UNPKG

d3-crud-plus

Version:
8 lines 207 kB
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("lodash")):"function"===typeof define&&define.amd?define(["lodash"],e):"object"===typeof exports?exports["d2-crud-plus"]=e(require("lodash")):t["d2-crud-plus"]=e(t["lodash"])})("undefined"!==typeof self?self:this,(function(t){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fae3")}({"0aff":function(t,e,n){"use strict";n("c2cb")},"10e7":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".d2p-dict-radio{width:100%}",""]),t.exports=e},"13fe":function(t,e,n){"use strict";n("f173")},"22f9":function(t,e,n){"use strict";n("cfa2")},"24fb":function(t,e,n){"use strict";function r(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"===typeof btoa){var i=o(r),a=r.sources.map((function(t){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(t," */")}));return[n].concat(a).concat([i]).join("\n")}return[n].join("\n")}function o(t){var e=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),n="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(e);return"/*# ".concat(n," */")}t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=r(e,t);return e[2]?"@media ".concat(e[2]," {").concat(n,"}"):n})).join("")},e.i=function(t,n,r){"string"===typeof t&&(t=[[null,t,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var u=0;u<t.length;u++){var l=[].concat(t[u]);r&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),e.push(l))}},e}},"3f20":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".d2p-textarea textarea{font-family:Arial,Microsoft YaHei,微软雅黑,Helvetica Neue,Helvetica,PingFang SC,Hiragino Sans GB,sans-serif}",""]),t.exports=e},4002:function(t,e,n){var r=n("10e7");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("499e").default;o("e391d35e",r,!0,{sourceMap:!1,shadowMode:!1})},"44a4":function(t,e,n){"use strict";n("4b38")},"499e":function(t,e,n){"use strict";function r(t,e){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],a=i[0],u=i[1],l=i[2],c=i[3],s={id:t+":"+o,css:u,media:l,sourceMap:c};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}n.r(e),n.d(e,"default",(function(){return h}));var o="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var i={},a=o&&(document.head||document.getElementsByTagName("head")[0]),u=null,l=0,c=!1,s=function(){},f=null,d="data-vue-ssr-id",p="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(t,e,n,o){c=n,f=o||{};var a=r(t,e);return m(a),function(e){for(var n=[],o=0;o<a.length;o++){var u=a[o],l=i[u.id];l.refs--,n.push(l)}e?(a=r(t,e),m(a)):a=[];for(o=0;o<n.length;o++){l=n[o];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete i[l.id]}}}}function m(t){for(var e=0;e<t.length;e++){var n=t[e],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(g(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var a=[];for(o=0;o<n.parts.length;o++)a.push(g(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:a}}}}function v(){var t=document.createElement("style");return t.type="text/css",a.appendChild(t),t}function g(t){var e,n,r=document.querySelector("style["+d+'~="'+t.id+'"]');if(r){if(c)return s;r.parentNode.removeChild(r)}if(p){var o=l++;r=u||(u=v()),e=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=v(),e=w.bind(null,r),n=function(){r.parentNode.removeChild(r)};return e(t),function(r){if(r){if(r.css===t.css&&r.media===t.media&&r.sourceMap===t.sourceMap)return;e(t=r)}else n()}}var b=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}();function y(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=b(e,o);else{var i=document.createTextNode(o),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(i,a[e]):t.appendChild(i)}}function w(t,e){var n=e.css,r=e.media,o=e.sourceMap;if(r&&t.setAttribute("media",r),f.ssrId&&t.setAttribute(d,e.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{while(t.firstChild)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}},"4b38":function(t,e,n){var r=n("ac3b");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var o=n("499e").default;o("83e1ed50",r,!0,{sourceMap:!1,shadowMode:!1})},"5a0c":function(t,e,n){!function(e,n){t.exports=n()}(0,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",o="second",i="minute",a="hour",u="day",l="week",c="month",s="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},g=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},b={s:g,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),o=n%60;return(e<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),o=e.clone().add(r,c),i=n-o<0,a=e.clone().add(r+(i?-1:1),c);return+(-(r+(n-o)/(i?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:f,w:l,d:u,D:d,h:a,m:i,s:o,ms:r,Q:s}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},y="en",w={};w[y]=v;var _="$isDayjsObject",O=function(t){return t instanceof D||!(!t||!t[_])},x=function t(e,n,r){var o;if(!e)return y;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),n&&(w[i]=n,o=i);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var u=e.name;w[u]=e,o=u}return!r&&o&&(y=o),o||!r&&y},S=function(t,e){if(O(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new D(n)},C=b;C.l=x,C.i=O,C.w=function(t,e){return S(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var D=function(){function v(t){this.$L=x(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[_]=!0}var g=v.prototype;return g.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(C.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match(h);if(r){var o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(e)}(t),this.init()},g.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},g.$utils=function(){return C},g.isValid=function(){return!(this.$d.toString()===p)},g.isSame=function(t,e){var n=S(t);return this.startOf(e)<=n&&n<=this.endOf(e)},g.isAfter=function(t,e){return S(t)<this.startOf(e)},g.isBefore=function(t,e){return this.endOf(e)<S(t)},g.$g=function(t,e,n){return C.u(t)?this[e]:this.set(n,t)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(t,e){var n=this,r=!!C.u(e)||e,s=C.p(t),p=function(t,e){var o=C.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?o:o.endOf(u)},h=function(t,e){return C.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},m=this.$W,v=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(s){case f:return r?p(1,0):p(31,11);case c:return r?p(1,v):p(0,v+1);case l:var y=this.$locale().weekStart||0,w=(m<y?m+7:m)-y;return p(r?g-w:g+(6-w),v);case u:case d:return h(b+"Hours",0);case a:return h(b+"Minutes",1);case i:return h(b+"Seconds",2);case o:return h(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(t){return this.startOf(t,!1)},g.$set=function(t,e){var n,l=C.p(t),s="set"+(this.$u?"UTC":""),p=(n={},n[u]=s+"Date",n[d]=s+"Date",n[c]=s+"Month",n[f]=s+"FullYear",n[a]=s+"Hours",n[i]=s+"Minutes",n[o]=s+"Seconds",n[r]=s+"Milliseconds",n)[l],h=l===u?this.$D+(e-this.$W):e;if(l===c||l===f){var m=this.clone().set(d,1);m.$d[p](h),m.init(),this.$d=m.set(d,Math.min(this.$D,m.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},g.set=function(t,e){return this.clone().$set(t,e)},g.get=function(t){return this[C.p(t)]()},g.add=function(r,s){var d,p=this;r=Number(r);var h=C.p(s),m=function(t){var e=S(p);return C.w(e.date(e.date()+Math.round(t*r)),p)};if(h===c)return this.set(c,this.$M+r);if(h===f)return this.set(f,this.$y+r);if(h===u)return m(1);if(h===l)return m(7);var v=(d={},d[i]=e,d[a]=n,d[o]=t,d)[h]||1,g=this.$d.getTime()+r*v;return C.w(g,this)},g.subtract=function(t,e){return this.add(-1*t,e)},g.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=t||"YYYY-MM-DDTHH:mm:ssZ",o=C.z(this),i=this.$H,a=this.$m,u=this.$M,l=n.weekdays,c=n.months,s=n.meridiem,f=function(t,n,o,i){return t&&(t[n]||t(e,r))||o[n].slice(0,i)},d=function(t){return C.s(i%12||12,t,"0")},h=s||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return C.s(e.$y,4,"0");case"M":return u+1;case"MM":return C.s(u+1,2,"0");case"MMM":return f(n.monthsShort,u,c,3);case"MMMM":return f(c,u);case"D":return e.$D;case"DD":return C.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(n.weekdaysMin,e.$W,l,2);case"ddd":return f(n.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(i);case"HH":return C.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return h(i,a,!0);case"A":return h(i,a,!1);case"m":return String(a);case"mm":return C.s(a,2,"0");case"s":return String(e.$s);case"ss":return C.s(e.$s,2,"0");case"SSS":return C.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,d,p){var h,m=this,v=C.p(d),g=S(r),b=(g.utcOffset()-this.utcOffset())*e,y=this-g,w=function(){return C.m(m,g)};switch(v){case f:h=w()/12;break;case c:h=w();break;case s:h=w()/3;break;case l:h=(y-b)/6048e5;break;case u:h=(y-b)/864e5;break;case a:h=y/n;break;case i:h=y/e;break;case o:h=y/t;break;default:h=y}return p?h:C.a(h)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=x(t,e,!0);return r&&(n.$L=r),n},g.clone=function(){return C.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),j=D.prototype;return S.prototype=j,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",u],["$M",c],["$y",f],["$D",d]].forEach((function(t){j[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),S.extend=function(t,e){return t.$i||(t(e,D,S),t.$i=!0),S},S.locale=x,S.isDayjs=O,S.unix=function(t){return S(1e3*t)},S.en=w[y],S.Ls=w,S.p={},S}))},"5c4f":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".d2p-search-form .el-form-item{margin-bottom:8px}",""]),t.exports=e},"60bb":function(e,n){e.exports=t},"62ce":function(t,e,n){"use strict";n("fd7a")},"6e3e":function(t,e,n){"use strict";n("4002")},"7d64":function(t,e,n){"use strict";n("f534")},"7f6f":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".d2p-dict-checkbox{width:100%}.d2p-dict-checkbox.el-checkbox-group{line-height:40px}",""]),t.exports=e},8875:function(t,e,n){var r,o,i;(function(n,a){o=[],r=a,i="function"===typeof r?r.apply(e,o):r,void 0===i||(t.exports=i)})("undefined"!==typeof self&&self,(function(){function t(){var e=Object.getOwnPropertyDescriptor(document,"currentScript");if(!e&&"currentScript"in document&&document.currentScript)return document.currentScript;if(e&&e.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(p){var n,r,o,i=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,a=/@([^@]*):(\d+):(\d+)\s*$/gi,u=i.exec(p.stack)||a.exec(p.stack),l=u&&u[1]||!1,c=u&&u[2]||!1,s=document.location.href.replace(document.location.hash,""),f=document.getElementsByTagName("script");l===s&&(n=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=n.replace(r,"$1").trim());for(var d=0;d<f.length;d++){if("interactive"===f[d].readyState)return f[d];if(f[d].src===l)return f[d];if(l===s&&f[d].innerHTML&&f[d].innerHTML.trim()===o)return f[d]}return null}}return t}))},"93c4":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".d2p-cascade{width:100%}.d2p-cascade .el-cascader__tags .el-tag>span{-webkit-box-flex:1;-ms-flex:auto;flex:auto}",""]),t.exports=e},9822:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,".d2p-toolbar{float:right}",""]),t.exports=e},"9d24":function(t,e,n){"use strict";n("de99")},aa47:function(t,e,n){"use strict"; /**! * Sortable 1.10.2 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */ function r(t){return r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(){return i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i.apply(this,arguments)}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})))),r.forEach((function(e){o(t,e,n[e])}))}return t}function u(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}function l(t,e){if(null==t)return{};var n,r,o=u(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function c(t){return s(t)||f(t)||d()}function s(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}function f(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance")}n.r(e),n.d(e,"MultiDrag",(function(){return Ne})),n.d(e,"Sortable",(function(){return Zt})),n.d(e,"Swap",(function(){return De}));var p="1.10.2";function h(t){if("undefined"!==typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var m=h(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),v=h(/Edge/i),g=h(/firefox/i),b=h(/safari/i)&&!h(/chrome/i)&&!h(/android/i),y=h(/iP(ad|od|hone)/i),w=h(/chrome/i)&&h(/android/i),_={capture:!1,passive:!1};function O(t,e,n){t.addEventListener(e,n,!m&&_)}function x(t,e,n){t.removeEventListener(e,n,!m&&_)}function S(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function C(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function D(t,e,n,r){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&S(t,e):S(t,e))||r&&t===n)return t;if(t===n)break}while(t=C(t))}return null}var j,E=/\s+/g;function P(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var r=(" "+t.className+" ").replace(E," ").replace(" "+e+" "," ");t.className=(r+(n?" "+e:"")).replace(E," ")}}function T(t,e,n){var r=t&&t.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in r||-1!==e.indexOf("webkit")||(e="-webkit-"+e),r[e]=n+("string"===typeof n?"":"px")}}function k(t,e){var n="";if("string"===typeof t)n=t;else do{var r=T(t,"transform");r&&"none"!==r&&(n=r+" "+n)}while(!e&&(t=t.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function M(t,e,n){if(t){var r=t.getElementsByTagName(e),o=0,i=r.length;if(n)for(;o<i;o++)n(r[o],o);return r}return[]}function A(){var t=document.scrollingElement;return t||document.documentElement}function $(t,e,n,r,o){if(t.getBoundingClientRect||t===window){var i,a,u,l,c,s,f;if(t!==window&&t!==A()?(i=t.getBoundingClientRect(),a=i.top,u=i.left,l=i.bottom,c=i.right,s=i.height,f=i.width):(a=0,u=0,l=window.innerHeight,c=window.innerWidth,s=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(o=o||t.parentNode,!m))do{if(o&&o.getBoundingClientRect&&("none"!==T(o,"transform")||n&&"static"!==T(o,"position"))){var d=o.getBoundingClientRect();a-=d.top+parseInt(T(o,"border-top-width")),u-=d.left+parseInt(T(o,"border-left-width")),l=a+i.height,c=u+i.width;break}}while(o=o.parentNode);if(r&&t!==window){var p=k(o||t),h=p&&p.a,v=p&&p.d;p&&(a/=v,u/=h,f/=h,s/=v,l=a+s,c=u+f)}return{top:a,left:u,bottom:l,right:c,width:f,height:s}}}function I(t,e,n){var r=B(t,!0),o=$(t)[e];while(r){var i=$(r)[n],a=void 0;if(a="top"===n||"left"===n?o>=i:o<=i,!a)return r;if(r===A())break;r=B(r,!1)}return!1}function R(t,e,n){var r=0,o=0,i=t.children;while(o<i.length){if("none"!==i[o].style.display&&i[o]!==Zt.ghost&&i[o]!==Zt.dragged&&D(i[o],n.draggable,t,!1)){if(r===e)return i[o];r++}o++}return null}function F(t,e){var n=t.lastElementChild;while(n&&(n===Zt.ghost||"none"===T(n,"display")||e&&!S(n,e)))n=n.previousElementSibling;return n||null}function N(t,e){var n=0;if(!t||!t.parentNode)return-1;while(t=t.previousElementSibling)"TEMPLATE"===t.nodeName.toUpperCase()||t===Zt.clone||e&&!S(t,e)||n++;return n}function L(t){var e=0,n=0,r=A();if(t)do{var o=k(t),i=o.a,a=o.d;e+=t.scrollLeft*i,n+=t.scrollTop*a}while(t!==r&&(t=t.parentNode));return[e,n]}function V(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var r in e)if(e.hasOwnProperty(r)&&e[r]===t[n][r])return Number(n);return-1}function B(t,e){if(!t||!t.getBoundingClientRect)return A();var n=t,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=T(n);if(n.clientWidth<n.scrollWidth&&("auto"==o.overflowX||"scroll"==o.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==o.overflowY||"scroll"==o.overflowY)){if(!n.getBoundingClientRect||n===document.body)return A();if(r||e)return n;r=!0}}}while(n=n.parentNode);return A()}function q(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function H(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function z(t,e){return function(){if(!j){var n=arguments,r=this;1===n.length?t.call(r,n[0]):t.apply(r,n),j=setTimeout((function(){j=void 0}),e)}}}function Y(){clearTimeout(j),j=void 0}function U(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function G(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function X(t,e){T(t,"position","absolute"),T(t,"top",e.top),T(t,"left",e.left),T(t,"width",e.width),T(t,"height",e.height)}function W(t){T(t,"position",""),T(t,"top",""),T(t,"left",""),T(t,"width",""),T(t,"height","")}var K="Sortable"+(new Date).getTime();function J(){var t,e=[];return{captureAnimationState:function(){if(e=[],this.options.animation){var t=[].slice.call(this.el.children);t.forEach((function(t){if("none"!==T(t,"display")&&t!==Zt.ghost){e.push({target:t,rect:$(t)});var n=a({},e[e.length-1].rect);if(t.thisAnimationDuration){var r=k(t,!0);r&&(n.top-=r.f,n.left-=r.e)}t.fromRect=n}}))}},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(V(e,{target:t}),1)},animateAll:function(n){var r=this;if(!this.options.animation)return clearTimeout(t),void("function"===typeof n&&n());var o=!1,i=0;e.forEach((function(t){var e=0,n=t.target,a=n.fromRect,u=$(n),l=n.prevFromRect,c=n.prevToRect,s=t.rect,f=k(n,!0);f&&(u.top-=f.f,u.left-=f.e),n.toRect=u,n.thisAnimationDuration&&H(l,u)&&!H(a,u)&&(s.top-u.top)/(s.left-u.left)===(a.top-u.top)/(a.left-u.left)&&(e=Q(s,l,c,r.options)),H(u,a)||(n.prevFromRect=a,n.prevToRect=u,e||(e=r.options.animation),r.animate(n,s,u,e)),e&&(o=!0,i=Math.max(i,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),o?t=setTimeout((function(){"function"===typeof n&&n()}),i):"function"===typeof n&&n(),e=[]},animate:function(t,e,n,r){if(r){T(t,"transition",""),T(t,"transform","");var o=k(this.el),i=o&&o.a,a=o&&o.d,u=(e.left-n.left)/(i||1),l=(e.top-n.top)/(a||1);t.animatingX=!!u,t.animatingY=!!l,T(t,"transform","translate3d("+u+"px,"+l+"px,0)"),Z(t),T(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),T(t,"transform","translate3d(0,0,0)"),"number"===typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){T(t,"transition",""),T(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),r)}}}}function Z(t){return t.offsetWidth}function Q(t,e,n,r){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*r.animation}var tt=[],et={initializeByDefault:!0},nt={mount:function(t){for(var e in et)et.hasOwnProperty(e)&&!(e in t)&&(t[e]=et[e]);tt.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";tt.forEach((function(r){e[r.pluginName]&&(e[r.pluginName][o]&&e[r.pluginName][o](a({sortable:e},n)),e.options[r.pluginName]&&e[r.pluginName][t]&&e[r.pluginName][t](a({sortable:e},n)))}))},initializePlugins:function(t,e,n,r){for(var o in tt.forEach((function(r){var o=r.pluginName;if(t.options[o]||r.initializeByDefault){var a=new r(t,e,t.options);a.sortable=t,a.options=t.options,t[o]=a,i(n,a.defaults)}})),t.options)if(t.options.hasOwnProperty(o)){var a=this.modifyOption(t,o,t.options[o]);"undefined"!==typeof a&&(t.options[o]=a)}},getEventProperties:function(t,e){var n={};return tt.forEach((function(r){"function"===typeof r.eventProperties&&i(n,r.eventProperties.call(e[r.pluginName],t))})),n},modifyOption:function(t,e,n){var r;return tt.forEach((function(o){t[o.pluginName]&&o.optionListeners&&"function"===typeof o.optionListeners[e]&&(r=o.optionListeners[e].call(t[o.pluginName],n))})),r}};function rt(t){var e=t.sortable,n=t.rootEl,r=t.name,o=t.targetEl,i=t.cloneEl,u=t.toEl,l=t.fromEl,c=t.oldIndex,s=t.newIndex,f=t.oldDraggableIndex,d=t.newDraggableIndex,p=t.originalEvent,h=t.putSortable,g=t.extraEventProperties;if(e=e||n&&n[K],e){var b,y=e.options,w="on"+r.charAt(0).toUpperCase()+r.substr(1);!window.CustomEvent||m||v?(b=document.createEvent("Event"),b.initEvent(r,!0,!0)):b=new CustomEvent(r,{bubbles:!0,cancelable:!0}),b.to=u||n,b.from=l||n,b.item=o||n,b.clone=i,b.oldIndex=c,b.newIndex=s,b.oldDraggableIndex=f,b.newDraggableIndex=d,b.originalEvent=p,b.pullMode=h?h.lastPutMode:void 0;var _=a({},g,nt.getEventProperties(r,e));for(var O in _)b[O]=_[O];n&&n.dispatchEvent(b),y[w]&&y[w].call(e,b)}}var ot=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.evt,o=l(n,["evt"]);nt.pluginEvent.bind(Zt)(t,e,a({dragEl:at,parentEl:ut,ghostEl:lt,rootEl:ct,nextEl:st,lastDownEl:ft,cloneEl:dt,cloneHidden:pt,dragStarted:Dt,putSortable:yt,activeSortable:Zt.active,originalEvent:r,oldIndex:ht,oldDraggableIndex:vt,newIndex:mt,newDraggableIndex:gt,hideGhostForTarget:Xt,unhideGhostForTarget:Wt,cloneNowHidden:function(){pt=!0},cloneNowShown:function(){pt=!1},dispatchSortableEvent:function(t){it({sortable:e,name:t,originalEvent:r})}},o))};function it(t){rt(a({putSortable:yt,cloneEl:dt,targetEl:at,rootEl:ct,oldIndex:ht,oldDraggableIndex:vt,newIndex:mt,newDraggableIndex:gt},t))}var at,ut,lt,ct,st,ft,dt,pt,ht,mt,vt,gt,bt,yt,wt,_t,Ot,xt,St,Ct,Dt,jt,Et,Pt,Tt,kt=!1,Mt=!1,At=[],$t=!1,It=!1,Rt=[],Ft=!1,Nt=[],Lt="undefined"!==typeof document,Vt=y,Bt=v||m?"cssFloat":"float",qt=Lt&&!w&&!y&&"draggable"in document.createElement("div"),Ht=function(){if(Lt){if(m)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),zt=function(t,e){var n=T(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=R(t,0,e),i=R(t,1,e),a=o&&T(o),u=i&&T(i),l=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+$(o).width,c=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+$(i).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a["float"]&&"none"!==a["float"]){var s="left"===a["float"]?"left":"right";return!i||"both"!==u.clear&&u.clear!==s?"horizontal":"vertical"}return o&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[Bt]||i&&"none"===n[Bt]&&l+c>r)?"vertical":"horizontal"},Yt=function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,i=n?t.width:t.height,a=n?e.left:e.top,u=n?e.right:e.bottom,l=n?e.width:e.height;return r===a||o===u||r+i/2===a+l/2},Ut=function(t,e){var n;return At.some((function(r){if(!F(r)){var o=$(r),i=r[K].options.emptyInsertThreshold,a=t>=o.left-i&&t<=o.right+i,u=e>=o.top-i&&e<=o.bottom+i;return i&&a&&u?n=r:void 0}})),n},Gt=function(t){function e(t,n){return function(r,o,i,a){var u=r.options.group.name&&o.options.group.name&&r.options.group.name===o.options.group.name;if(null==t&&(n||u))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"===typeof t)return e(t(r,o,i,a),n)(r,o,i,a);var l=(n?r:o).options.group.name;return!0===t||"string"===typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==r(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},Xt=function(){!Ht&&lt&&T(lt,"display","none")},Wt=function(){!Ht&&lt&&T(lt,"display","")};Lt&&document.addEventListener("click",(function(t){if(Mt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Mt=!1,!1}),!0);var Kt=function(t){if(at){t=t.touches?t.touches[0]:t;var e=Ut(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[K]._onDragOver(n)}}},Jt=function(t){at&&at.parentNode[K]._isOutsideThisEl(t.target)};function Zt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=i({},e),t[K]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return zt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Zt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in nt.initializePlugins(this,t,n),n)!(r in e)&&(e[r]=n[r]);for(var o in Gt(e),this)"_"===o.charAt(0)&&"function"===typeof this[o]&&(this[o]=this[o].bind(this));this.nativeDraggable=!e.forceFallback&&qt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?O(t,"pointerdown",this._onTapStart):(O(t,"mousedown",this._onTapStart),O(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(O(t,"dragover",this),O(t,"dragenter",this)),At.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),i(this,J())}function Qt(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function te(t,e,n,r,o,i,a,u){var l,c,s=t[K],f=s.options.onMove;return!window.CustomEvent||m||v?(l=document.createEvent("Event"),l.initEvent("move",!0,!0)):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=r,l.related=o||e,l.relatedRect=i||$(e),l.willInsertAfter=u,l.originalEvent=a,t.dispatchEvent(l),f&&(c=f.call(s,l,a)),c}function ee(t){t.draggable=!1}function ne(){Ft=!1}function re(t,e,n){var r=$(F(n.el,n.options.draggable)),o=10;return e?t.clientX>r.right+o||t.clientX<=r.right&&t.clientY>r.bottom&&t.clientX>=r.left:t.clientX>r.right&&t.clientY>r.top||t.clientX<=r.right&&t.clientY>r.bottom+o}function oe(t,e,n,r,o,i,a,u){var l=r?t.clientY:t.clientX,c=r?n.height:n.width,s=r?n.top:n.left,f=r?n.bottom:n.right,d=!1;if(!a)if(u&&Pt<c*o){if(!$t&&(1===Et?l>s+c*i/2:l<f-c*i/2)&&($t=!0),$t)d=!0;else if(1===Et?l<s+Pt:l>f-Pt)return-Et}else if(l>s+c*(1-o)/2&&l<f-c*(1-o)/2)return ie(e);return d=d||a,d&&(l<s+c*i/2||l>f-c*i/2)?l>s+c/2?1:-1:0}function ie(t){return N(at)<N(t)?1:-1}function ae(t){var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,r=0;while(n--)r+=e.charCodeAt(n);return r.toString(36)}function ue(t){Nt.length=0;var e=t.getElementsByTagName("input"),n=e.length;while(n--){var r=e[n];r.checked&&Nt.push(r)}}function le(t){return setTimeout(t,0)}function ce(t){return clearTimeout(t)}Zt.prototype={constructor:Zt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(jt=null)},_getDirection:function(t,e){return"function"===typeof this.options.direction?this.options.direction.call(this,t,e,at):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,i=t.type,a=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,u=(a||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||u,c=r.filter;if(ue(n),!at&&!(/mousedown|pointerdown/.test(i)&&0!==t.button||r.disabled)&&!l.isContentEditable&&(u=D(u,r.draggable,n,!1),(!u||!u.animated)&&ft!==u)){if(ht=N(u),vt=N(u,r.draggable),"function"===typeof c){if(c.call(this,t,u,this))return it({sortable:e,rootEl:l,name:"filter",targetEl:u,toEl:n,fromEl:n}),ot("filter",e,{evt:t}),void(o&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(r){if(r=D(l,r.trim(),n,!1),r)return it({sortable:e,rootEl:r,name:"filter",targetEl:u,fromEl:n,toEl:n}),ot("filter",e,{evt:t}),!0})),c))return void(o&&t.cancelable&&t.preventDefault());r.handle&&!D(l,r.handle,n,!1)||this._prepareDragStart(t,a,u)}}},_prepareDragStart:function(t,e,n){var r,o=this,i=o.el,a=o.options,u=i.ownerDocument;if(n&&!at&&n.parentNode===i){var l=$(n);if(ct=i,at=n,ut=at.parentNode,st=at.nextSibling,ft=n,bt=a.group,Zt.dragged=at,wt={target:at,clientX:(e||t).clientX,clientY:(e||t).clientY},St=wt.clientX-l.left,Ct=wt.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,at.style["will-change"]="all",r=function(){ot("delayEnded",o,{evt:t}),Zt.eventCanceled?o._onDrop():(o._disableDelayedDragEvents(),!g&&o.nativeDraggable&&(at.draggable=!0),o._triggerDragStart(t,e),it({sortable:o,name:"choose",originalEvent:t}),P(at,a.chosenClass,!0))},a.ignore.split(",").forEach((function(t){M(at,t.trim(),ee)})),O(u,"dragover",Kt),O(u,"mousemove",Kt),O(u,"touchmove",Kt),O(u,"mouseup",o._onDrop),O(u,"touchend",o._onDrop),O(u,"touchcancel",o._onDrop),g&&this.nativeDraggable&&(this.options.touchStartThreshold=4,at.draggable=!0),ot("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(v||m))r();else{if(Zt.eventCanceled)return void this._onDrop();O(u,"mouseup",o._disableDelayedDrag),O(u,"touchend",o._disableDelayedDrag),O(u,"touchcancel",o._disableDelayedDrag),O(u,"mousemove",o._delayedDragTouchMoveHandler),O(u,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&O(u,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(r,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){at&&ee(at),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;x(t,"mouseup",this._disableDelayedDrag),x(t,"touchend",this._disableDelayedDrag),x(t,"touchcancel",this._disableDelayedDrag),x(t,"mousemove",this._delayedDragTouchMoveHandler),x(t,"touchmove",this._delayedDragTouchMoveHandler),x(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?O(document,"pointermove",this._onTouchMove):O(document,e?"touchmove":"mousemove",this._onTouchMove):(O(at,"dragend",this),O(ct,"dragstart",this._onDragStart));try{document.selection?le((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(kt=!1,ct&&at){ot("dragStarted",this,{evt:e}),this.nativeDraggable&&O(document,"dragover",Jt);var n=this.options;!t&&P(at,n.dragClass,!1),P(at,n.ghostClass,!0),Zt.active=this,t&&this._appendGhost(),it({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(_t){this._lastX=_t.clientX,this._lastY=_t.clientY,Xt();var t=document.elementFromPoint(_t.clientX,_t.clientY),e=t;while(t&&t.shadowRoot){if(t=t.shadowRoot.elementFromPoint(_t.clientX,_t.clientY),t===e)break;e=t}if(at.parentNode[K]._isOutsideThisEl(t),e)do{if(e[K]){var n=void 0;if(n=e[K]._onDragOver({clientX:_t.clientX,clientY:_t.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Wt()}},_onTouchMove:function(t){if(wt){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,i=lt&&k(lt,!0),a=lt&&i&&i.a,u=lt&&i&&i.d,l=Vt&&Tt&&L(Tt),c=(o.clientX-wt.clientX+r.x)/(a||1)+(l?l[0]-Rt[0]:0)/(a||1),s=(o.clientY-wt.clientY+r.y)/(u||1)+(l?l[1]-Rt[1]:0)/(u||1);if(!Zt.active&&!kt){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(lt){i?(i.e+=c-(Ot||0),i.f+=s-(xt||0)):i={a:1,b:0,c:0,d:1,e:c,f:s};var f="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");T(lt,"webkitTransform",f),T(lt,"mozTransform",f),T(lt,"msTransform",f),T(lt,"transform",f),Ot=c,xt=s,_t=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!lt){var t=this.options.fallbackOnBody?document.body:ct,e=$(at,!0,Vt,!0,t),n=this.options;if(Vt){Tt=t;while("static"===T(Tt,"position")&&"none"===T(Tt,"transform")&&Tt!==document)Tt=Tt.parentNode;Tt!==document.body&&Tt!==document.documentElement?(Tt===document&&(Tt=A()),e.top+=Tt.scrollTop,e.left+=Tt.scrollLeft):Tt=A(),Rt=L(Tt)}lt=at.cloneNode(!0),P(lt,n.ghostClass,!1),P(lt,n.fallbackClass,!0),P(lt,n.dragClass,!0),T(lt,"transition",""),T(lt,"transform",""),T(lt,"box-sizing","border-box"),T(lt,"margin",0),T(lt,"top",e.top),T(lt,"left",e.left),T(lt,"width",e.width),T(lt,"height",e.height),T(lt,"opacity","0.8"),T(lt,"position",Vt?"absolute":"fixed"),T(lt,"zIndex","100000"),T(lt,"pointerEvents","none"),Zt.ghost=lt,t.appendChild(lt),T(lt,"transform-origin",St/parseInt(lt.style.width)*100+"% "+Ct/parseInt(lt.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;ot("dragStart",this,{evt:t}),Zt.eventCanceled?this._onDrop():(ot("setupClone",this),Zt.eventCanceled||(dt=G(at),dt.draggable=!1,dt.style["will-change"]="",this._hideClone(),P(dt,this.options.chosenClass,!1),Zt.clone=dt),n.cloneId=le((function(){ot("clone",n),Zt.eventCanceled||(n.options.removeCloneOnHide||ct.insertBefore(dt,at),n._hideClone(),it({sortable:n,name:"clone"}))})),!e&&P(at,o.dragClass,!0),e?(Mt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(x(document,"mouseup",n._onDrop),x(document,"touchend",n._onDrop),x(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,at)),O(document,"drop",n),T(at,"transform","translateZ(0)")),kt=!0,n._dragStartId=le(n._dragStarted.bind(n,e,t)),O(document,"selectstart",n),Dt=!0,b&&T(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,r,o,i=this.el,u=t.target,l=this.options,c=l.group,s=Zt.active,f=bt===c,d=l.sort,p=yt||s,h=this,m=!1;if(!Ft){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),u=D(u,l.draggable,i,!0),M("dragOver"),Zt.eventCanceled)return m;if(at.contains(t.target)||u.animated&&u.animatingX&&u.animatingY||h._ignoreWhileAnimating===u)return R(!1);if(Mt=!1,s&&!l.disabled&&(f?d||(r=!ct.contains(at)):yt===this||(this.lastPutMode=bt.checkPull(this,s,at,t))&&c.checkPut(this,s,at,t))){if(o="vertical"===this._getDirection(t,u),e=$(at),M("dragOverValid"),Zt.eventCanceled)return m;if(r)return ut=ct,A(),this._hideClone(),M("revert"),Zt.eventCanceled||(st?ct.insertBefore(at,st):ct.appendChild(at)),R(!0);var v=F(i,l.draggable);if(!v||re(t,o,this)&&!v.animated){if(v===at)return R(!1);if(v&&i===t.target&&(u=v),u&&(n=$(u)),!1!==te(ct,i,at,e,u,n,t,!!u))return A(),i.appendChild(at),ut=i,L(),R(!0)}else if(u.parentNode===i){n=$(u);var g,b,y=0,w=at.parentNode!==i,_=!Yt(at.animated&&at.toRect||e,u.animated&&u.toRect||n,o),O=o?"top":"left",x=I(u,"top","top")||I(at,"top","top"),S=x?x.scrollTop:void 0;if(jt!==u&&(g=n[O],$t=!1,It=!_&&l.invertSwap||w),y=oe(t,u,n,o,_?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,It,jt===u),0!==y){var C=N(at);do{C-=y,b=ut.children[C]}while(b&&("none"===T(b,"display")||b===lt))}if(0===y||b===u)return R(!1);jt=u,Et=y;var j=u.nextElementSibling,E=!1;E=1===y;var k=te(ct,i,at,e,u,n,t,E);if(!1!==k)return 1!==k&&-1!==k||(E=1===k),Ft=!0,setTimeout(ne,30),A(),E&&!j?i.appendChild(at):u.parentNode.insertBefore(at,E?j:u),x&&U(x,0,S-x.scrollTop),ut=at.parentNode,void 0===g||It||(Pt=Math.abs(g-$(u)[O])),L(),R(!0)}if(i.contains(at))return R(!1)}return!1}function M(l,c){ot(l,h,a({evt:t,isOwner:f,axis:o?"vertical":"horizontal",revert:r,dragRect:e,targetRect:n,canSort:d,fromSortable:p,target:u,completed:R,onMove:function(n,r){return te(ct,i,at,e,n,$(n),t,r)},changed:L},c))}function A(){M("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function R(e){return M("dragOverCompleted",{insertion:e}),e&&(f?s._hideClone():s._showClone(h),h!==p&&(P(at,yt?yt.options.ghostClass:s.options.ghostClass,!1),P(at,l.ghostClass,!0)),yt!==h&&h!==Zt.active?yt=h:h===Zt.active&&yt&&(yt=null),p===h&&(h._ignoreWhileAnimating=u),h.animateAll((function(){M("dragOverAnimationComplete"),h._ignoreWhileAnimating=null})),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(u===at&&!at.animated||u===i&&!u.animated)&&(jt=null),l.dragoverBubble||t.rootEl||u===document||(at.parentNode[K]._isOutsideThisEl(t.target),!e&&Kt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function L(){mt=N(at),gt=N(at,l.draggable),it({sortable:h,name:"change",toEl:i,newIndex:mt,newDraggableIndex:gt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){x(document,"mousemove",this._onTouchMove),x(document,"touchmove",this._onTouchMove),x(document,"pointermove",this._onTouchMove),x(document,"dragover",Kt),x(document,"mousemove",Kt),x(document,"touchmove",Kt)},_offUpEvents:function(){var t=this.el.ownerDocument;x(t,"mouseup",this._onDrop),x(t,"touchend",this._onDrop),x(t,"pointerup",this._onDrop),x(t,"touchcancel",this._onDrop),x(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;mt=N(at),gt=N(at,n.draggable),ot("drop",this,{evt:t}),ut=at&&at.parentNode,mt=N(at),gt=N(at,n.draggable),Zt.eventCanceled||(kt=!1,It=!1,$t=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),ce(this.cloneId),ce(this._dragStartId),this.nativeDraggable&&(x(document,"drop",this),x(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),b&&T(document.body,"user-select",""),T(at,"transform",""),t&&(Dt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),lt&&lt.parentNode&&lt.parentNode.removeChild(lt),(ct===ut||yt&&"clone"!==yt.lastPutMode)&&dt&&dt.parentNode&&dt.parentNode.removeChild(dt),at&&(this.nativeDraggable&&x(at,"dragend",this),ee(at),at.style["will-change"]="",Dt&&!kt&&P(at,yt?yt.options.ghostClass:this.options.ghostClass,!1),P(at,this.options.chosenClass,!1),it({sortable:this,name:"unchoose",toEl:ut,newIndex:null,newDraggableIndex:null,originalEvent:t}),ct!==ut?(mt>=0&&(it({rootEl:ut,name:"add",toEl:ut,fromEl:ct,originalEvent:t}),it({sortable:this,name:"remove",toEl:ut,originalEvent:t}),it({rootEl:ut,name:"sort",toEl:ut,fromEl:ct,originalEvent:t}),it({sortable:this,name:"sort",toEl:ut,originalEvent:t})),yt&&yt.save()):mt!==ht&&mt>=0&&(it({sortable:this,name:"update",toEl:ut,originalEvent:t}),it({sortable:this,name:"sort",toEl:ut,originalEvent:t})),Zt.active&&(null!=mt&&-1!==mt||(mt=ht,gt=vt),it({sortable:this,name:"end",toEl:ut,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){ot("nulling",this),ct=at=ut=lt=st=dt=ft=pt=wt=_t=Dt=mt=gt=ht=vt=jt=Et=yt=bt=Zt.dragged=Zt.ghost=Zt.clone=Zt.active=null,Nt.forEach((function(t){t.checked=!0})),Nt.length=Ot=xt=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":at&&(this._onDragOver(t),Qt(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t,e=[],n=this.el.children,r=0,o=n.length,i=this.options;r<o;r++)t=n[r],D(t,i.draggable,this.el,!1)&&e.push(t.getAttribute(i.dataIdAttr)||ae(t));return e},sort:function(t){var e={},n=this.el;this.toArray().forEach((function(t,r){var o=n.children[r];D(o,this.options.draggable,n,!1)&&(e[t]=o)}),this),t.forEach((function(t){e[t]&&(n.removeChild(e[t]),n.appendChild(e[t]))}))},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return D(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var r=nt.modifyOption(this,t,e);n[t]="undefined"!==typeof r?r:e,"group"===t&&Gt(n)},destroy:function(){ot("destroy",this);var t=this.el;t[K]=null,x(t,"mousedown",this._onTapStart),x(t,"touchstart",this._onTapStart),x(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(x(t,"dragover",this),x(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),At.splice(At.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!pt){if(ot("hideClone",this),Zt.eventCanceled)return;T(dt,"display","none"),this.options.removeCloneOnHide&&dt.parentNode&&dt.parentNode.removeChild(dt),pt=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(pt){if(ot("showClone",this),Zt.eventCanceled)return;ct.contains(at)&&!this.options.group.revertClone?ct.insertBefore(dt,at):st?ct.insertBefore(dt,st):ct.appendChild(dt),this.options.group.revertClone&&this.animate(at,dt),T(dt,"display",""),pt=!1}}else this._hideClone()}},Lt&&O(document,"touchmove",(function(t){(Zt.active||kt)&&t.cancelable&&t.preventDefault()})),Zt.utils={on:O,off:x,css:T,find:M,is:function(t,e){return!!D(t,e,t,!1)},extend:q,throttle:z,closest:D,toggleClass:P,clone:G,index:N,nextTick:le,cancelNextTick:ce,detectDirection:zt,getChild:R},Zt.get=function(t){return t[K]},Zt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Zt.utils=a({},Zt.utils,t.utils)),nt.mount(t)}))},Zt.create=function(t,e){return new Zt(t,e)},Zt.version=p;var se,fe,de,pe,he,me,ve=[],ge=!1;function be(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"===typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?O(document,"dragover",this._handleAutoScroll):this.options.supportPointer?O(document,"pointermove",this._handleFallbackAutoScroll):e.touches?O(document,"touchmove",this._handleFallbackAutoScroll):O(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?x(document,"dragover",this._handleAutoScroll):(x(document,"pointermove",this._handleFallbackAutoScroll),x(document,"touchmove",this._handleFallbackAutoScroll),x(document,"mousemove",this._handleFallbackAutoScroll)),we(),ye(),Y()},nulling:function(){he=fe=se=ge=me=de=pe=null,ve.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,i=document.elementFromPoint(r,o);if(he=t,e||v||m||b){Oe(t,this.options,i,e);var a=B(i,!0);!ge||me&&r===de&&o===pe||(me&&we(),me=setInterval((function(){var i=B(document.elementFromPoint(r,o),!0);i!==a&&(a=i,ye()),Oe(t,n.options,i,e)}),10),de=r,pe=o)}else{if(!this.options.bubbleScroll||B(i,!0)===A())return void ye();Oe(t,this.options,B(i,!1),!1)}}},i(t,{pluginName:"scroll",initializeByDefault:!0})}function ye(){ve.forEach((function(t){clearInterval(t.pid)})),ve=[]}function we(){clearInterval(me)}var _e,Oe=z((function(t,e,n,r){if(e.scroll){var o,i=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,u=e.scrollSensitivity,l=e.scrollSpeed,c=A(),s=!1;fe!==n&&(fe=n,ye(),se=e.scroll,o=e.scrollFn,!0===se&&(se=B(n,!0)));var f=0,d=se;do{var p=d,h=$(p),m=h.top,v=h.bottom,g=h.left,b=h.right,y=h.width,w=h.height,_=void 0,O=void 0,x=p.scrollWidth,S=p.scrollHeight,C=T(p),D=p.scrollLeft,j=p.scrollTop;p===c?(_=y<x&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),O=w<S&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(_=y<x&&("auto"===C.overflowX||"scroll"===C.overflowX),O=w<S&&("auto"===C.overflowY||"scroll"===C.overflowY));var E=_&&(Math.abs(b-i)<=u&&D+y<x)-(Math.abs(g-i)<=u&&!!D),P=O&&(Math.abs(v-a)<=u&&j+w<S)-(Math.abs(m-a)<=u&&!!j);if(!ve[f])for(var k=0;k<=f;k++)ve[k]||(ve[k]={});ve[f].vx==E&&ve[f].vy==P&&ve[f].el===p||(ve[f].el=p,ve[f].vx=E,ve[f].vy=P,clearInterval(ve[f].pid),0==E&&0==P||(s=!0,ve[f].pid=setInterval(function(){r&&0===this.layer&&Zt.active._onTouchMove(he);var e=ve[this.layer].vy?ve[this.layer].vy*l:0,n=ve[this.layer].vx?ve[this.layer].vx*l:0;"function"===typeof o&&"continue"!==o.call(Zt.dragged.parentNode[K],n,e,t,he,ve[this.layer].el)||U(ve[this.layer].el,n,e)}.bind({layer:f}),24))),f++}while(e.bubbleScroll&&d!==c&&(d=B(d,!1)));ge=s}}),30),xe=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,i=t.dispatchSortableEvent,a=t.hideGhostForTarget,u=t.unhideGhostForTarget;if(e){var l=n||o;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,s=document.elementFromPoint(c.clientX,c.clientY);u(),l&&!l.el.contains(s)&&(i("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function Se(){}function Ce(){}function De(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;_e=e},dragOverValid:function(t){var e=t.completed,n=t.target,r=t.onMove,o=t.activeSortable,i=t.changed,a=t.cancel;if(o.options.swap){var u=this.sortable.el,l=this.options;if(n&&n!==u){var c=_e;!1!==r(n)?(P(n,l.swapClass,!0),_e=n):_e=null,c&&c!==_e&&P(c,l.swapClass,!1)}i()