ecinc-cloud-yoaemail 9.6.245 → 9.6.247

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2727,7 +2727,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-c807af5e]:export{stdMenuBgcolo
2727
2727
 
2728
2728
  /***/ }),
2729
2729
 
2730
- /***/ 4750:
2730
+ /***/ 151:
2731
2731
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2732
2732
 
2733
2733
  "use strict";
@@ -2741,7 +2741,7 @@ __webpack_require__.r(__webpack_exports__);
2741
2741
 
2742
2742
  var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
2743
2743
  // Module
2744
- ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-6252c928] .attachFile .el-input__inner{width:76px;height:20px;text-align:center;line-height:20px;padding:0 5px}[data-v-6252c928] #busiForm table td{vertical-align:top}.RichtextEditor[data-v-6252c928] .richtext-container .el-table td div{height:100%}.RichtextEditor[data-v-6252c928] .richtext-container .cke_inner{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.RichtextEditor[data-v-6252c928] .richtext-container .cke_inner .cke_contents{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.spanLH[data-v-6252c928]{font-size:var(--portalFontSize13);text-align:center;color:#c9c9c9}.mailWrap[data-v-6252c928]{-webkit-box-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:9px 0 0 0}.sendMail[data-v-6252c928]{padding:0 0 0 10px}.sendMail .lineRow[data-v-6252c928]{margin:0!important;border-bottom:1px solid #eceff5;display:-webkit-box;display:-ms-flexbox;display:flex}.sendMail .lineRow .grid-content[data-v-6252c928]{height:100%;width:calc(100% - 72px);padding-left:16px}.sendMail .lineRow .grid-content .btnBorder[data-v-6252c928]{border:none!important}.sendMail .lineRow .grid-content .btnBorder[data-v-6252c928] .el-input__inner{border:none!important;height:unset;line-height:20px;padding-left:unset}.el-inputLyy__inner[data-v-6252c928] .el-input__inner{line-height:40px!important}[data-v-6252c928] input::-webkit-input-placeholder{color:#c9c9c9;font-size:var(--portalFontSize13)}[data-v-6252c928] input::-moz-input-placeholder{color:#c9c9c9;font-size:var(--portalFontSize13)}[data-v-6252c928] input::-ms-input-placeholder{color:#c9c9c9;font-size:var(--portalFontSize13)}.linkEmail[data-v-6252c928]{width:220px;max-height:calc(100vh - 270px);position:absolute;left:4%;z-index:99;top:135px;background-color:#fff;overflow-y:auto;-webkit-box-shadow:0 0 5px rgba(0,0,0,.1)!important;box-shadow:0 0 5px rgba(0,0,0,.1)!important;border-radius:4px}.linkEmail div[data-v-6252c928]{overflow-x:hidden;padding:10px}.linkEmail div p[data-v-6252c928]{width:200px;height:26px;overflow:hidden;word-break:break-all;text-overflow:clip;padding:0;margin:0;line-height:30px;font-size:var(--portalFontSize12);cursor:pointer}.linkEmail div p[data-v-6252c928]:hover{color:#409eff}.linkEmail[data-v-6252c928]::-webkit-scrollbar{display:none}[data-v-6252c928] .el-input__suffix{display:none}[data-v-6252c928] .el-input__inner{text-align:left}.RichtextEditor[data-v-6252c928] .richtext-container{margin:0;height:100%}.RichtextEditor[data-v-6252c928] .richtext-container .el-table{height:100%;border:none}.RichtextEditor[data-v-6252c928] .richtext-container .el-table:before{width:0}.RichtextEditor[data-v-6252c928] .richtext-container .el-table .el-table__body-wrapper,.RichtextEditor[data-v-6252c928] .richtext-container .el-table .el-table__body-wrapper .el-table__body{height:100%}[data-v-6252c928] .cke_top{border-bottom:none}[data-v-6252c928] .el-table--border:after{width:0}[data-v-6252c928] #busiForm table,[data-v-6252c928] #busiForm table td{border:none}.emailAddrStyle[data-v-6252c928]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-right:10px;margin-bottom:8px}.emailAddrStyle div[data-v-6252c928]{font-size:var(--portalFontSize12);border-radius:20px;cursor:pointer;border:1px solid #e0e0e0}.emailAddrStyle div i[data-v-6252c928]{color:#c0c4cc}.emailAddrStyle div[data-v-6252c928]:hover{border-color:#aaa}.emailAddrStyle div:hover i[data-v-6252c928]{border-left-color:#aaa!important;color:#aaa}.emailAddrStyle div span[data-v-6252c928]{padding:3px 5px 3px 10px;color:#333}.emailAddrStyle div i[data-v-6252c928]:hover{color:red!important}.inputWrap[data-v-6252c928]{padding-top:10px}.inputWrap[data-v-6252c928] .el-scrollbar .el-scrollbar__wrap{max-height:150px;overflow-x:hidden}.inputWrap[data-v-6252c928] .el-scrollbar .el-scrollbar__wrap .el-scrollbar__view{padding-bottom:20px}.inputWrap>div.emailAddrStyle[data-v-6252c928]:last-child{margin-right:unset}.readyFile[data-v-6252c928]{margin:0 23px 14px 0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:330px;height:56px;background:#f7f8fa;padding:10px}", ""]);
2744
+ ___CSS_LOADER_EXPORT___.push([module.id, "[data-v-0936748c] .attachFile .el-input__inner{width:76px;height:20px;text-align:center;line-height:20px;padding:0 5px}[data-v-0936748c] #busiForm table td{vertical-align:top}.RichtextEditor[data-v-0936748c] .richtext-container .el-table td div{height:100%}.RichtextEditor[data-v-0936748c] .richtext-container .cke_inner{height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.RichtextEditor[data-v-0936748c] .richtext-container .cke_inner .cke_contents{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.spanLH[data-v-0936748c]{font-size:var(--portalFontSize13);text-align:center;color:#c9c9c9}.mailWrap[data-v-0936748c]{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:9px 0 0 0;position:relative}.mailWrap[data-v-0936748c],.mailWrap .drag-mask[data-v-0936748c]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.mailWrap .drag-mask[data-v-0936748c]{position:absolute;left:0;top:0;height:calc(100% - 518px);width:100%;background-color:hsla(0,0%,100%,.8);-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px);z-index:999;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;gap:8px}.mailWrap .drag-mask .svg-icon[data-v-0936748c]{color:var(--subjectColor);font-size:100px}.sendMail[data-v-0936748c]{padding:0 0 0 10px}.sendMail .lineRow[data-v-0936748c]{margin:0!important;border-bottom:1px solid #eceff5;display:-webkit-box;display:-ms-flexbox;display:flex}.sendMail .lineRow .grid-content[data-v-0936748c]{height:100%;width:calc(100% - 72px);padding-left:16px}.sendMail .lineRow .grid-content .btnBorder[data-v-0936748c]{border:none!important}.sendMail .lineRow .grid-content .btnBorder[data-v-0936748c] .el-input__inner{border:none!important;height:unset;line-height:20px;padding-left:unset}.el-inputLyy__inner[data-v-0936748c] .el-input__inner{line-height:40px!important}[data-v-0936748c] input::-webkit-input-placeholder{color:#c9c9c9;font-size:var(--portalFontSize13)}[data-v-0936748c] input::-moz-input-placeholder{color:#c9c9c9;font-size:var(--portalFontSize13)}[data-v-0936748c] input::-ms-input-placeholder{color:#c9c9c9;font-size:var(--portalFontSize13)}.linkEmail[data-v-0936748c]{width:220px;max-height:calc(100vh - 270px);position:absolute;left:4%;z-index:99;top:135px;background-color:#fff;overflow-y:auto;-webkit-box-shadow:0 0 5px rgba(0,0,0,.1)!important;box-shadow:0 0 5px rgba(0,0,0,.1)!important;border-radius:4px}.linkEmail div[data-v-0936748c]{overflow-x:hidden;padding:10px}.linkEmail div p[data-v-0936748c]{width:200px;height:26px;overflow:hidden;word-break:break-all;text-overflow:clip;padding:0;margin:0;line-height:30px;font-size:var(--portalFontSize12);cursor:pointer}.linkEmail div p[data-v-0936748c]:hover{color:#409eff}.linkEmail[data-v-0936748c]::-webkit-scrollbar{display:none}[data-v-0936748c] .el-input__suffix{display:none}[data-v-0936748c] .el-input__inner{text-align:left}.RichtextEditor[data-v-0936748c] .richtext-container{margin:0;height:100%}.RichtextEditor[data-v-0936748c] .richtext-container .el-table{height:100%;border:none}.RichtextEditor[data-v-0936748c] .richtext-container .el-table:before{width:0}.RichtextEditor[data-v-0936748c] .richtext-container .el-table .el-table__body-wrapper,.RichtextEditor[data-v-0936748c] .richtext-container .el-table .el-table__body-wrapper .el-table__body{height:100%}[data-v-0936748c] .cke_top{border-bottom:none}[data-v-0936748c] .el-table--border:after{width:0}[data-v-0936748c] #busiForm table,[data-v-0936748c] #busiForm table td{border:none}.emailAddrStyle[data-v-0936748c]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;margin-right:10px;margin-bottom:8px}.emailAddrStyle div[data-v-0936748c]{font-size:var(--portalFontSize12);border-radius:20px;cursor:pointer;border:1px solid #e0e0e0}.emailAddrStyle div i[data-v-0936748c]{color:#c0c4cc}.emailAddrStyle div[data-v-0936748c]:hover{border-color:#aaa}.emailAddrStyle div:hover i[data-v-0936748c]{border-left-color:#aaa!important;color:#aaa}.emailAddrStyle div span[data-v-0936748c]{padding:3px 5px 3px 10px;color:#333;cursor:pointer}.emailAddrStyle div i[data-v-0936748c]:hover{color:red!important}.inputWrap[data-v-0936748c]{padding-top:10px}.inputWrap[data-v-0936748c] .el-scrollbar .el-scrollbar__wrap{max-height:150px;overflow-x:hidden}.inputWrap[data-v-0936748c] .el-scrollbar .el-scrollbar__wrap .el-scrollbar__view{padding-bottom:20px}.inputWrap>div.emailAddrStyle[data-v-0936748c]:last-child{margin-right:unset}.readyFile[data-v-0936748c]{margin:0 23px 14px 0;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;width:330px;height:56px;background:#f7f8fa;padding:10px}", ""]);
2745
2745
  // Exports
2746
2746
  /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___);
2747
2747
 
@@ -27150,19 +27150,19 @@ var update = add("76cb9540", content, true, {"sourceMap":false,"shadowMode":fals
27150
27150
 
27151
27151
  /***/ }),
27152
27152
 
27153
- /***/ 1188:
27153
+ /***/ 2385:
27154
27154
  /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
27155
27155
 
27156
27156
  // style-loader: Adds some css to the DOM by adding a <style> tag
27157
27157
 
27158
27158
  // load the styles
27159
- var content = __webpack_require__(4750);
27159
+ var content = __webpack_require__(151);
27160
27160
  if(content.__esModule) content = content.default;
27161
27161
  if(typeof content === 'string') content = [[module.id, content, '']];
27162
27162
  if(content.locals) module.exports = content.locals;
27163
27163
  // add the styles to the DOM
27164
27164
  var add = (__webpack_require__(9548)/* ["default"] */ .A)
27165
- var update = add("0da61f98", content, true, {"sourceMap":false,"shadowMode":false});
27165
+ var update = add("56cd6ef5", content, true, {"sourceMap":false,"shadowMode":false});
27166
27166
 
27167
27167
  /***/ }),
27168
27168
 
@@ -36201,8 +36201,8 @@ var list_component = normalizeComponent(
36201
36201
  )
36202
36202
 
36203
36203
  /* harmony default export */ var list = (list_component.exports);
