Files
MYSOPHAL/public/lib/sortable.min.js
2025-11-09 10:02:18 +01:00

12 lines
35 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(function(e){var t={};function r(n){if(t[n]){return t[n].exports}var i=t[n]={i:n,l:false,exports:{}};e[n].call(i.exports,i,i.exports,r);i.l=true;return i.exports}r.m=e;r.c=t;r.d=function(e,t,n){if(!r.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}};r.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};r.t=function(e,t){if(t&1)e=r(e);if(t&8)return e;if(t&4&&typeof e==="object"&&e&&e.__esModule)return e;var n=Object.create(null);r.r(n);Object.defineProperty(n,"default",{enumerable:true,value:e});if(t&2&&typeof e!="string")for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n};r.n=function(e){var t=e&&e.__esModule?function t(){return e["default"]}:function t(){return e};r.d(t,"a",t);return t};r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};r.p="";return r(r.s=553)})({10:function(e,t,r){try{var n=r(7);if(typeof n.inherits!=="function")throw"";e.exports=n.inherits}catch(t){e.exports=r(11)}},11:function(e,t){if(typeof Object.create==="function"){e.exports=function e(t,r){t.super_=r;t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}})}}else{e.exports=function e(t,r){t.super_=r;var n=function(){};n.prototype=r.prototype;t.prototype=new n;t.prototype.constructor=t}}},12:function(e,t,r){"use strict";(function(t){var n=r(13);
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/function i(e,t){if(e===t){return 0}var r=e.length;var n=t.length;for(var i=0,o=Math.min(r,n);i<o;++i){if(e[i]!==t[i]){r=e[i];n=t[i];break}}if(r<n){return-1}if(n<r){return 1}return 0}function o(e){if(t.Buffer&&typeof t.Buffer.isBuffer==="function"){return t.Buffer.isBuffer(e)}return!!(e!=null&&e._isBuffer)}var a=r(7);var f=Object.prototype.hasOwnProperty;var u=Array.prototype.slice;var l=function(){return function e(){}.name==="foo"}();function s(e){return Object.prototype.toString.call(e)}function c(e){if(o(e)){return false}if(typeof t.ArrayBuffer!=="function"){return false}if(typeof ArrayBuffer.isView==="function"){return ArrayBuffer.isView(e)}if(!e){return false}if(e instanceof DataView){return true}if(e.buffer&&e.buffer instanceof ArrayBuffer){return true}return false}var p=e.exports=b;var d=/\s*function\s+([^\(\s]*)\s*/;function g(e){if(!a.isFunction(e)){return}if(l){return e.name}var t=e.toString();var r=t.match(d);return r&&r[1]}p.AssertionError=function e(t){this.name="AssertionError";this.actual=t.actual;this.expected=t.expected;this.operator=t.operator;if(t.message){this.message=t.message;this.generatedMessage=false}else{this.message=m(this);this.generatedMessage=true}var r=t.stackStartFunction||y;if(Error.captureStackTrace){Error.captureStackTrace(this,r)}else{var n=new Error;if(n.stack){var i=n.stack;var o=g(r);var a=i.indexOf("\n"+o);if(a>=0){var f=i.indexOf("\n",a+1);i=i.substring(f+1)}this.stack=i}}};a.inherits(p.AssertionError,Error);function v(e,t){if(typeof e==="string"){return e.length<t?e:e.slice(0,t)}else{return e}}function h(e){if(l||!a.isFunction(e)){return a.inspect(e)}var t=g(e);var r=t?": "+t:"";return"[Function"+r+"]"}function m(e){return v(h(e.actual),128)+" "+e.operator+" "+v(h(e.expected),128)}function y(e,t,r,n,i){throw new p.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}p.fail=y;function b(e,t){if(!e)y(e,true,t,"==",p.ok)}p.ok=b;p.equal=function e(t,r,n){if(t!=r)y(t,r,n,"==",p.equal)};p.notEqual=function e(t,r,n){if(t==r){y(t,r,n,"!=",p.notEqual)}};p.deepEqual=function e(t,r,n){if(!w(t,r,false)){y(t,r,n,"deepEqual",p.deepEqual)}};p.deepStrictEqual=function e(t,r,n){if(!w(t,r,true)){y(t,r,n,"deepStrictEqual",p.deepStrictEqual)}};function w(e,t,r,n){if(e===t){return true}else if(o(e)&&o(t)){return i(e,t)===0}else if(a.isDate(e)&&a.isDate(t)){return e.getTime()===t.getTime()}else if(a.isRegExp(e)&&a.isRegExp(t)){return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase}else if((e===null||typeof e!=="object")&&(t===null||typeof t!=="object")){return r?e===t:e==t}else if(c(e)&&c(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array)){return i(new Uint8Array(e.buffer),new Uint8Array(t.buffer))===0}else if(o(e)!==o(t)){return false}else{n=n||{actual:[],expected:[]};var f=n.actual.indexOf(e);if(f!==-1){if(f===n.expected.indexOf(t)){return true}}n.actual.push(e);n.expected.push(t);return O(e,t,r,n)}}function E(e){return Object.prototype.toString.call(e)=="[object Arguments]"}function O(e,t,r,n){if(e===null||e===undefined||t===null||t===undefined)return false;if(a.isPrimitive(e)||a.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return false;var i=E(e);var o=E(t);if(i&&!o||!i&&o)return false;if(i){e=u.call(e);t=u.call(t);return w(e,t,r)}var f=D(e);var l=D(t);var s,c;if(f.length!==l.length)return false;f.sort();l.sort();for(c=f.length-1;c>=0;c--){if(f[c]!==l[c])return false}for(c=f.length-1;c>=0;c--){s=f[c];if(!w(e[s],t[s],r,n))return false}return true}p.notDeepEqual=function e(t,r,n){if(w(t,r,false)){y(t,r,n,"notDeepEqual",p.notDeepEqual)}};p.notDeepStrictEqual=T;function T(e,t,r){if(w(e,t,true)){y(e,t,r,"notDeepStrictEqual",T)}}p.strictEqual=function e(t,r,n){if(t!==r){y(t,r,n,"===",p.strictEqual)}};p.notStrictEqual=function e(t,r,n){if(t===r){y(t,r,n,"!==",p.notStrictEqual)}};function x(e,t){if(!e||!t){return false}if(Object.prototype.toString.call(t)=="[object RegExp]"){return t.test(e)}try{if(e instanceof t){return true}}catch(e){}if(Error.isPrototypeOf(t)){return false}return t.call({},e)===true}function j(e){var t;try{e()}catch(e){t=e}return t}function S(e,t,r,n){var i;if(typeof t!=="function"){throw new TypeError('"block" argument must be a function')}if(typeof r==="string"){n=r;r=null}i=j(t);n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:".");if(e&&!i){y(i,r,"Missing expected exception"+n)}var o=typeof n==="string";var f=!e&&a.isError(i);var u=!e&&i&&!r;if(f&&o&&x(i,r)||u){y(i,r,"Got unwanted exception"+n)}if(e&&i&&r&&!x(i,r)||!e&&i){throw i}}p.throws=function(e,t,r){S(true,e,t,r)};p.doesNotThrow=function(e,t,r){S(false,e,t,r)};p.ifError=function(e){if(e)throw e};function C(e,t){if(!e)y(e,true,t,"==",C)}p.strict=n(C,p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual});p.strict.strict=p.strict;var D=Object.keys||function(e){var t=[];for(var r in e){if(f.call(e,r))t.push(r)}return t}}).call(this,r(6))},13:function(e,t,r){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var n=Object.getOwnPropertySymbols;var i=Object.prototype.hasOwnProperty;var o=Object.prototype.propertyIsEnumerable;function a(e){if(e===null||e===undefined){throw new TypeError("Object.assign cannot be called with null or undefined")}return Object(e)}function f(){try{if(!Object.assign){return false}var e=new String("abc");e[5]="de";if(Object.getOwnPropertyNames(e)[0]==="5"){return false}var t={};for(var r=0;r<10;r++){t["_"+String.fromCharCode(r)]=r}var n=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if(n.join("")!=="0123456789"){return false}var i={};"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e}));if(Object.keys(Object.assign({},i)).join("")!=="abcdefghijklmnopqrst"){return false}return true}catch(e){return false}}e.exports=f()?Object.assign:function(e,t){var r;var f=a(e);var u;for(var l=1;l<arguments.length;l++){r=Object(arguments[l]);for(var s in r){if(i.call(r,s)){f[s]=r[s]}}if(n){u=n(r);for(var c=0;c<u.length;c++){if(o.call(r,u[c])){f[u[c]]=r[u[c]]}}}}return f}},5:function(e,t,r){(function(t){var n=r(7);var i=r(12);function o(){return(new Date).getTime()}var a=Array.prototype.slice;var f;var u={};if(typeof t!=="undefined"&&t.console){f=t.console}else if(typeof window!=="undefined"&&window.console){f=window.console}else{f={}}var l=[[g,"log"],[v,"info"],[h,"warn"],[m,"error"],[y,"time"],[b,"timeEnd"],[w,"trace"],[E,"dir"],[O,"assert"]];for(var s=0;s<l.length;s++){var c=l[s];var p=c[0];var d=c[1];if(!f[d]){f[d]=p}}e.exports=f;function g(){}function v(){f.log.apply(f,arguments)}function h(){f.log.apply(f,arguments)}function m(){f.warn.apply(f,arguments)}function y(e){u[e]=o()}function b(e){var t=u[e];if(!t){throw new Error("No such label: "+e)}delete u[e];var r=o()-t;f.log(e+": "+r+"ms")}function w(){var e=new Error;e.name="Trace";e.message=n.format.apply(null,arguments);f.error(e.stack)}function E(e){f.log(n.inspect(e)+"\n")}function O(e){if(!e){var t=a.call(arguments,1);i.ok(false,n.format.apply(null,t))}}}).call(this,r(6))},553:function(e,t,r){window.sortable=r(554)},554:function(e,t,r){(function(n){var i;!(i=function(){"use strict";function e(e,t,r){if(r===undefined){return e&&e.h5s&&e.h5s.data&&e.h5s.data[t]}else{e.h5s=e.h5s||{};e.h5s.data=e.h5s.data||{};e.h5s.data[t]=r}}function t(e){if(e.h5s){delete e.h5s.data}}var r=function(e,t){if(!(e instanceof NodeList||e instanceof HTMLCollection||e instanceof Array)){throw new Error("You must provide a nodeList/HTMLCollection/Array of elements to be filtered.")}if(typeof t!=="string"){return Array.from(e)}return Array.from(e).filter((function(e){return e.nodeType===1&&e.matches(t)}))};var i=new Map;var o=function(){function e(){this._config=new Map;this._placeholder=undefined;this._data=new Map}Object.defineProperty(e.prototype,"config",{get:function(){var e={};this._config.forEach((function(t,r){e[r]=t}));return e},set:function(e){if(typeof e!=="object"){throw new Error("You must provide a valid configuration object to the config setter.")}var t=Object.assign({},e);this._config=new Map(Object.entries(t))},enumerable:false,configurable:true});e.prototype.setConfig=function(e,t){if(!this._config.has(e)){throw new Error("Trying to set invalid configuration item: "+e)}this._config.set(e,t)};e.prototype.getConfig=function(e){if(!this._config.has(e)){throw new Error("Invalid configuration item requested: "+e)}return this._config.get(e)};Object.defineProperty(e.prototype,"placeholder",{get:function(){return this._placeholder},set:function(e){if(!(e instanceof HTMLElement)&&e!==null){throw new Error("A placeholder must be an html element or null.")}this._placeholder=e},enumerable:false,configurable:true});e.prototype.setData=function(e,t){if(typeof e!=="string"){throw new Error("The key must be a string.")}this._data.set(e,t)};e.prototype.getData=function(e){if(typeof e!=="string"){throw new Error("The key must be a string.")}return this._data.get(e)};e.prototype.deleteData=function(e){if(typeof e!=="string"){throw new Error("The key must be a string.")}return this._data.delete(e)};return e}();var a=function(e){if(!(e instanceof HTMLElement)){throw new Error("Please provide a sortable to the store function.")}if(!i.has(e)){i.set(e,new o)}return i.get(e)};function f(e,t,r){if(e instanceof Array){for(var n=0;n<e.length;++n){f(e[n],t,r)}return}e.addEventListener(t,r);a(e).setData("event"+t,r)}function u(e,t){if(e instanceof Array){for(var r=0;r<e.length;++r){u(e[r],t)}return}e.removeEventListener(t,a(e).getData("event"+t));a(e).deleteData("event"+t)}function l(e,t,r){if(e instanceof Array){for(var n=0;n<e.length;++n){l(e[n],t,r)}return}e.setAttribute(t,r)}function s(e,t){if(e instanceof Array){for(var r=0;r<e.length;++r){s(e[r],t)}return}e.removeAttribute(t)}var c=function(e){if(!e.parentElement||e.getClientRects().length===0){throw new Error("target element must be part of the dom")}var t=e.getClientRects()[0];return{left:t.left+window.pageXOffset,right:t.right+window.pageXOffset,top:t.top+window.pageYOffset,bottom:t.bottom+window.pageYOffset}};var p=function(e,t){if(t===void 0){t=0}var r;return function(){var n=[];for(var i=0;i<arguments.length;i++){n[i]=arguments[i]}clearTimeout(r);r=setTimeout((function(){e.apply(void 0,n)}),t)}};var d=function(e,t){if(!(e instanceof HTMLElement)||!(t instanceof NodeList||t instanceof HTMLCollection||t instanceof Array)){throw new Error("You must provide an element and a list of elements.")}return Array.from(t).indexOf(e)};var g=function(e){if(!(e instanceof HTMLElement)){throw new Error("Element is not a node element.")}return e.parentNode!==null};var v=function(e,t,r){if(!(e instanceof HTMLElement)||!(e.parentElement instanceof HTMLElement)){throw new Error("target and element must be a node")}e.parentElement.insertBefore(t,r==="before"?e:e.nextElementSibling)};var h=function(e,t){return v(e,t,"before")};var m=function(e,t){return v(e,t,"after")};var y=function(t,n,i){if(n===void 0){n=function(e,t){return e}}if(i===void 0){i=function(e){return e}}if(!(t instanceof HTMLElement)||!t.isSortable===true){throw new Error("You need to provide a sortableContainer to be serialized.")}if(typeof n!=="function"||typeof i!=="function"){throw new Error("You need to provide a valid serializer for items and the container.")}var o=e(t,"opts");var a=o.items;var f=r(t.children,a);var u=f.map((function(e){return{parent:t,node:e,html:e.outerHTML,index:d(e,f)}}));var l={node:t,itemCount:u.length};return{container:i(l),items:u.map((function(e){return n(e,t)}))}};var b=function(e,t,r){var n;if(r===void 0){r="sortable-placeholder"}if(!(e instanceof HTMLElement)){throw new Error("You must provide a valid element as a sortable.")}if(!(t instanceof HTMLElement)&&t!==undefined){throw new Error("You must provide a valid element as a placeholder or set ot to undefined.")}if(t===undefined){if(["UL","OL"].includes(e.tagName)){t=document.createElement("li")}else if(["TABLE","TBODY"].includes(e.tagName)){t=document.createElement("tr");t.innerHTML='<td colspan="100"></td>'}else{t=document.createElement("div")}}if(typeof r==="string"){(n=t.classList).add.apply(n,r.split(" "))}return t};var w=function(e){if(!(e instanceof HTMLElement)){throw new Error("You must provide a valid dom element")}var t=window.getComputedStyle(e);if(t.getPropertyValue("box-sizing")==="border-box"){return parseInt(t.getPropertyValue("height"),10)}return["height","padding-top","padding-bottom"].map((function(e){var r=parseInt(t.getPropertyValue(e),10);return isNaN(r)?0:r})).reduce((function(e,t){return e+t}))};var E=function(e){if(!(e instanceof HTMLElement)){throw new Error("You must provide a valid dom element")}var t=window.getComputedStyle(e);return["width","padding-left","padding-right"].map((function(e){var r=parseInt(t.getPropertyValue(e),10);return isNaN(r)?0:r})).reduce((function(e,t){return e+t}))};var O=function(e,t){if(!(e instanceof Array)){throw new Error("You must provide a Array of HTMLElements to be filtered.")}if(typeof t!=="string"){return e}return e.filter((function(e){return e.querySelector(t)instanceof HTMLElement||e.shadowRoot&&e.shadowRoot.querySelector(t)instanceof HTMLElement})).map((function(e){return e.querySelector(t)||e.shadowRoot&&e.shadowRoot.querySelector(t)}))};var T=function(e){return e.composedPath&&e.composedPath()[0]||e.target};var x=function(e,t,r){return{element:e,posX:r.pageX-t.left,posY:r.pageY-t.top}};var j=function(e,t,r){if(!(e instanceof Event)){throw new Error("setDragImage requires a DragEvent as the first argument.")}if(!(t instanceof HTMLElement)){throw new Error("setDragImage requires the dragged element as the second argument.")}if(!r){r=x}if(e.dataTransfer&&e.dataTransfer.setDragImage){var n=c(t);var i=r(t,n,e);if(!(i.element instanceof HTMLElement)||typeof i.posX!=="number"||typeof i.posY!=="number"){throw new Error("The customDragImage function you provided must return and object with the properties element[string], posX[integer], posY[integer].")}e.dataTransfer.effectAllowed="copyMove";e.dataTransfer.setData("text/plain",T(e).id);e.dataTransfer.setDragImage(i.element,i.posX,i.posY)}};var S=function(e,t){if(e.isSortable===true){var r=a(e).getConfig("acceptFrom");if(r!==null&&r!==false&&typeof r!=="string"){throw new Error('HTML5Sortable: Wrong argument, "acceptFrom" must be "null", "false", or a valid selector string.')}if(r!==null){return r!==false&&r.split(",").filter((function(e){return e.length>0&&t.matches(e)})).length>0}if(e===t){return true}if(a(e).getConfig("connectWith")!==undefined&&a(e).getConfig("connectWith")!==null){return a(e).getConfig("connectWith")===a(t).getConfig("connectWith")}}return false};var C={items:null,connectWith:null,disableIEFix:null,acceptFrom:null,copy:false,placeholder:null,placeholderClass:"sortable-placeholder",draggingClass:"sortable-dragging",hoverClass:false,dropTargetContainerClass:false,debounce:0,throttleTime:100,maxItems:0,itemSerializer:undefined,containerSerializer:undefined,customDragImage:null,orientation:"vertical"};function D(e,t){var r=this;if(t===void 0){t=250}if(typeof e!=="function"){throw new Error("You must provide a function as the first argument for throttle.")}if(typeof t!=="number"){throw new Error("You must provide a number as the second argument for throttle.")}var n=null;return function(){var i=[];for(var o=0;o<arguments.length;o++){i[o]=arguments[o]}var a=Date.now();if(n===null||a-n>=t){n=a;e.apply(r,i)}}}var A=function(e,t){if(typeof a(e).getConfig("hoverClass")==="string"){var n=a(e).getConfig("hoverClass").split(" ");if(t===true){f(e,"mousemove",D((function(t){if(t.buttons===0){r(e.children,a(e).getConfig("items")).forEach((function(e){var r,i;if(e!==t.target){(r=e.classList).remove.apply(r,n)}else{(i=e.classList).add.apply(i,n)}}))}}),a(e).getConfig("throttleTime")));f(e,"mouseleave",(function(){r(e.children,a(e).getConfig("items")).forEach((function(e){var t;(t=e.classList).remove.apply(t,n)}))}))}else{u(e,"mousemove");u(e,"mouseleave")}}};var L;var P;var M;var _;var q;var I;var H;var z;var k;var F=function(e){u(e,"dragstart");u(e,"dragend");u(e,"dragover");u(e,"dragenter");u(e,"drop");u(e,"mouseenter");u(e,"mouseleave")};var N=function(e,t){if(e){u(e,"dragleave")}if(t&&t!==e){u(t,"dragleave")}};var Y=function(e,t){var r=e;if(a(t).getConfig("copy")===true){r=e.cloneNode(true);l(r,"aria-copied","true");e.parentElement.appendChild(r);r.style.display="none";r.oldDisplay=e.style.display}return r};var B=function(e){t(e);s(e,"aria-dropeffect")};var R=function(e){s(e,"aria-grabbed");s(e,"aria-copied");s(e,"draggable");s(e,"role")};function U(e,t){if(t.composedPath){return t.composedPath().find((function(e){return e.isSortable}))}while(e.isSortable!==true){e=e.parentElement}return e}function W(t,n){var i=e(t,"opts");var o=r(t.children,i.items);var a=o.filter((function(e){return e.contains(n)||e.shadowRoot&&e.shadowRoot.contains(n)}));return a.length>0?a[0]:n}var X=function(t){var n=e(t,"opts")||{};var i=r(t.children,n.items);var o=O(i,n.handle);u(t,"dragover");u(t,"dragenter");u(t,"dragstart");u(t,"dragend");u(t,"drop");B(t);u(o,"mousedown");F(i);R(i);N(_,z);t.isSortable=false};var V=function(t){var n=e(t,"opts");var i=r(t.children,n.items);var o=O(i,n.handle);l(t,"aria-dropeffect","move");e(t,"_disabled","false");l(o,"draggable","true");if(n.disableIEFix===false){var a=(document||window.document).createElement("span");if(typeof a.dragDrop==="function"){f(o,"mousedown",(function(){if(i.indexOf(this)!==-1){this.dragDrop()}else{var e=this.parentElement;while(i.indexOf(e)===-1){e=e.parentElement}e.dragDrop()}}))}}};var J=function(t){var n=e(t,"opts");var i=r(t.children,n.items);var o=O(i,n.handle);l(t,"aria-dropeffect","none");e(t,"_disabled","true");l(o,"draggable","false");u(o,"mousedown")};var $=function(t){var n=e(t,"opts");var i=r(t.children,n.items);var o=O(i,n.handle);e(t,"_disabled","false");F(i);N(_,z);u(o,"mousedown");u(t,"dragover");u(t,"dragenter");u(t,"drop")};function G(t,o){var u=String(o);o=o||{};if(typeof t==="string"){t=document.querySelectorAll(t)}if(t instanceof HTMLElement){t=[t]}t=Array.prototype.slice.call(t);if(/serialize/.test(u)){return t.map((function(t){var r=e(t,"opts");return y(t,r.itemSerializer,r.containerSerializer)}))}t.forEach((function(t){if(/enable|disable|destroy/.test(u)){return G[u](t)}["connectWith","disableIEFix"].forEach((function(e){if(Object.prototype.hasOwnProperty.call(o,e)&&o[e]!==null){n.warn('HTML5Sortable: You are using the deprecated configuration "'+e+'". This will be removed in an upcoming version, make sure to migrate to the new options when updating.')}}));o=Object.assign({},C,a(t).config,o);a(t).config=o;e(t,"opts",o);t.isSortable=true;$(t);var s=r(t.children,o.items);var v;if(o.placeholder!==null&&o.placeholder!==undefined){var y=document.createElement(t.tagName);if(o.placeholder instanceof HTMLElement){y.appendChild(o.placeholder)}else{y.innerHTML=o.placeholder}v=y.children[0]}a(t).placeholder=b(t,v,o.placeholderClass);e(t,"items",o.items);if(o.acceptFrom){e(t,"acceptFrom",o.acceptFrom)}else if(o.connectWith){e(t,"connectWith",o.connectWith)}V(t);l(s,"role","option");l(s,"aria-grabbed","false");A(t,true);f(t,"dragstart",(function(e){var t=T(e);if(t.isSortable===true){return}e.stopImmediatePropagation();if(o.handle&&!t.matches(o.handle)||t.getAttribute("draggable")==="false"){return}var n=U(t,e);var i=W(n,t);H=r(n.children,o.items);q=H.indexOf(i);I=d(i,n.children);_=n;j(e,i,o.customDragImage);P=w(i);M=E(i);i.classList.add(o.draggingClass);L=Y(i,n);l(L,"aria-grabbed","true");n.dispatchEvent(new CustomEvent("sortstart",{detail:{origin:{elementIndex:I,index:q,container:_},item:L,originalTarget:t}}))}));f(t,"dragenter",(function(n){var i=T(n);var u=U(i,n);if(u&&u!==z){k=r(u.children,e(u,"items")).filter((function(e){return e!==a(t).placeholder}));if(o.dropTargetContainerClass){u.classList.add(o.dropTargetContainerClass)}u.dispatchEvent(new CustomEvent("sortenter",{detail:{origin:{elementIndex:I,index:q,container:_},destination:{container:u,itemsBeforeUpdate:k},item:L,originalTarget:i}}));f(u,"dragleave",(function(e){var t=e.relatedTarget||e.fromElement;if(!e.currentTarget.contains(t)){if(o.dropTargetContainerClass){u.classList.remove(o.dropTargetContainerClass)}u.dispatchEvent(new CustomEvent("sortleave",{detail:{origin:{elementIndex:I,index:q,container:u},item:L,originalTarget:i}}))}}))}z=u}));f(t,"dragend",(function(r){if(!L){return}L.classList.remove(o.draggingClass);l(L,"aria-grabbed","false");if(L.getAttribute("aria-copied")==="true"&&e(L,"dropped")!=="true"){L.remove()}L.style.display=L.oldDisplay;delete L.oldDisplay;var n=Array.from(i.values()).map((function(e){return e.placeholder})).filter((function(e){return e instanceof HTMLElement})).filter(g)[0];if(n){n.remove()}t.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:I,index:q,container:_},item:L}}));z=null;L=null;P=null;M=null}));f(t,"drop",(function(n){if(!S(t,L.parentElement)){return}n.preventDefault();n.stopPropagation();e(L,"dropped","true");var f=Array.from(i.values()).map((function(e){return e.placeholder})).filter((function(e){return e instanceof HTMLElement})).filter(g)[0];m(f,L);f.remove();t.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:I,index:q,container:_},item:L}}));var u=a(t).placeholder;var l=r(_.children,o.items).filter((function(e){return e!==u}));var s=this.isSortable===true?this:this.parentElement;var c=r(s.children,e(s,"items")).filter((function(e){return e!==u}));var p=d(L,Array.from(L.parentElement.children).filter((function(e){return e!==u})));var v=d(L,c);if(o.dropTargetContainerClass){s.classList.remove(o.dropTargetContainerClass)}if(I!==p||_!==s){t.dispatchEvent(new CustomEvent("sortupdate",{detail:{origin:{elementIndex:I,index:q,container:_,itemsBeforeUpdate:H,items:l},destination:{index:v,elementIndex:p,container:s,itemsBeforeUpdate:k,items:c},item:L}}))}}));var O=p((function(e,t,n,f){if(!L){return}if(o.forcePlaceholderSize){a(e).placeholder.style.height=P+"px";a(e).placeholder.style.width=M+"px"}if(Array.from(e.children).indexOf(t)>-1){var u=w(t);var l=E(t);var s=d(a(e).placeholder,t.parentElement.children);var p=d(t,t.parentElement.children);if(u>P||l>M){var g=u-P;var v=l-M;var y=c(t).top;var b=c(t).left;if(s<p&&(o.orientation==="vertical"&&f<y||o.orientation==="horizontal"&&n<b)){return}if(s>p&&(o.orientation==="vertical"&&f>y+u-g||o.orientation==="horizontal"&&n>b+l-v)){return}}if(L.oldDisplay===undefined){L.oldDisplay=L.style.display}if(L.style.display!=="none"){L.style.display="none"}var O=false;try{var T=c(t).top+t.offsetHeight/2;var x=c(t).left+t.offsetWidth/2;O=o.orientation==="vertical"&&f>=T||o.orientation==="horizontal"&&n>=x}catch(e){O=s<p}if(O){m(t,a(e).placeholder)}else{h(t,a(e).placeholder)}Array.from(i.values()).filter((function(e){return e.placeholder!==undefined})).forEach((function(t){if(t.placeholder!==a(e).placeholder){t.placeholder.remove()}}))}else{var j=Array.from(i.values()).filter((function(e){return e.placeholder!==undefined})).map((function(e){return e.placeholder}));if(j.indexOf(t)===-1&&e===t&&!r(t.children,o.items).length){j.forEach((function(e){return e.remove()}));t.appendChild(a(e).placeholder)}}}),o.debounce);var x=function(t){var n=t.target;var i=n.isSortable===true?n:U(n,t);n=W(i,n);if(!L||!S(i,L.parentElement)||e(i,"_disabled")==="true"){return}var o=e(i,"opts");if(parseInt(o.maxItems)&&r(i.children,e(i,"items")).length>=parseInt(o.maxItems)&&L.parentElement!==i){return}t.preventDefault();t.stopPropagation();t.dataTransfer.dropEffect=a(i).getConfig("copy")===true?"copy":"move";O(i,n,t.pageX,t.pageY)};f(s.concat(t),"dragover",x);f(s.concat(t),"dragenter",x)}));return t}G.destroy=function(e){X(e)};G.enable=function(e){V(e)};G.disable=function(e){J(e)};G.__testing={_data:e,_removeItemEvents:F,_removeItemData:R,_removeSortableData:B,_removeContainerEvents:N};return G}.call(t,r,t,e),i!==undefined&&(e.exports=i))}).call(this,r(5))},6:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){if(typeof window==="object")r=window}e.exports=r},7:function(e,t,r){(function(e,n){var i=Object.getOwnPropertyDescriptors||function e(t){var r=Object.keys(t);var n={};for(var i=0;i<r.length;i++){n[r[i]]=Object.getOwnPropertyDescriptor(t,r[i])}return n};var o=/%[sdj%]/g;t.format=function(e){if(!T(e)){var t=[];for(var r=0;r<arguments.length;r++){t.push(u(arguments[r]))}return t.join(" ")}var r=1;var n=arguments;var i=n.length;var a=String(e).replace(o,(function(e){if(e==="%%")return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}));for(var f=n[r];r<i;f=n[++r]){if(w(f)||!C(f)){a+=" "+f}else{a+=" "+u(f)}}return a};t.deprecate=function(r,i){if(typeof e!=="undefined"&&e.noDeprecation===true){return r}if(typeof e==="undefined"){return function(){return t.deprecate(r,i).apply(this,arguments)}}var o=false;function a(){if(!o){if(e.throwDeprecation){throw new Error(i)}else if(e.traceDeprecation){n.trace(i)}else{n.error(i)}o=true}return r.apply(this,arguments)}return a};var a={};var f;t.debuglog=function(r){if(j(f))f=e.env.NODE_DEBUG||"";r=r.toUpperCase();if(!a[r]){if(new RegExp("\\b"+r+"\\b","i").test(f)){var i=e.pid;a[r]=function(){var e=t.format.apply(t,arguments);n.error("%s %d: %s",r,i,e)}}else{a[r]=function(){}}}return a[r]};function u(e,r){var n={seen:[],stylize:s};if(arguments.length>=3)n.depth=arguments[2];if(arguments.length>=4)n.colors=arguments[3];if(b(r)){n.showHidden=r}else if(r){t._extend(n,r)}if(j(n.showHidden))n.showHidden=false;if(j(n.depth))n.depth=2;if(j(n.colors))n.colors=false;if(j(n.customInspect))n.customInspect=true;if(n.colors)n.stylize=l;return p(n,e,n.depth)}t.inspect=u;u.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(e,t){var r=u.styles[t];if(r){return"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m"}else{return e}}function s(e,t){return e}function c(e){var t={};e.forEach((function(e,r){t[e]=true}));return t}function p(e,r,n){if(e.customInspect&&r&&L(r.inspect)&&r.inspect!==t.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i=r.inspect(n,e);if(!T(i)){i=p(e,i,n)}return i}var o=d(e,r);if(o){return o}var a=Object.keys(r);var f=c(a);if(e.showHidden){a=Object.getOwnPropertyNames(r)}if(A(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0)){return g(r)}if(a.length===0){if(L(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(S(r)){return e.stylize(RegExp.prototype.toString.call(r),"regexp")}if(D(r)){return e.stylize(Date.prototype.toString.call(r),"date")}if(A(r)){return g(r)}}var l="",s=false,b=["{","}"];if(y(r)){s=true;b=["[","]"]}if(L(r)){var w=r.name?": "+r.name:"";l=" [Function"+w+"]"}if(S(r)){l=" "+RegExp.prototype.toString.call(r)}if(D(r)){l=" "+Date.prototype.toUTCString.call(r)}if(A(r)){l=" "+g(r)}if(a.length===0&&(!s||r.length==0)){return b[0]+l+b[1]}if(n<0){if(S(r)){return e.stylize(RegExp.prototype.toString.call(r),"regexp")}else{return e.stylize("[Object]","special")}}e.seen.push(r);var E;if(s){E=v(e,r,n,f,a)}else{E=a.map((function(t){return h(e,r,n,f,t,s)}))}e.seen.pop();return m(E,l,b)}function d(e,t){if(j(t))return e.stylize("undefined","undefined");if(T(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(O(t))return e.stylize(""+t,"number");if(b(t))return e.stylize(""+t,"boolean");if(w(t))return e.stylize("null","null")}function g(e){return"["+Error.prototype.toString.call(e)+"]"}function v(e,t,r,n,i){var o=[];for(var a=0,f=t.length;a<f;++a){if(H(t,String(a))){o.push(h(e,t,r,n,String(a),true))}else{o.push("")}}i.forEach((function(i){if(!i.match(/^\d+$/)){o.push(h(e,t,r,n,i,true))}}));return o}function h(e,t,r,n,i,o){var a,f,u;u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]};if(u.get){if(u.set){f=e.stylize("[Getter/Setter]","special")}else{f=e.stylize("[Getter]","special")}}else{if(u.set){f=e.stylize("[Setter]","special")}}if(!H(n,i)){a="["+i+"]"}if(!f){if(e.seen.indexOf(u.value)<0){if(w(r)){f=p(e,u.value,null)}else{f=p(e,u.value,r-1)}if(f.indexOf("\n")>-1){if(o){f=f.split("\n").map((function(e){return" "+e})).join("\n").substr(2)}else{f="\n"+f.split("\n").map((function(e){return" "+e})).join("\n")}}}else{f=e.stylize("[Circular]","special")}}if(j(a)){if(o&&i.match(/^\d+$/)){return f}a=JSON.stringify(""+i);if(a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){a=a.substr(1,a.length-2);a=e.stylize(a,"name")}else{a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");a=e.stylize(a,"string")}}return a+": "+f}function m(e,t,r){var n=0;var i=e.reduce((function(e,t){n++;if(t.indexOf("\n")>=0)n++;return e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(i>60){return r[0]+(t===""?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]}return r[0]+t+" "+e.join(", ")+" "+r[1]}function y(e){return Array.isArray(e)}t.isArray=y;function b(e){return typeof e==="boolean"}t.isBoolean=b;function w(e){return e===null}t.isNull=w;function E(e){return e==null}t.isNullOrUndefined=E;function O(e){return typeof e==="number"}t.isNumber=O;function T(e){return typeof e==="string"}t.isString=T;function x(e){return typeof e==="symbol"}t.isSymbol=x;function j(e){return e===void 0}t.isUndefined=j;function S(e){return C(e)&&M(e)==="[object RegExp]"}t.isRegExp=S;function C(e){return typeof e==="object"&&e!==null}t.isObject=C;function D(e){return C(e)&&M(e)==="[object Date]"}t.isDate=D;function A(e){return C(e)&&(M(e)==="[object Error]"||e instanceof Error)}t.isError=A;function L(e){return typeof e==="function"}t.isFunction=L;function P(e){return e===null||typeof e==="boolean"||typeof e==="number"||typeof e==="string"||typeof e==="symbol"||typeof e==="undefined"}t.isPrimitive=P;t.isBuffer=r(9);function M(e){return Object.prototype.toString.call(e)}function _(e){return e<10?"0"+e.toString(10):e.toString(10)}var q=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var e=new Date;var t=[_(e.getHours()),_(e.getMinutes()),_(e.getSeconds())].join(":");return[e.getDate(),q[e.getMonth()],t].join(" ")}t.log=function(){n.log("%s - %s",I(),t.format.apply(t,arguments))};t.inherits=r(10);t._extend=function(e,t){if(!t||!C(t))return e;var r=Object.keys(t);var n=r.length;while(n--){e[r[n]]=t[r[n]]}return e};function H(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var z=typeof Symbol!=="undefined"?Symbol("util.promisify.custom"):undefined;t.promisify=function e(t){if(typeof t!=="function")throw new TypeError('The "original" argument must be of type Function');if(z&&t[z]){var r=t[z];if(typeof r!=="function"){throw new TypeError('The "util.promisify.custom" argument must be of type Function')}Object.defineProperty(r,z,{value:r,enumerable:false,writable:false,configurable:true});return r}function r(){var e,r;var n=new Promise((function(t,n){e=t;r=n}));var i=[];for(var o=0;o<arguments.length;o++){i.push(arguments[o])}i.push((function(t,n){if(t){r(t)}else{e(n)}}));try{t.apply(this,i)}catch(e){r(e)}return n}Object.setPrototypeOf(r,Object.getPrototypeOf(t));if(z)Object.defineProperty(r,z,{value:r,enumerable:false,writable:false,configurable:true});return Object.defineProperties(r,i(t))};t.promisify.custom=z;function k(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e;e=r}return t(e)}function F(t){if(typeof t!=="function"){throw new TypeError('The "original" argument must be of type Function')}function r(){var r=[];for(var n=0;n<arguments.length;n++){r.push(arguments[n])}var i=r.pop();if(typeof i!=="function"){throw new TypeError("The last argument must be of type Function")}var o=this;var a=function(){return i.apply(o,arguments)};t.apply(this,r).then((function(t){e.nextTick(a,null,t)}),(function(t){e.nextTick(k,t,a)}))}Object.setPrototypeOf(r,Object.getPrototypeOf(t));Object.defineProperties(r,i(t));return r}t.callbackify=F}).call(this,r(8),r(5))},8:function(e,t){var r=e.exports={};var n;var i;function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function"){n=setTimeout}else{n=o}}catch(e){n=o}try{if(typeof clearTimeout==="function"){i=clearTimeout}else{i=a}}catch(e){i=a}})();function f(e){if(n===setTimeout){return setTimeout(e,0)}if((n===o||!n)&&setTimeout){n=setTimeout;return setTimeout(e,0)}try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}function u(e){if(i===clearTimeout){return clearTimeout(e)}if((i===a||!i)&&clearTimeout){i=clearTimeout;return clearTimeout(e)}try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}var l=[];var s=false;var c;var p=-1;function d(){if(!s||!c){return}s=false;if(c.length){l=c.concat(l)}else{p=-1}if(l.length){g()}}function g(){if(s){return}var e=f(d);s=true;var t=l.length;while(t){c=l;l=[];while(++p<t){if(c){c[p].run()}}p=-1;t=l.length}c=null;s=false;u(e)}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1){for(var r=1;r<arguments.length;r++){t[r-1]=arguments[r]}}l.push(new v(e,t));if(l.length===1&&!s){f(g)}};function v(e,t){this.fun=e;this.array=t}v.prototype.run=function(){this.fun.apply(null,this.array)};r.title="browser";r.browser=true;r.env={};r.argv=[];r.version="";r.versions={};function h(){}r.on=h;r.addListener=h;r.once=h;r.off=h;r.removeListener=h;r.removeAllListeners=h;r.emit=h;r.prependListener=h;r.prependOnceListener=h;r.listeners=function(e){return[]};r.binding=function(e){throw new Error("process.binding is not supported")};r.cwd=function(){return"/"};r.chdir=function(e){throw new Error("process.chdir is not supported")};r.umask=function(){return 0}},9:function(e,t){e.exports=function e(t){return t&&typeof t==="object"&&typeof t.copy==="function"&&typeof t.fill==="function"&&typeof t.readUInt8==="function"}}});