draggable-helper
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -63,3 +63,3 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service'; | ||
updateMovedElementStyle: () => void; | ||
isCloned: boolean; | ||
_isMovingElementCloned: boolean; | ||
} | ||
@@ -66,0 +66,0 @@ declare type EventPosition2 = { |
/*! | ||
* draggable-helper v6.0.0 | ||
* draggable-helper v6.0.1 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -16,5 +16,5 @@ * Homepage: undefined | ||
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
@@ -250,4 +250,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
store.isCloned = Boolean(opt.clone && (!opt.onClone || opt.onClone(store, opt))); | ||
var movedElement = store.isCloned ? movedOrClonedElement.cloneNode(true) : movedOrClonedElement; | ||
store._isMovingElementCloned = Boolean(opt.clone && (!opt.onClone || opt.onClone(store, opt))); | ||
var movedElement = store._isMovingElementCloned ? movedOrClonedElement.cloneNode(true) : movedOrClonedElement; | ||
if (store._isMovingElementCloned) { | ||
movedElement.setAttribute('id', undefined); | ||
} | ||
var initialPosition = hp.getViewportPosition(movedOrClonedElement); // attach elements and initialPosition to store | ||
@@ -263,3 +268,3 @@ // 附加元素和初始位置到store | ||
var updateMovedElementStyle = function updateMovedElementStyle() { | ||
if (store.isCloned) { | ||
if (store._isMovingElementCloned) { | ||
store.movedOrClonedElement.parentElement.appendChild(movedElement); | ||
@@ -326,23 +331,23 @@ } | ||
else { | ||
// define the function to update moved element style | ||
// 定义更新移动元素样式的方法 | ||
var _updateMovedElementStyle = function _updateMovedElementStyle() { | ||
Object.assign(store.movedElement.style, { | ||
left: store.initialPosition.x + move.x + 'px', | ||
top: store.initialPosition.y + move.y + 'px' | ||
}); | ||
}; | ||
// define the function to update moved element style | ||
// 定义更新移动元素样式的方法 | ||
var _updateMovedElementStyle = function _updateMovedElementStyle() { | ||
Object.assign(store.movedElement.style, { | ||
left: store.initialPosition.x + move.x + 'px', | ||
top: store.initialPosition.y + move.y + 'px' | ||
}); | ||
}; | ||
store.updateMovedElementStyle = _updateMovedElementStyle; // call hook beforeMove | ||
store.updateMovedElementStyle = _updateMovedElementStyle; // call hook beforeMove | ||
if (opt.beforeMove && opt.beforeMove(store, opt) === false) { | ||
return; | ||
} // try to update moved element style | ||
// 尝试更新移动元素样式 | ||
if (opt.beforeMove && opt.beforeMove(store, opt) === false) { | ||
return; | ||
} // try to update moved element style | ||
// 尝试更新移动元素样式 | ||
if (!opt.updateMovedElementStyleManually) { | ||
store.updateMovedElementStyle(); | ||
} | ||
if (!opt.updateMovedElementStyleManually) { | ||
store.updateMovedElementStyle(); | ||
} | ||
} | ||
@@ -388,3 +393,3 @@ _edgeScroll.afterMove(store, opt); | ||
if (store.isCloned) { | ||
if (store._isMovingElementCloned) { | ||
hp.removeEl(movedElement); | ||
@@ -391,0 +396,0 @@ } |
@@ -63,3 +63,3 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service'; | ||
updateMovedElementStyle: () => void; | ||
isCloned: boolean; | ||
_isMovingElementCloned: boolean; | ||
} | ||
@@ -66,0 +66,0 @@ declare type EventPosition2 = { |
/*! | ||
* draggable-helper v6.0.0 | ||
* draggable-helper v6.0.1 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -10,5 +10,5 @@ * Homepage: undefined | ||
function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | ||
@@ -244,4 +244,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | ||
store.isCloned = Boolean(opt.clone && (!opt.onClone || opt.onClone(store, opt))); | ||
var movedElement = store.isCloned ? movedOrClonedElement.cloneNode(true) : movedOrClonedElement; | ||
store._isMovingElementCloned = Boolean(opt.clone && (!opt.onClone || opt.onClone(store, opt))); | ||
var movedElement = store._isMovingElementCloned ? movedOrClonedElement.cloneNode(true) : movedOrClonedElement; | ||
if (store._isMovingElementCloned) { | ||
movedElement.setAttribute('id', undefined); | ||
} | ||
var initialPosition = getViewportPosition(movedOrClonedElement); // attach elements and initialPosition to store | ||
@@ -257,3 +262,3 @@ // 附加元素和初始位置到store | ||
var updateMovedElementStyle = function updateMovedElementStyle() { | ||
if (store.isCloned) { | ||
if (store._isMovingElementCloned) { | ||
store.movedOrClonedElement.parentElement.appendChild(movedElement); | ||
@@ -320,23 +325,23 @@ } | ||
else { | ||
// define the function to update moved element style | ||
// 定义更新移动元素样式的方法 | ||
var _updateMovedElementStyle = function _updateMovedElementStyle() { | ||
Object.assign(store.movedElement.style, { | ||
left: store.initialPosition.x + move.x + 'px', | ||
top: store.initialPosition.y + move.y + 'px' | ||
}); | ||
}; | ||
// define the function to update moved element style | ||
// 定义更新移动元素样式的方法 | ||
var _updateMovedElementStyle = function _updateMovedElementStyle() { | ||
Object.assign(store.movedElement.style, { | ||
left: store.initialPosition.x + move.x + 'px', | ||
top: store.initialPosition.y + move.y + 'px' | ||
}); | ||
}; | ||
store.updateMovedElementStyle = _updateMovedElementStyle; // call hook beforeMove | ||
store.updateMovedElementStyle = _updateMovedElementStyle; // call hook beforeMove | ||
if (opt.beforeMove && opt.beforeMove(store, opt) === false) { | ||
return; | ||
} // try to update moved element style | ||
// 尝试更新移动元素样式 | ||
if (opt.beforeMove && opt.beforeMove(store, opt) === false) { | ||
return; | ||
} // try to update moved element style | ||
// 尝试更新移动元素样式 | ||
if (!opt.updateMovedElementStyleManually) { | ||
store.updateMovedElementStyle(); | ||
} | ||
if (!opt.updateMovedElementStyleManually) { | ||
store.updateMovedElementStyle(); | ||
} | ||
} | ||
@@ -382,3 +387,3 @@ _edgeScroll.afterMove(store, opt); | ||
if (store.isCloned) { | ||
if (store._isMovingElementCloned) { | ||
removeEl(movedElement); | ||
@@ -385,0 +390,0 @@ } |
@@ -63,3 +63,3 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service'; | ||
updateMovedElementStyle: () => void; | ||
isCloned: boolean; | ||
_isMovingElementCloned: boolean; | ||
} | ||
@@ -66,0 +66,0 @@ declare type EventPosition2 = { |
/*! | ||
* draggable-helper v6.0.0 | ||
* draggable-helper v6.0.1 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
@@ -7,14 +7,15 @@ * 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 l(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 l=E(a,n);if(l){if(l===u)continue;return l}}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=c(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 c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function s(){}function d(){}var p={};p[o]=function(){return this};var h=Object.getPrototypeOf,v=h&&h(h(S([])));v&&v!==t&&n.call(v,o)&&(p=v);var g=d.prototype=f.prototype=Object.create(p);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,l){var u=c(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,l)}),(function(e){r("throw",e,a,l)})):t.resolve(s).then((function(e){f.value=e,a(f)}),(function(e){return r("throw",e,a,l)}))}l(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=c(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 b(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 w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(b,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=d,d.constructor=s,d[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,d):(e.__proto__=d,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(l(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(w),!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 l=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(l&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)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),w(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;w(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 l=function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)};var c=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)||l(e)||i(e)||c()}; | ||
!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){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var n=r((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0}));t(n);var o=r((function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.default=e.exports,e.exports.__esModule=!0,t(r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}));t(o);var i=r((function(e){e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0}));t(i),t(r((function(e){function t(r,n,o){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=t=Reflect.get,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e,t,r){var n=i(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(r):o.value}},e.exports.default=e.exports,e.exports.__esModule=!0),t(r,n,o||r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})));var a=r((function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(r,n)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}));t(a),t(r((function(e){e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})));var l=r((function(e){function t(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(e.exports=t=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),t(r)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}));t(l),t(r((function(e){var t=l.default;e.exports=function(e,r){return!r||"object"!==t(r)&&"function"!=typeof r?n(e):r},e.exports.default=e.exports,e.exports.__esModule=!0})));var u=r((function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0}));t(u);var c=r((function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,l=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(l)throw o}}return i}},e.exports.default=e.exports,e.exports.__esModule=!0}));t(c);var s=r((function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n},e.exports.default=e.exports,e.exports.__esModule=!0}));t(s);var f=r((function(e){e.exports=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0}));t(f);var p=r((function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0}));t(p),t(r((function(e){e.exports=function(e,t){return u(e)||c(e,t)||f(e,t)||p()},e.exports.default=e.exports,e.exports.__esModule=!0}))),t(r((function(e){function t(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}e.exports=function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0}))),t(r((function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0})));r((function(e){var t=function(e){var t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new _(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return M()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var l=b(a,r);if(l){if(l===s)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=c(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,a),i}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var s={};function f(){}function p(){}function d(){}var h={};l(h,o,(function(){return this}));var v=Object.getPrototypeOf,g=v&&v(v(S([])));g&&g!==t&&r.call(g,o)&&(h=g);var m=d.prototype=f.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var n;this._invoke=function(o,i){function a(){return new t((function(n,a){!function n(o,i,a,l){var u=c(e[o],e,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,l)}),(function(e){n("throw",e,a,l)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,l)}))}l(u.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function b(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=c(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var o=n.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,s):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}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 E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(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 n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:M}}function M(){return{value:void 0,done:!0}}return p.prototype=d,l(m,"constructor",d),l(d,"constructor",p),p.displayName=l(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,l(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(x.prototype),l(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new x(u(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),l(m,a,"Generator"),l(m,o,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=S,_.prototype={constructor:_,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(E),!e)for(var t in this)"t"===t.charAt(0)&&r.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 n(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.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,s):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),s},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),E(r),s}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:S(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}));var d=r((function(e){e.exports=function(e){if(Array.isArray(e))return s(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));t(d);var h=r((function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.default=e.exports,e.exports.__esModule=!0}));t(h);var v=r((function(e){e.exports=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.")},e.exports.default=e.exports,e.exports.__esModule=!0}));t(v);var g=t(r((function(e){e.exports=function(e){return d(e)||h(e)||f(e)||v()},e.exports.default=e.exports,e.exports.__esModule=!0})));function m(e){return t=e,"[object Array]"===Object.prototype.toString.call(t)?e:[e]; | ||
/*! | ||
* helper-js v2.0.0 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
* Homepage: undefined | ||
* Released under the MIT License. | ||
*/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 d(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}}function p(e){if(null!==e.parentNode)return e.parentNode.removeChild(e)}function h(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 v=h;function g(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 m(e,t){e["original_".concat(t)]=e.getAttribute(t)}function y(e,t){var n=e["original_".concat(t)];null==n?e.removeAttribute(t):e.setAttribute(t,n)}function E(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function b(e,t){E(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 x(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 S(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 T(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,l=i.scrollTop,c=r-l,u=i.scrollLeft,f=n-u,s=+new Date;return function p(){if(!e.beforeEveryFrame||!1!==e.beforeEveryFrame(a)){var h=(new Date).getTime()-s;null!=r&&(i.scrollTop=parseInt(d(l,c,h,o))),null!=n&&(i.scrollLeft=parseInt(d(u,f,h,o))),h<o?t=requestAnimationFrame(p):(null!=r&&(i.scrollTop=r),null!=n&&(i.scrollLeft=n)),a++}}(),function(){cancelAnimationFrame(t)};function d(e,t,n,r){return e+t*(n/r)}} | ||
* helper-js v2.0.4 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
* Homepage: undefined | ||
* Released under the MIT License. | ||
*/ | ||
var t}function y(e,t){Object.keys(t).forEach((function(r){null==e[r]&&(e[r]=t[r])}))}function x(e,t){for(;;){if(null==e.parentElement)return!1;if(e.parentElement===t)return!0;e=e.parentElement}}function b(e){if(null!==e.parentNode)return e.parentNode.removeChild(e)}function w(e){var t=e.getBoundingClientRect(),r=t.top-document.documentElement.clientTop,n=t.bottom,o=t.left-document.documentElement.clientLeft,i=t.right;return{top:r,right:i,bottom:n,left:o,width:t.width||i-o,height:t.height||n-r,x:o,y:r}}var E=w;function _(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r&&r.withSelf?e:e.parentElement;n;){var o=t(n);if("break"===o)return;if(o)return n;n=n.parentElement}}function S(e,t){e["original_".concat(t)]=e.getAttribute(t)}function M(e,t){var r=e["original_".concat(t)];null==r?e.removeAttribute(t):e.setAttribute(t,r)}function T(e,t){return e.classList?e.classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(e.className)}function O(e,t){T(e,t)||(e.classList?e.classList.add(t):e.className+=" "+t)}function L(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];e.addEventListener?e.addEventListener.apply(e,[t,r].concat(o)):e.attachEvent&&e.attachEvent.apply(e,["on".concat(t),r].concat(o))}function C(e,t,r){for(var n=arguments.length,o=new Array(n>3?n-3:0),i=3;i<n;i++)o[i-3]=arguments[i];e.removeEventListener?e.removeEventListener.apply(e,[t,r].concat(o)):e.detachEvent&&e.detachEvent.apply(e,["on".concat(t),r].concat(o))}function A(e,t){var r=[e,t];return(document.elementsFromPoint||document.msElementsFromPoint||function(e,t){var r=[],n=void 0;do{n!==document.elementFromPoint(e,t)?(n=document.elementFromPoint(e,t),r.push(n),n.style.pointerEvents="none"):n=!1}while(n);return r.forEach((function(e){return e.style.pointerEvents="all"})),r}).apply(document,r)}function j(e){e.element||(e.element=document.scrollingElement||document.documentElement),null==e.duration&&(e.duration=0);var t,r=e.x,n=e.y,o=e.duration,i=e.element,a=0,l=i.scrollTop,u=n-l,c=i.scrollLeft,s=r-c,f=+new Date;return function d(){if(!e.beforeEveryFrame||!1!==e.beforeEveryFrame(a)){var h=(new Date).getTime()-f;null!=n&&(i.scrollTop=parseInt(p(l,u,h,o))),null!=r&&(i.scrollLeft=parseInt(p(c,s,h,o))),h<o?t=requestAnimationFrame(d):(null!=n&&(i.scrollTop=n),null!=r&&(i.scrollLeft=r)),a++}}(),function(){cancelAnimationFrame(t)};function p(e,t,r,n){return e+t*(r/n)}} | ||
/*! | ||
* drag-event-service v1.1.7 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
* Homepage: undefined | ||
* Released under the MIT License. | ||
*/var O={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]},M={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=L(r),l=a.args,c=a.mouseArgs,f=a.touchArgs,s=this._getStore(e),d=this,p=function(e){var r;if(d.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:p}),(o=w).call.apply(o,[null,e,O[t][0],p].concat([].concat(u(l),u(c)))),(i=w).call.apply(i,[null,e,O[t][1],p].concat([].concat(u(l),u(f))))},off:function(e,t,n,r){for(var o=L(r),i=o.args,a=o.mouseArgs,l=this._getStore(e),c=l.length-1;c>=0;c--){var f,s,d=l[c],p=d.handler,h=d.wrapper;if(n===p)(f=x).call.apply(f,[null,e,O[t][0],h].concat([].concat(u(i),u(a)))),(s=x).call.apply(s,[null,e,O[t][1],h].concat([].concat(u(i),u(a)))),l.splice(c,1)}}};function L(e){return e||(e={}),{args:e.args||[],mouseArgs:e.mouseArgs||[],touchArgs:e.touchArgs||[]}}function C(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 A(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 A(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 A(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 j,N,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"},Y={movedCount:0};function X(){j&&(j(),j=null),N&&(N(),N=null)}_.afterMove=function(e,t){if(t.edgeScroll){var n=t.edgeScrollTriggerMargin;X();var r,o,i,a,l,c,u,f={x:e.mouse.clientX,y:e.mouse.clientY};if("top_left_corner"===t.edgeScrollTriggerMode){var s=v(e.movedElement);f={x:s.x,y:s.y}}var p;if(t.edgeScrollSpecifiedContainerX)(p="function"==typeof t.edgeScrollSpecifiedContainerX?t.edgeScrollSpecifiedContainerX(e,t):t.edgeScrollSpecifiedContainerX)&&(c=[p]);c||(u=c=S(f.x,f.y));var h,g,m=C(c);try{for(m.s();!(h=m.n()).done;){var y=h.value;if(!i||d(i,y)){if(!r&&y.scrollWidth>y.clientWidth){var E=A(y);f.x<=E.left+n?L(y,"left")>10&&M(y,"x")&&(r=y,a="left"):f.x>=E.left+y.clientWidth-n&&L(y,"right")>10&&M(y,"x")&&(r=y,a="right")}if(r)break;i=y}}}catch(e){m.e(e)}finally{m.f()}if(i=null,c=null,t.edgeScrollSpecifiedContainerY)(g="function"==typeof t.edgeScrollSpecifiedContainerY?t.edgeScrollSpecifiedContainerY(e,t):t.edgeScrollSpecifiedContainerY)&&(c=[g]);c||(c=u||S(f.x,f.y));var b,w=C(c);try{for(w.s();!(b=w.n()).done;){var x=b.value;if(!i||d(i,x)){if(!o&&x.scrollHeight>x.clientHeight){var O=A(x);f.y<=O.top+n?L(x,"up")>10&&M(x,"y")&&(o=x,l="up"):f.y>=O.top+x.clientHeight-n&&L(x,"down")>10&&M(x,"y")&&(o=x,l="down")}if(o)break;i=x}}}catch(e){w.e(e)}finally{w.f()}r&&(j=T("left"===a?{x:0,element:r,duration:L(r,"left")/t.edgeScrollSpeed}:{x:r.scrollWidth-r.clientWidth,element:r,duration:L(r,"right")/t.edgeScrollSpeed})),o&&(N=T("up"===l?{y:0,element:o,duration:L(o,"up")/t.edgeScrollSpeed}:{y:o.scrollHeight-o.clientHeight,element:o,duration:L(o,"down")/t.edgeScrollSpeed}))}function M(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 L(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 A(e){var t=v(e);return e===(document.scrollingElement||document.documentElement)&&(t.top=0,t.left=0),t}},_.afterDrop=function(e,t){t.edgeScroll&&X()},e.default=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(n,P);var r=function(r,a){M.isTouch(r)?n.ontouchstart&&n.ontouchstart(r):n.onmousedown&&n.onmousedown(r);var l=r.target;if(!n.ingoreTags.includes(l.tagName)&&(!E(l,n.undraggableClassName)&&!g(l,(function(t){return!!E(t,n.undraggableClassName)||(t===e?"break":void 0)})))){(t=JSON.parse(JSON.stringify(Y))).startEvent=r,t.listenerElement=e,t.directTriggerElement=l,t.initialMouse=Object.assign({},a);var c=!1;if(n.getTriggerElement){var u=n.getTriggerElement(t.directTriggerElement,t);if(!u)return;t.triggerElement=u}else if(n.triggerClassName){var s,d,p=C(f(n.triggerClassName));try{var h=function(){var n=d.value;if(s=g(t.directTriggerElement,(function(t){return!!E(t,n)||(t===e?"break":void 0)}),{withSelf:!0}))return"break"};for(p.s();!(d=p.n()).done;){if("break"===h())break}}catch(e){p.e(e)}finally{p.f()}if(!s)return;t.triggerElement=s}else c=!0;t.movedOrClonedElement=n.getMovedOrClonedElement?n.getMovedOrClonedElement(t.directTriggerElement,t,n):e,t.movedOrClonedElement&&(c&&(t.triggerElement=t.movedOrClonedElement),n.triggerBySelf&&t.triggerElement!==t.directTriggerElement||(M.isTouch(r)||n.preventTextSelection&&r.preventDefault(),M.on(document,"move",o,{touchArgs:[{passive:!1}]}),M.on(window,"end",i)))}};M.on(e,"start",r,{touchArgs:[{passive:!0}]});var o=function(e,r){M.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,(M.isTouch(e)||n.preventTextSelection)&&e.preventDefault(),0===t.movedCount){if(n.minDisplacement){var a=Math.pow(i.x,2),l=Math.pow(i.y,2);if(Math.pow(a+l,.5)<n.minDisplacement)return}t.isCloned=Boolean(n.clone&&(!n.onClone||n.onClone(t,n)));var c=t.isCloned?o.cloneNode(!0):o,u=v(o);t.movedOrClonedElement=o,t.movedElement=c,t.initialPositionRelativeToViewport=u,t.initialPosition=u;if(t.updateMovedElementStyle=function(){t.isCloned&&t.movedOrClonedElement.parentElement.appendChild(c);var e=h(c),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 m(c,"style"),m(c,"class"),m(document.body,"style"),r)c.style[o]=r[o];b(c,n.draggingClassName),document.body.style.cursor="grabbing";var i=v(c);i.x!==u.x&&(u.x=u.x-(i.x-u.x),u.y=u.y-(i.y-u.y),c.style.left=u.x+"px",c.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),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()}_.afterMove(t,n),t.movedCount++,n.afterMove&&n.afterMove(t,n)},i=function e(r){if(M.isTouch(r)?n.ontouchend&&n.ontouchend(r):n.onmousedown&&n.onmousedown(r),M.off(document,"move",o,{touchArgs:[{passive:!1}]}),M.off(window,"end",e),0!==t.movedCount){t.endEvent=r;var i=t.movedElement,a=function(){y(i,"style"),y(i,"class"),y(document.body,"style"),t.isCloned&&p(i)};t.updateMovedElementStyle=a,n.beforeDrop&&!1===n.beforeDrop(t,n)||(n.updateMovedElementStyleManually||a(),_.afterDrop(t,n),n.afterDrop&&n.afterDrop(t,n))}},a=function(){M.off(e,"start",r,{touchArgs:[{passive:!0}]}),M.off(document,"move",o,{touchArgs:[{passive:!1}]}),M.off(window,"end",i)};return{destroy:a,options:n}},e.defaultOptions=P,e.initialStore=Y,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
* drag-event-service v1.1.7 | ||
* (c) phphe <phphe@outlook.com> (https://github.com/phphe) | ||
* Homepage: undefined | ||
* Released under the MIT License. | ||
*/var P={start:["mousedown","touchstart"],move:["mousemove","touchmove"],end:["mouseup","touchend"]},N={isTouch:function(e){return e.type&&e.type.startsWith("touch")},_getStore:function(e){return e._wrapperStore||(e._wrapperStore=[]),e._wrapperStore},on:function(e,t,r,n){var o,i,a=Y(n),l=a.args,u=a.mouseArgs,c=a.touchArgs,s=this._getStore(e),f=this,p=function(e){var n;if(f.isTouch(e))n={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(n={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 r.call(this,e,n)};s.push({handler:r,wrapper:p}),(o=L).call.apply(o,[null,e,P[t][0],p].concat([].concat(g(l),g(u)))),(i=L).call.apply(i,[null,e,P[t][1],p].concat([].concat(g(l),g(c))))},off:function(e,t,r,n){for(var o=Y(n),i=o.args,a=o.mouseArgs,l=this._getStore(e),u=l.length-1;u>=0;u--){var c,s,f=l[u],p=f.handler,d=f.wrapper;if(r===p)(c=C).call.apply(c,[null,e,P[t][0],d].concat([].concat(g(i),g(a)))),(s=C).call.apply(s,[null,e,P[t][1],d].concat([].concat(g(i),g(a)))),l.splice(u,1)}}};function Y(e){return e||(e={}),{args:e.args||[],mouseArgs:e.mouseArgs||[],touchArgs:e.touchArgs||[]}}function X(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var k={afterFirstMove:function(e,t){},afterMove:function(e,t){},afterDrop:function(e,t){}};var I,D,R={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"},G={movedCount:0};function H(){I&&(I(),I=null),D&&(D(),D=null)}k.afterMove=function(e,t){if(t.edgeScroll){var r=t.edgeScrollTriggerMargin;H();var n,o,i,a,l,u,c,s={x:e.mouse.clientX,y:e.mouse.clientY};if("top_left_corner"===t.edgeScrollTriggerMode){var f=E(e.movedElement);s={x:f.x,y:f.y}}var p;if(t.edgeScrollSpecifiedContainerX)(p="function"==typeof t.edgeScrollSpecifiedContainerX?t.edgeScrollSpecifiedContainerX(e,t):t.edgeScrollSpecifiedContainerX)&&(u=[p]);u||(c=u=A(s.x,s.y));var d,h,v=X(u);try{for(v.s();!(d=v.n()).done;){var g=d.value;if(!i||x(i,g)){if(!n&&g.scrollWidth>g.clientWidth){var m=T(g);s.x<=m.left+r?M(g,"left")>10&&S(g,"x")&&(n=g,a="left"):s.x>=m.left+g.clientWidth-r&&M(g,"right")>10&&S(g,"x")&&(n=g,a="right")}if(n)break;i=g}}}catch(e){v.e(e)}finally{v.f()}if(i=null,u=null,t.edgeScrollSpecifiedContainerY)(h="function"==typeof t.edgeScrollSpecifiedContainerY?t.edgeScrollSpecifiedContainerY(e,t):t.edgeScrollSpecifiedContainerY)&&(u=[h]);u||(u=c||A(s.x,s.y));var y,b=X(u);try{for(b.s();!(y=b.n()).done;){var w=y.value;if(!i||x(i,w)){if(!o&&w.scrollHeight>w.clientHeight){var _=T(w);s.y<=_.top+r?M(w,"up")>10&&S(w,"y")&&(o=w,l="up"):s.y>=_.top+w.clientHeight-r&&M(w,"down")>10&&S(w,"y")&&(o=w,l="down")}if(o)break;i=w}}}catch(e){b.e(e)}finally{b.f()}n&&(I=j("left"===a?{x:0,element:n,duration:M(n,"left")/t.edgeScrollSpeed}:{x:n.scrollWidth-n.clientWidth,element:n,duration:M(n,"right")/t.edgeScrollSpeed})),o&&(D=j("up"===l?{y:0,element:o,duration:M(o,"up")/t.edgeScrollSpeed}:{y:o.scrollHeight-o.clientHeight,element:o,duration:M(o,"down")/t.edgeScrollSpeed}))}function S(e,t){var r=getComputedStyle(e),n="overflow-".concat(t);return e===(document.scrollingElement||document.documentElement)?"visible"===r[n]||"auto"===r[n]||"scroll"===r[n]:"auto"===r[n]||"scroll"===r[n]}function M(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 T(e){var t=E(e);return e===(document.scrollingElement||document.documentElement)&&(t.top=0,t.left=0),t}},k.afterDrop=function(e,t){t.edgeScroll&&H()},e.default=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};y(r,R);var n=function(n,a){N.isTouch(n)?r.ontouchstart&&r.ontouchstart(n):r.onmousedown&&r.onmousedown(n);var l=n.target;if(!r.ingoreTags.includes(l.tagName)&&(!T(l,r.undraggableClassName)&&!_(l,(function(t){return!!T(t,r.undraggableClassName)||(t===e?"break":void 0)})))){(t=JSON.parse(JSON.stringify(G))).startEvent=n,t.listenerElement=e,t.directTriggerElement=l,t.initialMouse=Object.assign({},a);var u=!1;if(r.getTriggerElement){var c=r.getTriggerElement(t.directTriggerElement,t);if(!c)return;t.triggerElement=c}else if(r.triggerClassName){var s,f,p=X(m(r.triggerClassName));try{var d=function(){var r=f.value;if(s=_(t.directTriggerElement,(function(t){return!!T(t,r)||(t===e?"break":void 0)}),{withSelf:!0}))return"break"};for(p.s();!(f=p.n()).done;){if("break"===d())break}}catch(e){p.e(e)}finally{p.f()}if(!s)return;t.triggerElement=s}else u=!0;t.movedOrClonedElement=r.getMovedOrClonedElement?r.getMovedOrClonedElement(t.directTriggerElement,t,r):e,t.movedOrClonedElement&&(u&&(t.triggerElement=t.movedOrClonedElement),r.triggerBySelf&&t.triggerElement!==t.directTriggerElement||(N.isTouch(n)||r.preventTextSelection&&n.preventDefault(),N.on(document,"move",o,{touchArgs:[{passive:!1}]}),N.on(window,"end",i)))}};N.on(e,"start",n,{touchArgs:[{passive:!0}]});var o=function(e,n){N.isTouch(e)?r.ontouchmove&&r.ontouchmove(e):r.onmousemove&&r.onmousemove(e);var o=t.movedOrClonedElement,i=t.move={x:n.clientX-t.initialMouse.clientX,y:n.clientY-t.initialMouse.clientY};if(t.moveEvent=e,t.mouse=n,(N.isTouch(e)||r.preventTextSelection)&&e.preventDefault(),0===t.movedCount){if(r.minDisplacement){var a=Math.pow(i.x,2),l=Math.pow(i.y,2);if(Math.pow(a+l,.5)<r.minDisplacement)return}t._isMovingElementCloned=Boolean(r.clone&&(!r.onClone||r.onClone(t,r)));var u=t._isMovingElementCloned?o.cloneNode(!0):o;t._isMovingElementCloned&&u.setAttribute("id",void 0);var c=E(o);t.movedOrClonedElement=o,t.movedElement=u,t.initialPositionRelativeToViewport=c,t.initialPosition=c;if(t.updateMovedElementStyle=function(){t._isMovingElementCloned&&t.movedOrClonedElement.parentElement.appendChild(u);var e=w(u),n={width:"".concat(Math.ceil(e.width),"px"),height:"".concat(Math.ceil(e.height),"px"),zIndex:9999,opacity:.8,position:"fixed",left:c.x+"px",top:c.y+"px",pointerEvents:"none"};for(var o in S(u,"style"),S(u,"class"),S(document.body,"style"),n)u.style[o]=n[o];O(u,r.draggingClassName),document.body.style.cursor="grabbing";var i=E(u);i.x!==c.x&&(c.x=c.x-(i.x-c.x),c.y=c.y-(i.y-c.y),u.style.left=c.x+"px",u.style.top=c.y+"px")},r.beforeFirstMove&&!1===r.beforeFirstMove(t,r))return;if(r.beforeMove&&!1===r.beforeMove(t,r))return;r.updateMovedElementStyleManually||t.updateMovedElementStyle(),k.afterFirstMove(t,r),r.afterFirstMove&&r.afterFirstMove(t,r)}else{if(t.updateMovedElementStyle=function(){Object.assign(t.movedElement.style,{left:t.initialPosition.x+i.x+"px",top:t.initialPosition.y+i.y+"px"})},r.beforeMove&&!1===r.beforeMove(t,r))return;r.updateMovedElementStyleManually||t.updateMovedElementStyle()}k.afterMove(t,r),t.movedCount++,r.afterMove&&r.afterMove(t,r)},i=function e(n){if(N.isTouch(n)?r.ontouchend&&r.ontouchend(n):r.onmousedown&&r.onmousedown(n),N.off(document,"move",o,{touchArgs:[{passive:!1}]}),N.off(window,"end",e),0!==t.movedCount){t.endEvent=n;var i=t.movedElement,a=function(){M(i,"style"),M(i,"class"),M(document.body,"style"),t._isMovingElementCloned&&b(i)};t.updateMovedElementStyle=a,r.beforeDrop&&!1===r.beforeDrop(t,r)||(r.updateMovedElementStyleManually||a(),k.afterDrop(t,r),r.afterDrop&&r.afterDrop(t,r))}},a=function(){N.off(e,"start",n,{touchArgs:[{passive:!0}]}),N.off(document,"move",o,{touchArgs:[{passive:!1}]}),N.off(window,"end",i)};return{destroy:a,options:r}},e.defaultOptions=R,e.initialStore=G,Object.defineProperty(e,"__esModule",{value:!0})})); |
@@ -63,3 +63,3 @@ import { EventPosition, MouseOrTouchEvent } from 'drag-event-service'; | ||
updateMovedElementStyle: () => void; | ||
isCloned: boolean; | ||
_isMovingElementCloned: boolean; | ||
} | ||
@@ -66,0 +66,0 @@ declare type EventPosition2 = { |
{ | ||
"name": "draggable-helper", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "To simplify drag and drop.", | ||
@@ -33,5 +33,6 @@ "main": "dist/cjs/index.js", | ||
"drag-event-service": "^1.1.7", | ||
"helper-js": "^2.0.0" | ||
"helper-js": "^2.0.4", | ||
"tslib": "^1.11.2" | ||
}, | ||
"license": "MIT" | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157766
3317
4
+ Addedtslib@^1.11.2
+ Addedtslib@1.14.1(transitive)
Updatedhelper-js@^2.0.4