36204
- ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/email/src/xieyoujian.vue?vue&type=template&id=6252c928&scoped=true
36205
- var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render() {
36204
+ ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/email/src/xieyoujian.vue?vue&type=template&id=0936748c&scoped=true
36205
+ var xieyoujianvue_type_template_id_0936748c_scoped_true_render = function render() {
36206
36206
  var _vm = this,
36207
36207
  _c = _vm._self._c;
36208
36208
  return _c('div', {
@@ -36232,7 +36232,26 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36232
36232
  expression: "loading"
36233
36233
  }],
36234
36234
  staticClass: "mailWrap"
36235
- }, [_c('el-row', {
36235
+ }, [_vm.isDragging ? _c('div', {
36236
+ ref: "dropZone",
36237
+ staticClass: "drag-mask",
36238
+ on: {
36239
+ "dragleave": _vm.handleDragLeave,
36240
+ "drop": function drop($event) {
36241
+ $event.stopPropagation();
36242
+ return _vm.handleDrop.apply(null, arguments);
36243
+ },
36244
+ "dragover": function dragover($event) {
36245
+ $event.preventDefault();
36246
+ return function () {}.apply(null, arguments);
36247
+ },
36248
+ "dragenter": _vm.handleDragEnter
36249
+ }
36250
+ }, [_c('svg-icon', {
36251
+ attrs: {
36252
+ "icon-class": "email_upload"
36253
+ }
36254
+ }), _c('div', [_vm._v("在此处拖放文件")])], 1) : _vm._e(), _c('el-row', {
36236
36255
  staticClass: "lineRow",
36237
36256
  staticStyle: {
36238
36257
  "border-bottom": "none"
@@ -36252,6 +36271,9 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36252
36271
  staticStyle: {
36253
36272
  "width": "100%",
36254
36273
  "padding-left": "unset"
36274
+ },
36275
+ on: {
36276
+ "dragenter": _vm.handleDragEnter
36255
36277
  }
36256
36278
  }, [_c('div', {
36257
36279
  staticStyle: {
@@ -36386,6 +36408,10 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36386
36408
  "method": "post",
36387
36409
  "autocomplete": "off"
36388
36410
  }
36411
+ }, [_c('div', {
36412
+ on: {
36413
+ "dragenter": _vm.handleDragEnter
36414
+ }
36389
36415
  }, [_c('div', {
36390
36416
  staticClass: "lineRow",
36391
36417
  on: {
@@ -36413,7 +36439,7 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36413
36439
  }, [_vm._v("收件人")])]), _c('div', {
36414
36440
  staticClass: "grid-content bg-purple-dark"
36415
36441
  }, [_c('div', {
36416
- staticClass: "inputWrap"
36442
+ staticClass: "inputWrap sendList"
36417
36443
  }, [_c('el-scrollbar', [_vm.sendList.length > 0 ? _vm._l(_vm.sendList, function (item, index) {
36418
36444
  return _c('div', {
36419
36445
  key: item,
@@ -36493,7 +36519,7 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36493
36519
  }, [_vm._v("抄送人:")])]), _c('div', {
36494
36520
  staticClass: "grid-content bg-purple-dark"
36495
36521
  }, [_c('div', {
36496
- staticClass: "inputWrap"
36522
+ staticClass: "inputWrap copyToList"
36497
36523
  }, [_c('el-scrollbar', [_vm.copyToList.length > 0 ? _vm._l(_vm.copyToList, function (item, index) {
36498
36524
  return _c('div', {
36499
36525
  key: item,
@@ -36572,7 +36598,7 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36572
36598
  }, [_vm._v("密送人:")])]), _c('div', {
36573
36599
  staticClass: "grid-content bg-purple-dark"
36574
36600
  }, [_c('div', {
36575
- staticClass: "inputWrap"
36601
+ staticClass: "inputWrap blindCopyToList"
36576
36602
  }, [_c('el-scrollbar', [_vm.blindCopyToList.length > 0 ? _vm._l(_vm.blindCopyToList, function (item, index) {
36577
36603
  return _c('div', {
36578
36604
  key: item,
@@ -36793,7 +36819,7 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36793
36819
  }
36794
36820
  }
36795
36821
  })]);
36796
- }), 0)])]), _vm.showeditor ? _c('div', {
36822
+ }), 0)])])]), _vm.showeditor ? _c('div', {
36797
36823
  staticClass: "RichtextEditor",
36798
36824
  staticStyle: {
36799
36825
  "border": "1px solid #eceff5",
@@ -36979,7 +37005,7 @@ var xieyoujianvue_type_template_id_6252c928_scoped_true_render = function render
36979
37005
  }
36980
37006
  })], 1)])]) : _vm._e()])]);
36981
37007
  };
36982
- var xieyoujianvue_type_template_id_6252c928_scoped_true_staticRenderFns = [];
37008
+ var xieyoujianvue_type_template_id_0936748c_scoped_true_staticRenderFns = [];
36983
37009
 
36984
37010
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/email/src/components/txl.vue?vue&type=template&id=0d337f2c&scoped=true
36985
37011
  var txlvue_type_template_id_0d337f2c_scoped_true_render = function render() {
@@ -37922,17 +37948,3371 @@ var txl_component = normalizeComponent(
37922
37948
  )
37923
37949
 
37924
37950
  /* harmony default export */ var txl = (txl_component.exports);
37951
+ ;// CONCATENATED MODULE: ./node_modules/sortablejs/modular/sortable.esm.js
37952
+ /**!
37953
+ * Sortable 1.15.2
37954
+ * @author RubaXa <trash@rubaxa.org>
37955
+ * @author owenm <owen23355@gmail.com>
37956
+ * @license MIT
37957
+ */
37958
+ function sortable_esm_ownKeys(object, enumerableOnly) {
37959
+ var keys = Object.keys(object);
37960
+ if (Object.getOwnPropertySymbols) {
37961
+ var symbols = Object.getOwnPropertySymbols(object);
37962
+ if (enumerableOnly) {
37963
+ symbols = symbols.filter(function (sym) {
37964
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
37965
+ });
37966
+ }
37967
+ keys.push.apply(keys, symbols);
37968
+ }
37969
+ return keys;
37970
+ }
37971
+ function _objectSpread2(target) {
37972
+ for (var i = 1; i < arguments.length; i++) {
37973
+ var source = arguments[i] != null ? arguments[i] : {};
37974
+ if (i % 2) {
37975
+ sortable_esm_ownKeys(Object(source), true).forEach(function (key) {
37976
+ sortable_esm_defineProperty(target, key, source[key]);
37977
+ });
37978
+ } else if (Object.getOwnPropertyDescriptors) {
37979
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
37980
+ } else {
37981
+ sortable_esm_ownKeys(Object(source)).forEach(function (key) {
37982
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37983
+ });
37984
+ }
37985
+ }
37986
+ return target;
37987
+ }
37988
+ function sortable_esm_typeof(obj) {
37989
+ "@babel/helpers - typeof";
37990
+
37991
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
37992
+ sortable_esm_typeof = function (obj) {
37993
+ return typeof obj;
37994
+ };
37995
+ } else {
37996
+ sortable_esm_typeof = function (obj) {
37997
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
37998
+ };
37999
+ }
38000
+ return sortable_esm_typeof(obj);
38001
+ }
38002
+ function sortable_esm_defineProperty(obj, key, value) {
38003
+ if (key in obj) {
38004
+ Object.defineProperty(obj, key, {
38005
+ value: value,
38006
+ enumerable: true,
38007
+ configurable: true,
38008
+ writable: true
38009
+ });
38010
+ } else {
38011
+ obj[key] = value;
38012
+ }
38013
+ return obj;
38014
+ }
38015
+ function _extends() {
38016
+ _extends = Object.assign || function (target) {
38017
+ for (var i = 1; i < arguments.length; i++) {
38018
+ var source = arguments[i];
38019
+ for (var key in source) {
38020
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
38021
+ target[key] = source[key];
38022
+ }
38023
+ }
38024
+ }
38025
+ return target;
38026
+ };
38027
+ return _extends.apply(this, arguments);
38028
+ }
38029
+ function _objectWithoutPropertiesLoose(source, excluded) {
38030
+ if (source == null) return {};
38031
+ var target = {};
38032
+ var sourceKeys = Object.keys(source);
38033
+ var key, i;
38034
+ for (i = 0; i < sourceKeys.length; i++) {
38035
+ key = sourceKeys[i];
38036
+ if (excluded.indexOf(key) >= 0) continue;
38037
+ target[key] = source[key];
38038
+ }
38039
+ return target;
38040
+ }
38041
+ function _objectWithoutProperties(source, excluded) {
38042
+ if (source == null) return {};
38043
+ var target = _objectWithoutPropertiesLoose(source, excluded);
38044
+ var key, i;
38045
+ if (Object.getOwnPropertySymbols) {
38046
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
38047
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
38048
+ key = sourceSymbolKeys[i];
38049
+ if (excluded.indexOf(key) >= 0) continue;
38050
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
38051
+ target[key] = source[key];
38052
+ }
38053
+ }
38054
+ return target;
38055
+ }
38056
+ function _toConsumableArray(arr) {
38057
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
38058
+ }
38059
+ function _arrayWithoutHoles(arr) {
38060
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
38061
+ }
38062
+ function _iterableToArray(iter) {
38063
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
38064
+ }
38065
+ function _unsupportedIterableToArray(o, minLen) {
38066
+ if (!o) return;
38067
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
38068
+ var n = Object.prototype.toString.call(o).slice(8, -1);
38069
+ if (n === "Object" && o.constructor) n = o.constructor.name;
38070
+ if (n === "Map" || n === "Set") return Array.from(o);
38071
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
38072
+ }
38073
+ function _arrayLikeToArray(arr, len) {
38074
+ if (len == null || len > arr.length) len = arr.length;
38075
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
38076
+ return arr2;
38077
+ }
38078
+ function _nonIterableSpread() {
38079
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
38080
+ }
38081
+
38082
+ var version = "1.15.2";
38083
+
38084
+ function userAgent(pattern) {
38085
+ if (typeof window !== 'undefined' && window.navigator) {
38086
+ return !! /*@__PURE__*/navigator.userAgent.match(pattern);
38087
+ }
38088
+ }
38089
+ var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
38090
+ var Edge = userAgent(/Edge/i);
38091
+ var FireFox = userAgent(/firefox/i);
38092
+ var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
38093
+ var IOS = userAgent(/iP(ad|od|hone)/i);
38094
+ var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
38095
+
38096
+ var captureMode = {
38097
+ capture: false,
38098
+ passive: false
38099
+ };
38100
+ function on(el, event, fn) {
38101
+ el.addEventListener(event, fn, !IE11OrLess && captureMode);
38102
+ }
38103
+ function off(el, event, fn) {
38104
+ el.removeEventListener(event, fn, !IE11OrLess && captureMode);
38105
+ }
38106
+ function matches( /**HTMLElement*/el, /**String*/selector) {
38107
+ if (!selector) return;
38108
+ selector[0] === '>' && (selector = selector.substring(1));
38109
+ if (el) {
38110
+ try {
38111
+ if (el.matches) {
38112
+ return el.matches(selector);
38113
+ } else if (el.msMatchesSelector) {
38114
+ return el.msMatchesSelector(selector);
38115
+ } else if (el.webkitMatchesSelector) {
38116
+ return el.webkitMatchesSelector(selector);
38117
+ }
38118
+ } catch (_) {
38119
+ return false;
38120
+ }
38121
+ }
38122
+ return false;
38123
+ }
38124
+ function getParentOrHost(el) {
38125
+ return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
38126
+ }
38127
+ function closest( /**HTMLElement*/el, /**String*/selector, /**HTMLElement*/ctx, includeCTX) {
38128
+ if (el) {
38129
+ ctx = ctx || document;
38130
+ do {
38131
+ if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
38132
+ return el;
38133
+ }
38134
+ if (el === ctx) break;
38135
+ /* jshint boss:true */
38136
+ } while (el = getParentOrHost(el));
38137
+ }
38138
+ return null;
38139
+ }
38140
+ var R_SPACE = /\s+/g;
38141
+ function toggleClass(el, name, state) {
38142
+ if (el && name) {
38143
+ if (el.classList) {
38144
+ el.classList[state ? 'add' : 'remove'](name);
38145
+ } else {
38146
+ var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
38147
+ el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
38148
+ }
38149
+ }
38150
+ }
38151
+ function css(el, prop, val) {
38152
+ var style = el && el.style;
38153
+ if (style) {
38154
+ if (val === void 0) {
38155
+ if (document.defaultView && document.defaultView.getComputedStyle) {
38156
+ val = document.defaultView.getComputedStyle(el, '');
38157
+ } else if (el.currentStyle) {
38158
+ val = el.currentStyle;
38159
+ }
38160
+ return prop === void 0 ? val : val[prop];
38161
+ } else {
38162
+ if (!(prop in style) && prop.indexOf('webkit') === -1) {
38163
+ prop = '-webkit-' + prop;
38164
+ }
38165
+ style[prop] = val + (typeof val === 'string' ? '' : 'px');
38166
+ }
38167
+ }
38168
+ }
38169
+ function matrix(el, selfOnly) {
38170
+ var appliedTransforms = '';
38171
+ if (typeof el === 'string') {
38172
+ appliedTransforms = el;
38173
+ } else {
38174
+ do {
38175
+ var transform = css(el, 'transform');
38176
+ if (transform && transform !== 'none') {
38177
+ appliedTransforms = transform + ' ' + appliedTransforms;
38178
+ }
38179
+ /* jshint boss:true */
38180
+ } while (!selfOnly && (el = el.parentNode));
38181
+ }
38182
+ var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
38183
+ /*jshint -W056 */
38184
+ return matrixFn && new matrixFn(appliedTransforms);
38185
+ }
38186
+ function sortable_esm_find(ctx, tagName, iterator) {
38187
+ if (ctx) {
38188
+ var list = ctx.getElementsByTagName(tagName),
38189
+ i = 0,
38190
+ n = list.length;
38191
+ if (iterator) {
38192
+ for (; i < n; i++) {
38193
+ iterator(list[i], i);
38194
+ }
38195
+ }
38196
+ return list;
38197
+ }
38198
+ return [];
38199
+ }
38200
+ function getWindowScrollingElement() {
38201
+ var scrollingElement = document.scrollingElement;
38202
+ if (scrollingElement) {
38203
+ return scrollingElement;
38204
+ } else {
38205
+ return document.documentElement;
38206
+ }
38207
+ }
38208
+
38209
+ /**
38210
+ * Returns the "bounding client rect" of given element
38211
+ * @param {HTMLElement} el The element whose boundingClientRect is wanted
38212
+ * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
38213
+ * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
38214
+ * @param {[Boolean]} undoScale Whether the container's scale() should be undone
38215
+ * @param {[HTMLElement]} container The parent the element will be placed in
38216
+ * @return {Object} The boundingClientRect of el, with specified adjustments
38217
+ */
38218
+ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
38219
+ if (!el.getBoundingClientRect && el !== window) return;
38220
+ var elRect, top, left, bottom, right, height, width;
38221
+ if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
38222
+ elRect = el.getBoundingClientRect();
38223
+ top = elRect.top;
38224
+ left = elRect.left;
38225
+ bottom = elRect.bottom;
38226
+ right = elRect.right;
38227
+ height = elRect.height;
38228
+ width = elRect.width;
38229
+ } else {
38230
+ top = 0;
38231
+ left = 0;
38232
+ bottom = window.innerHeight;
38233
+ right = window.innerWidth;
38234
+ height = window.innerHeight;
38235
+ width = window.innerWidth;
38236
+ }
38237
+ if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
38238
+ // Adjust for translate()
38239
+ container = container || el.parentNode;
38240
+
38241
+ // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
38242
+ // Not needed on <= IE11
38243
+ if (!IE11OrLess) {
38244
+ do {
38245
+ if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
38246
+ var containerRect = container.getBoundingClientRect();
38247
+
38248
+ // Set relative to edges of padding box of container
38249
+ top -= containerRect.top + parseInt(css(container, 'border-top-width'));
38250
+ left -= containerRect.left + parseInt(css(container, 'border-left-width'));
38251
+ bottom = top + elRect.height;
38252
+ right = left + elRect.width;
38253
+ break;
38254
+ }
38255
+ /* jshint boss:true */
38256
+ } while (container = container.parentNode);
38257
+ }
38258
+ }
38259
+ if (undoScale && el !== window) {
38260
+ // Adjust for scale()
38261
+ var elMatrix = matrix(container || el),
38262
+ scaleX = elMatrix && elMatrix.a,
38263
+ scaleY = elMatrix && elMatrix.d;
38264
+ if (elMatrix) {
38265
+ top /= scaleY;
38266
+ left /= scaleX;
38267
+ width /= scaleX;
38268
+ height /= scaleY;
38269
+ bottom = top + height;
38270
+ right = left + width;
38271
+ }
38272
+ }
38273
+ return {
38274
+ top: top,
38275
+ left: left,
38276
+ bottom: bottom,
38277
+ right: right,
38278
+ width: width,
38279
+ height: height
38280
+ };
38281
+ }
38282
+
38283
+ /**
38284
+ * Checks if a side of an element is scrolled past a side of its parents
38285
+ * @param {HTMLElement} el The element who's side being scrolled out of view is in question
38286
+ * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
38287
+ * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
38288
+ * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
38289
+ */
38290
+ function isScrolledPast(el, elSide, parentSide) {
38291
+ var parent = getParentAutoScrollElement(el, true),
38292
+ elSideVal = getRect(el)[elSide];
38293
+
38294
+ /* jshint boss:true */
38295
+ while (parent) {
38296
+ var parentSideVal = getRect(parent)[parentSide],
38297
+ visible = void 0;
38298
+ if (parentSide === 'top' || parentSide === 'left') {
38299
+ visible = elSideVal >= parentSideVal;
38300
+ } else {
38301
+ visible = elSideVal <= parentSideVal;
38302
+ }
38303
+ if (!visible) return parent;
38304
+ if (parent === getWindowScrollingElement()) break;
38305
+ parent = getParentAutoScrollElement(parent, false);
38306
+ }
38307
+ return false;
38308
+ }
38309
+
38310
+ /**
38311
+ * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
38312
+ * and non-draggable elements
38313
+ * @param {HTMLElement} el The parent element
38314
+ * @param {Number} childNum The index of the child
38315
+ * @param {Object} options Parent Sortable's options
38316
+ * @return {HTMLElement} The child at index childNum, or null if not found
38317
+ */
38318
+ function getChild(el, childNum, options, includeDragEl) {
38319
+ var currentChild = 0,
38320
+ i = 0,
38321
+ children = el.children;
38322
+ while (i < children.length) {
38323
+ if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) {
38324
+ if (currentChild === childNum) {
38325
+ return children[i];
38326
+ }
38327
+ currentChild++;
38328
+ }
38329
+ i++;
38330
+ }
38331
+ return null;
38332
+ }
38333
+
38334
+ /**
38335
+ * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
38336
+ * @param {HTMLElement} el Parent element
38337
+ * @param {selector} selector Any other elements that should be ignored
38338
+ * @return {HTMLElement} The last child, ignoring ghostEl
38339
+ */
38340
+ function lastChild(el, selector) {
38341
+ var last = el.lastElementChild;
38342
+ while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
38343
+ last = last.previousElementSibling;
38344
+ }
38345
+ return last || null;
38346
+ }
38347
+
38348
+ /**
38349
+ * Returns the index of an element within its parent for a selected set of
38350
+ * elements
38351
+ * @param {HTMLElement} el
38352
+ * @param {selector} selector
38353
+ * @return {number}
38354
+ */
38355
+ function sortable_esm_index(el, selector) {
38356
+ var index = 0;
38357
+ if (!el || !el.parentNode) {
38358
+ return -1;
38359
+ }
38360
+
38361
+ /* jshint boss:true */
38362
+ while (el = el.previousElementSibling) {
38363
+ if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) {
38364
+ index++;
38365
+ }
38366
+ }
38367
+ return index;
38368
+ }
38369
+
38370
+ /**
38371
+ * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
38372
+ * The value is returned in real pixels.
38373
+ * @param {HTMLElement} el
38374
+ * @return {Array} Offsets in the format of [left, top]
38375
+ */
38376
+ function getRelativeScrollOffset(el) {
38377
+ var offsetLeft = 0,
38378
+ offsetTop = 0,
38379
+ winScroller = getWindowScrollingElement();
38380
+ if (el) {
38381
+ do {
38382
+ var elMatrix = matrix(el),
38383
+ scaleX = elMatrix.a,
38384
+ scaleY = elMatrix.d;
38385
+ offsetLeft += el.scrollLeft * scaleX;
38386
+ offsetTop += el.scrollTop * scaleY;
38387
+ } while (el !== winScroller && (el = el.parentNode));
38388
+ }
38389
+ return [offsetLeft, offsetTop];
38390
+ }
38391
+
38392
+ /**
38393
+ * Returns the index of the object within the given array
38394
+ * @param {Array} arr Array that may or may not hold the object
38395
+ * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
38396
+ * @return {Number} The index of the object in the array, or -1
38397
+ */
38398
+ function indexOfObject(arr, obj) {
38399
+ for (var i in arr) {
38400
+ if (!arr.hasOwnProperty(i)) continue;
38401
+ for (var key in obj) {
38402
+ if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
38403
+ }
38404
+ }
38405
+ return -1;
38406
+ }
38407
+ function getParentAutoScrollElement(el, includeSelf) {
38408
+ // skip to window
38409
+ if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
38410
+ var elem = el;
38411
+ var gotSelf = false;
38412
+ do {
38413
+ // we don't need to get elem css if it isn't even overflowing in the first place (performance)
38414
+ if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
38415
+ var elemCSS = css(elem);
38416
+ if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
38417
+ if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
38418
+ if (gotSelf || includeSelf) return elem;
38419
+ gotSelf = true;
38420
+ }
38421
+ }
38422
+ /* jshint boss:true */
38423
+ } while (elem = elem.parentNode);
38424
+ return getWindowScrollingElement();
38425
+ }
38426
+ function extend(dst, src) {
38427
+ if (dst && src) {
38428
+ for (var key in src) {
38429
+ if (src.hasOwnProperty(key)) {
38430
+ dst[key] = src[key];
38431
+ }
38432
+ }
38433
+ }
38434
+ return dst;
38435
+ }
38436
+ function isRectEqual(rect1, rect2) {
38437
+ return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
38438
+ }
38439
+ var _throttleTimeout;
38440
+ function throttle(callback, ms) {
38441
+ return function () {
38442
+ if (!_throttleTimeout) {
38443
+ var args = arguments,
38444
+ _this = this;
38445
+ if (args.length === 1) {
38446
+ callback.call(_this, args[0]);
38447
+ } else {
38448
+ callback.apply(_this, args);
38449
+ }
38450
+ _throttleTimeout = setTimeout(function () {
38451
+ _throttleTimeout = void 0;
38452
+ }, ms);
38453
+ }
38454
+ };
38455
+ }
38456
+ function cancelThrottle() {
38457
+ clearTimeout(_throttleTimeout);
38458
+ _throttleTimeout = void 0;
38459
+ }
38460
+ function scrollBy(el, x, y) {
38461
+ el.scrollLeft += x;
38462
+ el.scrollTop += y;
38463
+ }
38464
+ function clone(el) {
38465
+ var Polymer = window.Polymer;
38466
+ var $ = window.jQuery || window.Zepto;
38467
+ if (Polymer && Polymer.dom) {
38468
+ return Polymer.dom(el).cloneNode(true);
38469
+ } else if ($) {
38470
+ return $(el).clone(true)[0];
38471
+ } else {
38472
+ return el.cloneNode(true);
38473
+ }
38474
+ }
38475
+ function setRect(el, rect) {
38476
+ css(el, 'position', 'absolute');
38477
+ css(el, 'top', rect.top);
38478
+ css(el, 'left', rect.left);
38479
+ css(el, 'width', rect.width);
38480
+ css(el, 'height', rect.height);
38481
+ }
38482
+ function unsetRect(el) {
38483
+ css(el, 'position', '');
38484
+ css(el, 'top', '');
38485
+ css(el, 'left', '');
38486
+ css(el, 'width', '');
38487
+ css(el, 'height', '');
38488
+ }
38489
+ function getChildContainingRectFromElement(container, options, ghostEl) {
38490
+ var rect = {};
38491
+ Array.from(container.children).forEach(function (child) {
38492
+ var _rect$left, _rect$top, _rect$right, _rect$bottom;
38493
+ if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl) return;
38494
+ var childRect = getRect(child);
38495
+ rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
38496
+ rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
38497
+ rect.right = Math.max((_rect$right = rect.right) !== null && _rect$right !== void 0 ? _rect$right : -Infinity, childRect.right);
38498
+ rect.bottom = Math.max((_rect$bottom = rect.bottom) !== null && _rect$bottom !== void 0 ? _rect$bottom : -Infinity, childRect.bottom);
38499
+ });
38500
+ rect.width = rect.right - rect.left;
38501
+ rect.height = rect.bottom - rect.top;
38502
+ rect.x = rect.left;
38503
+ rect.y = rect.top;
38504
+ return rect;
38505
+ }
38506
+ var expando = 'Sortable' + new Date().getTime();
38507
+
38508
+ function AnimationStateManager() {
38509
+ var animationStates = [],
38510
+ animationCallbackId;
38511
+ return {
38512
+ captureAnimationState: function captureAnimationState() {
38513
+ animationStates = [];
38514
+ if (!this.options.animation) return;
38515
+ var children = [].slice.call(this.el.children);
38516
+ children.forEach(function (child) {
38517
+ if (css(child, 'display') === 'none' || child === Sortable.ghost) return;
38518
+ animationStates.push({
38519
+ target: child,
38520
+ rect: getRect(child)
38521
+ });
38522
+ var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect);
38523
+
38524
+ // If animating: compensate for current animation
38525
+ if (child.thisAnimationDuration) {
38526
+ var childMatrix = matrix(child, true);
38527
+ if (childMatrix) {
38528
+ fromRect.top -= childMatrix.f;
38529
+ fromRect.left -= childMatrix.e;
38530
+ }
38531
+ }
38532
+ child.fromRect = fromRect;
38533
+ });
38534
+ },
38535
+ addAnimationState: function addAnimationState(state) {
38536
+ animationStates.push(state);
38537
+ },
38538
+ removeAnimationState: function removeAnimationState(target) {
38539
+ animationStates.splice(indexOfObject(animationStates, {
38540
+ target: target
38541
+ }), 1);
38542
+ },
38543
+ animateAll: function animateAll(callback) {
38544
+ var _this = this;
38545
+ if (!this.options.animation) {
38546
+ clearTimeout(animationCallbackId);
38547
+ if (typeof callback === 'function') callback();
38548
+ return;
38549
+ }
38550
+ var animating = false,
38551
+ animationTime = 0;
38552
+ animationStates.forEach(function (state) {
38553
+ var time = 0,
38554
+ target = state.target,
38555
+ fromRect = target.fromRect,
38556
+ toRect = getRect(target),
38557
+ prevFromRect = target.prevFromRect,
38558
+ prevToRect = target.prevToRect,
38559
+ animatingRect = state.rect,
38560
+ targetMatrix = matrix(target, true);
38561
+ if (targetMatrix) {
38562
+ // Compensate for current animation
38563
+ toRect.top -= targetMatrix.f;
38564
+ toRect.left -= targetMatrix.e;
38565
+ }
38566
+ target.toRect = toRect;
38567
+ if (target.thisAnimationDuration) {
38568
+ // Could also check if animatingRect is between fromRect and toRect
38569
+ if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) &&
38570
+ // Make sure animatingRect is on line between toRect & fromRect
38571
+ (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
38572
+ // If returning to same place as started from animation and on same axis
38573
+ time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options);
38574
+ }
38575
+ }
38576
+
38577
+ // if fromRect != toRect: animate
38578
+ if (!isRectEqual(toRect, fromRect)) {
38579
+ target.prevFromRect = fromRect;
38580
+ target.prevToRect = toRect;
38581
+ if (!time) {
38582
+ time = _this.options.animation;
38583
+ }
38584
+ _this.animate(target, animatingRect, toRect, time);
38585
+ }
38586
+ if (time) {
38587
+ animating = true;
38588
+ animationTime = Math.max(animationTime, time);
38589
+ clearTimeout(target.animationResetTimer);
38590
+ target.animationResetTimer = setTimeout(function () {
38591
+ target.animationTime = 0;
38592
+ target.prevFromRect = null;
38593
+ target.fromRect = null;
38594
+ target.prevToRect = null;
38595
+ target.thisAnimationDuration = null;
38596
+ }, time);
38597
+ target.thisAnimationDuration = time;
38598
+ }
38599
+ });
38600
+ clearTimeout(animationCallbackId);
38601
+ if (!animating) {
38602
+ if (typeof callback === 'function') callback();
38603
+ } else {
38604
+ animationCallbackId = setTimeout(function () {
38605
+ if (typeof callback === 'function') callback();
38606
+ }, animationTime);
38607
+ }
38608
+ animationStates = [];
38609
+ },
38610
+ animate: function animate(target, currentRect, toRect, duration) {
38611
+ if (duration) {
38612
+ css(target, 'transition', '');
38613
+ css(target, 'transform', '');
38614
+ var elMatrix = matrix(this.el),
38615
+ scaleX = elMatrix && elMatrix.a,
38616
+ scaleY = elMatrix && elMatrix.d,
38617
+ translateX = (currentRect.left - toRect.left) / (scaleX || 1),
38618
+ translateY = (currentRect.top - toRect.top) / (scaleY || 1);
38619
+ target.animatingX = !!translateX;
38620
+ target.animatingY = !!translateY;
38621
+ css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
38622
+ this.forRepaintDummy = repaint(target); // repaint
38623
+
38624
+ css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
38625
+ css(target, 'transform', 'translate3d(0,0,0)');
38626
+ typeof target.animated === 'number' && clearTimeout(target.animated);
38627
+ target.animated = setTimeout(function () {
38628
+ css(target, 'transition', '');
38629
+ css(target, 'transform', '');
38630
+ target.animated = false;
38631
+ target.animatingX = false;
38632
+ target.animatingY = false;
38633
+ }, duration);
38634
+ }
38635
+ }
38636
+ };
38637
+ }
38638
+ function repaint(target) {
38639
+ return target.offsetWidth;
38640
+ }
38641
+ function calculateRealTime(animatingRect, fromRect, toRect, options) {
38642
+ return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
38643
+ }
38644
+
38645
+ var plugins = [];
38646
+ var defaults = {
38647
+ initializeByDefault: true
38648
+ };
38649
+ var PluginManager = {
38650
+ mount: function mount(plugin) {
38651
+ // Set default static properties
38652
+ for (var option in defaults) {
38653
+ if (defaults.hasOwnProperty(option) && !(option in plugin)) {
38654
+ plugin[option] = defaults[option];
38655
+ }
38656
+ }
38657
+ plugins.forEach(function (p) {
38658
+ if (p.pluginName === plugin.pluginName) {
38659
+ throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once");
38660
+ }
38661
+ });
38662
+ plugins.push(plugin);
38663
+ },
38664
+ pluginEvent: function pluginEvent(eventName, sortable, evt) {
38665
+ var _this = this;
38666
+ this.eventCanceled = false;
38667
+ evt.cancel = function () {
38668
+ _this.eventCanceled = true;
38669
+ };
38670
+ var eventNameGlobal = eventName + 'Global';
38671
+ plugins.forEach(function (plugin) {
38672
+ if (!sortable[plugin.pluginName]) return;
38673
+ // Fire global events if it exists in this sortable
38674
+ if (sortable[plugin.pluginName][eventNameGlobal]) {
38675
+ sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
38676
+ sortable: sortable
38677
+ }, evt));
38678
+ }
38679
+
38680
+ // Only fire plugin event if plugin is enabled in this sortable,
38681
+ // and plugin has event defined
38682
+ if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) {
38683
+ sortable[plugin.pluginName][eventName](_objectSpread2({
38684
+ sortable: sortable
38685
+ }, evt));
38686
+ }
38687
+ });
38688
+ },
38689
+ initializePlugins: function initializePlugins(sortable, el, defaults, options) {
38690
+ plugins.forEach(function (plugin) {
38691
+ var pluginName = plugin.pluginName;
38692
+ if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
38693
+ var initialized = new plugin(sortable, el, sortable.options);
38694
+ initialized.sortable = sortable;
38695
+ initialized.options = sortable.options;
38696
+ sortable[pluginName] = initialized;
38697
+
38698
+ // Add default options from plugin
38699
+ _extends(defaults, initialized.defaults);
38700
+ });
38701
+ for (var option in sortable.options) {
38702
+ if (!sortable.options.hasOwnProperty(option)) continue;
38703
+ var modified = this.modifyOption(sortable, option, sortable.options[option]);
38704
+ if (typeof modified !== 'undefined') {
38705
+ sortable.options[option] = modified;
38706
+ }
38707
+ }
38708
+ },
38709
+ getEventProperties: function getEventProperties(name, sortable) {
38710
+ var eventProperties = {};
38711
+ plugins.forEach(function (plugin) {
38712
+ if (typeof plugin.eventProperties !== 'function') return;
38713
+ _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name));
38714
+ });
38715
+ return eventProperties;
38716
+ },
38717
+ modifyOption: function modifyOption(sortable, name, value) {
38718
+ var modifiedValue;
38719
+ plugins.forEach(function (plugin) {
38720
+ // Plugin must exist on the Sortable
38721
+ if (!sortable[plugin.pluginName]) return;
38722
+
38723
+ // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
38724
+ if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') {
38725
+ modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value);
38726
+ }
38727
+ });
38728
+ return modifiedValue;
38729
+ }
38730
+ };
38731
+
38732
+ function dispatchEvent(_ref) {
38733
+ var sortable = _ref.sortable,
38734
+ rootEl = _ref.rootEl,
38735
+ name = _ref.name,
38736
+ targetEl = _ref.targetEl,
38737
+ cloneEl = _ref.cloneEl,
38738
+ toEl = _ref.toEl,
38739
+ fromEl = _ref.fromEl,
38740
+ oldIndex = _ref.oldIndex,
38741
+ newIndex = _ref.newIndex,
38742
+ oldDraggableIndex = _ref.oldDraggableIndex,
38743
+ newDraggableIndex = _ref.newDraggableIndex,
38744
+ originalEvent = _ref.originalEvent,
38745
+ putSortable = _ref.putSortable,
38746
+ extraEventProperties = _ref.extraEventProperties;
38747
+ sortable = sortable || rootEl && rootEl[expando];
38748
+ if (!sortable) return;
38749
+ var evt,
38750
+ options = sortable.options,
38751
+ onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1);
38752
+ // Support for new CustomEvent feature
38753
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
38754
+ evt = new CustomEvent(name, {
38755
+ bubbles: true,
38756
+ cancelable: true
38757
+ });
38758
+ } else {
38759
+ evt = document.createEvent('Event');
38760
+ evt.initEvent(name, true, true);
38761
+ }
38762
+ evt.to = toEl || rootEl;
38763
+ evt.from = fromEl || rootEl;
38764
+ evt.item = targetEl || rootEl;
38765
+ evt.clone = cloneEl;
38766
+ evt.oldIndex = oldIndex;
38767
+ evt.newIndex = newIndex;
38768
+ evt.oldDraggableIndex = oldDraggableIndex;
38769
+ evt.newDraggableIndex = newDraggableIndex;
38770
+ evt.originalEvent = originalEvent;
38771
+ evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
38772
+ var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable));
38773
+ for (var option in allEventProperties) {
38774
+ evt[option] = allEventProperties[option];
38775
+ }
38776
+ if (rootEl) {
38777
+ rootEl.dispatchEvent(evt);
38778
+ }
38779
+ if (options[onName]) {
38780
+ options[onName].call(sortable, evt);
38781
+ }
38782
+ }
38783
+
38784
+ var _excluded = ["evt"];
38785
+ var pluginEvent = function pluginEvent(eventName, sortable) {
38786
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
38787
+ originalEvent = _ref.evt,
38788
+ data = _objectWithoutProperties(_ref, _excluded);
38789
+ PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({
38790
+ dragEl: dragEl,
38791
+ parentEl: parentEl,
38792
+ ghostEl: ghostEl,
38793
+ rootEl: rootEl,
38794
+ nextEl: nextEl,
38795
+ lastDownEl: lastDownEl,
38796
+ cloneEl: cloneEl,
38797
+ cloneHidden: cloneHidden,
38798
+ dragStarted: moved,
38799
+ putSortable: putSortable,
38800
+ activeSortable: Sortable.active,
38801
+ originalEvent: originalEvent,
38802
+ oldIndex: oldIndex,
38803
+ oldDraggableIndex: oldDraggableIndex,
38804
+ newIndex: newIndex,
38805
+ newDraggableIndex: newDraggableIndex,
38806
+ hideGhostForTarget: _hideGhostForTarget,
38807
+ unhideGhostForTarget: _unhideGhostForTarget,
38808
+ cloneNowHidden: function cloneNowHidden() {
38809
+ cloneHidden = true;
38810
+ },
38811
+ cloneNowShown: function cloneNowShown() {
38812
+ cloneHidden = false;
38813
+ },
38814
+ dispatchSortableEvent: function dispatchSortableEvent(name) {
38815
+ _dispatchEvent({
38816
+ sortable: sortable,
38817
+ name: name,
38818
+ originalEvent: originalEvent
38819
+ });
38820
+ }
38821
+ }, data));
38822
+ };
38823
+ function _dispatchEvent(info) {
38824
+ dispatchEvent(_objectSpread2({
38825
+ putSortable: putSortable,
38826
+ cloneEl: cloneEl,
38827
+ targetEl: dragEl,
38828
+ rootEl: rootEl,
38829
+ oldIndex: oldIndex,
38830
+ oldDraggableIndex: oldDraggableIndex,
38831
+ newIndex: newIndex,
38832
+ newDraggableIndex: newDraggableIndex
38833
+ }, info));
38834
+ }
38835
+ var dragEl,
38836
+ parentEl,
38837
+ ghostEl,
38838
+ rootEl,
38839
+ nextEl,
38840
+ lastDownEl,
38841
+ cloneEl,
38842
+ cloneHidden,
38843
+ oldIndex,
38844
+ newIndex,
38845
+ oldDraggableIndex,
38846
+ newDraggableIndex,
38847
+ activeGroup,
38848
+ putSortable,
38849
+ awaitingDragStarted = false,
38850
+ ignoreNextClick = false,
38851
+ sortables = [],
38852
+ tapEvt,
38853
+ touchEvt,
38854
+ lastDx,
38855
+ lastDy,
38856
+ tapDistanceLeft,
38857
+ tapDistanceTop,
38858
+ moved,
38859
+ lastTarget,
38860
+ lastDirection,
38861
+ pastFirstInvertThresh = false,
38862
+ isCircumstantialInvert = false,
38863
+ targetMoveDistance,
38864
+ // For positioning ghost absolutely
38865
+ ghostRelativeParent,
38866
+ ghostRelativeParentInitialScroll = [],
38867
+ // (left, top)
38868
+
38869
+ _silent = false,
38870
+ savedInputChecked = [];
38871
+
38872
+ /** @const */
38873
+ var documentExists = typeof document !== 'undefined',
38874
+ PositionGhostAbsolutely = IOS,
38875
+ CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
38876
+ // This will not pass for IE9, because IE9 DnD only works on anchors
38877
+ supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'),
38878
+ supportCssPointerEvents = function () {
38879
+ if (!documentExists) return;
38880
+ // false when <= IE11
38881
+ if (IE11OrLess) {
38882
+ return false;
38883
+ }
38884
+ var el = document.createElement('x');
38885
+ el.style.cssText = 'pointer-events:auto';
38886
+ return el.style.pointerEvents === 'auto';
38887
+ }(),
38888
+ _detectDirection = function _detectDirection(el, options) {
38889
+ var elCSS = css(el),
38890
+ elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
38891
+ child1 = getChild(el, 0, options),
38892
+ child2 = getChild(el, 1, options),
38893
+ firstChildCSS = child1 && css(child1),
38894
+ secondChildCSS = child2 && css(child2),
38895
+ firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
38896
+ secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
38897
+ if (elCSS.display === 'flex') {
38898
+ return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
38899
+ }
38900
+ if (elCSS.display === 'grid') {
38901
+ return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
38902
+ }
38903
+ if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') {
38904
+ var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
38905
+ return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
38906
+ }
38907
+ return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
38908
+ },
38909
+ _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
38910
+ var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
38911
+ dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
38912
+ dragElOppLength = vertical ? dragRect.width : dragRect.height,
38913
+ targetS1Opp = vertical ? targetRect.left : targetRect.top,
38914
+ targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
38915
+ targetOppLength = vertical ? targetRect.width : targetRect.height;
38916
+ return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
38917
+ },
38918
+ /**
38919
+ * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
38920
+ * @param {Number} x X position
38921
+ * @param {Number} y Y position
38922
+ * @return {HTMLElement} Element of the first found nearest Sortable
38923
+ */
38924
+ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
38925
+ var ret;
38926
+ sortables.some(function (sortable) {
38927
+ var threshold = sortable[expando].options.emptyInsertThreshold;
38928
+ if (!threshold || lastChild(sortable)) return;
38929
+ var rect = getRect(sortable),
38930
+ insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
38931
+ insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
38932
+ if (insideHorizontally && insideVertically) {
38933
+ return ret = sortable;
38934
+ }
38935
+ });
38936
+ return ret;
38937
+ },
38938
+ _prepareGroup = function _prepareGroup(options) {
38939
+ function toFn(value, pull) {
38940
+ return function (to, from, dragEl, evt) {
38941
+ var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
38942
+ if (value == null && (pull || sameGroup)) {
38943
+ // Default pull value
38944
+ // Default pull and put value if same group
38945
+ return true;
38946
+ } else if (value == null || value === false) {
38947
+ return false;
38948
+ } else if (pull && value === 'clone') {
38949
+ return value;
38950
+ } else if (typeof value === 'function') {
38951
+ return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
38952
+ } else {
38953
+ var otherGroup = (pull ? to : from).options.group.name;
38954
+ return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
38955
+ }
38956
+ };
38957
+ }
38958
+ var group = {};
38959
+ var originalGroup = options.group;
38960
+ if (!originalGroup || sortable_esm_typeof(originalGroup) != 'object') {
38961
+ originalGroup = {
38962
+ name: originalGroup
38963
+ };
38964
+ }
38965
+ group.name = originalGroup.name;
38966
+ group.checkPull = toFn(originalGroup.pull, true);
38967
+ group.checkPut = toFn(originalGroup.put);
38968
+ group.revertClone = originalGroup.revertClone;
38969
+ options.group = group;
38970
+ },
38971
+ _hideGhostForTarget = function _hideGhostForTarget() {
38972
+ if (!supportCssPointerEvents && ghostEl) {
38973
+ css(ghostEl, 'display', 'none');
38974
+ }
38975
+ },
38976
+ _unhideGhostForTarget = function _unhideGhostForTarget() {
38977
+ if (!supportCssPointerEvents && ghostEl) {
38978
+ css(ghostEl, 'display', '');
38979
+ }
38980
+ };
38981
+
38982
+ // #1184 fix - Prevent click event on fallback if dragged but item not changed position
38983
+ if (documentExists && !ChromeForAndroid) {
38984
+ document.addEventListener('click', function (evt) {
38985
+ if (ignoreNextClick) {
38986
+ evt.preventDefault();
38987
+ evt.stopPropagation && evt.stopPropagation();
38988
+ evt.stopImmediatePropagation && evt.stopImmediatePropagation();
38989
+ ignoreNextClick = false;
38990
+ return false;
38991
+ }
38992
+ }, true);
38993
+ }
38994
+ var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
38995
+ if (dragEl) {
38996
+ evt = evt.touches ? evt.touches[0] : evt;
38997
+ var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
38998
+ if (nearest) {
38999
+ // Create imitation event
39000
+ var event = {};
39001
+ for (var i in evt) {
39002
+ if (evt.hasOwnProperty(i)) {
39003
+ event[i] = evt[i];
39004
+ }
39005
+ }
39006
+ event.target = event.rootEl = nearest;
39007
+ event.preventDefault = void 0;
39008
+ event.stopPropagation = void 0;
39009
+ nearest[expando]._onDragOver(event);
39010
+ }
39011
+ }
39012
+ };
39013
+ var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
39014
+ if (dragEl) {
39015
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
39016
+ }
39017
+ };
39018
+
39019
+ /**
39020
+ * @class Sortable
39021
+ * @param {HTMLElement} el
39022
+ * @param {Object} [options]
39023
+ */
39024
+ function Sortable(el, options) {
39025
+ if (!(el && el.nodeType && el.nodeType === 1)) {
39026
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
39027
+ }
39028
+ this.el = el; // root element
39029
+ this.options = options = _extends({}, options);
39030
+
39031
+ // Export instance
39032
+ el[expando] = this;
39033
+ var defaults = {
39034
+ group: null,
39035
+ sort: true,
39036
+ disabled: false,
39037
+ store: null,
39038
+ handle: null,
39039
+ draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
39040
+ swapThreshold: 1,
39041
+ // percentage; 0 <= x <= 1
39042
+ invertSwap: false,
39043
+ // invert always
39044
+ invertedSwapThreshold: null,
39045
+ // will be set to same as swapThreshold if default
39046
+ removeCloneOnHide: true,
39047
+ direction: function direction() {
39048
+ return _detectDirection(el, this.options);
39049
+ },
39050
+ ghostClass: 'sortable-ghost',
39051
+ chosenClass: 'sortable-chosen',
39052
+ dragClass: 'sortable-drag',
39053
+ ignore: 'a, img',
39054
+ filter: null,
39055
+ preventOnFilter: true,
39056
+ animation: 0,
39057
+ easing: null,
39058
+ setData: function setData(dataTransfer, dragEl) {
39059
+ dataTransfer.setData('Text', dragEl.textContent);
39060
+ },
39061
+ dropBubble: false,
39062
+ dragoverBubble: false,
39063
+ dataIdAttr: 'data-id',
39064
+ delay: 0,
39065
+ delayOnTouchOnly: false,
39066
+ touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
39067
+ forceFallback: false,
39068
+ fallbackClass: 'sortable-fallback',
39069
+ fallbackOnBody: false,
39070
+ fallbackTolerance: 0,
39071
+ fallbackOffset: {
39072
+ x: 0,
39073
+ y: 0
39074
+ },
39075
+ supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari,
39076
+ emptyInsertThreshold: 5
39077
+ };
39078
+ PluginManager.initializePlugins(this, el, defaults);
39079
+
39080
+ // Set default options
39081
+ for (var name in defaults) {
39082
+ !(name in options) && (options[name] = defaults[name]);
39083
+ }
39084
+ _prepareGroup(options);
39085
+
39086
+ // Bind all private methods
39087
+ for (var fn in this) {
39088
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
39089
+ this[fn] = this[fn].bind(this);
39090
+ }
39091
+ }
39092
+
39093
+ // Setup drag mode
39094
+ this.nativeDraggable = options.forceFallback ? false : supportDraggable;
39095
+ if (this.nativeDraggable) {
39096
+ // Touch start threshold cannot be greater than the native dragstart threshold
39097
+ this.options.touchStartThreshold = 1;
39098
+ }
39099
+
39100
+ // Bind events
39101
+ if (options.supportPointer) {
39102
+ on(el, 'pointerdown', this._onTapStart);
39103
+ } else {
39104
+ on(el, 'mousedown', this._onTapStart);
39105
+ on(el, 'touchstart', this._onTapStart);
39106
+ }
39107
+ if (this.nativeDraggable) {
39108
+ on(el, 'dragover', this);
39109
+ on(el, 'dragenter', this);
39110
+ }
39111
+ sortables.push(this.el);
39112
+
39113
+ // Restore sorting
39114
+ options.store && options.store.get && this.sort(options.store.get(this) || []);
39115
+
39116
+ // Add animation state manager
39117
+ _extends(this, AnimationStateManager());
39118
+ }
39119
+ Sortable.prototype = /** @lends Sortable.prototype */{
39120
+ constructor: Sortable,
39121
+ _isOutsideThisEl: function _isOutsideThisEl(target) {
39122
+ if (!this.el.contains(target) && target !== this.el) {
39123
+ lastTarget = null;
39124
+ }
39125
+ },
39126
+ _getDirection: function _getDirection(evt, target) {
39127
+ return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
39128
+ },
39129
+ _onTapStart: function _onTapStart( /** Event|TouchEvent */evt) {
39130
+ if (!evt.cancelable) return;
39131
+ var _this = this,
39132
+ el = this.el,
39133
+ options = this.options,
39134
+ preventOnFilter = options.preventOnFilter,
39135
+ type = evt.type,
39136
+ touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt,
39137
+ target = (touch || evt).target,
39138
+ originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
39139
+ filter = options.filter;
39140
+ _saveInputCheckedState(el);
39141
+
39142
+ // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
39143
+ if (dragEl) {
39144
+ return;
39145
+ }
39146
+ if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
39147
+ return; // only left button and enabled
39148
+ }
39149
+
39150
+ // cancel dnd if original target is content editable
39151
+ if (originalTarget.isContentEditable) {
39152
+ return;
39153
+ }
39154
+
39155
+ // Safari ignores further event handling after mousedown
39156
+ if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') {
39157
+ return;
39158
+ }
39159
+ target = closest(target, options.draggable, el, false);
39160
+ if (target && target.animated) {
39161
+ return;
39162
+ }
39163
+ if (lastDownEl === target) {
39164
+ // Ignoring duplicate `down`
39165
+ return;
39166
+ }
39167
+
39168
+ // Get the index of the dragged element within its parent
39169
+ oldIndex = sortable_esm_index(target);
39170
+ oldDraggableIndex = sortable_esm_index(target, options.draggable);
39171
+
39172
+ // Check filter
39173
+ if (typeof filter === 'function') {
39174
+ if (filter.call(this, evt, target, this)) {
39175
+ _dispatchEvent({
39176
+ sortable: _this,
39177
+ rootEl: originalTarget,
39178
+ name: 'filter',
39179
+ targetEl: target,
39180
+ toEl: el,
39181
+ fromEl: el
39182
+ });
39183
+ pluginEvent('filter', _this, {
39184
+ evt: evt
39185
+ });
39186
+ preventOnFilter && evt.cancelable && evt.preventDefault();
39187
+ return; // cancel dnd
39188
+ }
39189
+ } else if (filter) {
39190
+ filter = filter.split(',').some(function (criteria) {
39191
+ criteria = closest(originalTarget, criteria.trim(), el, false);
39192
+ if (criteria) {
39193
+ _dispatchEvent({
39194
+ sortable: _this,
39195
+ rootEl: criteria,
39196
+ name: 'filter',
39197
+ targetEl: target,
39198
+ fromEl: el,
39199
+ toEl: el
39200
+ });
39201
+ pluginEvent('filter', _this, {
39202
+ evt: evt
39203
+ });
39204
+ return true;
39205
+ }
39206
+ });
39207
+ if (filter) {
39208
+ preventOnFilter && evt.cancelable && evt.preventDefault();
39209
+ return; // cancel dnd
39210
+ }
39211
+ }
39212
+ if (options.handle && !closest(originalTarget, options.handle, el, false)) {
39213
+ return;
39214
+ }
39215
+
39216
+ // Prepare `dragstart`
39217
+ this._prepareDragStart(evt, touch, target);
39218
+ },
39219
+ _prepareDragStart: function _prepareDragStart( /** Event */evt, /** Touch */touch, /** HTMLElement */target) {
39220
+ var _this = this,
39221
+ el = _this.el,
39222
+ options = _this.options,
39223
+ ownerDocument = el.ownerDocument,
39224
+ dragStartFn;
39225
+ if (target && !dragEl && target.parentNode === el) {
39226
+ var dragRect = getRect(target);
39227
+ rootEl = el;
39228
+ dragEl = target;
39229
+ parentEl = dragEl.parentNode;
39230
+ nextEl = dragEl.nextSibling;
39231
+ lastDownEl = target;
39232
+ activeGroup = options.group;
39233
+ Sortable.dragged = dragEl;
39234
+ tapEvt = {
39235
+ target: dragEl,
39236
+ clientX: (touch || evt).clientX,
39237
+ clientY: (touch || evt).clientY
39238
+ };
39239
+ tapDistanceLeft = tapEvt.clientX - dragRect.left;
39240
+ tapDistanceTop = tapEvt.clientY - dragRect.top;
39241
+ this._lastX = (touch || evt).clientX;
39242
+ this._lastY = (touch || evt).clientY;
39243
+ dragEl.style['will-change'] = 'all';
39244
+ dragStartFn = function dragStartFn() {
39245
+ pluginEvent('delayEnded', _this, {
39246
+ evt: evt
39247
+ });
39248
+ if (Sortable.eventCanceled) {
39249
+ _this._onDrop();
39250
+ return;
39251
+ }
39252
+ // Delayed drag has been triggered
39253
+ // we can re-enable the events: touchmove/mousemove
39254
+ _this._disableDelayedDragEvents();
39255
+ if (!FireFox && _this.nativeDraggable) {
39256
+ dragEl.draggable = true;
39257
+ }
39258
+
39259
+ // Bind the events: dragstart/dragend
39260
+ _this._triggerDragStart(evt, touch);
39261
+
39262
+ // Drag start event
39263
+ _dispatchEvent({
39264
+ sortable: _this,
39265
+ name: 'choose',
39266
+ originalEvent: evt
39267
+ });
39268
+
39269
+ // Chosen item
39270
+ toggleClass(dragEl, options.chosenClass, true);
39271
+ };
39272
+
39273
+ // Disable "draggable"
39274
+ options.ignore.split(',').forEach(function (criteria) {
39275
+ sortable_esm_find(dragEl, criteria.trim(), _disableDraggable);
39276
+ });
39277
+ on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
39278
+ on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
39279
+ on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
39280
+ on(ownerDocument, 'mouseup', _this._onDrop);
39281
+ on(ownerDocument, 'touchend', _this._onDrop);
39282
+ on(ownerDocument, 'touchcancel', _this._onDrop);
39283
+
39284
+ // Make dragEl draggable (must be before delay for FireFox)
39285
+ if (FireFox && this.nativeDraggable) {
39286
+ this.options.touchStartThreshold = 4;
39287
+ dragEl.draggable = true;
39288
+ }
39289
+ pluginEvent('delayStart', this, {
39290
+ evt: evt
39291
+ });
39292
+
39293
+ // Delay is impossible for native DnD in Edge or IE
39294
+ if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
39295
+ if (Sortable.eventCanceled) {
39296
+ this._onDrop();
39297
+ return;
39298
+ }
39299
+ // If the user moves the pointer or let go the click or touch
39300
+ // before the delay has been reached:
39301
+ // disable the delayed drag
39302
+ on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
39303
+ on(ownerDocument, 'touchend', _this._disableDelayedDrag);
39304
+ on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
39305
+ on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
39306
+ on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
39307
+ options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
39308
+ _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
39309
+ } else {
39310
+ dragStartFn();
39311
+ }
39312
+ }
39313
+ },
39314
+ _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/e) {
39315
+ var touch = e.touches ? e.touches[0] : e;
39316
+ if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
39317
+ this._disableDelayedDrag();
39318
+ }
39319
+ },
39320
+ _disableDelayedDrag: function _disableDelayedDrag() {
39321
+ dragEl && _disableDraggable(dragEl);
39322
+ clearTimeout(this._dragStartTimer);
39323
+ this._disableDelayedDragEvents();
39324
+ },
39325
+ _disableDelayedDragEvents: function _disableDelayedDragEvents() {
39326
+ var ownerDocument = this.el.ownerDocument;
39327
+ off(ownerDocument, 'mouseup', this._disableDelayedDrag);
39328
+ off(ownerDocument, 'touchend', this._disableDelayedDrag);
39329
+ off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
39330
+ off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
39331
+ off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
39332
+ off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
39333
+ },
39334
+ _triggerDragStart: function _triggerDragStart( /** Event */evt, /** Touch */touch) {
39335
+ touch = touch || evt.pointerType == 'touch' && evt;
39336
+ if (!this.nativeDraggable || touch) {
39337
+ if (this.options.supportPointer) {
39338
+ on(document, 'pointermove', this._onTouchMove);
39339
+ } else if (touch) {
39340
+ on(document, 'touchmove', this._onTouchMove);
39341
+ } else {
39342
+ on(document, 'mousemove', this._onTouchMove);
39343
+ }
39344
+ } else {
39345
+ on(dragEl, 'dragend', this);
39346
+ on(rootEl, 'dragstart', this._onDragStart);
39347
+ }
39348
+ try {
39349
+ if (document.selection) {
39350
+ // Timeout neccessary for IE9
39351
+ _nextTick(function () {
39352
+ document.selection.empty();
39353
+ });
39354
+ } else {
39355
+ window.getSelection().removeAllRanges();
39356
+ }
39357
+ } catch (err) {}
39358
+ },
39359
+ _dragStarted: function _dragStarted(fallback, evt) {
39360
+ awaitingDragStarted = false;
39361
+ if (rootEl && dragEl) {
39362
+ pluginEvent('dragStarted', this, {
39363
+ evt: evt
39364
+ });
39365
+ if (this.nativeDraggable) {
39366
+ on(document, 'dragover', _checkOutsideTargetEl);
39367
+ }
39368
+ var options = this.options;
39369
+
39370
+ // Apply effect
39371
+ !fallback && toggleClass(dragEl, options.dragClass, false);
39372
+ toggleClass(dragEl, options.ghostClass, true);
39373
+ Sortable.active = this;
39374
+ fallback && this._appendGhost();
39375
+
39376
+ // Drag start event
39377
+ _dispatchEvent({
39378
+ sortable: this,
39379
+ name: 'start',
39380
+ originalEvent: evt
39381
+ });
39382
+ } else {
39383
+ this._nulling();
39384
+ }
39385
+ },
39386
+ _emulateDragOver: function _emulateDragOver() {
39387
+ if (touchEvt) {
39388
+ this._lastX = touchEvt.clientX;
39389
+ this._lastY = touchEvt.clientY;
39390
+ _hideGhostForTarget();
39391
+ var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
39392
+ var parent = target;
39393
+ while (target && target.shadowRoot) {
39394
+ target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
39395
+ if (target === parent) break;
39396
+ parent = target;
39397
+ }
39398
+ dragEl.parentNode[expando]._isOutsideThisEl(target);
39399
+ if (parent) {
39400
+ do {
39401
+ if (parent[expando]) {
39402
+ var inserted = void 0;
39403
+ inserted = parent[expando]._onDragOver({
39404
+ clientX: touchEvt.clientX,
39405
+ clientY: touchEvt.clientY,
39406
+ target: target,
39407
+ rootEl: parent
39408
+ });
39409
+ if (inserted && !this.options.dragoverBubble) {
39410
+ break;
39411
+ }
39412
+ }
39413
+ target = parent; // store last element
39414
+ }
39415
+ /* jshint boss:true */ while (parent = parent.parentNode);
39416
+ }
39417
+ _unhideGhostForTarget();
39418
+ }
39419
+ },
39420
+ _onTouchMove: function _onTouchMove( /**TouchEvent*/evt) {
39421
+ if (tapEvt) {
39422
+ var options = this.options,
39423
+ fallbackTolerance = options.fallbackTolerance,
39424
+ fallbackOffset = options.fallbackOffset,
39425
+ touch = evt.touches ? evt.touches[0] : evt,
39426
+ ghostMatrix = ghostEl && matrix(ghostEl, true),
39427
+ scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
39428
+ scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
39429
+ relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
39430
+ dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
39431
+ dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1);
39432
+
39433
+ // only set the status to dragging, when we are actually dragging
39434
+ if (!Sortable.active && !awaitingDragStarted) {
39435
+ if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
39436
+ return;
39437
+ }
39438
+ this._onDragStart(evt, true);
39439
+ }
39440
+ if (ghostEl) {
39441
+ if (ghostMatrix) {
39442
+ ghostMatrix.e += dx - (lastDx || 0);
39443
+ ghostMatrix.f += dy - (lastDy || 0);
39444
+ } else {
39445
+ ghostMatrix = {
39446
+ a: 1,
39447
+ b: 0,
39448
+ c: 0,
39449
+ d: 1,
39450
+ e: dx,
39451
+ f: dy
39452
+ };
39453
+ }
39454
+ var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")");
39455
+ css(ghostEl, 'webkitTransform', cssMatrix);
39456
+ css(ghostEl, 'mozTransform', cssMatrix);
39457
+ css(ghostEl, 'msTransform', cssMatrix);
39458
+ css(ghostEl, 'transform', cssMatrix);
39459
+ lastDx = dx;
39460
+ lastDy = dy;
39461
+ touchEvt = touch;
39462
+ }
39463
+ evt.cancelable && evt.preventDefault();
39464
+ }
39465
+ },
39466
+ _appendGhost: function _appendGhost() {
39467
+ // Bug if using scale(): https://stackoverflow.com/questions/2637058
39468
+ // Not being adjusted for
39469
+ if (!ghostEl) {
39470
+ var container = this.options.fallbackOnBody ? document.body : rootEl,
39471
+ rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
39472
+ options = this.options;
39473
+
39474
+ // Position absolutely
39475
+ if (PositionGhostAbsolutely) {
39476
+ // Get relatively positioned parent
39477
+ ghostRelativeParent = container;
39478
+ while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
39479
+ ghostRelativeParent = ghostRelativeParent.parentNode;
39480
+ }
39481
+ if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
39482
+ if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
39483
+ rect.top += ghostRelativeParent.scrollTop;
39484
+ rect.left += ghostRelativeParent.scrollLeft;
39485
+ } else {
39486
+ ghostRelativeParent = getWindowScrollingElement();
39487
+ }
39488
+ ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
39489
+ }
39490
+ ghostEl = dragEl.cloneNode(true);
39491
+ toggleClass(ghostEl, options.ghostClass, false);
39492
+ toggleClass(ghostEl, options.fallbackClass, true);
39493
+ toggleClass(ghostEl, options.dragClass, true);
39494
+ css(ghostEl, 'transition', '');
39495
+ css(ghostEl, 'transform', '');
39496
+ css(ghostEl, 'box-sizing', 'border-box');
39497
+ css(ghostEl, 'margin', 0);
39498
+ css(ghostEl, 'top', rect.top);
39499
+ css(ghostEl, 'left', rect.left);
39500
+ css(ghostEl, 'width', rect.width);
39501
+ css(ghostEl, 'height', rect.height);
39502
+ css(ghostEl, 'opacity', '0.8');
39503
+ css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
39504
+ css(ghostEl, 'zIndex', '100000');
39505
+ css(ghostEl, 'pointerEvents', 'none');
39506
+ Sortable.ghost = ghostEl;
39507
+ container.appendChild(ghostEl);
39508
+
39509
+ // Set transform-origin
39510
+ css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%');
39511
+ }
39512
+ },
39513
+ _onDragStart: function _onDragStart( /**Event*/evt, /**boolean*/fallback) {
39514
+ var _this = this;
39515
+ var dataTransfer = evt.dataTransfer;
39516
+ var options = _this.options;
39517
+ pluginEvent('dragStart', this, {
39518
+ evt: evt
39519
+ });
39520
+ if (Sortable.eventCanceled) {
39521
+ this._onDrop();
39522
+ return;
39523
+ }
39524
+ pluginEvent('setupClone', this);
39525
+ if (!Sortable.eventCanceled) {
39526
+ cloneEl = clone(dragEl);
39527
+ cloneEl.removeAttribute("id");
39528
+ cloneEl.draggable = false;
39529
+ cloneEl.style['will-change'] = '';
39530
+ this._hideClone();
39531
+ toggleClass(cloneEl, this.options.chosenClass, false);
39532
+ Sortable.clone = cloneEl;
39533
+ }
39534
+
39535
+ // #1143: IFrame support workaround
39536
+ _this.cloneId = _nextTick(function () {
39537
+ pluginEvent('clone', _this);
39538
+ if (Sortable.eventCanceled) return;
39539
+ if (!_this.options.removeCloneOnHide) {
39540
+ rootEl.insertBefore(cloneEl, dragEl);
39541
+ }
39542
+ _this._hideClone();
39543
+ _dispatchEvent({
39544
+ sortable: _this,
39545
+ name: 'clone'
39546
+ });
39547
+ });
39548
+ !fallback && toggleClass(dragEl, options.dragClass, true);
39549
+
39550
+ // Set proper drop events
39551
+ if (fallback) {
39552
+ ignoreNextClick = true;
39553
+ _this._loopId = setInterval(_this._emulateDragOver, 50);
39554
+ } else {
39555
+ // Undo what was set in _prepareDragStart before drag started
39556
+ off(document, 'mouseup', _this._onDrop);
39557
+ off(document, 'touchend', _this._onDrop);
39558
+ off(document, 'touchcancel', _this._onDrop);
39559
+ if (dataTransfer) {
39560
+ dataTransfer.effectAllowed = 'move';
39561
+ options.setData && options.setData.call(_this, dataTransfer, dragEl);
39562
+ }
39563
+ on(document, 'drop', _this);
39564
+
39565
+ // #1276 fix:
39566
+ css(dragEl, 'transform', 'translateZ(0)');
39567
+ }
39568
+ awaitingDragStarted = true;
39569
+ _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
39570
+ on(document, 'selectstart', _this);
39571
+ moved = true;
39572
+ if (Safari) {
39573
+ css(document.body, 'user-select', 'none');
39574
+ }
39575
+ },
39576
+ // Returns true - if no further action is needed (either inserted or another condition)
39577
+ _onDragOver: function _onDragOver( /**Event*/evt) {
39578
+ var el = this.el,
39579
+ target = evt.target,
39580
+ dragRect,
39581
+ targetRect,
39582
+ revert,
39583
+ options = this.options,
39584
+ group = options.group,
39585
+ activeSortable = Sortable.active,
39586
+ isOwner = activeGroup === group,
39587
+ canSort = options.sort,
39588
+ fromSortable = putSortable || activeSortable,
39589
+ vertical,
39590
+ _this = this,
39591
+ completedFired = false;
39592
+ if (_silent) return;
39593
+ function dragOverEvent(name, extra) {
39594
+ pluginEvent(name, _this, _objectSpread2({
39595
+ evt: evt,
39596
+ isOwner: isOwner,
39597
+ axis: vertical ? 'vertical' : 'horizontal',
39598
+ revert: revert,
39599
+ dragRect: dragRect,
39600
+ targetRect: targetRect,
39601
+ canSort: canSort,
39602
+ fromSortable: fromSortable,
39603
+ target: target,
39604
+ completed: completed,
39605
+ onMove: function onMove(target, after) {
39606
+ return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
39607
+ },
39608
+ changed: changed
39609
+ }, extra));
39610
+ }
39611
+
39612
+ // Capture animation state
39613
+ function capture() {
39614
+ dragOverEvent('dragOverAnimationCapture');
39615
+ _this.captureAnimationState();
39616
+ if (_this !== fromSortable) {
39617
+ fromSortable.captureAnimationState();
39618
+ }
39619
+ }
39620
+
39621
+ // Return invocation when dragEl is inserted (or completed)
39622
+ function completed(insertion) {
39623
+ dragOverEvent('dragOverCompleted', {
39624
+ insertion: insertion
39625
+ });
39626
+ if (insertion) {
39627
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
39628
+ if (isOwner) {
39629
+ activeSortable._hideClone();
39630
+ } else {
39631
+ activeSortable._showClone(_this);
39632
+ }
39633
+ if (_this !== fromSortable) {
39634
+ // Set ghost class to new sortable's ghost class
39635
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
39636
+ toggleClass(dragEl, options.ghostClass, true);
39637
+ }
39638
+ if (putSortable !== _this && _this !== Sortable.active) {
39639
+ putSortable = _this;
39640
+ } else if (_this === Sortable.active && putSortable) {
39641
+ putSortable = null;
39642
+ }
39643
+
39644
+ // Animation
39645
+ if (fromSortable === _this) {
39646
+ _this._ignoreWhileAnimating = target;
39647
+ }
39648
+ _this.animateAll(function () {
39649
+ dragOverEvent('dragOverAnimationComplete');
39650
+ _this._ignoreWhileAnimating = null;
39651
+ });
39652
+ if (_this !== fromSortable) {
39653
+ fromSortable.animateAll();
39654
+ fromSortable._ignoreWhileAnimating = null;
39655
+ }
39656
+ }
39657
+
39658
+ // Null lastTarget if it is not inside a previously swapped element
39659
+ if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
39660
+ lastTarget = null;
39661
+ }
39662
+
39663
+ // no bubbling and not fallback
39664
+ if (!options.dragoverBubble && !evt.rootEl && target !== document) {
39665
+ dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
39666
+
39667
+ // Do not detect for empty insert if already inserted
39668
+ !insertion && nearestEmptyInsertDetectEvent(evt);
39669
+ }
39670
+ !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
39671
+ return completedFired = true;
39672
+ }
39673
+
39674
+ // Call when dragEl has been inserted
39675
+ function changed() {
39676
+ newIndex = sortable_esm_index(dragEl);
39677
+ newDraggableIndex = sortable_esm_index(dragEl, options.draggable);
39678
+ _dispatchEvent({
39679
+ sortable: _this,
39680
+ name: 'change',
39681
+ toEl: el,
39682
+ newIndex: newIndex,
39683
+ newDraggableIndex: newDraggableIndex,
39684
+ originalEvent: evt
39685
+ });
39686
+ }
39687
+ if (evt.preventDefault !== void 0) {
39688
+ evt.cancelable && evt.preventDefault();
39689
+ }
39690
+ target = closest(target, options.draggable, el, true);
39691
+ dragOverEvent('dragOver');
39692
+ if (Sortable.eventCanceled) return completedFired;
39693
+ if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
39694
+ return completed(false);
39695
+ }
39696
+ ignoreNextClick = false;
39697
+ if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list
39698
+ : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
39699
+ vertical = this._getDirection(evt, target) === 'vertical';
39700
+ dragRect = getRect(dragEl);
39701
+ dragOverEvent('dragOverValid');
39702
+ if (Sortable.eventCanceled) return completedFired;
39703
+ if (revert) {
39704
+ parentEl = rootEl; // actualization
39705
+ capture();
39706
+ this._hideClone();
39707
+ dragOverEvent('revert');
39708
+ if (!Sortable.eventCanceled) {
39709
+ if (nextEl) {
39710
+ rootEl.insertBefore(dragEl, nextEl);
39711
+ } else {
39712
+ rootEl.appendChild(dragEl);
39713
+ }
39714
+ }
39715
+ return completed(true);
39716
+ }
39717
+ var elLastChild = lastChild(el, options.draggable);
39718
+ if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
39719
+ // Insert to end of list
39720
+
39721
+ // If already at end of list: Do not insert
39722
+ if (elLastChild === dragEl) {
39723
+ return completed(false);
39724
+ }
39725
+
39726
+ // if there is a last element, it is the target
39727
+ if (elLastChild && el === evt.target) {
39728
+ target = elLastChild;
39729
+ }
39730
+ if (target) {
39731
+ targetRect = getRect(target);
39732
+ }
39733
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
39734
+ capture();
39735
+ if (elLastChild && elLastChild.nextSibling) {
39736
+ // the last draggable element is not the last node
39737
+ el.insertBefore(dragEl, elLastChild.nextSibling);
39738
+ } else {
39739
+ el.appendChild(dragEl);
39740
+ }
39741
+ parentEl = el; // actualization
39742
+
39743
+ changed();
39744
+ return completed(true);
39745
+ }
39746
+ } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) {
39747
+ // Insert to start of list
39748
+ var firstChild = getChild(el, 0, options, true);
39749
+ if (firstChild === dragEl) {
39750
+ return completed(false);
39751
+ }
39752
+ target = firstChild;
39753
+ targetRect = getRect(target);
39754
+ if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) {
39755
+ capture();
39756
+ el.insertBefore(dragEl, firstChild);
39757
+ parentEl = el; // actualization
39758
+
39759
+ changed();
39760
+ return completed(true);
39761
+ }
39762
+ } else if (target.parentNode === el) {
39763
+ targetRect = getRect(target);
39764
+ var direction = 0,
39765
+ targetBeforeFirstSwap,
39766
+ differentLevel = dragEl.parentNode !== el,
39767
+ differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
39768
+ side1 = vertical ? 'top' : 'left',
39769
+ scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'),
39770
+ scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
39771
+ if (lastTarget !== target) {
39772
+ targetBeforeFirstSwap = targetRect[side1];
39773
+ pastFirstInvertThresh = false;
39774
+ isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
39775
+ }
39776
+ direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
39777
+ var sibling;
39778
+ if (direction !== 0) {
39779
+ // Check if target is beside dragEl in respective direction (ignoring hidden elements)
39780
+ var dragIndex = sortable_esm_index(dragEl);
39781
+ do {
39782
+ dragIndex -= direction;
39783
+ sibling = parentEl.children[dragIndex];
39784
+ } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
39785
+ }
39786
+ // If dragEl is already beside target: Do not insert
39787
+ if (direction === 0 || sibling === target) {
39788
+ return completed(false);
39789
+ }
39790
+ lastTarget = target;
39791
+ lastDirection = direction;
39792
+ var nextSibling = target.nextElementSibling,
39793
+ after = false;
39794
+ after = direction === 1;
39795
+ var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
39796
+ if (moveVector !== false) {
39797
+ if (moveVector === 1 || moveVector === -1) {
39798
+ after = moveVector === 1;
39799
+ }
39800
+ _silent = true;
39801
+ setTimeout(_unsilent, 30);
39802
+ capture();
39803
+ if (after && !nextSibling) {
39804
+ el.appendChild(dragEl);
39805
+ } else {
39806
+ target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
39807
+ }
39808
+
39809
+ // Undo chrome's scroll adjustment (has no effect on other browsers)
39810
+ if (scrolledPastTop) {
39811
+ scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
39812
+ }
39813
+ parentEl = dragEl.parentNode; // actualization
39814
+
39815
+ // must be done before animation
39816
+ if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
39817
+ targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
39818
+ }
39819
+ changed();
39820
+ return completed(true);
39821
+ }
39822
+ }
39823
+ if (el.contains(dragEl)) {
39824
+ return completed(false);
39825
+ }
39826
+ }
39827
+ return false;
39828
+ },
39829
+ _ignoreWhileAnimating: null,
39830
+ _offMoveEvents: function _offMoveEvents() {
39831
+ off(document, 'mousemove', this._onTouchMove);
39832
+ off(document, 'touchmove', this._onTouchMove);
39833
+ off(document, 'pointermove', this._onTouchMove);
39834
+ off(document, 'dragover', nearestEmptyInsertDetectEvent);
39835
+ off(document, 'mousemove', nearestEmptyInsertDetectEvent);
39836
+ off(document, 'touchmove', nearestEmptyInsertDetectEvent);
39837
+ },
39838
+ _offUpEvents: function _offUpEvents() {
39839
+ var ownerDocument = this.el.ownerDocument;
39840
+ off(ownerDocument, 'mouseup', this._onDrop);
39841
+ off(ownerDocument, 'touchend', this._onDrop);
39842
+ off(ownerDocument, 'pointerup', this._onDrop);
39843
+ off(ownerDocument, 'touchcancel', this._onDrop);
39844
+ off(document, 'selectstart', this);
39845
+ },
39846
+ _onDrop: function _onDrop( /**Event*/evt) {
39847
+ var el = this.el,
39848
+ options = this.options;
39849
+
39850
+ // Get the index of the dragged element within its parent
39851
+ newIndex = sortable_esm_index(dragEl);
39852
+ newDraggableIndex = sortable_esm_index(dragEl, options.draggable);
39853
+ pluginEvent('drop', this, {
39854
+ evt: evt
39855
+ });
39856
+ parentEl = dragEl && dragEl.parentNode;
39857
+
39858
+ // Get again after plugin event
39859
+ newIndex = sortable_esm_index(dragEl);
39860
+ newDraggableIndex = sortable_esm_index(dragEl, options.draggable);
39861
+ if (Sortable.eventCanceled) {
39862
+ this._nulling();
39863
+ return;
39864
+ }
39865
+ awaitingDragStarted = false;
39866
+ isCircumstantialInvert = false;
39867
+ pastFirstInvertThresh = false;
39868
+ clearInterval(this._loopId);
39869
+ clearTimeout(this._dragStartTimer);
39870
+ _cancelNextTick(this.cloneId);
39871
+ _cancelNextTick(this._dragStartId);
39872
+
39873
+ // Unbind events
39874
+ if (this.nativeDraggable) {
39875
+ off(document, 'drop', this);
39876
+ off(el, 'dragstart', this._onDragStart);
39877
+ }
39878
+ this._offMoveEvents();
39879
+ this._offUpEvents();
39880
+ if (Safari) {
39881
+ css(document.body, 'user-select', '');
39882
+ }
39883
+ css(dragEl, 'transform', '');
39884
+ if (evt) {
39885
+ if (moved) {
39886
+ evt.cancelable && evt.preventDefault();
39887
+ !options.dropBubble && evt.stopPropagation();
39888
+ }
39889
+ ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
39890
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
39891
+ // Remove clone(s)
39892
+ cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
39893
+ }
39894
+ if (dragEl) {
39895
+ if (this.nativeDraggable) {
39896
+ off(dragEl, 'dragend', this);
39897
+ }
39898
+ _disableDraggable(dragEl);
39899
+ dragEl.style['will-change'] = '';
39900
+
39901
+ // Remove classes
39902
+ // ghostClass is added in dragStarted
39903
+ if (moved && !awaitingDragStarted) {
39904
+ toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
39905
+ }
39906
+ toggleClass(dragEl, this.options.chosenClass, false);
39907
+
39908
+ // Drag stop event
39909
+ _dispatchEvent({
39910
+ sortable: this,
39911
+ name: 'unchoose',
39912
+ toEl: parentEl,
39913
+ newIndex: null,
39914
+ newDraggableIndex: null,
39915
+ originalEvent: evt
39916
+ });
39917
+ if (rootEl !== parentEl) {
39918
+ if (newIndex >= 0) {
39919
+ // Add event
39920
+ _dispatchEvent({
39921
+ rootEl: parentEl,
39922
+ name: 'add',
39923
+ toEl: parentEl,
39924
+ fromEl: rootEl,
39925
+ originalEvent: evt
39926
+ });
39927
+
39928
+ // Remove event
39929
+ _dispatchEvent({
39930
+ sortable: this,
39931
+ name: 'remove',
39932
+ toEl: parentEl,
39933
+ originalEvent: evt
39934
+ });
39935
+
39936
+ // drag from one list and drop into another
39937
+ _dispatchEvent({
39938
+ rootEl: parentEl,
39939
+ name: 'sort',
39940
+ toEl: parentEl,
39941
+ fromEl: rootEl,
39942
+ originalEvent: evt
39943
+ });
39944
+ _dispatchEvent({
39945
+ sortable: this,
39946
+ name: 'sort',
39947
+ toEl: parentEl,
39948
+ originalEvent: evt
39949
+ });
39950
+ }
39951
+ putSortable && putSortable.save();
39952
+ } else {
39953
+ if (newIndex !== oldIndex) {
39954
+ if (newIndex >= 0) {
39955
+ // drag & drop within the same list
39956
+ _dispatchEvent({
39957
+ sortable: this,
39958
+ name: 'update',
39959
+ toEl: parentEl,
39960
+ originalEvent: evt
39961
+ });
39962
+ _dispatchEvent({
39963
+ sortable: this,
39964
+ name: 'sort',
39965
+ toEl: parentEl,
39966
+ originalEvent: evt
39967
+ });
39968
+ }
39969
+ }
39970
+ }
39971
+ if (Sortable.active) {
39972
+ /* jshint eqnull:true */
39973
+ if (newIndex == null || newIndex === -1) {
39974
+ newIndex = oldIndex;
39975
+ newDraggableIndex = oldDraggableIndex;
39976
+ }
39977
+ _dispatchEvent({
39978
+ sortable: this,
39979
+ name: 'end',
39980
+ toEl: parentEl,
39981
+ originalEvent: evt
39982
+ });
39983
+
39984
+ // Save sorting
39985
+ this.save();
39986
+ }
39987
+ }
39988
+ }
39989
+ this._nulling();
39990
+ },
39991
+ _nulling: function _nulling() {
39992
+ pluginEvent('nulling', this);
39993
+ rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null;
39994
+ savedInputChecked.forEach(function (el) {
39995
+ el.checked = true;
39996
+ });
39997
+ savedInputChecked.length = lastDx = lastDy = 0;
39998
+ },
39999
+ handleEvent: function handleEvent( /**Event*/evt) {
40000
+ switch (evt.type) {
40001
+ case 'drop':
40002
+ case 'dragend':
40003
+ this._onDrop(evt);
40004
+ break;
40005
+ case 'dragenter':
40006
+ case 'dragover':
40007
+ if (dragEl) {
40008
+ this._onDragOver(evt);
40009
+ _globalDragOver(evt);
40010
+ }
40011
+ break;
40012
+ case 'selectstart':
40013
+ evt.preventDefault();
40014
+ break;
40015
+ }
40016
+ },
40017
+ /**
40018
+ * Serializes the item into an array of string.
40019
+ * @returns {String[]}
40020
+ */
40021
+ toArray: function toArray() {
40022
+ var order = [],
40023
+ el,
40024
+ children = this.el.children,
40025
+ i = 0,
40026
+ n = children.length,
40027
+ options = this.options;
40028
+ for (; i < n; i++) {
40029
+ el = children[i];
40030
+ if (closest(el, options.draggable, this.el, false)) {
40031
+ order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
40032
+ }
40033
+ }
40034
+ return order;
40035
+ },
40036
+ /**
40037
+ * Sorts the elements according to the array.
40038
+ * @param {String[]} order order of the items
40039
+ */
40040
+ sort: function sort(order, useAnimation) {
40041
+ var items = {},
40042
+ rootEl = this.el;
40043
+ this.toArray().forEach(function (id, i) {
40044
+ var el = rootEl.children[i];
40045
+ if (closest(el, this.options.draggable, rootEl, false)) {
40046
+ items[id] = el;
40047
+ }
40048
+ }, this);
40049
+ useAnimation && this.captureAnimationState();
40050
+ order.forEach(function (id) {
40051
+ if (items[id]) {
40052
+ rootEl.removeChild(items[id]);
40053
+ rootEl.appendChild(items[id]);
40054
+ }
40055
+ });
40056
+ useAnimation && this.animateAll();
40057
+ },
40058
+ /**
40059
+ * Save the current sorting
40060
+ */
40061
+ save: function save() {
40062
+ var store = this.options.store;
40063
+ store && store.set && store.set(this);
40064
+ },
40065
+ /**
40066
+ * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
40067
+ * @param {HTMLElement} el
40068
+ * @param {String} [selector] default: `options.draggable`
40069
+ * @returns {HTMLElement|null}
40070
+ */
40071
+ closest: function closest$1(el, selector) {
40072
+ return closest(el, selector || this.options.draggable, this.el, false);
40073
+ },
40074
+ /**
40075
+ * Set/get option
40076
+ * @param {string} name
40077
+ * @param {*} [value]
40078
+ * @returns {*}
40079
+ */
40080
+ option: function option(name, value) {
40081
+ var options = this.options;
40082
+ if (value === void 0) {
40083
+ return options[name];
40084
+ } else {
40085
+ var modifiedValue = PluginManager.modifyOption(this, name, value);
40086
+ if (typeof modifiedValue !== 'undefined') {
40087
+ options[name] = modifiedValue;
40088
+ } else {
40089
+ options[name] = value;
40090
+ }
40091
+ if (name === 'group') {
40092
+ _prepareGroup(options);
40093
+ }
40094
+ }
40095
+ },
40096
+ /**
40097
+ * Destroy
40098
+ */
40099
+ destroy: function destroy() {
40100
+ pluginEvent('destroy', this);
40101
+ var el = this.el;
40102
+ el[expando] = null;
40103
+ off(el, 'mousedown', this._onTapStart);
40104
+ off(el, 'touchstart', this._onTapStart);
40105
+ off(el, 'pointerdown', this._onTapStart);
40106
+ if (this.nativeDraggable) {
40107
+ off(el, 'dragover', this);
40108
+ off(el, 'dragenter', this);
40109
+ }
40110
+ // Remove draggable attributes
40111
+ Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
40112
+ el.removeAttribute('draggable');
40113
+ });
40114
+ this._onDrop();
40115
+ this._disableDelayedDragEvents();
40116
+ sortables.splice(sortables.indexOf(this.el), 1);
40117
+ this.el = el = null;
40118
+ },
40119
+ _hideClone: function _hideClone() {
40120
+ if (!cloneHidden) {
40121
+ pluginEvent('hideClone', this);
40122
+ if (Sortable.eventCanceled) return;
40123
+ css(cloneEl, 'display', 'none');
40124
+ if (this.options.removeCloneOnHide && cloneEl.parentNode) {
40125
+ cloneEl.parentNode.removeChild(cloneEl);
40126
+ }
40127
+ cloneHidden = true;
40128
+ }
40129
+ },
40130
+ _showClone: function _showClone(putSortable) {
40131
+ if (putSortable.lastPutMode !== 'clone') {
40132
+ this._hideClone();
40133
+ return;
40134
+ }
40135
+ if (cloneHidden) {
40136
+ pluginEvent('showClone', this);
40137
+ if (Sortable.eventCanceled) return;
40138
+
40139
+ // show clone at dragEl or original position
40140
+ if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
40141
+ rootEl.insertBefore(cloneEl, dragEl);
40142
+ } else if (nextEl) {
40143
+ rootEl.insertBefore(cloneEl, nextEl);
40144
+ } else {
40145
+ rootEl.appendChild(cloneEl);
40146
+ }
40147
+ if (this.options.group.revertClone) {
40148
+ this.animate(dragEl, cloneEl);
40149
+ }
40150
+ css(cloneEl, 'display', '');
40151
+ cloneHidden = false;
40152
+ }
40153
+ }
40154
+ };
40155
+ function _globalDragOver( /**Event*/evt) {
40156
+ if (evt.dataTransfer) {
40157
+ evt.dataTransfer.dropEffect = 'move';
40158
+ }
40159
+ evt.cancelable && evt.preventDefault();
40160
+ }
40161
+ function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
40162
+ var evt,
40163
+ sortable = fromEl[expando],
40164
+ onMoveFn = sortable.options.onMove,
40165
+ retVal;
40166
+ // Support for new CustomEvent feature
40167
+ if (window.CustomEvent && !IE11OrLess && !Edge) {
40168
+ evt = new CustomEvent('move', {
40169
+ bubbles: true,
40170
+ cancelable: true
40171
+ });
40172
+ } else {
40173
+ evt = document.createEvent('Event');
40174
+ evt.initEvent('move', true, true);
40175
+ }
40176
+ evt.to = toEl;
40177
+ evt.from = fromEl;
40178
+ evt.dragged = dragEl;
40179
+ evt.draggedRect = dragRect;
40180
+ evt.related = targetEl || toEl;
40181
+ evt.relatedRect = targetRect || getRect(toEl);
40182
+ evt.willInsertAfter = willInsertAfter;
40183
+ evt.originalEvent = originalEvent;
40184
+ fromEl.dispatchEvent(evt);
40185
+ if (onMoveFn) {
40186
+ retVal = onMoveFn.call(sortable, evt, originalEvent);
40187
+ }
40188
+ return retVal;
40189
+ }
40190
+ function _disableDraggable(el) {
40191
+ el.draggable = false;
40192
+ }
40193
+ function _unsilent() {
40194
+ _silent = false;
40195
+ }
40196
+ function _ghostIsFirst(evt, vertical, sortable) {
40197
+ var firstElRect = getRect(getChild(sortable.el, 0, sortable.options, true));
40198
+ var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
40199
+ var spacer = 10;
40200
+ return vertical ? evt.clientX < childContainingRect.left - spacer || evt.clientY < firstElRect.top && evt.clientX < firstElRect.right : evt.clientY < childContainingRect.top - spacer || evt.clientY < firstElRect.bottom && evt.clientX < firstElRect.left;
40201
+ }
40202
+ function _ghostIsLast(evt, vertical, sortable) {
40203
+ var lastElRect = getRect(lastChild(sortable.el, sortable.options.draggable));
40204
+ var childContainingRect = getChildContainingRectFromElement(sortable.el, sortable.options, ghostEl);
40205
+ var spacer = 10;
40206
+ return vertical ? evt.clientX > childContainingRect.right + spacer || evt.clientY > lastElRect.bottom && evt.clientX > lastElRect.left : evt.clientY > childContainingRect.bottom + spacer || evt.clientX > lastElRect.right && evt.clientY > lastElRect.top;
40207
+ }
40208
+ function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
40209
+ var mouseOnAxis = vertical ? evt.clientY : evt.clientX,
40210
+ targetLength = vertical ? targetRect.height : targetRect.width,
40211
+ targetS1 = vertical ? targetRect.top : targetRect.left,
40212
+ targetS2 = vertical ? targetRect.bottom : targetRect.right,
40213
+ invert = false;
40214
+ if (!invertSwap) {
40215
+ // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
40216
+ if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
40217
+ // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
40218
+ // check if past first invert threshold on side opposite of lastDirection
40219
+ if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
40220
+ // past first invert threshold, do not restrict inverted threshold to dragEl shadow
40221
+ pastFirstInvertThresh = true;
40222
+ }
40223
+ if (!pastFirstInvertThresh) {
40224
+ // dragEl shadow (target move distance shadow)
40225
+ if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
40226
+ : mouseOnAxis > targetS2 - targetMoveDistance) {
40227
+ return -lastDirection;
40228
+ }
40229
+ } else {
40230
+ invert = true;
40231
+ }
40232
+ } else {
40233
+ // Regular
40234
+ if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
40235
+ return _getInsertDirection(target);
40236
+ }
40237
+ }
40238
+ }
40239
+ invert = invert || invertSwap;
40240
+ if (invert) {
40241
+ // Invert of regular
40242
+ if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
40243
+ return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
40244
+ }
40245
+ }
40246
+ return 0;
40247
+ }
40248
+
40249
+ /**
40250
+ * Gets the direction dragEl must be swapped relative to target in order to make it
40251
+ * seem that dragEl has been "inserted" into that element's position
40252
+ * @param {HTMLElement} target The target whose position dragEl is being inserted at
40253
+ * @return {Number} Direction dragEl must be swapped
40254
+ */
40255
+ function _getInsertDirection(target) {
40256
+ if (sortable_esm_index(dragEl) < sortable_esm_index(target)) {
40257
+ return 1;
40258
+ } else {
40259
+ return -1;
40260
+ }
40261
+ }
40262
+
40263
+ /**
40264
+ * Generate id
40265
+ * @param {HTMLElement} el
40266
+ * @returns {String}
40267
+ * @private
40268
+ */
40269
+ function _generateId(el) {
40270
+ var str = el.tagName + el.className + el.src + el.href + el.textContent,
40271
+ i = str.length,
40272
+ sum = 0;
40273
+ while (i--) {
40274
+ sum += str.charCodeAt(i);
40275
+ }
40276
+ return sum.toString(36);
40277
+ }
40278
+ function _saveInputCheckedState(root) {
40279
+ savedInputChecked.length = 0;
40280
+ var inputs = root.getElementsByTagName('input');
40281
+ var idx = inputs.length;
40282
+ while (idx--) {
40283
+ var el = inputs[idx];
40284
+ el.checked && savedInputChecked.push(el);
40285
+ }
40286
+ }
40287
+ function _nextTick(fn) {
40288
+ return setTimeout(fn, 0);
40289
+ }
40290
+ function _cancelNextTick(id) {
40291
+ return clearTimeout(id);
40292
+ }
40293
+
40294
+ // Fixed #973:
40295
+ if (documentExists) {
40296
+ on(document, 'touchmove', function (evt) {
40297
+ if ((Sortable.active || awaitingDragStarted) && evt.cancelable) {
40298
+ evt.preventDefault();
40299
+ }
40300
+ });
40301
+ }
40302
+
40303
+ // Export utils
40304
+ Sortable.utils = {
40305
+ on: on,
40306
+ off: off,
40307
+ css: css,
40308
+ find: sortable_esm_find,
40309
+ is: function is(el, selector) {
40310
+ return !!closest(el, selector, el, false);
40311
+ },
40312
+ extend: extend,
40313
+ throttle: throttle,
40314
+ closest: closest,
40315
+ toggleClass: toggleClass,
40316
+ clone: clone,
40317
+ index: sortable_esm_index,
40318
+ nextTick: _nextTick,
40319
+ cancelNextTick: _cancelNextTick,
40320
+ detectDirection: _detectDirection,
40321
+ getChild: getChild
40322
+ };
40323
+
40324
+ /**
40325
+ * Get the Sortable instance of an element
40326
+ * @param {HTMLElement} element The element
40327
+ * @return {Sortable|undefined} The instance of Sortable
40328
+ */
40329
+ Sortable.get = function (element) {
40330
+ return element[expando];
40331
+ };
40332
+
40333
+ /**
40334
+ * Mount a plugin to Sortable
40335
+ * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
40336
+ */
40337
+ Sortable.mount = function () {
40338
+ for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
40339
+ plugins[_key] = arguments[_key];
40340
+ }
40341
+ if (plugins[0].constructor === Array) plugins = plugins[0];
40342
+ plugins.forEach(function (plugin) {
40343
+ if (!plugin.prototype || !plugin.prototype.constructor) {
40344
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
40345
+ }
40346
+ if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
40347
+ PluginManager.mount(plugin);
40348
+ });
40349
+ };
40350
+
40351
+ /**
40352
+ * Create sortable instance
40353
+ * @param {HTMLElement} el
40354
+ * @param {Object} [options]
40355
+ */
40356
+ Sortable.create = function (el, options) {
40357
+ return new Sortable(el, options);
40358
+ };
40359
+
40360
+ // Export
40361
+ Sortable.version = version;
40362
+
40363
+ var autoScrolls = [],
40364
+ scrollEl,
40365
+ scrollRootEl,
40366
+ scrolling = false,
40367
+ lastAutoScrollX,
40368
+ lastAutoScrollY,
40369
+ touchEvt$1,
40370
+ pointerElemChangedInterval;
40371
+ function AutoScrollPlugin() {
40372
+ function AutoScroll() {
40373
+ this.defaults = {
40374
+ scroll: true,
40375
+ forceAutoScrollFallback: false,
40376
+ scrollSensitivity: 30,
40377
+ scrollSpeed: 10,
40378
+ bubbleScroll: true
40379
+ };
40380
+
40381
+ // Bind all private methods
40382
+ for (var fn in this) {
40383
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
40384
+ this[fn] = this[fn].bind(this);
40385
+ }
40386
+ }
40387
+ }
40388
+ AutoScroll.prototype = {
40389
+ dragStarted: function dragStarted(_ref) {
40390
+ var originalEvent = _ref.originalEvent;
40391
+ if (this.sortable.nativeDraggable) {
40392
+ on(document, 'dragover', this._handleAutoScroll);
40393
+ } else {
40394
+ if (this.options.supportPointer) {
40395
+ on(document, 'pointermove', this._handleFallbackAutoScroll);
40396
+ } else if (originalEvent.touches) {
40397
+ on(document, 'touchmove', this._handleFallbackAutoScroll);
40398
+ } else {
40399
+ on(document, 'mousemove', this._handleFallbackAutoScroll);
40400
+ }
40401
+ }
40402
+ },
40403
+ dragOverCompleted: function dragOverCompleted(_ref2) {
40404
+ var originalEvent = _ref2.originalEvent;
40405
+ // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
40406
+ if (!this.options.dragOverBubble && !originalEvent.rootEl) {
40407
+ this._handleAutoScroll(originalEvent);
40408
+ }
40409
+ },
40410
+ drop: function drop() {
40411
+ if (this.sortable.nativeDraggable) {
40412
+ off(document, 'dragover', this._handleAutoScroll);
40413
+ } else {
40414
+ off(document, 'pointermove', this._handleFallbackAutoScroll);
40415
+ off(document, 'touchmove', this._handleFallbackAutoScroll);
40416
+ off(document, 'mousemove', this._handleFallbackAutoScroll);
40417
+ }
40418
+ clearPointerElemChangedInterval();
40419
+ clearAutoScrolls();
40420
+ cancelThrottle();
40421
+ },
40422
+ nulling: function nulling() {
40423
+ touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
40424
+ autoScrolls.length = 0;
40425
+ },
40426
+ _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
40427
+ this._handleAutoScroll(evt, true);
40428
+ },
40429
+ _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
40430
+ var _this = this;
40431
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
40432
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
40433
+ elem = document.elementFromPoint(x, y);
40434
+ touchEvt$1 = evt;
40435
+
40436
+ // IE does not seem to have native autoscroll,
40437
+ // Edge's autoscroll seems too conditional,
40438
+ // MACOS Safari does not have autoscroll,
40439
+ // Firefox and Chrome are good
40440
+ if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) {
40441
+ autoScroll(evt, this.options, elem, fallback);
40442
+
40443
+ // Listener for pointer element change
40444
+ var ogElemScroller = getParentAutoScrollElement(elem, true);
40445
+ if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
40446
+ pointerElemChangedInterval && clearPointerElemChangedInterval();
40447
+ // Detect for pointer elem change, emulating native DnD behaviour
40448
+ pointerElemChangedInterval = setInterval(function () {
40449
+ var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
40450
+ if (newElem !== ogElemScroller) {
40451
+ ogElemScroller = newElem;
40452
+ clearAutoScrolls();
40453
+ }
40454
+ autoScroll(evt, _this.options, newElem, fallback);
40455
+ }, 10);
40456
+ lastAutoScrollX = x;
40457
+ lastAutoScrollY = y;
40458
+ }
40459
+ } else {
40460
+ // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
40461
+ if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
40462
+ clearAutoScrolls();
40463
+ return;
40464
+ }
40465
+ autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
40466
+ }
40467
+ }
40468
+ };
40469
+ return _extends(AutoScroll, {
40470
+ pluginName: 'scroll',
40471
+ initializeByDefault: true
40472
+ });
40473
+ }
40474
+ function clearAutoScrolls() {
40475
+ autoScrolls.forEach(function (autoScroll) {
40476
+ clearInterval(autoScroll.pid);
40477
+ });
40478
+ autoScrolls = [];
40479
+ }
40480
+ function clearPointerElemChangedInterval() {
40481
+ clearInterval(pointerElemChangedInterval);
40482
+ }
40483
+ var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
40484
+ // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
40485
+ if (!options.scroll) return;
40486
+ var x = (evt.touches ? evt.touches[0] : evt).clientX,
40487
+ y = (evt.touches ? evt.touches[0] : evt).clientY,
40488
+ sens = options.scrollSensitivity,
40489
+ speed = options.scrollSpeed,
40490
+ winScroller = getWindowScrollingElement();
40491
+ var scrollThisInstance = false,
40492
+ scrollCustomFn;
40493
+
40494
+ // New scroll root, set scrollEl
40495
+ if (scrollRootEl !== rootEl) {
40496
+ scrollRootEl = rootEl;
40497
+ clearAutoScrolls();
40498
+ scrollEl = options.scroll;
40499
+ scrollCustomFn = options.scrollFn;
40500
+ if (scrollEl === true) {
40501
+ scrollEl = getParentAutoScrollElement(rootEl, true);
40502
+ }
40503
+ }
40504
+ var layersOut = 0;
40505
+ var currentParent = scrollEl;
40506
+ do {
40507
+ var el = currentParent,
40508
+ rect = getRect(el),
40509
+ top = rect.top,
40510
+ bottom = rect.bottom,
40511
+ left = rect.left,
40512
+ right = rect.right,
40513
+ width = rect.width,
40514
+ height = rect.height,
40515
+ canScrollX = void 0,
40516
+ canScrollY = void 0,
40517
+ scrollWidth = el.scrollWidth,
40518
+ scrollHeight = el.scrollHeight,
40519
+ elCSS = css(el),
40520
+ scrollPosX = el.scrollLeft,
40521
+ scrollPosY = el.scrollTop;
40522
+ if (el === winScroller) {
40523
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
40524
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
40525
+ } else {
40526
+ canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
40527
+ canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
40528
+ }
40529
+ var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX);
40530
+ var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY);
40531
+ if (!autoScrolls[layersOut]) {
40532
+ for (var i = 0; i <= layersOut; i++) {
40533
+ if (!autoScrolls[i]) {
40534
+ autoScrolls[i] = {};
40535
+ }
40536
+ }
40537
+ }
40538
+ if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
40539
+ autoScrolls[layersOut].el = el;
40540
+ autoScrolls[layersOut].vx = vx;
40541
+ autoScrolls[layersOut].vy = vy;
40542
+ clearInterval(autoScrolls[layersOut].pid);
40543
+ if (vx != 0 || vy != 0) {
40544
+ scrollThisInstance = true;
40545
+ /* jshint loopfunc:true */
40546
+ autoScrolls[layersOut].pid = setInterval(function () {
40547
+ // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
40548
+ if (isFallback && this.layer === 0) {
40549
+ Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
40550
+ }
40551
+ var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
40552
+ var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
40553
+ if (typeof scrollCustomFn === 'function') {
40554
+ if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
40555
+ return;
40556
+ }
40557
+ }
40558
+ scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
40559
+ }.bind({
40560
+ layer: layersOut
40561
+ }), 24);
40562
+ }
40563
+ }
40564
+ layersOut++;
40565
+ } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
40566
+ scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
40567
+ }, 30);
40568
+
40569
+ var drop = function drop(_ref) {
40570
+ var originalEvent = _ref.originalEvent,
40571
+ putSortable = _ref.putSortable,
40572
+ dragEl = _ref.dragEl,
40573
+ activeSortable = _ref.activeSortable,
40574
+ dispatchSortableEvent = _ref.dispatchSortableEvent,
40575
+ hideGhostForTarget = _ref.hideGhostForTarget,
40576
+ unhideGhostForTarget = _ref.unhideGhostForTarget;
40577
+ if (!originalEvent) return;
40578
+ var toSortable = putSortable || activeSortable;
40579
+ hideGhostForTarget();
40580
+ var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
40581
+ var target = document.elementFromPoint(touch.clientX, touch.clientY);
40582
+ unhideGhostForTarget();
40583
+ if (toSortable && !toSortable.el.contains(target)) {
40584
+ dispatchSortableEvent('spill');
40585
+ this.onSpill({
40586
+ dragEl: dragEl,
40587
+ putSortable: putSortable
40588
+ });
40589
+ }
40590
+ };
40591
+ function Revert() {}
40592
+ Revert.prototype = {
40593
+ startIndex: null,
40594
+ dragStart: function dragStart(_ref2) {
40595
+ var oldDraggableIndex = _ref2.oldDraggableIndex;
40596
+ this.startIndex = oldDraggableIndex;
40597
+ },
40598
+ onSpill: function onSpill(_ref3) {
40599
+ var dragEl = _ref3.dragEl,
40600
+ putSortable = _ref3.putSortable;
40601
+ this.sortable.captureAnimationState();
40602
+ if (putSortable) {
40603
+ putSortable.captureAnimationState();
40604
+ }
40605
+ var nextSibling = getChild(this.sortable.el, this.startIndex, this.options);
40606
+ if (nextSibling) {
40607
+ this.sortable.el.insertBefore(dragEl, nextSibling);
40608
+ } else {
40609
+ this.sortable.el.appendChild(dragEl);
40610
+ }
40611
+ this.sortable.animateAll();
40612
+ if (putSortable) {
40613
+ putSortable.animateAll();
40614
+ }
40615
+ },
40616
+ drop: drop
40617
+ };
40618
+ _extends(Revert, {
40619
+ pluginName: 'revertOnSpill'
40620
+ });
40621
+ function Remove() {}
40622
+ Remove.prototype = {
40623
+ onSpill: function onSpill(_ref4) {
40624
+ var dragEl = _ref4.dragEl,
40625
+ putSortable = _ref4.putSortable;
40626
+ var parentSortable = putSortable || this.sortable;
40627
+ parentSortable.captureAnimationState();
40628
+ dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
40629
+ parentSortable.animateAll();
40630
+ },
40631
+ drop: drop
40632
+ };
40633
+ _extends(Remove, {
40634
+ pluginName: 'removeOnSpill'
40635
+ });
40636
+
40637
+ var lastSwapEl;
40638
+ function SwapPlugin() {
40639
+ function Swap() {
40640
+ this.defaults = {
40641
+ swapClass: 'sortable-swap-highlight'
40642
+ };
40643
+ }
40644
+ Swap.prototype = {
40645
+ dragStart: function dragStart(_ref) {
40646
+ var dragEl = _ref.dragEl;
40647
+ lastSwapEl = dragEl;
40648
+ },
40649
+ dragOverValid: function dragOverValid(_ref2) {
40650
+ var completed = _ref2.completed,
40651
+ target = _ref2.target,
40652
+ onMove = _ref2.onMove,
40653
+ activeSortable = _ref2.activeSortable,
40654
+ changed = _ref2.changed,
40655
+ cancel = _ref2.cancel;
40656
+ if (!activeSortable.options.swap) return;
40657
+ var el = this.sortable.el,
40658
+ options = this.options;
40659
+ if (target && target !== el) {
40660
+ var prevSwapEl = lastSwapEl;
40661
+ if (onMove(target) !== false) {
40662
+ toggleClass(target, options.swapClass, true);
40663
+ lastSwapEl = target;
40664
+ } else {
40665
+ lastSwapEl = null;
40666
+ }
40667
+ if (prevSwapEl && prevSwapEl !== lastSwapEl) {
40668
+ toggleClass(prevSwapEl, options.swapClass, false);
40669
+ }
40670
+ }
40671
+ changed();
40672
+ completed(true);
40673
+ cancel();
40674
+ },
40675
+ drop: function drop(_ref3) {
40676
+ var activeSortable = _ref3.activeSortable,
40677
+ putSortable = _ref3.putSortable,
40678
+ dragEl = _ref3.dragEl;
40679
+ var toSortable = putSortable || this.sortable;
40680
+ var options = this.options;
40681
+ lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
40682
+ if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
40683
+ if (dragEl !== lastSwapEl) {
40684
+ toSortable.captureAnimationState();
40685
+ if (toSortable !== activeSortable) activeSortable.captureAnimationState();
40686
+ swapNodes(dragEl, lastSwapEl);
40687
+ toSortable.animateAll();
40688
+ if (toSortable !== activeSortable) activeSortable.animateAll();
40689
+ }
40690
+ }
40691
+ },
40692
+ nulling: function nulling() {
40693
+ lastSwapEl = null;
40694
+ }
40695
+ };
40696
+ return _extends(Swap, {
40697
+ pluginName: 'swap',
40698
+ eventProperties: function eventProperties() {
40699
+ return {
40700
+ swapItem: lastSwapEl
40701
+ };
40702
+ }
40703
+ });
40704
+ }
40705
+ function swapNodes(n1, n2) {
40706
+ var p1 = n1.parentNode,
40707
+ p2 = n2.parentNode,
40708
+ i1,
40709
+ i2;
40710
+ if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
40711
+ i1 = sortable_esm_index(n1);
40712
+ i2 = sortable_esm_index(n2);
40713
+ if (p1.isEqualNode(p2) && i1 < i2) {
40714
+ i2++;
40715
+ }
40716
+ p1.insertBefore(n2, p1.children[i1]);
40717
+ p2.insertBefore(n1, p2.children[i2]);
40718
+ }
40719
+
40720
+ var multiDragElements = (/* unused pure expression or super */ null && ([])),
40721
+ multiDragClones = (/* unused pure expression or super */ null && ([])),
40722
+ lastMultiDragSelect,
40723
+ // for selection with modifier key down (SHIFT)
40724
+ multiDragSortable,
40725
+ initialFolding = false,
40726
+ // Initial multi-drag fold when drag started
40727
+ folding = false,
40728
+ // Folding any other time
40729
+ dragStarted = false,
40730
+ dragEl$1,
40731
+ clonesFromRect,
40732
+ clonesHidden;
40733
+ function MultiDragPlugin() {
40734
+ function MultiDrag(sortable) {
40735
+ // Bind all private methods
40736
+ for (var fn in this) {
40737
+ if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
40738
+ this[fn] = this[fn].bind(this);
40739
+ }
40740
+ }
40741
+ if (!sortable.options.avoidImplicitDeselect) {
40742
+ if (sortable.options.supportPointer) {
40743
+ on(document, 'pointerup', this._deselectMultiDrag);
40744
+ } else {
40745
+ on(document, 'mouseup', this._deselectMultiDrag);
40746
+ on(document, 'touchend', this._deselectMultiDrag);
40747
+ }
40748
+ }
40749
+ on(document, 'keydown', this._checkKeyDown);
40750
+ on(document, 'keyup', this._checkKeyUp);
40751
+ this.defaults = {
40752
+ selectedClass: 'sortable-selected',
40753
+ multiDragKey: null,
40754
+ avoidImplicitDeselect: false,
40755
+ setData: function setData(dataTransfer, dragEl) {
40756
+ var data = '';
40757
+ if (multiDragElements.length && multiDragSortable === sortable) {
40758
+ multiDragElements.forEach(function (multiDragElement, i) {
40759
+ data += (!i ? '' : ', ') + multiDragElement.textContent;
40760
+ });
40761
+ } else {
40762
+ data = dragEl.textContent;
40763
+ }
40764
+ dataTransfer.setData('Text', data);
40765
+ }
40766
+ };
40767
+ }
40768
+ MultiDrag.prototype = {
40769
+ multiDragKeyDown: false,
40770
+ isMultiDrag: false,
40771
+ delayStartGlobal: function delayStartGlobal(_ref) {
40772
+ var dragged = _ref.dragEl;
40773
+ dragEl$1 = dragged;
40774
+ },
40775
+ delayEnded: function delayEnded() {
40776
+ this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
40777
+ },
40778
+ setupClone: function setupClone(_ref2) {
40779
+ var sortable = _ref2.sortable,
40780
+ cancel = _ref2.cancel;
40781
+ if (!this.isMultiDrag) return;
40782
+ for (var i = 0; i < multiDragElements.length; i++) {
40783
+ multiDragClones.push(clone(multiDragElements[i]));
40784
+ multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
40785
+ multiDragClones[i].draggable = false;
40786
+ multiDragClones[i].style['will-change'] = '';
40787
+ toggleClass(multiDragClones[i], this.options.selectedClass, false);
40788
+ multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false);
40789
+ }
40790
+ sortable._hideClone();
40791
+ cancel();
40792
+ },
40793
+ clone: function clone(_ref3) {
40794
+ var sortable = _ref3.sortable,
40795
+ rootEl = _ref3.rootEl,
40796
+ dispatchSortableEvent = _ref3.dispatchSortableEvent,
40797
+ cancel = _ref3.cancel;
40798
+ if (!this.isMultiDrag) return;
40799
+ if (!this.options.removeCloneOnHide) {
40800
+ if (multiDragElements.length && multiDragSortable === sortable) {
40801
+ insertMultiDragClones(true, rootEl);
40802
+ dispatchSortableEvent('clone');
40803
+ cancel();
40804
+ }
40805
+ }
40806
+ },
40807
+ showClone: function showClone(_ref4) {
40808
+ var cloneNowShown = _ref4.cloneNowShown,
40809
+ rootEl = _ref4.rootEl,
40810
+ cancel = _ref4.cancel;
40811
+ if (!this.isMultiDrag) return;
40812
+ insertMultiDragClones(false, rootEl);
40813
+ multiDragClones.forEach(function (clone) {
40814
+ css(clone, 'display', '');
40815
+ });
40816
+ cloneNowShown();
40817
+ clonesHidden = false;
40818
+ cancel();
40819
+ },
40820
+ hideClone: function hideClone(_ref5) {
40821
+ var _this = this;
40822
+ var sortable = _ref5.sortable,
40823
+ cloneNowHidden = _ref5.cloneNowHidden,
40824
+ cancel = _ref5.cancel;
40825
+ if (!this.isMultiDrag) return;
40826
+ multiDragClones.forEach(function (clone) {
40827
+ css(clone, 'display', 'none');
40828
+ if (_this.options.removeCloneOnHide && clone.parentNode) {
40829
+ clone.parentNode.removeChild(clone);
40830
+ }
40831
+ });
40832
+ cloneNowHidden();
40833
+ clonesHidden = true;
40834
+ cancel();
40835
+ },
40836
+ dragStartGlobal: function dragStartGlobal(_ref6) {
40837
+ var sortable = _ref6.sortable;
40838
+ if (!this.isMultiDrag && multiDragSortable) {
40839
+ multiDragSortable.multiDrag._deselectMultiDrag();
40840
+ }
40841
+ multiDragElements.forEach(function (multiDragElement) {
40842
+ multiDragElement.sortableIndex = sortable_esm_index(multiDragElement);
40843
+ });
40844
+
40845
+ // Sort multi-drag elements
40846
+ multiDragElements = multiDragElements.sort(function (a, b) {
40847
+ return a.sortableIndex - b.sortableIndex;
40848
+ });
40849
+ dragStarted = true;
40850
+ },
40851
+ dragStarted: function dragStarted(_ref7) {
40852
+ var _this2 = this;
40853
+ var sortable = _ref7.sortable;
40854
+ if (!this.isMultiDrag) return;
40855
+ if (this.options.sort) {
40856
+ // Capture rects,
40857
+ // hide multi drag elements (by positioning them absolute),
40858
+ // set multi drag elements rects to dragRect,
40859
+ // show multi drag elements,
40860
+ // animate to rects,
40861
+ // unset rects & remove from DOM
40862
+
40863
+ sortable.captureAnimationState();
40864
+ if (this.options.animation) {
40865
+ multiDragElements.forEach(function (multiDragElement) {
40866
+ if (multiDragElement === dragEl$1) return;
40867
+ css(multiDragElement, 'position', 'absolute');
40868
+ });
40869
+ var dragRect = getRect(dragEl$1, false, true, true);
40870
+ multiDragElements.forEach(function (multiDragElement) {
40871
+ if (multiDragElement === dragEl$1) return;
40872
+ setRect(multiDragElement, dragRect);
40873
+ });
40874
+ folding = true;
40875
+ initialFolding = true;
40876
+ }
40877
+ }
40878
+ sortable.animateAll(function () {
40879
+ folding = false;
40880
+ initialFolding = false;
40881
+ if (_this2.options.animation) {
40882
+ multiDragElements.forEach(function (multiDragElement) {
40883
+ unsetRect(multiDragElement);
40884
+ });
40885
+ }
40886
+
40887
+ // Remove all auxiliary multidrag items from el, if sorting enabled
40888
+ if (_this2.options.sort) {
40889
+ removeMultiDragElements();
40890
+ }
40891
+ });
40892
+ },
40893
+ dragOver: function dragOver(_ref8) {
40894
+ var target = _ref8.target,
40895
+ completed = _ref8.completed,
40896
+ cancel = _ref8.cancel;
40897
+ if (folding && ~multiDragElements.indexOf(target)) {
40898
+ completed(false);
40899
+ cancel();
40900
+ }
40901
+ },
40902
+ revert: function revert(_ref9) {
40903
+ var fromSortable = _ref9.fromSortable,
40904
+ rootEl = _ref9.rootEl,
40905
+ sortable = _ref9.sortable,
40906
+ dragRect = _ref9.dragRect;
40907
+ if (multiDragElements.length > 1) {
40908
+ // Setup unfold animation
40909
+ multiDragElements.forEach(function (multiDragElement) {
40910
+ sortable.addAnimationState({
40911
+ target: multiDragElement,
40912
+ rect: folding ? getRect(multiDragElement) : dragRect
40913
+ });
40914
+ unsetRect(multiDragElement);
40915
+ multiDragElement.fromRect = dragRect;
40916
+ fromSortable.removeAnimationState(multiDragElement);
40917
+ });
40918
+ folding = false;
40919
+ insertMultiDragElements(!this.options.removeCloneOnHide, rootEl);
40920
+ }
40921
+ },
40922
+ dragOverCompleted: function dragOverCompleted(_ref10) {
40923
+ var sortable = _ref10.sortable,
40924
+ isOwner = _ref10.isOwner,
40925
+ insertion = _ref10.insertion,
40926
+ activeSortable = _ref10.activeSortable,
40927
+ parentEl = _ref10.parentEl,
40928
+ putSortable = _ref10.putSortable;
40929
+ var options = this.options;
40930
+ if (insertion) {
40931
+ // Clones must be hidden before folding animation to capture dragRectAbsolute properly
40932
+ if (isOwner) {
40933
+ activeSortable._hideClone();
40934
+ }
40935
+ initialFolding = false;
40936
+ // If leaving sort:false root, or already folding - Fold to new location
40937
+ if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
40938
+ // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
40939
+ var dragRectAbsolute = getRect(dragEl$1, false, true, true);
40940
+ multiDragElements.forEach(function (multiDragElement) {
40941
+ if (multiDragElement === dragEl$1) return;
40942
+ setRect(multiDragElement, dragRectAbsolute);
40943
+
40944
+ // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
40945
+ // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
40946
+ parentEl.appendChild(multiDragElement);
40947
+ });
40948
+ folding = true;
40949
+ }
40950
+
40951
+ // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
40952
+ if (!isOwner) {
40953
+ // Only remove if not folding (folding will remove them anyways)
40954
+ if (!folding) {
40955
+ removeMultiDragElements();
40956
+ }
40957
+ if (multiDragElements.length > 1) {
40958
+ var clonesHiddenBefore = clonesHidden;
40959
+ activeSortable._showClone(sortable);
40960
+
40961
+ // Unfold animation for clones if showing from hidden
40962
+ if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
40963
+ multiDragClones.forEach(function (clone) {
40964
+ activeSortable.addAnimationState({
40965
+ target: clone,
40966
+ rect: clonesFromRect
40967
+ });
40968
+ clone.fromRect = clonesFromRect;
40969
+ clone.thisAnimationDuration = null;
40970
+ });
40971
+ }
40972
+ } else {
40973
+ activeSortable._showClone(sortable);
40974
+ }
40975
+ }
40976
+ }
40977
+ },
40978
+ dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
40979
+ var dragRect = _ref11.dragRect,
40980
+ isOwner = _ref11.isOwner,
40981
+ activeSortable = _ref11.activeSortable;
40982
+ multiDragElements.forEach(function (multiDragElement) {
40983
+ multiDragElement.thisAnimationDuration = null;
40984
+ });
40985
+ if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
40986
+ clonesFromRect = _extends({}, dragRect);
40987
+ var dragMatrix = matrix(dragEl$1, true);
40988
+ clonesFromRect.top -= dragMatrix.f;
40989
+ clonesFromRect.left -= dragMatrix.e;
40990
+ }
40991
+ },
40992
+ dragOverAnimationComplete: function dragOverAnimationComplete() {
40993
+ if (folding) {
40994
+ folding = false;
40995
+ removeMultiDragElements();
40996
+ }
40997
+ },
40998
+ drop: function drop(_ref12) {
40999
+ var evt = _ref12.originalEvent,
41000
+ rootEl = _ref12.rootEl,
41001
+ parentEl = _ref12.parentEl,
41002
+ sortable = _ref12.sortable,
41003
+ dispatchSortableEvent = _ref12.dispatchSortableEvent,
41004
+ oldIndex = _ref12.oldIndex,
41005
+ putSortable = _ref12.putSortable;
41006
+ var toSortable = putSortable || this.sortable;
41007
+ if (!evt) return;
41008
+ var options = this.options,
41009
+ children = parentEl.children;
41010
+
41011
+ // Multi-drag selection
41012
+ if (!dragStarted) {
41013
+ if (options.multiDragKey && !this.multiDragKeyDown) {
41014
+ this._deselectMultiDrag();
41015
+ }
41016
+ toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
41017
+ if (!~multiDragElements.indexOf(dragEl$1)) {
41018
+ multiDragElements.push(dragEl$1);
41019
+ dispatchEvent({
41020
+ sortable: sortable,
41021
+ rootEl: rootEl,
41022
+ name: 'select',
41023
+ targetEl: dragEl$1,
41024
+ originalEvent: evt
41025
+ });
41026
+
41027
+ // Modifier activated, select from last to dragEl
41028
+ if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
41029
+ var lastIndex = sortable_esm_index(lastMultiDragSelect),
41030
+ currentIndex = sortable_esm_index(dragEl$1);
41031
+ if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
41032
+ // Must include lastMultiDragSelect (select it), in case modified selection from no selection
41033
+ // (but previous selection existed)
41034
+ var n, i;
41035
+ if (currentIndex > lastIndex) {
41036
+ i = lastIndex;
41037
+ n = currentIndex;
41038
+ } else {
41039
+ i = currentIndex;
41040
+ n = lastIndex + 1;
41041
+ }
41042
+ for (; i < n; i++) {
41043
+ if (~multiDragElements.indexOf(children[i])) continue;
41044
+ toggleClass(children[i], options.selectedClass, true);
41045
+ multiDragElements.push(children[i]);
41046
+ dispatchEvent({
41047
+ sortable: sortable,
41048
+ rootEl: rootEl,
41049
+ name: 'select',
41050
+ targetEl: children[i],
41051
+ originalEvent: evt
41052
+ });
41053
+ }
41054
+ }
41055
+ } else {
41056
+ lastMultiDragSelect = dragEl$1;
41057
+ }
41058
+ multiDragSortable = toSortable;
41059
+ } else {
41060
+ multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
41061
+ lastMultiDragSelect = null;
41062
+ dispatchEvent({
41063
+ sortable: sortable,
41064
+ rootEl: rootEl,
41065
+ name: 'deselect',
41066
+ targetEl: dragEl$1,
41067
+ originalEvent: evt
41068
+ });
41069
+ }
41070
+ }
41071
+
41072
+ // Multi-drag drop
41073
+ if (dragStarted && this.isMultiDrag) {
41074
+ folding = false;
41075
+ // Do not "unfold" after around dragEl if reverted
41076
+ if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
41077
+ var dragRect = getRect(dragEl$1),
41078
+ multiDragIndex = sortable_esm_index(dragEl$1, ':not(.' + this.options.selectedClass + ')');
41079
+ if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
41080
+ toSortable.captureAnimationState();
41081
+ if (!initialFolding) {
41082
+ if (options.animation) {
41083
+ dragEl$1.fromRect = dragRect;
41084
+ multiDragElements.forEach(function (multiDragElement) {
41085
+ multiDragElement.thisAnimationDuration = null;
41086
+ if (multiDragElement !== dragEl$1) {
41087
+ var rect = folding ? getRect(multiDragElement) : dragRect;
41088
+ multiDragElement.fromRect = rect;
41089
+
41090
+ // Prepare unfold animation
41091
+ toSortable.addAnimationState({
41092
+ target: multiDragElement,
41093
+ rect: rect
41094
+ });
41095
+ }
41096
+ });
41097
+ }
41098
+
41099
+ // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
41100
+ // properly they must all be removed
41101
+ removeMultiDragElements();
41102
+ multiDragElements.forEach(function (multiDragElement) {
41103
+ if (children[multiDragIndex]) {
41104
+ parentEl.insertBefore(multiDragElement, children[multiDragIndex]);
41105
+ } else {
41106
+ parentEl.appendChild(multiDragElement);
41107
+ }
41108
+ multiDragIndex++;
41109
+ });
41110
+
41111
+ // If initial folding is done, the elements may have changed position because they are now
41112
+ // unfolding around dragEl, even though dragEl may not have his index changed, so update event
41113
+ // must be fired here as Sortable will not.
41114
+ if (oldIndex === sortable_esm_index(dragEl$1)) {
41115
+ var update = false;
41116
+ multiDragElements.forEach(function (multiDragElement) {
41117
+ if (multiDragElement.sortableIndex !== sortable_esm_index(multiDragElement)) {
41118
+ update = true;
41119
+ return;
41120
+ }
41121
+ });
41122
+ if (update) {
41123
+ dispatchSortableEvent('update');
41124
+ dispatchSortableEvent('sort');
41125
+ }
41126
+ }
41127
+ }
41128
+
41129
+ // Must be done after capturing individual rects (scroll bar)
41130
+ multiDragElements.forEach(function (multiDragElement) {
41131
+ unsetRect(multiDragElement);
41132
+ });
41133
+ toSortable.animateAll();
41134
+ }
41135
+ multiDragSortable = toSortable;
41136
+ }
41137
+
41138
+ // Remove clones if necessary
41139
+ if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
41140
+ multiDragClones.forEach(function (clone) {
41141
+ clone.parentNode && clone.parentNode.removeChild(clone);
41142
+ });
41143
+ }
41144
+ },
41145
+ nullingGlobal: function nullingGlobal() {
41146
+ this.isMultiDrag = dragStarted = false;
41147
+ multiDragClones.length = 0;
41148
+ },
41149
+ destroyGlobal: function destroyGlobal() {
41150
+ this._deselectMultiDrag();
41151
+ off(document, 'pointerup', this._deselectMultiDrag);
41152
+ off(document, 'mouseup', this._deselectMultiDrag);
41153
+ off(document, 'touchend', this._deselectMultiDrag);
41154
+ off(document, 'keydown', this._checkKeyDown);
41155
+ off(document, 'keyup', this._checkKeyUp);
41156
+ },
41157
+ _deselectMultiDrag: function _deselectMultiDrag(evt) {
41158
+ if (typeof dragStarted !== "undefined" && dragStarted) return;
41159
+
41160
+ // Only deselect if selection is in this sortable
41161
+ if (multiDragSortable !== this.sortable) return;
41162
+
41163
+ // Only deselect if target is not item in this sortable
41164
+ if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return;
41165
+
41166
+ // Only deselect if left click
41167
+ if (evt && evt.button !== 0) return;
41168
+ while (multiDragElements.length) {
41169
+ var el = multiDragElements[0];
41170
+ toggleClass(el, this.options.selectedClass, false);
41171
+ multiDragElements.shift();
41172
+ dispatchEvent({
41173
+ sortable: this.sortable,
41174
+ rootEl: this.sortable.el,
41175
+ name: 'deselect',
41176
+ targetEl: el,
41177
+ originalEvent: evt
41178
+ });
41179
+ }
41180
+ },
41181
+ _checkKeyDown: function _checkKeyDown(evt) {
41182
+ if (evt.key === this.options.multiDragKey) {
41183
+ this.multiDragKeyDown = true;
41184
+ }
41185
+ },
41186
+ _checkKeyUp: function _checkKeyUp(evt) {
41187
+ if (evt.key === this.options.multiDragKey) {
41188
+ this.multiDragKeyDown = false;
41189
+ }
41190
+ }
41191
+ };
41192
+ return _extends(MultiDrag, {
41193
+ // Static methods & properties
41194
+ pluginName: 'multiDrag',
41195
+ utils: {
41196
+ /**
41197
+ * Selects the provided multi-drag item
41198
+ * @param {HTMLElement} el The element to be selected
41199
+ */
41200
+ select: function select(el) {
41201
+ var sortable = el.parentNode[expando];
41202
+ if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
41203
+ if (multiDragSortable && multiDragSortable !== sortable) {
41204
+ multiDragSortable.multiDrag._deselectMultiDrag();
41205
+ multiDragSortable = sortable;
41206
+ }
41207
+ toggleClass(el, sortable.options.selectedClass, true);
41208
+ multiDragElements.push(el);
41209
+ },
41210
+ /**
41211
+ * Deselects the provided multi-drag item
41212
+ * @param {HTMLElement} el The element to be deselected
41213
+ */
41214
+ deselect: function deselect(el) {
41215
+ var sortable = el.parentNode[expando],
41216
+ index = multiDragElements.indexOf(el);
41217
+ if (!sortable || !sortable.options.multiDrag || !~index) return;
41218
+ toggleClass(el, sortable.options.selectedClass, false);
41219
+ multiDragElements.splice(index, 1);
41220
+ }
41221
+ },
41222
+ eventProperties: function eventProperties() {
41223
+ var _this3 = this;
41224
+ var oldIndicies = [],
41225
+ newIndicies = [];
41226
+ multiDragElements.forEach(function (multiDragElement) {
41227
+ oldIndicies.push({
41228
+ multiDragElement: multiDragElement,
41229
+ index: multiDragElement.sortableIndex
41230
+ });
41231
+
41232
+ // multiDragElements will already be sorted if folding
41233
+ var newIndex;
41234
+ if (folding && multiDragElement !== dragEl$1) {
41235
+ newIndex = -1;
41236
+ } else if (folding) {
41237
+ newIndex = sortable_esm_index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')');
41238
+ } else {
41239
+ newIndex = sortable_esm_index(multiDragElement);
41240
+ }
41241
+ newIndicies.push({
41242
+ multiDragElement: multiDragElement,
41243
+ index: newIndex
41244
+ });
41245
+ });
41246
+ return {
41247
+ items: _toConsumableArray(multiDragElements),
41248
+ clones: [].concat(multiDragClones),
41249
+ oldIndicies: oldIndicies,
41250
+ newIndicies: newIndicies
41251
+ };
41252
+ },
41253
+ optionListeners: {
41254
+ multiDragKey: function multiDragKey(key) {
41255
+ key = key.toLowerCase();
41256
+ if (key === 'ctrl') {
41257
+ key = 'Control';
41258
+ } else if (key.length > 1) {
41259
+ key = key.charAt(0).toUpperCase() + key.substr(1);
41260
+ }
41261
+ return key;
41262
+ }
41263
+ }
41264
+ });
41265
+ }
41266
+ function insertMultiDragElements(clonesInserted, rootEl) {
41267
+ multiDragElements.forEach(function (multiDragElement, i) {
41268
+ var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)];
41269
+ if (target) {
41270
+ rootEl.insertBefore(multiDragElement, target);
41271
+ } else {
41272
+ rootEl.appendChild(multiDragElement);
41273
+ }
41274
+ });
41275
+ }
41276
+
41277
+ /**
41278
+ * Insert multi-drag clones
41279
+ * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
41280
+ * @param {HTMLElement} rootEl
41281
+ */
41282
+ function insertMultiDragClones(elementsInserted, rootEl) {
41283
+ multiDragClones.forEach(function (clone, i) {
41284
+ var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)];
41285
+ if (target) {
41286
+ rootEl.insertBefore(clone, target);
41287
+ } else {
41288
+ rootEl.appendChild(clone);
41289
+ }
41290
+ });
41291
+ }
41292
+ function removeMultiDragElements() {
41293
+ multiDragElements.forEach(function (multiDragElement) {
41294
+ if (multiDragElement === dragEl$1) return;
41295
+ multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement);
41296
+ });
41297
+ }
41298
+
41299
+ Sortable.mount(new AutoScrollPlugin());
41300
+ Sortable.mount(Remove, Revert);
41301
+
41302
+ /* harmony default export */ var sortable_esm = (Sortable);
41303
+
41304
+
37925
41305
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/email/src/xieyoujian.vue?vue&type=script&lang=js
37926
41306
  function xieyoujianvue_type_script_lang_js_typeof(o) { "@babel/helpers - typeof"; return xieyoujianvue_type_script_lang_js_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, xieyoujianvue_type_script_lang_js_typeof(o); }
37927
41307
  function xieyoujianvue_type_script_lang_js_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ xieyoujianvue_type_script_lang_js_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == xieyoujianvue_type_script_lang_js_typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(xieyoujianvue_type_script_lang_js_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { 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" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
37928
41308
  function xieyoujianvue_type_script_lang_js_asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
37929
41309
  function xieyoujianvue_type_script_lang_js_asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { xieyoujianvue_type_script_lang_js_asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { xieyoujianvue_type_script_lang_js_asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
37930
- function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
37931
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
37932
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
37933
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
37934
- function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
37935
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
41310
+ function xieyoujianvue_type_script_lang_js_toConsumableArray(r) { return xieyoujianvue_type_script_lang_js_arrayWithoutHoles(r) || xieyoujianvue_type_script_lang_js_iterableToArray(r) || xieyoujianvue_type_script_lang_js_unsupportedIterableToArray(r) || xieyoujianvue_type_script_lang_js_nonIterableSpread(); }
41311
+ function xieyoujianvue_type_script_lang_js_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
41312
+ function xieyoujianvue_type_script_lang_js_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a) : void 0; } }
41313
+ function xieyoujianvue_type_script_lang_js_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
41314
+ function xieyoujianvue_type_script_lang_js_arrayWithoutHoles(r) { if (Array.isArray(r)) return xieyoujianvue_type_script_lang_js_arrayLikeToArray(r); }
41315
+ function xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
37936
41316
  function xieyoujianvue_type_script_lang_js_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
37937
41317
  function xieyoujianvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? xieyoujianvue_type_script_lang_js_ownKeys(Object(t), !0).forEach(function (r) { xieyoujianvue_type_script_lang_js_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : xieyoujianvue_type_script_lang_js_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
37938
41318
  function xieyoujianvue_type_script_lang_js_defineProperty(e, r, t) { return (r = xieyoujianvue_type_script_lang_js_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -37940,6 +41320,7 @@ function xieyoujianvue_type_script_lang_js_toPropertyKey(t) { var i = xieyoujian
37940
41320
  function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != xieyoujianvue_type_script_lang_js_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != xieyoujianvue_type_script_lang_js_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
37941
41321
 
37942
41322
 
41323
+
37943
41324
  /* harmony default export */ var xieyoujianvue_type_script_lang_js = ({
37944
41325
  components: {
37945
41326
  txl: txl
@@ -38007,7 +41388,9 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38007
41388
  topBarHeight: '180px',
38008
41389
  attachBarHeight: '43px',
38009
41390
  itemlist: [],
38010
- limitNum: 5 // 上传文件的最大个数
41391
+ limitNum: 5,
41392
+ // 上传文件的最大个数
41393
+ isDragging: false
38011
41394
  };
38012
41395
  },
38013
41396
  computed: xieyoujianvue_type_script_lang_js_objectSpread({
@@ -38024,13 +41407,11 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38024
41407
  _this2.attachBarHeight = document.querySelector('.attach-bar').clientHeight + 'px';
38025
41408
  });
38026
41409
  var _this = this;
38027
- console.log('_this.$route.query', _this.$route.query);
38028
41410
  if (!_this.$route.query) {
38029
41411
  _this.isParams = 'againMail';
38030
41412
  _this.newMail(_this.isParams);
38031
41413
  } else {
38032
41414
  // 草稿箱/新建写邮件
38033
- console.log('走不走这里');
38034
41415
  _this.newMail();
38035
41416
  }
38036
41417
  } else {
@@ -38084,7 +41465,6 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38084
41465
  percentage: 0
38085
41466
  });
38086
41467
  });
38087
- console.log(this.itemlist, 'this.itemlist');
38088
41468
  }
38089
41469
  }
38090
41470
  }
@@ -38112,6 +41492,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38112
41492
  _this5.itemlist.push(val.fileLevel);
38113
41493
  });
38114
41494
  }
41495
+ _this5.setDragHander('sendList');
38115
41496
  });
38116
41497
  if (this.$route.query.srcBusiDataId) {
38117
41498
  this.topBarHeight = '0px';
@@ -38132,7 +41513,6 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38132
41513
  });
38133
41514
  this.$bus.on('quickdataFuc', function (resobj) {
38134
41515
  _this5.linkManEmail = _this5.unique(resobj);
38135
- console.log('linkManEmail====', _this5.linkManEmail);
38136
41516
  if (resobj.length > 0) {
38137
41517
  _this5.closeLink = true;
38138
41518
  } else {
@@ -38255,7 +41635,6 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38255
41635
  });
38256
41636
  // 从个人通讯录或最近联系人中选择
38257
41637
  this.$bus.on('checkEmailPerson', function (resobj) {
38258
- console.log('走不走');
38259
41638
  if (typeof resobj === 'string') {
38260
41639
  var errRes = null;
38261
41640
  // 验证当前为内部邮箱时,是否需要绑定外部邮箱
@@ -38296,7 +41675,6 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38296
41675
  }
38297
41676
  }
38298
41677
  } else {
38299
- console.log('数组', resobj);
38300
41678
  var _loop2 = function _loop2() {
38301
41679
  var errRes = null;
38302
41680
  // 验证当前为内部邮箱时,是否需要绑定外部邮箱
@@ -38340,7 +41718,6 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38340
41718
  } else {
38341
41719
  _this5.blindCopyToList.push(resobj[i]);
38342
41720
  }
38343
- console.log('uuuuu', resobj[i], _this5.sendList);
38344
41721
  }
38345
41722
  },
38346
41723
  _ret2;
@@ -38374,6 +41751,21 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38374
41751
  });
38375
41752
  },
38376
41753
  methods: {
41754
+ setDragHander: function setDragHander(sendType) {
41755
+ var _this6 = this;
41756
+ var el = this.$el.querySelector('.' + sendType).querySelector('.el-scrollbar__view');
41757
+ this.sortable = sortable_esm.create(el, {
41758
+ handle: '.emailAddrStyle',
41759
+ dragClass: 'sortable-drag',
41760
+ setData: function setData(dataTransfer) {
41761
+ dataTransfer.setData('Text', '');
41762
+ },
41763
+ onEnd: function onEnd(evt) {
41764
+ var receiver = _this6[sendType].splice(evt.oldIndex, 1)[0];
41765
+ _this6[sendType].splice(evt.newIndex, 0, receiver);
41766
+ }
41767
+ });
41768
+ },
38377
41769
  // 获取点击区域将鼠标定位在input中
38378
41770
  clickArea: function clickArea(area) {
38379
41771
  this.$refs[area].focus();
@@ -38386,7 +41778,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38386
41778
  // this.$refs.txl.zTreelatey.checkAllNodes(false)
38387
41779
  },
38388
41780
  filterTree: function filterTree(item) {
38389
- var _this6 = this;
41781
+ var _this7 = this;
38390
41782
  // 获取父节点
38391
41783
  var ztreeNode = this.$refs.txl.zTree.getNodes();
38392
41784
  var zTreetxlNode = this.$refs.txl.zTreetxl.getNodes();
@@ -38397,17 +41789,17 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38397
41789
  var zLnodes = this.$refs.txl.zTreelatey.transformToArray(zTreelateyNode);
38398
41790
  zTnodes.forEach(function (item2) {
38399
41791
  if (item2.name === item) {
38400
- _this6.$refs.txl.zTree.checkNode(item2, false, true);
41792
+ _this7.$refs.txl.zTree.checkNode(item2, false, true);
38401
41793
  }
38402
41794
  });
38403
41795
  zTxlnodes.forEach(function (item2) {
38404
41796
  if (item2.email === item) {
38405
- _this6.$refs.txl.zTreetxl.checkNode(item2, false, true);
41797
+ _this7.$refs.txl.zTreetxl.checkNode(item2, false, true);
38406
41798
  }
38407
41799
  });
38408
41800
  zLnodes.forEach(function (item2) {
38409
41801
  if (item2.email === item) {
38410
- _this6.$refs.txl.zTreelatey.checkNode(item2, false, true);
41802
+ _this7.$refs.txl.zTreelatey.checkNode(item2, false, true);
38411
41803
  }
38412
41804
  });
38413
41805
  // 每一项前面的全选是否也取消
@@ -38416,7 +41808,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38416
41808
  } else if (this.$refs.txl.zTree.getCheckedNodes(true).length > 0) {
38417
41809
  var samePub = 0;
38418
41810
  ztreeNode.forEach(function (item3) {
38419
- _this6.$refs.txl.zTree.getCheckedNodes(true).forEach(function (item4) {
41811
+ _this7.$refs.txl.zTree.getCheckedNodes(true).forEach(function (item4) {
38420
41812
  if (item4.id === item3.id) {
38421
41813
  samePub++;
38422
41814
  }
@@ -38429,7 +41821,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38429
41821
  } else if (this.$refs.txl.zTreetxl.getCheckedNodes(true).length > 0) {
38430
41822
  var sameTxl = 0;
38431
41823
  zTreetxlNode.forEach(function (item3) {
38432
- _this6.$refs.txl.zTreetxl.getCheckedNodes(true).forEach(function (item4) {
41824
+ _this7.$refs.txl.zTreetxl.getCheckedNodes(true).forEach(function (item4) {
38433
41825
  if (item4.id === item3.id) {
38434
41826
  sameTxl++;
38435
41827
  }
@@ -38443,41 +41835,47 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38443
41835
  },
38444
41836
  // 点击添加/删除 抄送
38445
41837
  csTagChange: function csTagChange() {
38446
- var _this7 = this;
41838
+ var _this8 = this;
38447
41839
  this.csr = !this.csr;
38448
41840
  this.focusInput = this.csr ? 2 : 1;
38449
41841
  if (this.csr) {
38450
41842
  this.$nextTick(function () {
38451
- _this7.$refs.copyTo.focus();
41843
+ _this8.$refs.copyTo.focus();
38452
41844
  });
38453
41845
  } else {
38454
41846
  // 删除抄送人选项时
38455
41847
  if (this.copyToList.length > 0) {
38456
41848
  this.copyToList.forEach(function (item) {
38457
- _this7.filterTree(item);
41849
+ _this8.filterTree(item);
38458
41850
  });
38459
41851
  }
38460
41852
  }
38461
41853
  this.copyToList = [];
41854
+ this.$nextTick(function () {
41855
+ _this8.setDragHander('copyToList');
41856
+ });
38462
41857
  },
38463
41858
  // 点击添加/删除 密送
38464
41859
  msTagChange: function msTagChange() {
38465
- var _this8 = this;
41860
+ var _this9 = this;
38466
41861
  this.msr = !this.msr;
38467
41862
  this.focusInput = this.msr ? 3 : 1;
38468
41863
  if (this.msr) {
38469
41864
  this.$nextTick(function () {
38470
- _this8.$refs.blindCopyTo.focus();
41865
+ _this9.$refs.blindCopyTo.focus();
38471
41866
  });
38472
41867
  } else {
38473
41868
  // 删除密送人选项时
38474
41869
  if (this.blindCopyToList.length > 0) {
38475
41870
  this.blindCopyToList.forEach(function (item) {
38476
- _this8.filterTree(item);
41871
+ _this9.filterTree(item);
38477
41872
  });
38478
41873
  }
38479
41874
  }
38480
41875
  this.blindCopyToList = [];
41876
+ this.$nextTick(function () {
41877
+ _this9.setDragHander('blindCopyToList');
41878
+ });
38481
41879
  },
38482
41880
  // 点击群发单显/取消群发单显
38483
41881
  qfdxTagChange: function qfdxTagChange() {
@@ -38495,7 +41893,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38495
41893
  },
38496
41894
  // 绑定的邮箱列表,获取默认邮箱
38497
41895
  loadInternetList: function loadInternetList() {
38498
- var _this9 = this;
41896
+ var _this10 = this;
38499
41897
  var _this = this;
38500
41898
  _this.loading = false;
38501
41899
 
@@ -38522,7 +41920,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38522
41920
  }
38523
41921
  } else {
38524
41922
  // _this.$message.error(response.message)
38525
- _this.$alert(response.message, _this9.$tx('common.operationTip', '操作提示'), {
41923
+ _this.$alert(response.message, _this10.$tx('common.operationTip', '操作提示'), {
38526
41924
  type: 'error'
38527
41925
  });
38528
41926
  }
@@ -38589,7 +41987,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38589
41987
  },
38590
41988
  // 新邮件初始化
38591
41989
  newMail: function newMail(type) {
38592
- var _this10 = this;
41990
+ var _this11 = this;
38593
41991
  this.loading = true;
38594
41992
  this.sendList = [];
38595
41993
  if (type === 'againMail') {
@@ -38644,7 +42042,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38644
42042
  if (this.mailInfo.attachments) {
38645
42043
  var _this$readyList;
38646
42044
  // if (this.mailInfo.attachments.length > 0) {
38647
- this.readyList = (_this$readyList = this.readyList).concat.apply(_this$readyList, _toConsumableArray(this.mailInfo.attachments));
42045
+ this.readyList = (_this$readyList = this.readyList).concat.apply(_this$readyList, xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
38648
42046
  this.readyList.forEach(function (item) {
38649
42047
  if (!item.name) {
38650
42048
  item.name = item.fileName;
@@ -38655,7 +42053,6 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38655
42053
  // _this.$message.error(this.$tx('email.xieyoujian.addresseeEnter'))
38656
42054
  // return false
38657
42055
  // }
38658
- console.log('this.mailInfo', this.mailInfo);
38659
42056
  }
38660
42057
  } else if (this.mailInfo.actionType) {
38661
42058
  // 转发、重新发送、回复邮件
@@ -38664,20 +42061,20 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38664
42061
  var lists2 = this.mailInfo.fromAddr.split(',');
38665
42062
  var lists3 = this.mailInfo.copyTo.split(',');
38666
42063
  lists1.forEach(function (item, index) {
38667
- if (item.indexOf(_this10.defultMail.emailAddr) === -1 && item.indexOf(_this10.defultMail.emailAddr.split('@')[0]) === -1) {
38668
- _this10.sendList.push(item);
42064
+ if (item.indexOf(_this11.defultMail.emailAddr) === -1 && item.indexOf(_this11.defultMail.emailAddr.split('@')[0]) === -1) {
42065
+ _this11.sendList.push(item);
38669
42066
  }
38670
42067
  });
38671
42068
  lists2.forEach(function (item, index) {
38672
- if (item.indexOf(_this10.defultMail.emailAddr) === -1 && item.indexOf(_this10.defultMail.emailAddr.split('@')[0]) === -1) {
38673
- _this10.sendList.push(item);
42069
+ if (item.indexOf(_this11.defultMail.emailAddr) === -1 && item.indexOf(_this11.defultMail.emailAddr.split('@')[0]) === -1) {
42070
+ _this11.sendList.push(item);
38674
42071
  }
38675
42072
  });
38676
42073
  lists3.forEach(function (item, index) {
38677
42074
  if (item !== '') {
38678
- if (item.indexOf(_this10.defultMail.emailAddr) === -1 && item.indexOf(_this10.defultMail.emailAddr.split('@')[0]) === -1) {
38679
- _this10.copyToList.push(item);
38680
- _this10.csr = true;
42075
+ if (item.indexOf(_this11.defultMail.emailAddr) === -1 && item.indexOf(_this11.defultMail.emailAddr.split('@')[0]) === -1) {
42076
+ _this11.copyToList.push(item);
42077
+ _this11.csr = true;
38681
42078
  }
38682
42079
  }
38683
42080
  });
@@ -38688,7 +42085,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38688
42085
  this.sendList.push(this.mailInfo.sendTo);
38689
42086
  if (this.mailInfo.attachments.length > 0) {
38690
42087
  var _this$readyList2;
38691
- (_this$readyList2 = this.readyList).push.apply(_this$readyList2, _toConsumableArray(this.mailInfo.attachments));
42088
+ (_this$readyList2 = this.readyList).push.apply(_this$readyList2, xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
38692
42089
  }
38693
42090
  } else if (this.mailInfo.actionType === 'forward') {
38694
42091
  this.mailInfo.fromAddr = this.defultMail.emailAddr;
@@ -38696,7 +42093,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38696
42093
  if (this.mailInfo.attachments) {
38697
42094
  if (this.mailInfo.attachments.length > 0) {
38698
42095
  var _this$readyList3;
38699
- (_this$readyList3 = this.readyList).push.apply(_this$readyList3, _toConsumableArray(this.mailInfo.attachments));
42096
+ (_this$readyList3 = this.readyList).push.apply(_this$readyList3, xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
38700
42097
  this.readyList.forEach(function (item) {
38701
42098
  if (!item.name) {
38702
42099
  item.name = item.fileName;
@@ -38727,7 +42124,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38727
42124
  },
38728
42125
  // 流程表单转发邮件
38729
42126
  wflowForwardMail: function wflowForwardMail() {
38730
- var _this11 = this;
42127
+ var _this12 = this;
38731
42128
  var _this = this;
38732
42129
  this.$http({
38733
42130
  method: 'GET',
@@ -38742,7 +42139,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38742
42139
  _this.$set(_this.mailInfo, 'subject', '【' + response.body.wfInstance.wfName + '】' + response.body.wfInstance.title);
38743
42140
  _this.mailContent = response.body.content;
38744
42141
  _this.mailInfo.content = _this.mailContent;
38745
- var mailAttachs = _this11.mailInfo.attachments || [];
42142
+ var mailAttachs = _this12.mailInfo.attachments || [];
38746
42143
  response.body.attachs.forEach(function (attach) {
38747
42144
  if (_this.$route.query.fileId && _this.$route.query.fileId.indexOf(attach.id) !== -1) {
38748
42145
  mailAttachs.push(attach);
@@ -38770,9 +42167,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38770
42167
  this.readyList = fileList;
38771
42168
  this.moveFile.push(file);
38772
42169
  },
38773
- allUpload: function allUpload(params) {
38774
- console.log(params, 'params');
38775
- },
42170
+ allUpload: function allUpload(params) {},
38776
42171
  // 选择附件方法
38777
42172
  handleChange: function handleChange(file, fileList) {
38778
42173
  this.uploadAttach = file;
@@ -38825,7 +42220,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38825
42220
  // 存草稿
38826
42221
  // 保存邮件草稿
38827
42222
  saveDraft: function saveDraft(type) {
38828
- var _this12 = this;
42223
+ var _this13 = this;
38829
42224
  var _this = this;
38830
42225
  _this.mailInfo.usersetId = _this.defultMail.id;
38831
42226
  if (_this.sendList.length > 0) {
@@ -38836,7 +42231,6 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38836
42231
  _this.$message.error(this.$tx('email.messages.addresseeEnter', '请输入收件人!'));
38837
42232
  return false;
38838
42233
  }
38839
- console.log(this.readyList, 'this.readyList');
38840
42234
  _this.formValidate(function () {
38841
42235
  _this.loading = true;
38842
42236
  _this.mailInfo.onlyOne = _this.qfdx ? 1 : 0;
@@ -38864,7 +42258,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38864
42258
  _this.sendMail();
38865
42259
  } else {
38866
42260
  _this.loading = false;
38867
- _this.$message.success(_this12.$tx('email.messages.SaveDraftsu', '保存草稿成功'));
42261
+ _this.$message.success(_this13.$tx('email.messages.SaveDraftsu', '保存草稿成功'));
38868
42262
  // location.reload()
38869
42263
  }
38870
42264
  }
@@ -38881,19 +42275,19 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38881
42275
  },
38882
42276
  // * 上传附件
38883
42277
  fileUploadFuc: function fileUploadFuc(type) {
38884
- var _this13 = this;
42278
+ var _this14 = this;
38885
42279
  return xieyoujianvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/xieyoujianvue_type_script_lang_js_regeneratorRuntime().mark(function _callee() {
38886
42280
  var _this, url, _loop3, i;
38887
42281
  return xieyoujianvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee$(_context2) {
38888
42282
  while (1) switch (_context2.prev = _context2.next) {
38889
42283
  case 0:
38890
- _this = _this13; // 两种上传接口 处理 草稿和转发和再次发送操作带过来的旧附件 和 新上传的附件
42284
+ _this = _this14; // 两种上传接口 处理 草稿和转发和再次发送操作带过来的旧附件 和 新上传的附件
38891
42285
  url = '/mail/attach/upload';
38892
42286
  if (!(_this.readyList.length === 0)) {
38893
42287
  _context2.next = 6;
38894
42288
  break;
38895
42289
  }
38896
- _this.$messages.info(_this13.$tx('email.messages.selectExportFile', '请选择导入文件'));
42290
+ _this.$messages.info(_this14.$tx('email.messages.selectExportFile', '请选择导入文件'));
38897
42291
  _context2.next = 15;
38898
42292
  break;
38899
42293
  case 6:
@@ -38954,7 +42348,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
38954
42348
  if (response.code === 'success') {
38955
42349
  if (response.body.uploadAttach.length > 0) {
38956
42350
  var _this$mailInfo$attach;
38957
- (_this$mailInfo$attach = _this.mailInfo.attachments).push.apply(_this$mailInfo$attach, _toConsumableArray(response.body.uploadAttach));
42351
+ (_this$mailInfo$attach = _this.mailInfo.attachments).push.apply(_this$mailInfo$attach, xieyoujianvue_type_script_lang_js_toConsumableArray(response.body.uploadAttach));
38958
42352
  }
38959
42353
  } else {
38960
42354
  _this.$message.error(response.message);
@@ -39015,7 +42409,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39015
42409
  _this.sendMail();
39016
42410
  } else {
39017
42411
  _this.loading = false;
39018
- _this.$message.success(_this13.$tx('email.messages.SaveDraftsu', '保存草稿成功'));
42412
+ _this.$message.success(_this14.$tx('email.messages.SaveDraftsu', '保存草稿成功'));
39019
42413
  _this.readyList = _this.mailInfo.attachments;
39020
42414
  if (_this.mailInfo.actionType) {
39021
42415
  delete _this.mailInfo.actionType;
@@ -39111,14 +42505,11 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39111
42505
  }).then(function successCallback(response) {
39112
42506
  if (response.code === 'success') {
39113
42507
  _this.defultMail = value;
39114
- // console.log(_this.$refs.txl)
39115
- // console.log(response)
39116
42508
  }
39117
42509
  });
39118
42510
  },
39119
42511
  // 选择快速匹配出来的人
39120
42512
  clickLink: function clickLink(val) {
39121
- console.log('选择快速匹配出来的人', val);
39122
42513
  if (val.split('/')[1] === '无') {
39123
42514
  this.$message.warning(this.$tx('email.xieyoujian.notEmail', '当前项无邮箱地址,不支持选择'));
39124
42515
  // this.sendListInput = ''
@@ -39152,23 +42543,23 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39152
42543
  },
39153
42544
  // 手动输入的邮箱账号, 失去焦点后去验证输入的的邮件格式
39154
42545
  keyUpFuc: function keyUpFuc() {
39155
- var _this14 = this;
42546
+ var _this15 = this;
39156
42547
  return xieyoujianvue_type_script_lang_js_asyncToGenerator( /*#__PURE__*/xieyoujianvue_type_script_lang_js_regeneratorRuntime().mark(function _callee2() {
39157
42548
  var emailDomain, tfFlag, errRes;
39158
42549
  return xieyoujianvue_type_script_lang_js_regeneratorRuntime().wrap(function _callee2$(_context3) {
39159
42550
  while (1) switch (_context3.prev = _context3.next) {
39160
42551
  case 0:
39161
- if (!((_this14.focusInput === 1 ? _this14.sendListInput : _this14.focusInput === 2 ? _this14.copyToInput : _this14.blindCopyToInput).trim() !== '')) {
42552
+ if (!((_this15.focusInput === 1 ? _this15.sendListInput : _this15.focusInput === 2 ? _this15.copyToInput : _this15.blindCopyToInput).trim() !== '')) {
39162
42553
  _context3.next = 25;
39163
42554
  break;
39164
42555
  }
39165
42556
  emailDomain = null;
39166
- if (!(_this14.closeLink === false)) {
42557
+ if (!(_this15.closeLink === false)) {
39167
42558
  _context3.next = 25;
39168
42559
  break;
39169
42560
  }
39170
42561
  _context3.next = 5;
39171
- return _this14.isEmail(_this14.focusInput === 1 ? _this14.sendListInput : _this14.focusInput === 2 ? _this14.copyToInput : _this14.blindCopyToInput);
42562
+ return _this15.isEmail(_this15.focusInput === 1 ? _this15.sendListInput : _this15.focusInput === 2 ? _this15.copyToInput : _this15.blindCopyToInput);
39172
42563
  case 5:
39173
42564
  tfFlag = _context3.sent;
39174
42565
  if (!tfFlag) {
@@ -39176,29 +42567,29 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39176
42567
  break;
39177
42568
  }
39178
42569
  errRes = null; // 验证当前为内部邮箱时,是否需要绑定外部邮箱
39179
- if (!(_this14.defultMail.emailReceiveType === null)) {
42570
+ if (!(_this15.defultMail.emailReceiveType === null)) {
39180
42571
  _context3.next = 15;
39181
42572
  break;
39182
42573
  }
39183
- emailDomain = '@' + _this14.defultMail.emailAddr.split('@')[1];
39184
- if (_this14.defultMail.internetEmailAddr) {
42574
+ emailDomain = '@' + _this15.defultMail.emailAddr.split('@')[1];
42575
+ if (_this15.defultMail.internetEmailAddr) {
39185
42576
  _context3.next = 15;
39186
42577
  break;
39187
42578
  }
39188
- if (!((_this14.focusInput === 1 ? _this14.sendListInput : _this14.focusInput === 2 ? _this14.copyToInput : _this14.blindCopyToInput).indexOf(emailDomain) === -1)) {
42579
+ if (!((_this15.focusInput === 1 ? _this15.sendListInput : _this15.focusInput === 2 ? _this15.copyToInput : _this15.blindCopyToInput).indexOf(emailDomain) === -1)) {
39189
42580
  _context3.next = 15;
39190
42581
  break;
39191
42582
  }
39192
- _this14.$alert(_this14.$tx('email.xieyoujian.content2', '当前账号为内部使用邮箱,如您需往外部邮箱发送邮件,请先前往邮箱中心将本账号绑定外部邮箱'), _this14.$tx('common.operationTip', '操作提示'), {
42583
+ _this15.$alert(_this15.$tx('email.xieyoujian.content2', '当前账号为内部使用邮箱,如您需往外部邮箱发送邮件,请先前往邮箱中心将本账号绑定外部邮箱'), _this15.$tx('common.operationTip', '操作提示'), {
39193
42584
  type: 'warning'
39194
42585
  });
39195
- _this14.focusInput === 1 ? _this14.sendListInput = '' : _this14.focusInput === 2 ? _this14.copyToInput = '' : _this14.blindCopyToInput = '';
42586
+ _this15.focusInput === 1 ? _this15.sendListInput = '' : _this15.focusInput === 2 ? _this15.copyToInput = '' : _this15.blindCopyToInput = '';
39196
42587
  return _context3.abrupt("return", false);
39197
42588
  case 15:
39198
42589
  // 验证手动输入的与已经存在的是否重复
39199
42590
  ;
39200
- (_this14.focusInput === 1 ? _this14.sendList : _this14.focusInput === 2 ? _this14.copyToList : _this14.blindCopyToList).forEach(function (item, index) {
39201
- if (item === (_this14.focusInput === 1 ? _this14.sendListInput : _this14.focusInput === 2 ? _this14.copyToInput : _this14.blindCopyToInput)) {
42591
+ (_this15.focusInput === 1 ? _this15.sendList : _this15.focusInput === 2 ? _this15.copyToList : _this15.blindCopyToList).forEach(function (item, index) {
42592
+ if (item === (_this15.focusInput === 1 ? _this15.sendListInput : _this15.focusInput === 2 ? _this15.copyToInput : _this15.blindCopyToInput)) {
39202
42593
  errRes = 1;
39203
42594
  }
39204
42595
  });
@@ -39213,29 +42604,29 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39213
42604
  _context3.next = 24;
39214
42605
  break;
39215
42606
  }
39216
- if (_this14.focusInput === 1) {
39217
- _this14.$message.warning(_this14.$tx('email.messages.emailTip1', '已存在该收件人!'));
42607
+ if (_this15.focusInput === 1) {
42608
+ _this15.$message.warning(_this15.$tx('email.messages.emailTip1', '已存在该收件人!'));
39218
42609
  }
39219
- if (_this14.focusInput === 2) {
39220
- _this14.$message.warning(_this14.$tx('email.messages.emailTip2', '已存在该抄送人!'));
42610
+ if (_this15.focusInput === 2) {
42611
+ _this15.$message.warning(_this15.$tx('email.messages.emailTip2', '已存在该抄送人!'));
39221
42612
  }
39222
- if (_this14.focusInput === 3) {
39223
- _this14.$message.warning(_this14.$tx('email.messages.emailTip3', '已存在该密送人!'));
42613
+ if (_this15.focusInput === 3) {
42614
+ _this15.$message.warning(_this15.$tx('email.messages.emailTip3', '已存在该密送人!'));
39224
42615
  }
39225
42616
  return _context3.abrupt("return", false);
39226
42617
  case 24:
39227
- if (_this14.focusInput === 1) {
39228
- _this14.sendList.push(_this14.sendListInput);
42618
+ if (_this15.focusInput === 1) {
42619
+ _this15.sendList.push(_this15.sendListInput);
39229
42620
  // this.isEmail(this.sendListInput)
39230
- _this14.sendListInput = '';
39231
- } else if (_this14.focusInput === 2) {
39232
- _this14.copyToList.push(_this14.copyToInput);
42621
+ _this15.sendListInput = '';
42622
+ } else if (_this15.focusInput === 2) {
42623
+ _this15.copyToList.push(_this15.copyToInput);
39233
42624
  // this.isEmail(this.copyToInput)
39234
- _this14.copyToInput = '';
42625
+ _this15.copyToInput = '';
39235
42626
  } else {
39236
- _this14.blindCopyToList.push(_this14.blindCopyToInput);
42627
+ _this15.blindCopyToList.push(_this15.blindCopyToInput);
39237
42628
  // this.isEmail(this.blindCopyToInput)
39238
- _this14.blindCopyToInput = '';
42629
+ _this15.blindCopyToInput = '';
39239
42630
  }
39240
42631
  case 25:
39241
42632
  case "end":
@@ -39293,7 +42684,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39293
42684
  return res;
39294
42685
  },
39295
42686
  getDefultMail: function getDefultMail() {
39296
- var _this15 = this;
42687
+ var _this16 = this;
39297
42688
  var currentMail = sessionStorage.getItem('currentMail');
39298
42689
  if (currentMail !== null && currentMail !== '' && currentMail !== undefined) {
39299
42690
  this.defultMail = JSON.parse(currentMail);
@@ -39322,7 +42713,7 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39322
42713
  } else {
39323
42714
  _this.$message.error(response.message);
39324
42715
  }
39325
- _this15.loading = false;
42716
+ _this16.loading = false;
39326
42717
  }, function (err) {
39327
42718
  _this.$message.error(err);
39328
42719
  });
@@ -39373,14 +42764,50 @@ function xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("object" != x
39373
42764
  } else {
39374
42765
  return 'images/w-imgs/email/other.png';
39375
42766
  }
42767
+ },
42768
+ handleDragEnter: function handleDragEnter(e) {
42769
+ e.preventDefault();
42770
+ if (this.defultMail !== null && !this.mailInfo.sended && e.dataTransfer.types.includes('Files') && !this.isDragging) {
42771
+ this.isDragging = true;
42772
+ }
42773
+ },
42774
+ handleDragLeave: function handleDragLeave(e) {
42775
+ e.preventDefault();
42776
+ var relatedTarget = e.relatedTarget;
42777
+ var dropZone = this.$refs.dropZone;
42778
+ if (!relatedTarget || !dropZone.contains(relatedTarget)) {
42779
+ this.isDragging = false;
42780
+ } else {}
42781
+ },
42782
+ handleDrop: function handleDrop(e) {
42783
+ e.preventDefault();
42784
+ this.dragCounter = 0;
42785
+ this.isDragging = false;
42786
+ var files = e.dataTransfer.files;
42787
+ if (this.readyList.length + files.length > this.limitNum) {
42788
+ this.$message.error('附件数量不能超过' + this.limitNum);
42789
+ return;
42790
+ }
42791
+ for (var index = 0; index < files.length; index++) {
42792
+ var file = files[index];
42793
+ var fileBody = {
42794
+ raw: file,
42795
+ status: 'ready',
42796
+ percentage: 0,
42797
+ name: file.name,
42798
+ uid: file.uid,
42799
+ size: file.size
42800
+ };
42801
+ this.handleChange(fileBody);
42802
+ }
39376
42803
  }
39377
42804
  }
39378
42805
  });
39379
42806
  ;// CONCATENATED MODULE: ./packages/ecyoa/email/src/xieyoujian.vue?vue&type=script&lang=js
39380
42807
  /* harmony default export */ var src_xieyoujianvue_type_script_lang_js = (xieyoujianvue_type_script_lang_js);
39381
- // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/email/src/xieyoujian.vue?vue&type=style&index=0&id=6252c928&prod&lang=scss&scoped=true
39382
- var xieyoujianvue_type_style_index_0_id_6252c928_prod_lang_scss_scoped_true = __webpack_require__(1188);
39383
- ;// CONCATENATED MODULE: ./packages/ecyoa/email/src/xieyoujian.vue?vue&type=style&index=0&id=6252c928&prod&lang=scss&scoped=true
42808
+ // EXTERNAL MODULE: ./node_modules/vue-style-loader/index.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[4]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/email/src/xieyoujian.vue?vue&type=style&index=0&id=0936748c&prod&lang=scss&scoped=true
42809
+ var xieyoujianvue_type_style_index_0_id_0936748c_prod_lang_scss_scoped_true = __webpack_require__(2385);
42810
+ ;// CONCATENATED MODULE: ./packages/ecyoa/email/src/xieyoujian.vue?vue&type=style&index=0&id=0936748c&prod&lang=scss&scoped=true
39384
42811
 
39385
42812
  ;// CONCATENATED MODULE: ./packages/ecyoa/email/src/xieyoujian.vue
39386
42813
 
@@ -39393,11 +42820,11 @@ var xieyoujianvue_type_style_index_0_id_6252c928_prod_lang_scss_scoped_true = __
39393
42820
 
39394
42821
  var xieyoujian_component = normalizeComponent(
39395
42822
  src_xieyoujianvue_type_script_lang_js,
39396
- xieyoujianvue_type_template_id_6252c928_scoped_true_render,
39397
- xieyoujianvue_type_template_id_6252c928_scoped_true_staticRenderFns,
42823
+ xieyoujianvue_type_template_id_0936748c_scoped_true_render,
42824
+ xieyoujianvue_type_template_id_0936748c_scoped_true_staticRenderFns,
39398
42825
  false,
39399
42826
  null,
39400
- "6252c928",
42827
+ "0936748c",
39401
42828
  null
39402
42829
 
39403
42830
  )
@@ -46183,12 +49610,12 @@ var components_txl_component = normalizeComponent(
46183
49610
  /* harmony default export */ var components_txl = (components_txl_component.exports);
46184
49611
  ;// CONCATENATED MODULE: ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/ecyoa/email/src/sendMail/xieyoujian.vue?vue&type=script&lang=js
46185
49612
  function sendMail_xieyoujianvue_type_script_lang_js_typeof(o) { "@babel/helpers - typeof"; return sendMail_xieyoujianvue_type_script_lang_js_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, sendMail_xieyoujianvue_type_script_lang_js_typeof(o); }
46186
- function xieyoujianvue_type_script_lang_js_toConsumableArray(r) { return xieyoujianvue_type_script_lang_js_arrayWithoutHoles(r) || xieyoujianvue_type_script_lang_js_iterableToArray(r) || xieyoujianvue_type_script_lang_js_unsupportedIterableToArray(r) || xieyoujianvue_type_script_lang_js_nonIterableSpread(); }
46187
- function xieyoujianvue_type_script_lang_js_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
46188
- function xieyoujianvue_type_script_lang_js_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a) : void 0; } }
46189
- function xieyoujianvue_type_script_lang_js_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
46190
- function xieyoujianvue_type_script_lang_js_arrayWithoutHoles(r) { if (Array.isArray(r)) return xieyoujianvue_type_script_lang_js_arrayLikeToArray(r); }
46191
- function xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
49613
+ function sendMail_xieyoujianvue_type_script_lang_js_toConsumableArray(r) { return sendMail_xieyoujianvue_type_script_lang_js_arrayWithoutHoles(r) || sendMail_xieyoujianvue_type_script_lang_js_iterableToArray(r) || sendMail_xieyoujianvue_type_script_lang_js_unsupportedIterableToArray(r) || sendMail_xieyoujianvue_type_script_lang_js_nonIterableSpread(); }
49614
+ function sendMail_xieyoujianvue_type_script_lang_js_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
49615
+ function sendMail_xieyoujianvue_type_script_lang_js_unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return sendMail_xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? sendMail_xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a) : void 0; } }
49616
+ function sendMail_xieyoujianvue_type_script_lang_js_iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
49617
+ function sendMail_xieyoujianvue_type_script_lang_js_arrayWithoutHoles(r) { if (Array.isArray(r)) return sendMail_xieyoujianvue_type_script_lang_js_arrayLikeToArray(r); }
49618
+ function sendMail_xieyoujianvue_type_script_lang_js_arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
46192
49619
  function sendMail_xieyoujianvue_type_script_lang_js_ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
46193
49620
  function sendMail_xieyoujianvue_type_script_lang_js_objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? sendMail_xieyoujianvue_type_script_lang_js_ownKeys(Object(t), !0).forEach(function (r) { sendMail_xieyoujianvue_type_script_lang_js_defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : sendMail_xieyoujianvue_type_script_lang_js_ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
46194
49621
  function sendMail_xieyoujianvue_type_script_lang_js_defineProperty(e, r, t) { return (r = sendMail_xieyoujianvue_type_script_lang_js_toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -46393,7 +49820,7 @@ function sendMail_xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("obj
46393
49820
  // 文件中心过来的
46394
49821
  if (this.$route.query.srcBusiDataId) {
46395
49822
  this.srcName = this.$route.query.srcBusiDataId;
46396
- var list = xieyoujianvue_type_script_lang_js_toConsumableArray(JSON.parse(this.$route.query.row));
49823
+ var list = sendMail_xieyoujianvue_type_script_lang_js_toConsumableArray(JSON.parse(this.$route.query.row));
46397
49824
  this.readyList = list.filter(function (res, i) {
46398
49825
  res.name = res.fileName;
46399
49826
  return i !== list.length;
@@ -46984,7 +50411,7 @@ function sendMail_xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("obj
46984
50411
  if (this.mailInfo.attachments) {
46985
50412
  if (this.mailInfo.attachments.length > 0) {
46986
50413
  var _this$readyList;
46987
- this.readyList = (_this$readyList = this.readyList).concat.apply(_this$readyList, xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
50414
+ this.readyList = (_this$readyList = this.readyList).concat.apply(_this$readyList, sendMail_xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
46988
50415
  this.readyList.forEach(function (item) {
46989
50416
  if (!item.name) {
46990
50417
  item.name = item.fileName;
@@ -47026,7 +50453,7 @@ function sendMail_xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("obj
47026
50453
  this.sendList.push(this.mailInfo.sendTo);
47027
50454
  if (this.mailInfo.attachments.length > 0) {
47028
50455
  var _this$readyList2;
47029
- (_this$readyList2 = this.readyList).push.apply(_this$readyList2, xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
50456
+ (_this$readyList2 = this.readyList).push.apply(_this$readyList2, sendMail_xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
47030
50457
  }
47031
50458
  } else if (this.mailInfo.actionType === 'forward') {
47032
50459
  this.wflowEditor = true;
@@ -47035,7 +50462,7 @@ function sendMail_xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("obj
47035
50462
  if (this.mailInfo.attachments) {
47036
50463
  if (this.mailInfo.attachments.length > 0) {
47037
50464
  var _this$readyList3;
47038
- (_this$readyList3 = this.readyList).push.apply(_this$readyList3, xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
50465
+ (_this$readyList3 = this.readyList).push.apply(_this$readyList3, sendMail_xieyoujianvue_type_script_lang_js_toConsumableArray(this.mailInfo.attachments));
47039
50466
  this.readyList.forEach(function (item) {
47040
50467
  if (!item.name) {
47041
50468
  item.name = item.fileName;
@@ -47333,7 +50760,7 @@ function sendMail_xieyoujianvue_type_script_lang_js_toPrimitive(t, r) { if ("obj
47333
50760
  if (response.code === 'success') {
47334
50761
  if (response.body.uploadAttach && response.body.uploadAttach.length > 0) {
47335
50762
  var _this$mailInfo$attach;
47336
- (_this$mailInfo$attach = _this.mailInfo.attachments).push.apply(_this$mailInfo$attach, xieyoujianvue_type_script_lang_js_toConsumableArray(response.body.uploadAttach));
50763
+ (_this$mailInfo$attach = _this.mailInfo.attachments).push.apply(_this$mailInfo$attach, sendMail_xieyoujianvue_type_script_lang_js_toConsumableArray(response.body.uploadAttach));
47337
50764
  }
47338
50765
  if (type === 'send' && index === _this.readyList.length - 1) {
47339
50766
  if (_this.readyList.length) {