@pantograph/vue 0.23.4 → 0.23.6
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.
- package/dist/ActionButton/index.js +1 -1
- package/dist/ActionButton/index.umd.cjs +1 -1
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-CoWtYp90.js → ActionButton.vue_vue_type_script_setup_true_lang-7ImUgPOW.js} +2 -2
- package/dist/{ActionButton.vue_vue_type_script_setup_true_lang-BM-HiVKZ.js → ActionButton.vue_vue_type_script_setup_true_lang-D8DXU0Vb.js} +1 -1
- package/dist/Alert/index.js +1 -1
- package/dist/Alert/index.umd.cjs +1 -1
- package/dist/{Alert.vue_vue_type_style_index_0_lang-DmEdkb41.js → Alert.vue_vue_type_style_index_0_lang-CqrPX_Iw.js} +3 -3
- package/dist/{Alert.vue_vue_type_style_index_0_lang-CsZWFSR_.js → Alert.vue_vue_type_style_index_0_lang-DtOx68kv.js} +1 -1
- package/dist/Avatar/index.js +1 -1
- package/dist/Avatar/index.umd.cjs +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-DTndXzmH.js → Avatar.vue_vue_type_style_index_0_lang-B0jPWS1n.js} +1 -1
- package/dist/{Avatar.vue_vue_type_style_index_0_lang-CcKQb0PA.js → Avatar.vue_vue_type_style_index_0_lang-Dj-jkrYp.js} +2 -2
- package/dist/AvatarGroup/index.js +1 -1
- package/dist/AvatarGroup/index.umd.cjs +1 -1
- package/dist/Badge/index.js +1 -1
- package/dist/Badge/index.umd.cjs +1 -1
- package/dist/Badge.vue_vue_type_script_setup_true_lang-ChmvYjjQ.js +1 -0
- package/dist/Badge.vue_vue_type_script_setup_true_lang-PioR6WEK.js +57 -0
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-stkOtvTd.js → BaseButton.vue_vue_type_style_index_0_lang-Cb5t50gO.js} +2 -2
- package/dist/{BaseButton.vue_vue_type_style_index_0_lang-Ch3LDS1D.js → BaseButton.vue_vue_type_style_index_0_lang-CeHbEfy3.js} +1 -1
- package/dist/Button/index.js +1 -1
- package/dist/Button/index.umd.cjs +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-CIjMWs2s.js → Button.vue_vue_type_script_setup_true_lang-ChrdvyD2.js} +2 -2
- package/dist/{Button.vue_vue_type_script_setup_true_lang-BouXlBWO.js → Button.vue_vue_type_script_setup_true_lang-vJ7lfVy_.js} +1 -1
- package/dist/Checkbox/index.js +1 -1
- package/dist/Checkbox/index.umd.cjs +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-Bo8DiMqm.js → Checkbox.vue_vue_type_style_index_0_lang-Dh2oLmt5.js} +1 -1
- package/dist/{Checkbox.vue_vue_type_style_index_0_lang-2qQxhEQ0.js → Checkbox.vue_vue_type_style_index_0_lang-Dhn_dWz7.js} +2 -2
- package/dist/CheckboxGroup/index.js +1 -1
- package/dist/CheckboxGroup/index.umd.cjs +1 -1
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.umd.cjs +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-qKiQbAUD.js → Chip.vue_vue_type_style_index_0_lang-CEXKUJCj.js} +1 -1
- package/dist/{Chip.vue_vue_type_style_index_0_lang-pkEj-IcZ.js → Chip.vue_vue_type_style_index_0_lang-Cr1_L0Lz.js} +2 -2
- package/dist/ChipGroup/index.js +1 -1
- package/dist/ChipGroup/index.umd.cjs +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-DmbWGoar.js → ChipGroup.vue_vue_type_style_index_0_lang-B945U8rL.js} +1 -1
- package/dist/{ChipGroup.vue_vue_type_style_index_0_lang-BFHkFjPI.js → ChipGroup.vue_vue_type_style_index_0_lang-j6Reg1S9.js} +1 -1
- package/dist/ColorPicker/index.js +1 -1
- package/dist/ColorPicker/index.umd.cjs +1 -1
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-CxWDk_6b.js → ColorPicker.vue_vue_type_style_index_0_lang-CcqGZq-b.js} +259 -259
- package/dist/{ColorPicker.vue_vue_type_style_index_0_lang-DKGxK13w.js → ColorPicker.vue_vue_type_style_index_0_lang-Cdxk3fOe.js} +2 -2
- package/dist/ColorSwatch/index.js +1 -1
- package/dist/ColorSwatch/index.umd.cjs +1 -1
- package/dist/ColorSwatch-CH_N4TfV.js +1 -0
- package/dist/ColorSwatch-DkW6RvE7.js +4 -0
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CABlbyiP.js → ColorSwatch.vue_vue_type_style_index_0_lang-WU4Q0TGg.js} +1 -1
- package/dist/{ColorSwatch.vue_vue_type_style_index_0_lang-CAXvzEY_.js → ColorSwatch.vue_vue_type_style_index_0_lang-r7jNc78g.js} +3 -3
- package/dist/ColorSwatchGroup/index.js +1 -1
- package/dist/ColorSwatchGroup/index.umd.cjs +1 -1
- package/dist/{ColorSwatchGroup.vue_vue_type_style_index_0_lang-Cjn4NZYK.js → ColorSwatchGroup.vue_vue_type_style_index_0_lang-DP1dT4Eq.js} +6 -6
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-iWwvyQwp.js +1 -0
- package/dist/ColorTrigger/index.js +1 -1
- package/dist/ColorTrigger/index.umd.cjs +1 -1
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-XqnB_VGl.js → ColorTrigger.vue_vue_type_style_index_0_lang-D7M2EQfc.js} +3 -3
- package/dist/{ColorTrigger.vue_vue_type_style_index_0_lang-BsexkD4u.js → ColorTrigger.vue_vue_type_style_index_0_lang-IwIexR_Y.js} +1 -1
- package/dist/Combobox/index.js +1 -1
- package/dist/Combobox/index.umd.cjs +1 -1
- package/dist/Combobox.vue_vue_type_style_index_0_lang-Cnl79xIk.js +1 -0
- package/dist/Combobox.vue_vue_type_style_index_0_lang-DIXSNQlS.js +924 -0
- package/dist/DataTable/index.js +1 -1
- package/dist/DataTable/index.umd.cjs +1 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-DeDH_Kvd.js +1 -0
- package/dist/{DataTable.vue_vue_type_style_index_0_lang-CpQ0Yn-D.js → DataTable.vue_vue_type_style_index_0_lang-PXmil6LX.js} +12 -12
- package/dist/DropZone/index.js +1 -1
- package/dist/DropZone/index.umd.cjs +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-DVZrmQwL.js → DropZone.vue_vue_type_style_index_0_lang-CrBpJeKe.js} +1 -1
- package/dist/{DropZone.vue_vue_type_style_index_0_lang-BnrcUu_6.js → DropZone.vue_vue_type_style_index_0_lang-WmRKdmXK.js} +1 -1
- package/dist/FloatButton/index.js +1 -1
- package/dist/FloatButton/index.umd.cjs +1 -1
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-Br1BEY7H.js → FloatButton.vue_vue_type_script_setup_true_lang-DFHM_Tuo.js} +2 -2
- package/dist/{FloatButton.vue_vue_type_script_setup_true_lang-BOFSVjFP.js → FloatButton.vue_vue_type_script_setup_true_lang-DpFewhq3.js} +1 -1
- package/dist/Form/index.js +1 -1
- package/dist/Form/index.umd.cjs +1 -1
- package/dist/{FormItem.vue_vue_type_style_index_0_lang-s7o6crR0.js → FormItem.vue_vue_type_style_index_0_lang-CTRszGlB.js} +3 -3
- package/dist/{FormItem.vue_vue_type_style_index_0_lang-CwxlEgep.js → FormItem.vue_vue_type_style_index_0_lang-DbMENNc4.js} +3 -3
- package/dist/GOPicker/GOItemSkeleton.d.ts +2 -0
- package/dist/GOPicker/GOPicker.d.ts +36 -96
- package/dist/GOPicker/GOPicker.model.d.ts +72 -0
- package/dist/GOPicker/index.d.ts +2 -1
- package/dist/GOPicker/index.js +1 -1
- package/dist/GOPicker/index.umd.cjs +1 -1
- package/dist/GraphicalObject/index.js +1 -1
- package/dist/GraphicalObject/index.umd.cjs +1 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-C4i8C-dP.js +65 -0
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-CmkmatJc.js +1 -0
- package/dist/GraphicalObjectGroup/index.js +1 -1
- package/dist/GraphicalObjectGroup/index.umd.cjs +1 -1
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-DgjnAH0N.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CB9Q1b9r.js} +1 -1
- package/dist/{GraphicalObjectGroup.vue_vue_type_style_index_0_lang-ChJsB7QV.js → GraphicalObjectGroup.vue_vue_type_style_index_0_lang-CU2CrD-j.js} +1 -1
- package/dist/IconButton/index.js +1 -1
- package/dist/IconButton/index.umd.cjs +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DvbKC7wq.js → IconButton.vue_vue_type_script_setup_true_lang-Bq7Ed6Jl.js} +1 -1
- package/dist/{IconButton.vue_vue_type_script_setup_true_lang-DAX_14ed.js → IconButton.vue_vue_type_script_setup_true_lang-DJiG3_YJ.js} +2 -2
- package/dist/Image/index.js +1 -1
- package/dist/Image/index.umd.cjs +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-CGdnuyxZ.js → Image.vue_vue_type_style_index_0_lang-CgczUp3D.js} +1 -1
- package/dist/{Image.vue_vue_type_style_index_0_lang-CqilRo2A.js → Image.vue_vue_type_style_index_0_lang-Cmn0ijum.js} +1 -1
- package/dist/IndentLevel/index.js +1 -1
- package/dist/IndentLevel/index.umd.cjs +1 -1
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-CjaQqD7w.js → IndentLevel.vue_vue_type_style_index_0_lang-ZmHvmKOS.js} +2 -2
- package/dist/{IndentLevel.vue_vue_type_style_index_0_lang-DD2920xJ.js → IndentLevel.vue_vue_type_style_index_0_lang-u9PJeCGr.js} +1 -1
- package/dist/Indicator/index.js +1 -1
- package/dist/Indicator/index.umd.cjs +1 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-CX3cY74r.js +1 -0
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-CmKraTSB.js +38 -0
- package/dist/Input/index.js +1 -1
- package/dist/Input/index.umd.cjs +1 -1
- package/dist/{Input.vue_vue_type_style_index_0_lang-C-jEi11-.js → Input.vue_vue_type_style_index_0_lang-Ccow0nkI.js} +4 -4
- package/dist/Input.vue_vue_type_style_index_0_lang-yHgbuD_4.js +1 -0
- package/dist/Label/index.js +1 -1
- package/dist/Label/index.umd.cjs +1 -1
- package/dist/Menu/index.js +1 -1
- package/dist/Menu/index.umd.cjs +1 -1
- package/dist/MenuItem/index.js +1 -1
- package/dist/MenuItem/index.umd.cjs +1 -1
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DGaSx-eQ.js → MenuItem.vue_vue_type_style_index_0_lang-C8ofBbNv.js} +4 -4
- package/dist/{MenuItem.vue_vue_type_style_index_0_lang-DL9Njg73.js → MenuItem.vue_vue_type_style_index_0_lang-pnm3rqME.js} +1 -1
- package/dist/Popover/Popover.d.ts +1 -0
- package/dist/Popover/index.js +1 -1
- package/dist/Popover/index.umd.cjs +1 -1
- package/dist/{Popover.vue_vue_type_style_index_0_lang-ColyiCeV.js → Popover.vue_vue_type_style_index_0_lang-BGRXQmj3.js} +3 -3
- package/dist/{Popover.vue_vue_type_style_index_0_lang-CZYvVeso.js → Popover.vue_vue_type_style_index_0_lang-CZ_AaHDG.js} +1 -1
- package/dist/RadioGroup/index.js +1 -1
- package/dist/RadioGroup/index.umd.cjs +1 -1
- package/dist/{RadioGroup.vue_vue_type_script_setup_true_lang-Buet9dc2.js → RadioGroup.vue_vue_type_script_setup_true_lang-03XUb7NC.js} +20 -21
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-1clw8kVI.js +1 -0
- package/dist/ScrollContainer/ScrollContainer.d.ts +2 -0
- package/dist/Segmented/index.js +1 -1
- package/dist/Segmented/index.umd.cjs +1 -1
- package/dist/{Segmented.vue_vue_type_style_index_0_lang-R_eXQ6g9.js → Segmented.vue_vue_type_style_index_0_lang-906ZRFCK.js} +26 -26
- package/dist/Segmented.vue_vue_type_style_index_0_lang-B4aQCMXZ.js +1 -0
- package/dist/Select/index.js +1 -1
- package/dist/Select/index.umd.cjs +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-Bc9kyMDB.js → Select.vue_vue_type_style_index_0_lang-DX17VhqH.js} +1 -1
- package/dist/{Select.vue_vue_type_style_index_0_lang-BfUtCG_-.js → Select.vue_vue_type_style_index_0_lang-W3dk0Ug0.js} +6 -6
- package/dist/SubMenu/index.js +1 -1
- package/dist/SubMenu/index.umd.cjs +1 -1
- package/dist/Switch/index.js +1 -1
- package/dist/Switch/index.umd.cjs +1 -1
- package/dist/{Switch.vue_vue_type_style_index_0_lang-jzphTPAF.js → Switch.vue_vue_type_style_index_0_lang-BM-h82G0.js} +2 -2
- package/dist/{Switch.vue_vue_type_style_index_0_lang-DhuZK1wp.js → Switch.vue_vue_type_style_index_0_lang-DHT9utPp.js} +1 -1
- package/dist/{THead.vue_vue_type_style_index_0_lang-Du3rBBec.js → THead.vue_vue_type_style_index_0_lang-B6U8HrWi.js} +1 -1
- package/dist/{THead.vue_vue_type_style_index_0_lang-DtBQAI4D.js → THead.vue_vue_type_style_index_0_lang-CHicticP.js} +1 -1
- package/dist/Table/index.js +1 -1
- package/dist/Table/index.umd.cjs +1 -1
- package/dist/Textarea/index.js +1 -1
- package/dist/Textarea/index.umd.cjs +1 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-DiCqcDyH.js +1 -0
- package/dist/{Textarea.vue_vue_type_style_index_0_lang-Dbdx29In.js → Textarea.vue_vue_type_style_index_0_lang-UyndJFBo.js} +4 -4
- package/dist/Tree/Tree.d.ts +3 -1
- package/dist/Tree/Tree.model.d.ts +11 -8
- package/dist/Tree/TreeNode.d.ts +2 -0
- package/dist/Tree/index.js +1 -1
- package/dist/Tree/index.umd.cjs +1 -1
- package/dist/Tree/utils.d.ts +14 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-B30b4oK2.js +6 -0
- package/dist/Tree.vue_vue_type_style_index_0_lang-DBDkYw9s.js +1757 -0
- package/dist/exports.d.ts +4 -0
- package/dist/{getEmojiList-DSYihWrO.js → getEmojiList-BiHAQqm6.js} +237 -227
- package/dist/getEmojiList-mUahBsHW.js +1 -0
- package/dist/index.d.ts +3 -6
- package/dist/index.js +60 -60
- package/dist/index.umd.cjs +1 -1
- package/dist/{omit-B3e_dACs.js → omit-BuBwx_M2.js} +182 -181
- package/dist/omit-CYbreqlf.js +1 -0
- package/dist/style/index.css +1 -1
- package/dist/{uniq-BsN259vC.js → uniq-BeFmBpYC.js} +1 -1
- package/dist/{uniq-Dhcbw64V.js → uniq-CezX8yQS.js} +1 -1
- package/dist/{useInputDataStates-CtuCKcP6.js → useInputDataStates-Bzs7T9xb.js} +2 -2
- package/dist/{useInputDataStates-DEfYzXQl.js → useInputDataStates-C1T7BL_V.js} +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.umd.cjs +1 -1
- package/package.json +4 -4
- package/dist/Badge.vue_vue_type_script_setup_true_lang-Blql7wH1.js +0 -66
- package/dist/Badge.vue_vue_type_script_setup_true_lang-CsIGsGWg.js +0 -1
- package/dist/ColorSwatchGroup.vue_vue_type_style_index_0_lang-D8oB421I.js +0 -1
- package/dist/Combobox.vue_vue_type_style_index_0_lang-BM7QiXKH.js +0 -831
- package/dist/Combobox.vue_vue_type_style_index_0_lang-IdKdwJfN.js +0 -1
- package/dist/DataTable.vue_vue_type_style_index_0_lang-CnUiY5l1.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-BlFC2U5K.js +0 -1
- package/dist/GraphicalObject.vue_vue_type_script_setup_true_lang-C7HScEPN.js +0 -68
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-Bnqpi2bU.js +0 -1
- package/dist/Indicator.vue_vue_type_script_setup_true_lang-D5xqdZRn.js +0 -40
- package/dist/Input.vue_vue_type_style_index_0_lang-5iaTCkoa.js +0 -1
- package/dist/RadioGroup.vue_vue_type_script_setup_true_lang-lIx8QQp8.js +0 -1
- package/dist/Segmented.vue_vue_type_style_index_0_lang-DqaTvxYQ.js +0 -1
- package/dist/Textarea.vue_vue_type_style_index_0_lang-BMbkTBJu.js +0 -1
- package/dist/Tree.vue_vue_type_style_index_0_lang-Bcy8moE2.js +0 -1789
- package/dist/Tree.vue_vue_type_style_index_0_lang-BrJHHwGl.js +0 -6
- package/dist/getEmojiList-kI-Nn4xv.js +0 -1
- package/dist/omit-DEPypqqe.js +0 -1
|
@@ -0,0 +1,1757 @@
|
|
|
1
|
+
import { defineComponent as rn, useSlots as an, computed as M, ref as be, useTemplateRef as _n, resolveComponent as Cn, createElementBlock as De, openBlock as le, mergeProps as st, unref as y, createCommentVNode as He, createElementVNode as Vt, withDirectives as Dn, normalizeClass as ke, createVNode as Tn, createBlock as ut, withCtx as dt, renderSlot as Ve, normalizeProps as Ct, guardReactiveProps as Dt, withModifiers as xn, Fragment as Mt, toDisplayString as In, renderList as mt, createSlots as ln, vShow as Nn, watch as je, normalizeStyle as On, onMounted as kn, onBeforeUnmount as An } from "vue";
|
|
2
|
+
import { generateVariantClassList as Te, getBemElement as ge, getBemModifier as zt, getBemBlock as Pn, usePCId as Fn } from "@pantograph/utils";
|
|
3
|
+
import { cva as sn } from "class-variance-authority";
|
|
4
|
+
import { h as he, k as Wt } from "./FormItem.vue_vue_type_style_index_0_lang-DbMENNc4.js";
|
|
5
|
+
import { u as Tt } from "./uniq-BeFmBpYC.js";
|
|
6
|
+
import { g as un } from "./options-D4et5euX.js";
|
|
7
|
+
import { createContext as Bn } from "reka-ui";
|
|
8
|
+
import { _ as Mn } from "./IndentLevel.vue_vue_type_style_index_0_lang-ZmHvmKOS.js";
|
|
9
|
+
import { _ as zn } from "./Icon.vue_vue_type_style_index_0_lang-CbLL-Ngi.js";
|
|
10
|
+
import { _ as Kn } from "./Checkbox.vue_vue_type_style_index_0_lang-Dhn_dWz7.js";
|
|
11
|
+
import { U as Rn, u as Xn } from "./useInputDataStates-Bzs7T9xb.js";
|
|
12
|
+
import { useElementSize as Ln } from "@vueuse/core";
|
|
13
|
+
import { u as Yn, d as Gn } from "./index-jwkhq8oW.js";
|
|
14
|
+
/**!
|
|
15
|
+
* Sortable 1.14.0
|
|
16
|
+
* @author RubaXa <trash@rubaxa.org>
|
|
17
|
+
* @author owenm <owen23355@gmail.com>
|
|
18
|
+
* @license MIT
|
|
19
|
+
*/
|
|
20
|
+
function $t(o, e) {
|
|
21
|
+
var n = Object.keys(o);
|
|
22
|
+
if (Object.getOwnPropertySymbols) {
|
|
23
|
+
var t = Object.getOwnPropertySymbols(o);
|
|
24
|
+
e && (t = t.filter(function(i) {
|
|
25
|
+
return Object.getOwnPropertyDescriptor(o, i).enumerable;
|
|
26
|
+
})), n.push.apply(n, t);
|
|
27
|
+
}
|
|
28
|
+
return n;
|
|
29
|
+
}
|
|
30
|
+
function Ee(o) {
|
|
31
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
32
|
+
var n = arguments[e] != null ? arguments[e] : {};
|
|
33
|
+
e % 2 ? $t(Object(n), !0).forEach(function(t) {
|
|
34
|
+
Hn(o, t, n[t]);
|
|
35
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(n)) : $t(Object(n)).forEach(function(t) {
|
|
36
|
+
Object.defineProperty(o, t, Object.getOwnPropertyDescriptor(n, t));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return o;
|
|
40
|
+
}
|
|
41
|
+
function ct(o) {
|
|
42
|
+
"@babel/helpers - typeof";
|
|
43
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ct = function(e) {
|
|
44
|
+
return typeof e;
|
|
45
|
+
} : ct = function(e) {
|
|
46
|
+
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
47
|
+
}, ct(o);
|
|
48
|
+
}
|
|
49
|
+
function Hn(o, e, n) {
|
|
50
|
+
return e in o ? Object.defineProperty(o, e, {
|
|
51
|
+
value: n,
|
|
52
|
+
enumerable: !0,
|
|
53
|
+
configurable: !0,
|
|
54
|
+
writable: !0
|
|
55
|
+
}) : o[e] = n, o;
|
|
56
|
+
}
|
|
57
|
+
function Ie() {
|
|
58
|
+
return Ie = Object.assign || function(o) {
|
|
59
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
60
|
+
var n = arguments[e];
|
|
61
|
+
for (var t in n)
|
|
62
|
+
Object.prototype.hasOwnProperty.call(n, t) && (o[t] = n[t]);
|
|
63
|
+
}
|
|
64
|
+
return o;
|
|
65
|
+
}, Ie.apply(this, arguments);
|
|
66
|
+
}
|
|
67
|
+
function jn(o, e) {
|
|
68
|
+
if (o == null) return {};
|
|
69
|
+
var n = {}, t = Object.keys(o), i, r;
|
|
70
|
+
for (r = 0; r < t.length; r++)
|
|
71
|
+
i = t[r], !(e.indexOf(i) >= 0) && (n[i] = o[i]);
|
|
72
|
+
return n;
|
|
73
|
+
}
|
|
74
|
+
function Vn(o, e) {
|
|
75
|
+
if (o == null) return {};
|
|
76
|
+
var n = jn(o, e), t, i;
|
|
77
|
+
if (Object.getOwnPropertySymbols) {
|
|
78
|
+
var r = Object.getOwnPropertySymbols(o);
|
|
79
|
+
for (i = 0; i < r.length; i++)
|
|
80
|
+
t = r[i], !(e.indexOf(t) >= 0) && Object.prototype.propertyIsEnumerable.call(o, t) && (n[t] = o[t]);
|
|
81
|
+
}
|
|
82
|
+
return n;
|
|
83
|
+
}
|
|
84
|
+
var Wn = "1.14.0";
|
|
85
|
+
function xe(o) {
|
|
86
|
+
if (typeof window < "u" && window.navigator)
|
|
87
|
+
return !!/* @__PURE__ */ navigator.userAgent.match(o);
|
|
88
|
+
}
|
|
89
|
+
var Ne = xe(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), tt = xe(/Edge/i), Ut = xe(/firefox/i), qe = xe(/safari/i) && !xe(/chrome/i) && !xe(/android/i), dn = xe(/iP(ad|od|hone)/i), $n = xe(/chrome/i) && xe(/android/i), cn = {
|
|
90
|
+
capture: !1,
|
|
91
|
+
passive: !1
|
|
92
|
+
};
|
|
93
|
+
function O(o, e, n) {
|
|
94
|
+
o.addEventListener(e, n, !Ne && cn);
|
|
95
|
+
}
|
|
96
|
+
function I(o, e, n) {
|
|
97
|
+
o.removeEventListener(e, n, !Ne && cn);
|
|
98
|
+
}
|
|
99
|
+
function vt(o, e) {
|
|
100
|
+
if (e) {
|
|
101
|
+
if (e[0] === ">" && (e = e.substring(1)), o)
|
|
102
|
+
try {
|
|
103
|
+
if (o.matches)
|
|
104
|
+
return o.matches(e);
|
|
105
|
+
if (o.msMatchesSelector)
|
|
106
|
+
return o.msMatchesSelector(e);
|
|
107
|
+
if (o.webkitMatchesSelector)
|
|
108
|
+
return o.webkitMatchesSelector(e);
|
|
109
|
+
} catch {
|
|
110
|
+
return !1;
|
|
111
|
+
}
|
|
112
|
+
return !1;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
function Un(o) {
|
|
116
|
+
return o.host && o !== document && o.host.nodeType ? o.host : o.parentNode;
|
|
117
|
+
}
|
|
118
|
+
function ye(o, e, n, t) {
|
|
119
|
+
if (o) {
|
|
120
|
+
n = n || document;
|
|
121
|
+
do {
|
|
122
|
+
if (e != null && (e[0] === ">" ? o.parentNode === n && vt(o, e) : vt(o, e)) || t && o === n)
|
|
123
|
+
return o;
|
|
124
|
+
if (o === n) break;
|
|
125
|
+
} while (o = Un(o));
|
|
126
|
+
}
|
|
127
|
+
return null;
|
|
128
|
+
}
|
|
129
|
+
var qt = /\s+/g;
|
|
130
|
+
function re(o, e, n) {
|
|
131
|
+
if (o && e)
|
|
132
|
+
if (o.classList)
|
|
133
|
+
o.classList[n ? "add" : "remove"](e);
|
|
134
|
+
else {
|
|
135
|
+
var t = (" " + o.className + " ").replace(qt, " ").replace(" " + e + " ", " ");
|
|
136
|
+
o.className = (t + (n ? " " + e : "")).replace(qt, " ");
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function v(o, e, n) {
|
|
140
|
+
var t = o && o.style;
|
|
141
|
+
if (t) {
|
|
142
|
+
if (n === void 0)
|
|
143
|
+
return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(o, "") : o.currentStyle && (n = o.currentStyle), e === void 0 ? n : n[e];
|
|
144
|
+
!(e in t) && e.indexOf("webkit") === -1 && (e = "-webkit-" + e), t[e] = n + (typeof n == "string" ? "" : "px");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
function Ye(o, e) {
|
|
148
|
+
var n = "";
|
|
149
|
+
if (typeof o == "string")
|
|
150
|
+
n = o;
|
|
151
|
+
else
|
|
152
|
+
do {
|
|
153
|
+
var t = v(o, "transform");
|
|
154
|
+
t && t !== "none" && (n = t + " " + n);
|
|
155
|
+
} while (!e && (o = o.parentNode));
|
|
156
|
+
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
157
|
+
return i && new i(n);
|
|
158
|
+
}
|
|
159
|
+
function fn(o, e, n) {
|
|
160
|
+
if (o) {
|
|
161
|
+
var t = o.getElementsByTagName(e), i = 0, r = t.length;
|
|
162
|
+
if (n)
|
|
163
|
+
for (; i < r; i++)
|
|
164
|
+
n(t[i], i);
|
|
165
|
+
return t;
|
|
166
|
+
}
|
|
167
|
+
return [];
|
|
168
|
+
}
|
|
169
|
+
function we() {
|
|
170
|
+
var o = document.scrollingElement;
|
|
171
|
+
return o || document.documentElement;
|
|
172
|
+
}
|
|
173
|
+
function K(o, e, n, t, i) {
|
|
174
|
+
if (!(!o.getBoundingClientRect && o !== window)) {
|
|
175
|
+
var r, a, l, s, u, f, c;
|
|
176
|
+
if (o !== window && o.parentNode && o !== we() ? (r = o.getBoundingClientRect(), a = r.top, l = r.left, s = r.bottom, u = r.right, f = r.height, c = r.width) : (a = 0, l = 0, s = window.innerHeight, u = window.innerWidth, f = window.innerHeight, c = window.innerWidth), (e || n) && o !== window && (i = i || o.parentNode, !Ne))
|
|
177
|
+
do
|
|
178
|
+
if (i && i.getBoundingClientRect && (v(i, "transform") !== "none" || n && v(i, "position") !== "static")) {
|
|
179
|
+
var w = i.getBoundingClientRect();
|
|
180
|
+
a -= w.top + parseInt(v(i, "border-top-width")), l -= w.left + parseInt(v(i, "border-left-width")), s = a + r.height, u = l + r.width;
|
|
181
|
+
break;
|
|
182
|
+
}
|
|
183
|
+
while (i = i.parentNode);
|
|
184
|
+
if (t && o !== window) {
|
|
185
|
+
var g = Ye(i || o), _ = g && g.a, D = g && g.d;
|
|
186
|
+
g && (a /= D, l /= _, c /= _, f /= D, s = a + f, u = l + c);
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
top: a,
|
|
190
|
+
left: l,
|
|
191
|
+
bottom: s,
|
|
192
|
+
right: u,
|
|
193
|
+
width: c,
|
|
194
|
+
height: f
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function Zt(o, e, n) {
|
|
199
|
+
for (var t = Fe(o, !0), i = K(o)[e]; t; ) {
|
|
200
|
+
var r = K(t)[n], a = void 0;
|
|
201
|
+
if (a = i >= r, !a) return t;
|
|
202
|
+
if (t === we()) break;
|
|
203
|
+
t = Fe(t, !1);
|
|
204
|
+
}
|
|
205
|
+
return !1;
|
|
206
|
+
}
|
|
207
|
+
function Ge(o, e, n, t) {
|
|
208
|
+
for (var i = 0, r = 0, a = o.children; r < a.length; ) {
|
|
209
|
+
if (a[r].style.display !== "none" && a[r] !== p.ghost && (t || a[r] !== p.dragged) && ye(a[r], n.draggable, o, !1)) {
|
|
210
|
+
if (i === e)
|
|
211
|
+
return a[r];
|
|
212
|
+
i++;
|
|
213
|
+
}
|
|
214
|
+
r++;
|
|
215
|
+
}
|
|
216
|
+
return null;
|
|
217
|
+
}
|
|
218
|
+
function Yt(o, e) {
|
|
219
|
+
for (var n = o.lastElementChild; n && (n === p.ghost || v(n, "display") === "none" || e && !vt(n, e)); )
|
|
220
|
+
n = n.previousElementSibling;
|
|
221
|
+
return n || null;
|
|
222
|
+
}
|
|
223
|
+
function de(o, e) {
|
|
224
|
+
var n = 0;
|
|
225
|
+
if (!o || !o.parentNode)
|
|
226
|
+
return -1;
|
|
227
|
+
for (; o = o.previousElementSibling; )
|
|
228
|
+
o.nodeName.toUpperCase() !== "TEMPLATE" && o !== p.clone && (!e || vt(o, e)) && n++;
|
|
229
|
+
return n;
|
|
230
|
+
}
|
|
231
|
+
function Qt(o) {
|
|
232
|
+
var e = 0, n = 0, t = we();
|
|
233
|
+
if (o)
|
|
234
|
+
do {
|
|
235
|
+
var i = Ye(o), r = i.a, a = i.d;
|
|
236
|
+
e += o.scrollLeft * r, n += o.scrollTop * a;
|
|
237
|
+
} while (o !== t && (o = o.parentNode));
|
|
238
|
+
return [e, n];
|
|
239
|
+
}
|
|
240
|
+
function qn(o, e) {
|
|
241
|
+
for (var n in o)
|
|
242
|
+
if (o.hasOwnProperty(n)) {
|
|
243
|
+
for (var t in e)
|
|
244
|
+
if (e.hasOwnProperty(t) && e[t] === o[n][t]) return Number(n);
|
|
245
|
+
}
|
|
246
|
+
return -1;
|
|
247
|
+
}
|
|
248
|
+
function Fe(o, e) {
|
|
249
|
+
if (!o || !o.getBoundingClientRect) return we();
|
|
250
|
+
var n = o, t = !1;
|
|
251
|
+
do
|
|
252
|
+
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
253
|
+
var i = v(n);
|
|
254
|
+
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
255
|
+
if (!n.getBoundingClientRect || n === document.body) return we();
|
|
256
|
+
if (t || e) return n;
|
|
257
|
+
t = !0;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
while (n = n.parentNode);
|
|
261
|
+
return we();
|
|
262
|
+
}
|
|
263
|
+
function Zn(o, e) {
|
|
264
|
+
if (o && e)
|
|
265
|
+
for (var n in e)
|
|
266
|
+
e.hasOwnProperty(n) && (o[n] = e[n]);
|
|
267
|
+
return o;
|
|
268
|
+
}
|
|
269
|
+
function xt(o, e) {
|
|
270
|
+
return Math.round(o.top) === Math.round(e.top) && Math.round(o.left) === Math.round(e.left) && Math.round(o.height) === Math.round(e.height) && Math.round(o.width) === Math.round(e.width);
|
|
271
|
+
}
|
|
272
|
+
var Ze;
|
|
273
|
+
function hn(o, e) {
|
|
274
|
+
return function() {
|
|
275
|
+
if (!Ze) {
|
|
276
|
+
var n = arguments, t = this;
|
|
277
|
+
n.length === 1 ? o.call(t, n[0]) : o.apply(t, n), Ze = setTimeout(function() {
|
|
278
|
+
Ze = void 0;
|
|
279
|
+
}, e);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function Qn() {
|
|
284
|
+
clearTimeout(Ze), Ze = void 0;
|
|
285
|
+
}
|
|
286
|
+
function pn(o, e, n) {
|
|
287
|
+
o.scrollLeft += e, o.scrollTop += n;
|
|
288
|
+
}
|
|
289
|
+
function gn(o) {
|
|
290
|
+
var e = window.Polymer, n = window.jQuery || window.Zepto;
|
|
291
|
+
return e && e.dom ? e.dom(o).cloneNode(!0) : n ? n(o).clone(!0)[0] : o.cloneNode(!0);
|
|
292
|
+
}
|
|
293
|
+
var se = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
294
|
+
function Jn() {
|
|
295
|
+
var o = [], e;
|
|
296
|
+
return {
|
|
297
|
+
captureAnimationState: function() {
|
|
298
|
+
if (o = [], !!this.options.animation) {
|
|
299
|
+
var t = [].slice.call(this.el.children);
|
|
300
|
+
t.forEach(function(i) {
|
|
301
|
+
if (!(v(i, "display") === "none" || i === p.ghost)) {
|
|
302
|
+
o.push({
|
|
303
|
+
target: i,
|
|
304
|
+
rect: K(i)
|
|
305
|
+
});
|
|
306
|
+
var r = Ee({}, o[o.length - 1].rect);
|
|
307
|
+
if (i.thisAnimationDuration) {
|
|
308
|
+
var a = Ye(i, !0);
|
|
309
|
+
a && (r.top -= a.f, r.left -= a.e);
|
|
310
|
+
}
|
|
311
|
+
i.fromRect = r;
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
addAnimationState: function(t) {
|
|
317
|
+
o.push(t);
|
|
318
|
+
},
|
|
319
|
+
removeAnimationState: function(t) {
|
|
320
|
+
o.splice(qn(o, {
|
|
321
|
+
target: t
|
|
322
|
+
}), 1);
|
|
323
|
+
},
|
|
324
|
+
animateAll: function(t) {
|
|
325
|
+
var i = this;
|
|
326
|
+
if (!this.options.animation) {
|
|
327
|
+
clearTimeout(e), typeof t == "function" && t();
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
330
|
+
var r = !1, a = 0;
|
|
331
|
+
o.forEach(function(l) {
|
|
332
|
+
var s = 0, u = l.target, f = u.fromRect, c = K(u), w = u.prevFromRect, g = u.prevToRect, _ = l.rect, D = Ye(u, !0);
|
|
333
|
+
D && (c.top -= D.f, c.left -= D.e), u.toRect = c, u.thisAnimationDuration && xt(w, c) && !xt(f, c) && // Make sure animatingRect is on line between toRect & fromRect
|
|
334
|
+
(_.top - c.top) / (_.left - c.left) === (f.top - c.top) / (f.left - c.left) && (s = to(_, w, g, i.options)), xt(c, f) || (u.prevFromRect = f, u.prevToRect = c, s || (s = i.options.animation), i.animate(u, _, c, s)), s && (r = !0, a = Math.max(a, s), clearTimeout(u.animationResetTimer), u.animationResetTimer = setTimeout(function() {
|
|
335
|
+
u.animationTime = 0, u.prevFromRect = null, u.fromRect = null, u.prevToRect = null, u.thisAnimationDuration = null;
|
|
336
|
+
}, s), u.thisAnimationDuration = s);
|
|
337
|
+
}), clearTimeout(e), r ? e = setTimeout(function() {
|
|
338
|
+
typeof t == "function" && t();
|
|
339
|
+
}, a) : typeof t == "function" && t(), o = [];
|
|
340
|
+
},
|
|
341
|
+
animate: function(t, i, r, a) {
|
|
342
|
+
if (a) {
|
|
343
|
+
v(t, "transition", ""), v(t, "transform", "");
|
|
344
|
+
var l = Ye(this.el), s = l && l.a, u = l && l.d, f = (i.left - r.left) / (s || 1), c = (i.top - r.top) / (u || 1);
|
|
345
|
+
t.animatingX = !!f, t.animatingY = !!c, v(t, "transform", "translate3d(" + f + "px," + c + "px,0)"), this.forRepaintDummy = eo(t), v(t, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), v(t, "transform", "translate3d(0,0,0)"), typeof t.animated == "number" && clearTimeout(t.animated), t.animated = setTimeout(function() {
|
|
346
|
+
v(t, "transition", ""), v(t, "transform", ""), t.animated = !1, t.animatingX = !1, t.animatingY = !1;
|
|
347
|
+
}, a);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
function eo(o) {
|
|
353
|
+
return o.offsetWidth;
|
|
354
|
+
}
|
|
355
|
+
function to(o, e, n, t) {
|
|
356
|
+
return Math.sqrt(Math.pow(e.top - o.top, 2) + Math.pow(e.left - o.left, 2)) / Math.sqrt(Math.pow(e.top - n.top, 2) + Math.pow(e.left - n.left, 2)) * t.animation;
|
|
357
|
+
}
|
|
358
|
+
var Ke = [], It = {
|
|
359
|
+
initializeByDefault: !0
|
|
360
|
+
}, nt = {
|
|
361
|
+
mount: function(e) {
|
|
362
|
+
for (var n in It)
|
|
363
|
+
It.hasOwnProperty(n) && !(n in e) && (e[n] = It[n]);
|
|
364
|
+
Ke.forEach(function(t) {
|
|
365
|
+
if (t.pluginName === e.pluginName)
|
|
366
|
+
throw "Sortable: Cannot mount plugin ".concat(e.pluginName, " more than once");
|
|
367
|
+
}), Ke.push(e);
|
|
368
|
+
},
|
|
369
|
+
pluginEvent: function(e, n, t) {
|
|
370
|
+
var i = this;
|
|
371
|
+
this.eventCanceled = !1, t.cancel = function() {
|
|
372
|
+
i.eventCanceled = !0;
|
|
373
|
+
};
|
|
374
|
+
var r = e + "Global";
|
|
375
|
+
Ke.forEach(function(a) {
|
|
376
|
+
n[a.pluginName] && (n[a.pluginName][r] && n[a.pluginName][r](Ee({
|
|
377
|
+
sortable: n
|
|
378
|
+
}, t)), n.options[a.pluginName] && n[a.pluginName][e] && n[a.pluginName][e](Ee({
|
|
379
|
+
sortable: n
|
|
380
|
+
}, t)));
|
|
381
|
+
});
|
|
382
|
+
},
|
|
383
|
+
initializePlugins: function(e, n, t, i) {
|
|
384
|
+
Ke.forEach(function(l) {
|
|
385
|
+
var s = l.pluginName;
|
|
386
|
+
if (!(!e.options[s] && !l.initializeByDefault)) {
|
|
387
|
+
var u = new l(e, n, e.options);
|
|
388
|
+
u.sortable = e, u.options = e.options, e[s] = u, Ie(t, u.defaults);
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
for (var r in e.options)
|
|
392
|
+
if (e.options.hasOwnProperty(r)) {
|
|
393
|
+
var a = this.modifyOption(e, r, e.options[r]);
|
|
394
|
+
typeof a < "u" && (e.options[r] = a);
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
getEventProperties: function(e, n) {
|
|
398
|
+
var t = {};
|
|
399
|
+
return Ke.forEach(function(i) {
|
|
400
|
+
typeof i.eventProperties == "function" && Ie(t, i.eventProperties.call(n[i.pluginName], e));
|
|
401
|
+
}), t;
|
|
402
|
+
},
|
|
403
|
+
modifyOption: function(e, n, t) {
|
|
404
|
+
var i;
|
|
405
|
+
return Ke.forEach(function(r) {
|
|
406
|
+
e[r.pluginName] && r.optionListeners && typeof r.optionListeners[n] == "function" && (i = r.optionListeners[n].call(e[r.pluginName], t));
|
|
407
|
+
}), i;
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
function no(o) {
|
|
411
|
+
var e = o.sortable, n = o.rootEl, t = o.name, i = o.targetEl, r = o.cloneEl, a = o.toEl, l = o.fromEl, s = o.oldIndex, u = o.newIndex, f = o.oldDraggableIndex, c = o.newDraggableIndex, w = o.originalEvent, g = o.putSortable, _ = o.extraEventProperties;
|
|
412
|
+
if (e = e || n && n[se], !!e) {
|
|
413
|
+
var D, R = e.options, L = "on" + t.charAt(0).toUpperCase() + t.substr(1);
|
|
414
|
+
window.CustomEvent && !Ne && !tt ? D = new CustomEvent(t, {
|
|
415
|
+
bubbles: !0,
|
|
416
|
+
cancelable: !0
|
|
417
|
+
}) : (D = document.createEvent("Event"), D.initEvent(t, !0, !0)), D.to = a || n, D.from = l || n, D.item = i || n, D.clone = r, D.oldIndex = s, D.newIndex = u, D.oldDraggableIndex = f, D.newDraggableIndex = c, D.originalEvent = w, D.pullMode = g ? g.lastPutMode : void 0;
|
|
418
|
+
var A = Ee(Ee({}, _), nt.getEventProperties(t, e));
|
|
419
|
+
for (var k in A)
|
|
420
|
+
D[k] = A[k];
|
|
421
|
+
n && n.dispatchEvent(D), R[L] && R[L].call(e, D);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
var oo = ["evt"], J = function(e, n) {
|
|
425
|
+
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = t.evt, r = Vn(t, oo);
|
|
426
|
+
nt.pluginEvent.bind(p)(e, n, Ee({
|
|
427
|
+
dragEl: d,
|
|
428
|
+
parentEl: F,
|
|
429
|
+
ghostEl: S,
|
|
430
|
+
rootEl: P,
|
|
431
|
+
nextEl: ze,
|
|
432
|
+
lastDownEl: ft,
|
|
433
|
+
cloneEl: B,
|
|
434
|
+
cloneHidden: Pe,
|
|
435
|
+
dragStarted: We,
|
|
436
|
+
putSortable: H,
|
|
437
|
+
activeSortable: p.active,
|
|
438
|
+
originalEvent: i,
|
|
439
|
+
oldIndex: Le,
|
|
440
|
+
oldDraggableIndex: Qe,
|
|
441
|
+
newIndex: ae,
|
|
442
|
+
newDraggableIndex: Ae,
|
|
443
|
+
hideGhostForTarget: yn,
|
|
444
|
+
unhideGhostForTarget: wn,
|
|
445
|
+
cloneNowHidden: function() {
|
|
446
|
+
Pe = !0;
|
|
447
|
+
},
|
|
448
|
+
cloneNowShown: function() {
|
|
449
|
+
Pe = !1;
|
|
450
|
+
},
|
|
451
|
+
dispatchSortableEvent: function(l) {
|
|
452
|
+
Z({
|
|
453
|
+
sortable: n,
|
|
454
|
+
name: l,
|
|
455
|
+
originalEvent: i
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
}, r));
|
|
459
|
+
};
|
|
460
|
+
function Z(o) {
|
|
461
|
+
no(Ee({
|
|
462
|
+
putSortable: H,
|
|
463
|
+
cloneEl: B,
|
|
464
|
+
targetEl: d,
|
|
465
|
+
rootEl: P,
|
|
466
|
+
oldIndex: Le,
|
|
467
|
+
oldDraggableIndex: Qe,
|
|
468
|
+
newIndex: ae,
|
|
469
|
+
newDraggableIndex: Ae
|
|
470
|
+
}, o));
|
|
471
|
+
}
|
|
472
|
+
var d, F, S, P, ze, ft, B, Pe, Le, ae, Qe, Ae, it, H, Xe = !1, bt = !1, yt = [], Be, pe, Nt, Ot, Jt, en, We, Re, Je, et = !1, rt = !1, ht, V, kt = [], Kt = !1, wt = [], St = typeof document < "u", at = dn, tn = tt || Ne ? "cssFloat" : "float", io = St && !$n && !dn && "draggable" in document.createElement("div"), mn = function() {
|
|
473
|
+
if (St) {
|
|
474
|
+
if (Ne)
|
|
475
|
+
return !1;
|
|
476
|
+
var o = document.createElement("x");
|
|
477
|
+
return o.style.cssText = "pointer-events:auto", o.style.pointerEvents === "auto";
|
|
478
|
+
}
|
|
479
|
+
}(), vn = function(e, n) {
|
|
480
|
+
var t = v(e), i = parseInt(t.width) - parseInt(t.paddingLeft) - parseInt(t.paddingRight) - parseInt(t.borderLeftWidth) - parseInt(t.borderRightWidth), r = Ge(e, 0, n), a = Ge(e, 1, n), l = r && v(r), s = a && v(a), u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + K(r).width, f = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + K(a).width;
|
|
481
|
+
if (t.display === "flex")
|
|
482
|
+
return t.flexDirection === "column" || t.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
483
|
+
if (t.display === "grid")
|
|
484
|
+
return t.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
485
|
+
if (r && l.float && l.float !== "none") {
|
|
486
|
+
var c = l.float === "left" ? "left" : "right";
|
|
487
|
+
return a && (s.clear === "both" || s.clear === c) ? "vertical" : "horizontal";
|
|
488
|
+
}
|
|
489
|
+
return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || u >= i && t[tn] === "none" || a && t[tn] === "none" && u + f > i) ? "vertical" : "horizontal";
|
|
490
|
+
}, ro = function(e, n, t) {
|
|
491
|
+
var i = t ? e.left : e.top, r = t ? e.right : e.bottom, a = t ? e.width : e.height, l = t ? n.left : n.top, s = t ? n.right : n.bottom, u = t ? n.width : n.height;
|
|
492
|
+
return i === l || r === s || i + a / 2 === l + u / 2;
|
|
493
|
+
}, ao = function(e, n) {
|
|
494
|
+
var t;
|
|
495
|
+
return yt.some(function(i) {
|
|
496
|
+
var r = i[se].options.emptyInsertThreshold;
|
|
497
|
+
if (!(!r || Yt(i))) {
|
|
498
|
+
var a = K(i), l = e >= a.left - r && e <= a.right + r, s = n >= a.top - r && n <= a.bottom + r;
|
|
499
|
+
if (l && s)
|
|
500
|
+
return t = i;
|
|
501
|
+
}
|
|
502
|
+
}), t;
|
|
503
|
+
}, bn = function(e) {
|
|
504
|
+
function n(r, a) {
|
|
505
|
+
return function(l, s, u, f) {
|
|
506
|
+
var c = l.options.group.name && s.options.group.name && l.options.group.name === s.options.group.name;
|
|
507
|
+
if (r == null && (a || c))
|
|
508
|
+
return !0;
|
|
509
|
+
if (r == null || r === !1)
|
|
510
|
+
return !1;
|
|
511
|
+
if (a && r === "clone")
|
|
512
|
+
return r;
|
|
513
|
+
if (typeof r == "function")
|
|
514
|
+
return n(r(l, s, u, f), a)(l, s, u, f);
|
|
515
|
+
var w = (a ? l : s).options.group.name;
|
|
516
|
+
return r === !0 || typeof r == "string" && r === w || r.join && r.indexOf(w) > -1;
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
var t = {}, i = e.group;
|
|
520
|
+
(!i || ct(i) != "object") && (i = {
|
|
521
|
+
name: i
|
|
522
|
+
}), t.name = i.name, t.checkPull = n(i.pull, !0), t.checkPut = n(i.put), t.revertClone = i.revertClone, e.group = t;
|
|
523
|
+
}, yn = function() {
|
|
524
|
+
!mn && S && v(S, "display", "none");
|
|
525
|
+
}, wn = function() {
|
|
526
|
+
!mn && S && v(S, "display", "");
|
|
527
|
+
};
|
|
528
|
+
St && document.addEventListener("click", function(o) {
|
|
529
|
+
if (bt)
|
|
530
|
+
return o.preventDefault(), o.stopPropagation && o.stopPropagation(), o.stopImmediatePropagation && o.stopImmediatePropagation(), bt = !1, !1;
|
|
531
|
+
}, !0);
|
|
532
|
+
var Me = function(e) {
|
|
533
|
+
if (d) {
|
|
534
|
+
e = e.touches ? e.touches[0] : e;
|
|
535
|
+
var n = ao(e.clientX, e.clientY);
|
|
536
|
+
if (n) {
|
|
537
|
+
var t = {};
|
|
538
|
+
for (var i in e)
|
|
539
|
+
e.hasOwnProperty(i) && (t[i] = e[i]);
|
|
540
|
+
t.target = t.rootEl = n, t.preventDefault = void 0, t.stopPropagation = void 0, n[se]._onDragOver(t);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}, lo = function(e) {
|
|
544
|
+
d && d.parentNode[se]._isOutsideThisEl(e.target);
|
|
545
|
+
};
|
|
546
|
+
function p(o, e) {
|
|
547
|
+
if (!(o && o.nodeType && o.nodeType === 1))
|
|
548
|
+
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(o));
|
|
549
|
+
this.el = o, this.options = e = Ie({}, e), o[se] = this;
|
|
550
|
+
var n = {
|
|
551
|
+
group: null,
|
|
552
|
+
sort: !0,
|
|
553
|
+
disabled: !1,
|
|
554
|
+
store: null,
|
|
555
|
+
handle: null,
|
|
556
|
+
draggable: /^[uo]l$/i.test(o.nodeName) ? ">li" : ">*",
|
|
557
|
+
swapThreshold: 1,
|
|
558
|
+
// percentage; 0 <= x <= 1
|
|
559
|
+
invertSwap: !1,
|
|
560
|
+
// invert always
|
|
561
|
+
invertedSwapThreshold: null,
|
|
562
|
+
// will be set to same as swapThreshold if default
|
|
563
|
+
removeCloneOnHide: !0,
|
|
564
|
+
direction: function() {
|
|
565
|
+
return vn(o, this.options);
|
|
566
|
+
},
|
|
567
|
+
ghostClass: "sortable-ghost",
|
|
568
|
+
chosenClass: "sortable-chosen",
|
|
569
|
+
dragClass: "sortable-drag",
|
|
570
|
+
ignore: "a, img",
|
|
571
|
+
filter: null,
|
|
572
|
+
preventOnFilter: !0,
|
|
573
|
+
animation: 0,
|
|
574
|
+
easing: null,
|
|
575
|
+
setData: function(a, l) {
|
|
576
|
+
a.setData("Text", l.textContent);
|
|
577
|
+
},
|
|
578
|
+
dropBubble: !1,
|
|
579
|
+
dragoverBubble: !1,
|
|
580
|
+
dataIdAttr: "data-id",
|
|
581
|
+
delay: 0,
|
|
582
|
+
delayOnTouchOnly: !1,
|
|
583
|
+
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
584
|
+
forceFallback: !1,
|
|
585
|
+
fallbackClass: "sortable-fallback",
|
|
586
|
+
fallbackOnBody: !1,
|
|
587
|
+
fallbackTolerance: 0,
|
|
588
|
+
fallbackOffset: {
|
|
589
|
+
x: 0,
|
|
590
|
+
y: 0
|
|
591
|
+
},
|
|
592
|
+
supportPointer: p.supportPointer !== !1 && "PointerEvent" in window && !qe,
|
|
593
|
+
emptyInsertThreshold: 5
|
|
594
|
+
};
|
|
595
|
+
nt.initializePlugins(this, o, n);
|
|
596
|
+
for (var t in n)
|
|
597
|
+
!(t in e) && (e[t] = n[t]);
|
|
598
|
+
bn(e);
|
|
599
|
+
for (var i in this)
|
|
600
|
+
i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
601
|
+
this.nativeDraggable = e.forceFallback ? !1 : io, this.nativeDraggable && (this.options.touchStartThreshold = 1), e.supportPointer ? O(o, "pointerdown", this._onTapStart) : (O(o, "mousedown", this._onTapStart), O(o, "touchstart", this._onTapStart)), this.nativeDraggable && (O(o, "dragover", this), O(o, "dragenter", this)), yt.push(this.el), e.store && e.store.get && this.sort(e.store.get(this) || []), Ie(this, Jn());
|
|
602
|
+
}
|
|
603
|
+
p.prototype = /** @lends Sortable.prototype */
|
|
604
|
+
{
|
|
605
|
+
constructor: p,
|
|
606
|
+
_isOutsideThisEl: function(e) {
|
|
607
|
+
!this.el.contains(e) && e !== this.el && (Re = null);
|
|
608
|
+
},
|
|
609
|
+
_getDirection: function(e, n) {
|
|
610
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, n, d) : this.options.direction;
|
|
611
|
+
},
|
|
612
|
+
_onTapStart: function(e) {
|
|
613
|
+
if (e.cancelable) {
|
|
614
|
+
var n = this, t = this.el, i = this.options, r = i.preventOnFilter, a = e.type, l = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (l || e).target, u = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, f = i.filter;
|
|
615
|
+
if (mo(t), !d && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || i.disabled) && !u.isContentEditable && !(!this.nativeDraggable && qe && s && s.tagName.toUpperCase() === "SELECT") && (s = ye(s, i.draggable, t, !1), !(s && s.animated) && ft !== s)) {
|
|
616
|
+
if (Le = de(s), Qe = de(s, i.draggable), typeof f == "function") {
|
|
617
|
+
if (f.call(this, e, s, this)) {
|
|
618
|
+
Z({
|
|
619
|
+
sortable: n,
|
|
620
|
+
rootEl: u,
|
|
621
|
+
name: "filter",
|
|
622
|
+
targetEl: s,
|
|
623
|
+
toEl: t,
|
|
624
|
+
fromEl: t
|
|
625
|
+
}), J("filter", n, {
|
|
626
|
+
evt: e
|
|
627
|
+
}), r && e.cancelable && e.preventDefault();
|
|
628
|
+
return;
|
|
629
|
+
}
|
|
630
|
+
} else if (f && (f = f.split(",").some(function(c) {
|
|
631
|
+
if (c = ye(u, c.trim(), t, !1), c)
|
|
632
|
+
return Z({
|
|
633
|
+
sortable: n,
|
|
634
|
+
rootEl: c,
|
|
635
|
+
name: "filter",
|
|
636
|
+
targetEl: s,
|
|
637
|
+
fromEl: t,
|
|
638
|
+
toEl: t
|
|
639
|
+
}), J("filter", n, {
|
|
640
|
+
evt: e
|
|
641
|
+
}), !0;
|
|
642
|
+
}), f)) {
|
|
643
|
+
r && e.cancelable && e.preventDefault();
|
|
644
|
+
return;
|
|
645
|
+
}
|
|
646
|
+
i.handle && !ye(u, i.handle, t, !1) || this._prepareDragStart(e, l, s);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
_prepareDragStart: function(e, n, t) {
|
|
651
|
+
var i = this, r = i.el, a = i.options, l = r.ownerDocument, s;
|
|
652
|
+
if (t && !d && t.parentNode === r) {
|
|
653
|
+
var u = K(t);
|
|
654
|
+
if (P = r, d = t, F = d.parentNode, ze = d.nextSibling, ft = t, it = a.group, p.dragged = d, Be = {
|
|
655
|
+
target: d,
|
|
656
|
+
clientX: (n || e).clientX,
|
|
657
|
+
clientY: (n || e).clientY
|
|
658
|
+
}, Jt = Be.clientX - u.left, en = Be.clientY - u.top, this._lastX = (n || e).clientX, this._lastY = (n || e).clientY, d.style["will-change"] = "all", s = function() {
|
|
659
|
+
if (J("delayEnded", i, {
|
|
660
|
+
evt: e
|
|
661
|
+
}), p.eventCanceled) {
|
|
662
|
+
i._onDrop();
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
i._disableDelayedDragEvents(), !Ut && i.nativeDraggable && (d.draggable = !0), i._triggerDragStart(e, n), Z({
|
|
666
|
+
sortable: i,
|
|
667
|
+
name: "choose",
|
|
668
|
+
originalEvent: e
|
|
669
|
+
}), re(d, a.chosenClass, !0);
|
|
670
|
+
}, a.ignore.split(",").forEach(function(f) {
|
|
671
|
+
fn(d, f.trim(), At);
|
|
672
|
+
}), O(l, "dragover", Me), O(l, "mousemove", Me), O(l, "touchmove", Me), O(l, "mouseup", i._onDrop), O(l, "touchend", i._onDrop), O(l, "touchcancel", i._onDrop), Ut && this.nativeDraggable && (this.options.touchStartThreshold = 4, d.draggable = !0), J("delayStart", this, {
|
|
673
|
+
evt: e
|
|
674
|
+
}), a.delay && (!a.delayOnTouchOnly || n) && (!this.nativeDraggable || !(tt || Ne))) {
|
|
675
|
+
if (p.eventCanceled) {
|
|
676
|
+
this._onDrop();
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
O(l, "mouseup", i._disableDelayedDrag), O(l, "touchend", i._disableDelayedDrag), O(l, "touchcancel", i._disableDelayedDrag), O(l, "mousemove", i._delayedDragTouchMoveHandler), O(l, "touchmove", i._delayedDragTouchMoveHandler), a.supportPointer && O(l, "pointermove", i._delayedDragTouchMoveHandler), i._dragStartTimer = setTimeout(s, a.delay);
|
|
680
|
+
} else
|
|
681
|
+
s();
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
_delayedDragTouchMoveHandler: function(e) {
|
|
685
|
+
var n = e.touches ? e.touches[0] : e;
|
|
686
|
+
Math.max(Math.abs(n.clientX - this._lastX), Math.abs(n.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
687
|
+
},
|
|
688
|
+
_disableDelayedDrag: function() {
|
|
689
|
+
d && At(d), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
690
|
+
},
|
|
691
|
+
_disableDelayedDragEvents: function() {
|
|
692
|
+
var e = this.el.ownerDocument;
|
|
693
|
+
I(e, "mouseup", this._disableDelayedDrag), I(e, "touchend", this._disableDelayedDrag), I(e, "touchcancel", this._disableDelayedDrag), I(e, "mousemove", this._delayedDragTouchMoveHandler), I(e, "touchmove", this._delayedDragTouchMoveHandler), I(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
694
|
+
},
|
|
695
|
+
_triggerDragStart: function(e, n) {
|
|
696
|
+
n = n || e.pointerType == "touch" && e, !this.nativeDraggable || n ? this.options.supportPointer ? O(document, "pointermove", this._onTouchMove) : n ? O(document, "touchmove", this._onTouchMove) : O(document, "mousemove", this._onTouchMove) : (O(d, "dragend", this), O(P, "dragstart", this._onDragStart));
|
|
697
|
+
try {
|
|
698
|
+
document.selection ? pt(function() {
|
|
699
|
+
document.selection.empty();
|
|
700
|
+
}) : window.getSelection().removeAllRanges();
|
|
701
|
+
} catch {
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
_dragStarted: function(e, n) {
|
|
705
|
+
if (Xe = !1, P && d) {
|
|
706
|
+
J("dragStarted", this, {
|
|
707
|
+
evt: n
|
|
708
|
+
}), this.nativeDraggable && O(document, "dragover", lo);
|
|
709
|
+
var t = this.options;
|
|
710
|
+
!e && re(d, t.dragClass, !1), re(d, t.ghostClass, !0), p.active = this, e && this._appendGhost(), Z({
|
|
711
|
+
sortable: this,
|
|
712
|
+
name: "start",
|
|
713
|
+
originalEvent: n
|
|
714
|
+
});
|
|
715
|
+
} else
|
|
716
|
+
this._nulling();
|
|
717
|
+
},
|
|
718
|
+
_emulateDragOver: function() {
|
|
719
|
+
if (pe) {
|
|
720
|
+
this._lastX = pe.clientX, this._lastY = pe.clientY, yn();
|
|
721
|
+
for (var e = document.elementFromPoint(pe.clientX, pe.clientY), n = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(pe.clientX, pe.clientY), e !== n); )
|
|
722
|
+
n = e;
|
|
723
|
+
if (d.parentNode[se]._isOutsideThisEl(e), n)
|
|
724
|
+
do {
|
|
725
|
+
if (n[se]) {
|
|
726
|
+
var t = void 0;
|
|
727
|
+
if (t = n[se]._onDragOver({
|
|
728
|
+
clientX: pe.clientX,
|
|
729
|
+
clientY: pe.clientY,
|
|
730
|
+
target: e,
|
|
731
|
+
rootEl: n
|
|
732
|
+
}), t && !this.options.dragoverBubble)
|
|
733
|
+
break;
|
|
734
|
+
}
|
|
735
|
+
e = n;
|
|
736
|
+
} while (n = n.parentNode);
|
|
737
|
+
wn();
|
|
738
|
+
}
|
|
739
|
+
},
|
|
740
|
+
_onTouchMove: function(e) {
|
|
741
|
+
if (Be) {
|
|
742
|
+
var n = this.options, t = n.fallbackTolerance, i = n.fallbackOffset, r = e.touches ? e.touches[0] : e, a = S && Ye(S, !0), l = S && a && a.a, s = S && a && a.d, u = at && V && Qt(V), f = (r.clientX - Be.clientX + i.x) / (l || 1) + (u ? u[0] - kt[0] : 0) / (l || 1), c = (r.clientY - Be.clientY + i.y) / (s || 1) + (u ? u[1] - kt[1] : 0) / (s || 1);
|
|
743
|
+
if (!p.active && !Xe) {
|
|
744
|
+
if (t && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < t)
|
|
745
|
+
return;
|
|
746
|
+
this._onDragStart(e, !0);
|
|
747
|
+
}
|
|
748
|
+
if (S) {
|
|
749
|
+
a ? (a.e += f - (Nt || 0), a.f += c - (Ot || 0)) : a = {
|
|
750
|
+
a: 1,
|
|
751
|
+
b: 0,
|
|
752
|
+
c: 0,
|
|
753
|
+
d: 1,
|
|
754
|
+
e: f,
|
|
755
|
+
f: c
|
|
756
|
+
};
|
|
757
|
+
var w = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
758
|
+
v(S, "webkitTransform", w), v(S, "mozTransform", w), v(S, "msTransform", w), v(S, "transform", w), Nt = f, Ot = c, pe = r;
|
|
759
|
+
}
|
|
760
|
+
e.cancelable && e.preventDefault();
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
_appendGhost: function() {
|
|
764
|
+
if (!S) {
|
|
765
|
+
var e = this.options.fallbackOnBody ? document.body : P, n = K(d, !0, at, !0, e), t = this.options;
|
|
766
|
+
if (at) {
|
|
767
|
+
for (V = e; v(V, "position") === "static" && v(V, "transform") === "none" && V !== document; )
|
|
768
|
+
V = V.parentNode;
|
|
769
|
+
V !== document.body && V !== document.documentElement ? (V === document && (V = we()), n.top += V.scrollTop, n.left += V.scrollLeft) : V = we(), kt = Qt(V);
|
|
770
|
+
}
|
|
771
|
+
S = d.cloneNode(!0), re(S, t.ghostClass, !1), re(S, t.fallbackClass, !0), re(S, t.dragClass, !0), v(S, "transition", ""), v(S, "transform", ""), v(S, "box-sizing", "border-box"), v(S, "margin", 0), v(S, "top", n.top), v(S, "left", n.left), v(S, "width", n.width), v(S, "height", n.height), v(S, "opacity", "0.8"), v(S, "position", at ? "absolute" : "fixed"), v(S, "zIndex", "100000"), v(S, "pointerEvents", "none"), p.ghost = S, e.appendChild(S), v(S, "transform-origin", Jt / parseInt(S.style.width) * 100 + "% " + en / parseInt(S.style.height) * 100 + "%");
|
|
772
|
+
}
|
|
773
|
+
},
|
|
774
|
+
_onDragStart: function(e, n) {
|
|
775
|
+
var t = this, i = e.dataTransfer, r = t.options;
|
|
776
|
+
if (J("dragStart", this, {
|
|
777
|
+
evt: e
|
|
778
|
+
}), p.eventCanceled) {
|
|
779
|
+
this._onDrop();
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
J("setupClone", this), p.eventCanceled || (B = gn(d), B.draggable = !1, B.style["will-change"] = "", this._hideClone(), re(B, this.options.chosenClass, !1), p.clone = B), t.cloneId = pt(function() {
|
|
783
|
+
J("clone", t), !p.eventCanceled && (t.options.removeCloneOnHide || P.insertBefore(B, d), t._hideClone(), Z({
|
|
784
|
+
sortable: t,
|
|
785
|
+
name: "clone"
|
|
786
|
+
}));
|
|
787
|
+
}), !n && re(d, r.dragClass, !0), n ? (bt = !0, t._loopId = setInterval(t._emulateDragOver, 50)) : (I(document, "mouseup", t._onDrop), I(document, "touchend", t._onDrop), I(document, "touchcancel", t._onDrop), i && (i.effectAllowed = "move", r.setData && r.setData.call(t, i, d)), O(document, "drop", t), v(d, "transform", "translateZ(0)")), Xe = !0, t._dragStartId = pt(t._dragStarted.bind(t, n, e)), O(document, "selectstart", t), We = !0, qe && v(document.body, "user-select", "none");
|
|
788
|
+
},
|
|
789
|
+
// Returns true - if no further action is needed (either inserted or another condition)
|
|
790
|
+
_onDragOver: function(e) {
|
|
791
|
+
var n = this.el, t = e.target, i, r, a, l = this.options, s = l.group, u = p.active, f = it === s, c = l.sort, w = H || u, g, _ = this, D = !1;
|
|
792
|
+
if (Kt) return;
|
|
793
|
+
function R(_e, E) {
|
|
794
|
+
J(_e, _, Ee({
|
|
795
|
+
evt: e,
|
|
796
|
+
isOwner: f,
|
|
797
|
+
axis: g ? "vertical" : "horizontal",
|
|
798
|
+
revert: a,
|
|
799
|
+
dragRect: i,
|
|
800
|
+
targetRect: r,
|
|
801
|
+
canSort: c,
|
|
802
|
+
fromSortable: w,
|
|
803
|
+
target: t,
|
|
804
|
+
completed: A,
|
|
805
|
+
onMove: function(h, C) {
|
|
806
|
+
return lt(P, n, d, i, h, K(h), e, C);
|
|
807
|
+
},
|
|
808
|
+
changed: k
|
|
809
|
+
}, E));
|
|
810
|
+
}
|
|
811
|
+
function L() {
|
|
812
|
+
R("dragOverAnimationCapture"), _.captureAnimationState(), _ !== w && w.captureAnimationState();
|
|
813
|
+
}
|
|
814
|
+
function A(_e) {
|
|
815
|
+
return R("dragOverCompleted", {
|
|
816
|
+
insertion: _e
|
|
817
|
+
}), _e && (f ? u._hideClone() : u._showClone(_), _ !== w && (re(d, H ? H.options.ghostClass : u.options.ghostClass, !1), re(d, l.ghostClass, !0)), H !== _ && _ !== p.active ? H = _ : _ === p.active && H && (H = null), w === _ && (_._ignoreWhileAnimating = t), _.animateAll(function() {
|
|
818
|
+
R("dragOverAnimationComplete"), _._ignoreWhileAnimating = null;
|
|
819
|
+
}), _ !== w && (w.animateAll(), w._ignoreWhileAnimating = null)), (t === d && !d.animated || t === n && !t.animated) && (Re = null), !l.dragoverBubble && !e.rootEl && t !== document && (d.parentNode[se]._isOutsideThisEl(e.target), !_e && Me(e)), !l.dragoverBubble && e.stopPropagation && e.stopPropagation(), D = !0;
|
|
820
|
+
}
|
|
821
|
+
function k() {
|
|
822
|
+
ae = de(d), Ae = de(d, l.draggable), Z({
|
|
823
|
+
sortable: _,
|
|
824
|
+
name: "change",
|
|
825
|
+
toEl: n,
|
|
826
|
+
newIndex: ae,
|
|
827
|
+
newDraggableIndex: Ae,
|
|
828
|
+
originalEvent: e
|
|
829
|
+
});
|
|
830
|
+
}
|
|
831
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), t = ye(t, l.draggable, n, !0), R("dragOver"), p.eventCanceled) return D;
|
|
832
|
+
if (d.contains(e.target) || t.animated && t.animatingX && t.animatingY || _._ignoreWhileAnimating === t)
|
|
833
|
+
return A(!1);
|
|
834
|
+
if (bt = !1, u && !l.disabled && (f ? c || (a = F !== P) : H === this || (this.lastPutMode = it.checkPull(this, u, d, e)) && s.checkPut(this, u, d, e))) {
|
|
835
|
+
if (g = this._getDirection(e, t) === "vertical", i = K(d), R("dragOverValid"), p.eventCanceled) return D;
|
|
836
|
+
if (a)
|
|
837
|
+
return F = P, L(), this._hideClone(), R("revert"), p.eventCanceled || (ze ? P.insertBefore(d, ze) : P.appendChild(d)), A(!0);
|
|
838
|
+
var Y = Yt(n, l.draggable);
|
|
839
|
+
if (!Y || fo(e, g, this) && !Y.animated) {
|
|
840
|
+
if (Y === d)
|
|
841
|
+
return A(!1);
|
|
842
|
+
if (Y && n === e.target && (t = Y), t && (r = K(t)), lt(P, n, d, i, t, r, e, !!t) !== !1)
|
|
843
|
+
return L(), n.appendChild(d), F = n, k(), A(!0);
|
|
844
|
+
} else if (Y && co(e, g, this)) {
|
|
845
|
+
var W = Ge(n, 0, l, !0);
|
|
846
|
+
if (W === d)
|
|
847
|
+
return A(!1);
|
|
848
|
+
if (t = W, r = K(t), lt(P, n, d, i, t, r, e, !1) !== !1)
|
|
849
|
+
return L(), n.insertBefore(d, W), F = n, k(), A(!0);
|
|
850
|
+
} else if (t.parentNode === n) {
|
|
851
|
+
r = K(t);
|
|
852
|
+
var $ = 0, ee, j = d.parentNode !== n, X = !ro(d.animated && d.toRect || i, t.animated && t.toRect || r, g), me = g ? "top" : "left", ue = Zt(t, "top", "top") || Zt(d, "top", "top"), ce = ue ? ue.scrollTop : void 0;
|
|
853
|
+
Re !== t && (ee = r[me], et = !1, rt = !X && l.invertSwap || j), $ = ho(e, t, r, g, X ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, rt, Re === t);
|
|
854
|
+
var U;
|
|
855
|
+
if ($ !== 0) {
|
|
856
|
+
var Q = de(d);
|
|
857
|
+
do
|
|
858
|
+
Q -= $, U = F.children[Q];
|
|
859
|
+
while (U && (v(U, "display") === "none" || U === S));
|
|
860
|
+
}
|
|
861
|
+
if ($ === 0 || U === t)
|
|
862
|
+
return A(!1);
|
|
863
|
+
Re = t, Je = $;
|
|
864
|
+
var fe = t.nextElementSibling, te = !1;
|
|
865
|
+
te = $ === 1;
|
|
866
|
+
var Se = lt(P, n, d, i, t, r, e, te);
|
|
867
|
+
if (Se !== !1)
|
|
868
|
+
return (Se === 1 || Se === -1) && (te = Se === 1), Kt = !0, setTimeout(uo, 30), L(), te && !fe ? n.appendChild(d) : t.parentNode.insertBefore(d, te ? fe : t), ue && pn(ue, 0, ce - ue.scrollTop), F = d.parentNode, ee !== void 0 && !rt && (ht = Math.abs(ee - K(t)[me])), k(), A(!0);
|
|
869
|
+
}
|
|
870
|
+
if (n.contains(d))
|
|
871
|
+
return A(!1);
|
|
872
|
+
}
|
|
873
|
+
return !1;
|
|
874
|
+
},
|
|
875
|
+
_ignoreWhileAnimating: null,
|
|
876
|
+
_offMoveEvents: function() {
|
|
877
|
+
I(document, "mousemove", this._onTouchMove), I(document, "touchmove", this._onTouchMove), I(document, "pointermove", this._onTouchMove), I(document, "dragover", Me), I(document, "mousemove", Me), I(document, "touchmove", Me);
|
|
878
|
+
},
|
|
879
|
+
_offUpEvents: function() {
|
|
880
|
+
var e = this.el.ownerDocument;
|
|
881
|
+
I(e, "mouseup", this._onDrop), I(e, "touchend", this._onDrop), I(e, "pointerup", this._onDrop), I(e, "touchcancel", this._onDrop), I(document, "selectstart", this);
|
|
882
|
+
},
|
|
883
|
+
_onDrop: function(e) {
|
|
884
|
+
var n = this.el, t = this.options;
|
|
885
|
+
if (ae = de(d), Ae = de(d, t.draggable), J("drop", this, {
|
|
886
|
+
evt: e
|
|
887
|
+
}), F = d && d.parentNode, ae = de(d), Ae = de(d, t.draggable), p.eventCanceled) {
|
|
888
|
+
this._nulling();
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
Xe = !1, rt = !1, et = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Rt(this.cloneId), Rt(this._dragStartId), this.nativeDraggable && (I(document, "drop", this), I(n, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), qe && v(document.body, "user-select", ""), v(d, "transform", ""), e && (We && (e.cancelable && e.preventDefault(), !t.dropBubble && e.stopPropagation()), S && S.parentNode && S.parentNode.removeChild(S), (P === F || H && H.lastPutMode !== "clone") && B && B.parentNode && B.parentNode.removeChild(B), d && (this.nativeDraggable && I(d, "dragend", this), At(d), d.style["will-change"] = "", We && !Xe && re(d, H ? H.options.ghostClass : this.options.ghostClass, !1), re(d, this.options.chosenClass, !1), Z({
|
|
892
|
+
sortable: this,
|
|
893
|
+
name: "unchoose",
|
|
894
|
+
toEl: F,
|
|
895
|
+
newIndex: null,
|
|
896
|
+
newDraggableIndex: null,
|
|
897
|
+
originalEvent: e
|
|
898
|
+
}), P !== F ? (ae >= 0 && (Z({
|
|
899
|
+
rootEl: F,
|
|
900
|
+
name: "add",
|
|
901
|
+
toEl: F,
|
|
902
|
+
fromEl: P,
|
|
903
|
+
originalEvent: e
|
|
904
|
+
}), Z({
|
|
905
|
+
sortable: this,
|
|
906
|
+
name: "remove",
|
|
907
|
+
toEl: F,
|
|
908
|
+
originalEvent: e
|
|
909
|
+
}), Z({
|
|
910
|
+
rootEl: F,
|
|
911
|
+
name: "sort",
|
|
912
|
+
toEl: F,
|
|
913
|
+
fromEl: P,
|
|
914
|
+
originalEvent: e
|
|
915
|
+
}), Z({
|
|
916
|
+
sortable: this,
|
|
917
|
+
name: "sort",
|
|
918
|
+
toEl: F,
|
|
919
|
+
originalEvent: e
|
|
920
|
+
})), H && H.save()) : ae !== Le && ae >= 0 && (Z({
|
|
921
|
+
sortable: this,
|
|
922
|
+
name: "update",
|
|
923
|
+
toEl: F,
|
|
924
|
+
originalEvent: e
|
|
925
|
+
}), Z({
|
|
926
|
+
sortable: this,
|
|
927
|
+
name: "sort",
|
|
928
|
+
toEl: F,
|
|
929
|
+
originalEvent: e
|
|
930
|
+
})), p.active && ((ae == null || ae === -1) && (ae = Le, Ae = Qe), Z({
|
|
931
|
+
sortable: this,
|
|
932
|
+
name: "end",
|
|
933
|
+
toEl: F,
|
|
934
|
+
originalEvent: e
|
|
935
|
+
}), this.save()))), this._nulling();
|
|
936
|
+
},
|
|
937
|
+
_nulling: function() {
|
|
938
|
+
J("nulling", this), P = d = F = S = ze = B = ft = Pe = Be = pe = We = ae = Ae = Le = Qe = Re = Je = H = it = p.dragged = p.ghost = p.clone = p.active = null, wt.forEach(function(e) {
|
|
939
|
+
e.checked = !0;
|
|
940
|
+
}), wt.length = Nt = Ot = 0;
|
|
941
|
+
},
|
|
942
|
+
handleEvent: function(e) {
|
|
943
|
+
switch (e.type) {
|
|
944
|
+
case "drop":
|
|
945
|
+
case "dragend":
|
|
946
|
+
this._onDrop(e);
|
|
947
|
+
break;
|
|
948
|
+
case "dragenter":
|
|
949
|
+
case "dragover":
|
|
950
|
+
d && (this._onDragOver(e), so(e));
|
|
951
|
+
break;
|
|
952
|
+
case "selectstart":
|
|
953
|
+
e.preventDefault();
|
|
954
|
+
break;
|
|
955
|
+
}
|
|
956
|
+
},
|
|
957
|
+
/**
|
|
958
|
+
* Serializes the item into an array of string.
|
|
959
|
+
* @returns {String[]}
|
|
960
|
+
*/
|
|
961
|
+
toArray: function() {
|
|
962
|
+
for (var e = [], n, t = this.el.children, i = 0, r = t.length, a = this.options; i < r; i++)
|
|
963
|
+
n = t[i], ye(n, a.draggable, this.el, !1) && e.push(n.getAttribute(a.dataIdAttr) || go(n));
|
|
964
|
+
return e;
|
|
965
|
+
},
|
|
966
|
+
/**
|
|
967
|
+
* Sorts the elements according to the array.
|
|
968
|
+
* @param {String[]} order order of the items
|
|
969
|
+
*/
|
|
970
|
+
sort: function(e, n) {
|
|
971
|
+
var t = {}, i = this.el;
|
|
972
|
+
this.toArray().forEach(function(r, a) {
|
|
973
|
+
var l = i.children[a];
|
|
974
|
+
ye(l, this.options.draggable, i, !1) && (t[r] = l);
|
|
975
|
+
}, this), n && this.captureAnimationState(), e.forEach(function(r) {
|
|
976
|
+
t[r] && (i.removeChild(t[r]), i.appendChild(t[r]));
|
|
977
|
+
}), n && this.animateAll();
|
|
978
|
+
},
|
|
979
|
+
/**
|
|
980
|
+
* Save the current sorting
|
|
981
|
+
*/
|
|
982
|
+
save: function() {
|
|
983
|
+
var e = this.options.store;
|
|
984
|
+
e && e.set && e.set(this);
|
|
985
|
+
},
|
|
986
|
+
/**
|
|
987
|
+
* 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.
|
|
988
|
+
* @param {HTMLElement} el
|
|
989
|
+
* @param {String} [selector] default: `options.draggable`
|
|
990
|
+
* @returns {HTMLElement|null}
|
|
991
|
+
*/
|
|
992
|
+
closest: function(e, n) {
|
|
993
|
+
return ye(e, n || this.options.draggable, this.el, !1);
|
|
994
|
+
},
|
|
995
|
+
/**
|
|
996
|
+
* Set/get option
|
|
997
|
+
* @param {string} name
|
|
998
|
+
* @param {*} [value]
|
|
999
|
+
* @returns {*}
|
|
1000
|
+
*/
|
|
1001
|
+
option: function(e, n) {
|
|
1002
|
+
var t = this.options;
|
|
1003
|
+
if (n === void 0)
|
|
1004
|
+
return t[e];
|
|
1005
|
+
var i = nt.modifyOption(this, e, n);
|
|
1006
|
+
typeof i < "u" ? t[e] = i : t[e] = n, e === "group" && bn(t);
|
|
1007
|
+
},
|
|
1008
|
+
/**
|
|
1009
|
+
* Destroy
|
|
1010
|
+
*/
|
|
1011
|
+
destroy: function() {
|
|
1012
|
+
J("destroy", this);
|
|
1013
|
+
var e = this.el;
|
|
1014
|
+
e[se] = null, I(e, "mousedown", this._onTapStart), I(e, "touchstart", this._onTapStart), I(e, "pointerdown", this._onTapStart), this.nativeDraggable && (I(e, "dragover", this), I(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(n) {
|
|
1015
|
+
n.removeAttribute("draggable");
|
|
1016
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), yt.splice(yt.indexOf(this.el), 1), this.el = e = null;
|
|
1017
|
+
},
|
|
1018
|
+
_hideClone: function() {
|
|
1019
|
+
if (!Pe) {
|
|
1020
|
+
if (J("hideClone", this), p.eventCanceled) return;
|
|
1021
|
+
v(B, "display", "none"), this.options.removeCloneOnHide && B.parentNode && B.parentNode.removeChild(B), Pe = !0;
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
_showClone: function(e) {
|
|
1025
|
+
if (e.lastPutMode !== "clone") {
|
|
1026
|
+
this._hideClone();
|
|
1027
|
+
return;
|
|
1028
|
+
}
|
|
1029
|
+
if (Pe) {
|
|
1030
|
+
if (J("showClone", this), p.eventCanceled) return;
|
|
1031
|
+
d.parentNode == P && !this.options.group.revertClone ? P.insertBefore(B, d) : ze ? P.insertBefore(B, ze) : P.appendChild(B), this.options.group.revertClone && this.animate(d, B), v(B, "display", ""), Pe = !1;
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
};
|
|
1035
|
+
function so(o) {
|
|
1036
|
+
o.dataTransfer && (o.dataTransfer.dropEffect = "move"), o.cancelable && o.preventDefault();
|
|
1037
|
+
}
|
|
1038
|
+
function lt(o, e, n, t, i, r, a, l) {
|
|
1039
|
+
var s, u = o[se], f = u.options.onMove, c;
|
|
1040
|
+
return window.CustomEvent && !Ne && !tt ? s = new CustomEvent("move", {
|
|
1041
|
+
bubbles: !0,
|
|
1042
|
+
cancelable: !0
|
|
1043
|
+
}) : (s = document.createEvent("Event"), s.initEvent("move", !0, !0)), s.to = e, s.from = o, s.dragged = n, s.draggedRect = t, s.related = i || e, s.relatedRect = r || K(e), s.willInsertAfter = l, s.originalEvent = a, o.dispatchEvent(s), f && (c = f.call(u, s, a)), c;
|
|
1044
|
+
}
|
|
1045
|
+
function At(o) {
|
|
1046
|
+
o.draggable = !1;
|
|
1047
|
+
}
|
|
1048
|
+
function uo() {
|
|
1049
|
+
Kt = !1;
|
|
1050
|
+
}
|
|
1051
|
+
function co(o, e, n) {
|
|
1052
|
+
var t = K(Ge(n.el, 0, n.options, !0)), i = 10;
|
|
1053
|
+
return e ? o.clientX < t.left - i || o.clientY < t.top && o.clientX < t.right : o.clientY < t.top - i || o.clientY < t.bottom && o.clientX < t.left;
|
|
1054
|
+
}
|
|
1055
|
+
function fo(o, e, n) {
|
|
1056
|
+
var t = K(Yt(n.el, n.options.draggable)), i = 10;
|
|
1057
|
+
return e ? o.clientX > t.right + i || o.clientX <= t.right && o.clientY > t.bottom && o.clientX >= t.left : o.clientX > t.right && o.clientY > t.top || o.clientX <= t.right && o.clientY > t.bottom + i;
|
|
1058
|
+
}
|
|
1059
|
+
function ho(o, e, n, t, i, r, a, l) {
|
|
1060
|
+
var s = t ? o.clientY : o.clientX, u = t ? n.height : n.width, f = t ? n.top : n.left, c = t ? n.bottom : n.right, w = !1;
|
|
1061
|
+
if (!a) {
|
|
1062
|
+
if (l && ht < u * i) {
|
|
1063
|
+
if (!et && (Je === 1 ? s > f + u * r / 2 : s < c - u * r / 2) && (et = !0), et)
|
|
1064
|
+
w = !0;
|
|
1065
|
+
else if (Je === 1 ? s < f + ht : s > c - ht)
|
|
1066
|
+
return -Je;
|
|
1067
|
+
} else if (s > f + u * (1 - i) / 2 && s < c - u * (1 - i) / 2)
|
|
1068
|
+
return po(e);
|
|
1069
|
+
}
|
|
1070
|
+
return w = w || a, w && (s < f + u * r / 2 || s > c - u * r / 2) ? s > f + u / 2 ? 1 : -1 : 0;
|
|
1071
|
+
}
|
|
1072
|
+
function po(o) {
|
|
1073
|
+
return de(d) < de(o) ? 1 : -1;
|
|
1074
|
+
}
|
|
1075
|
+
function go(o) {
|
|
1076
|
+
for (var e = o.tagName + o.className + o.src + o.href + o.textContent, n = e.length, t = 0; n--; )
|
|
1077
|
+
t += e.charCodeAt(n);
|
|
1078
|
+
return t.toString(36);
|
|
1079
|
+
}
|
|
1080
|
+
function mo(o) {
|
|
1081
|
+
wt.length = 0;
|
|
1082
|
+
for (var e = o.getElementsByTagName("input"), n = e.length; n--; ) {
|
|
1083
|
+
var t = e[n];
|
|
1084
|
+
t.checked && wt.push(t);
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
function pt(o) {
|
|
1088
|
+
return setTimeout(o, 0);
|
|
1089
|
+
}
|
|
1090
|
+
function Rt(o) {
|
|
1091
|
+
return clearTimeout(o);
|
|
1092
|
+
}
|
|
1093
|
+
St && O(document, "touchmove", function(o) {
|
|
1094
|
+
(p.active || Xe) && o.cancelable && o.preventDefault();
|
|
1095
|
+
});
|
|
1096
|
+
p.utils = {
|
|
1097
|
+
on: O,
|
|
1098
|
+
off: I,
|
|
1099
|
+
css: v,
|
|
1100
|
+
find: fn,
|
|
1101
|
+
is: function(e, n) {
|
|
1102
|
+
return !!ye(e, n, e, !1);
|
|
1103
|
+
},
|
|
1104
|
+
extend: Zn,
|
|
1105
|
+
throttle: hn,
|
|
1106
|
+
closest: ye,
|
|
1107
|
+
toggleClass: re,
|
|
1108
|
+
clone: gn,
|
|
1109
|
+
index: de,
|
|
1110
|
+
nextTick: pt,
|
|
1111
|
+
cancelNextTick: Rt,
|
|
1112
|
+
detectDirection: vn,
|
|
1113
|
+
getChild: Ge
|
|
1114
|
+
};
|
|
1115
|
+
p.get = function(o) {
|
|
1116
|
+
return o[se];
|
|
1117
|
+
};
|
|
1118
|
+
p.mount = function() {
|
|
1119
|
+
for (var o = arguments.length, e = new Array(o), n = 0; n < o; n++)
|
|
1120
|
+
e[n] = arguments[n];
|
|
1121
|
+
e[0].constructor === Array && (e = e[0]), e.forEach(function(t) {
|
|
1122
|
+
if (!t.prototype || !t.prototype.constructor)
|
|
1123
|
+
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));
|
|
1124
|
+
t.utils && (p.utils = Ee(Ee({}, p.utils), t.utils)), nt.mount(t);
|
|
1125
|
+
});
|
|
1126
|
+
};
|
|
1127
|
+
p.create = function(o, e) {
|
|
1128
|
+
return new p(o, e);
|
|
1129
|
+
};
|
|
1130
|
+
p.version = Wn;
|
|
1131
|
+
var z = [], $e, Xt, Lt = !1, Pt, Ft, Et, Ue;
|
|
1132
|
+
function vo() {
|
|
1133
|
+
function o() {
|
|
1134
|
+
this.defaults = {
|
|
1135
|
+
scroll: !0,
|
|
1136
|
+
forceAutoScrollFallback: !1,
|
|
1137
|
+
scrollSensitivity: 30,
|
|
1138
|
+
scrollSpeed: 10,
|
|
1139
|
+
bubbleScroll: !0
|
|
1140
|
+
};
|
|
1141
|
+
for (var e in this)
|
|
1142
|
+
e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
1143
|
+
}
|
|
1144
|
+
return o.prototype = {
|
|
1145
|
+
dragStarted: function(n) {
|
|
1146
|
+
var t = n.originalEvent;
|
|
1147
|
+
this.sortable.nativeDraggable ? O(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? O(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? O(document, "touchmove", this._handleFallbackAutoScroll) : O(document, "mousemove", this._handleFallbackAutoScroll);
|
|
1148
|
+
},
|
|
1149
|
+
dragOverCompleted: function(n) {
|
|
1150
|
+
var t = n.originalEvent;
|
|
1151
|
+
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
1152
|
+
},
|
|
1153
|
+
drop: function() {
|
|
1154
|
+
this.sortable.nativeDraggable ? I(document, "dragover", this._handleAutoScroll) : (I(document, "pointermove", this._handleFallbackAutoScroll), I(document, "touchmove", this._handleFallbackAutoScroll), I(document, "mousemove", this._handleFallbackAutoScroll)), nn(), gt(), Qn();
|
|
1155
|
+
},
|
|
1156
|
+
nulling: function() {
|
|
1157
|
+
Et = Xt = $e = Lt = Ue = Pt = Ft = null, z.length = 0;
|
|
1158
|
+
},
|
|
1159
|
+
_handleFallbackAutoScroll: function(n) {
|
|
1160
|
+
this._handleAutoScroll(n, !0);
|
|
1161
|
+
},
|
|
1162
|
+
_handleAutoScroll: function(n, t) {
|
|
1163
|
+
var i = this, r = (n.touches ? n.touches[0] : n).clientX, a = (n.touches ? n.touches[0] : n).clientY, l = document.elementFromPoint(r, a);
|
|
1164
|
+
if (Et = n, t || this.options.forceAutoScrollFallback || tt || Ne || qe) {
|
|
1165
|
+
Bt(n, this.options, l, t);
|
|
1166
|
+
var s = Fe(l, !0);
|
|
1167
|
+
Lt && (!Ue || r !== Pt || a !== Ft) && (Ue && nn(), Ue = setInterval(function() {
|
|
1168
|
+
var u = Fe(document.elementFromPoint(r, a), !0);
|
|
1169
|
+
u !== s && (s = u, gt()), Bt(n, i.options, u, t);
|
|
1170
|
+
}, 10), Pt = r, Ft = a);
|
|
1171
|
+
} else {
|
|
1172
|
+
if (!this.options.bubbleScroll || Fe(l, !0) === we()) {
|
|
1173
|
+
gt();
|
|
1174
|
+
return;
|
|
1175
|
+
}
|
|
1176
|
+
Bt(n, this.options, Fe(l, !1), !1);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
}, Ie(o, {
|
|
1180
|
+
pluginName: "scroll",
|
|
1181
|
+
initializeByDefault: !0
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
function gt() {
|
|
1185
|
+
z.forEach(function(o) {
|
|
1186
|
+
clearInterval(o.pid);
|
|
1187
|
+
}), z = [];
|
|
1188
|
+
}
|
|
1189
|
+
function nn() {
|
|
1190
|
+
clearInterval(Ue);
|
|
1191
|
+
}
|
|
1192
|
+
var Bt = hn(function(o, e, n, t) {
|
|
1193
|
+
if (e.scroll) {
|
|
1194
|
+
var i = (o.touches ? o.touches[0] : o).clientX, r = (o.touches ? o.touches[0] : o).clientY, a = e.scrollSensitivity, l = e.scrollSpeed, s = we(), u = !1, f;
|
|
1195
|
+
Xt !== n && (Xt = n, gt(), $e = e.scroll, f = e.scrollFn, $e === !0 && ($e = Fe(n, !0)));
|
|
1196
|
+
var c = 0, w = $e;
|
|
1197
|
+
do {
|
|
1198
|
+
var g = w, _ = K(g), D = _.top, R = _.bottom, L = _.left, A = _.right, k = _.width, Y = _.height, W = void 0, $ = void 0, ee = g.scrollWidth, j = g.scrollHeight, X = v(g), me = g.scrollLeft, ue = g.scrollTop;
|
|
1199
|
+
g === s ? (W = k < ee && (X.overflowX === "auto" || X.overflowX === "scroll" || X.overflowX === "visible"), $ = Y < j && (X.overflowY === "auto" || X.overflowY === "scroll" || X.overflowY === "visible")) : (W = k < ee && (X.overflowX === "auto" || X.overflowX === "scroll"), $ = Y < j && (X.overflowY === "auto" || X.overflowY === "scroll"));
|
|
1200
|
+
var ce = W && (Math.abs(A - i) <= a && me + k < ee) - (Math.abs(L - i) <= a && !!me), U = $ && (Math.abs(R - r) <= a && ue + Y < j) - (Math.abs(D - r) <= a && !!ue);
|
|
1201
|
+
if (!z[c])
|
|
1202
|
+
for (var Q = 0; Q <= c; Q++)
|
|
1203
|
+
z[Q] || (z[Q] = {});
|
|
1204
|
+
(z[c].vx != ce || z[c].vy != U || z[c].el !== g) && (z[c].el = g, z[c].vx = ce, z[c].vy = U, clearInterval(z[c].pid), (ce != 0 || U != 0) && (u = !0, z[c].pid = setInterval((function() {
|
|
1205
|
+
t && this.layer === 0 && p.active._onTouchMove(Et);
|
|
1206
|
+
var fe = z[this.layer].vy ? z[this.layer].vy * l : 0, te = z[this.layer].vx ? z[this.layer].vx * l : 0;
|
|
1207
|
+
typeof f == "function" && f.call(p.dragged.parentNode[se], te, fe, o, Et, z[this.layer].el) !== "continue" || pn(z[this.layer].el, te, fe);
|
|
1208
|
+
}).bind({
|
|
1209
|
+
layer: c
|
|
1210
|
+
}), 24))), c++;
|
|
1211
|
+
} while (e.bubbleScroll && w !== s && (w = Fe(w, !1)));
|
|
1212
|
+
Lt = u;
|
|
1213
|
+
}
|
|
1214
|
+
}, 30), En = function(e) {
|
|
1215
|
+
var n = e.originalEvent, t = e.putSortable, i = e.dragEl, r = e.activeSortable, a = e.dispatchSortableEvent, l = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
1216
|
+
if (n) {
|
|
1217
|
+
var u = t || r;
|
|
1218
|
+
l();
|
|
1219
|
+
var f = n.changedTouches && n.changedTouches.length ? n.changedTouches[0] : n, c = document.elementFromPoint(f.clientX, f.clientY);
|
|
1220
|
+
s(), u && !u.el.contains(c) && (a("spill"), this.onSpill({
|
|
1221
|
+
dragEl: i,
|
|
1222
|
+
putSortable: t
|
|
1223
|
+
}));
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
function Gt() {
|
|
1227
|
+
}
|
|
1228
|
+
Gt.prototype = {
|
|
1229
|
+
startIndex: null,
|
|
1230
|
+
dragStart: function(e) {
|
|
1231
|
+
var n = e.oldDraggableIndex;
|
|
1232
|
+
this.startIndex = n;
|
|
1233
|
+
},
|
|
1234
|
+
onSpill: function(e) {
|
|
1235
|
+
var n = e.dragEl, t = e.putSortable;
|
|
1236
|
+
this.sortable.captureAnimationState(), t && t.captureAnimationState();
|
|
1237
|
+
var i = Ge(this.sortable.el, this.startIndex, this.options);
|
|
1238
|
+
i ? this.sortable.el.insertBefore(n, i) : this.sortable.el.appendChild(n), this.sortable.animateAll(), t && t.animateAll();
|
|
1239
|
+
},
|
|
1240
|
+
drop: En
|
|
1241
|
+
};
|
|
1242
|
+
Ie(Gt, {
|
|
1243
|
+
pluginName: "revertOnSpill"
|
|
1244
|
+
});
|
|
1245
|
+
function Ht() {
|
|
1246
|
+
}
|
|
1247
|
+
Ht.prototype = {
|
|
1248
|
+
onSpill: function(e) {
|
|
1249
|
+
var n = e.dragEl, t = e.putSortable, i = t || this.sortable;
|
|
1250
|
+
i.captureAnimationState(), n.parentNode && n.parentNode.removeChild(n), i.animateAll();
|
|
1251
|
+
},
|
|
1252
|
+
drop: En
|
|
1253
|
+
};
|
|
1254
|
+
Ie(Ht, {
|
|
1255
|
+
pluginName: "removeOnSpill"
|
|
1256
|
+
});
|
|
1257
|
+
p.mount(new vo());
|
|
1258
|
+
p.mount(Ht, Gt);
|
|
1259
|
+
const bo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1260
|
+
__proto__: null,
|
|
1261
|
+
Sortable: p,
|
|
1262
|
+
default: p
|
|
1263
|
+
}, Symbol.toStringTag, { value: "Module" })), yo = ["sm", "md", "lg"], on = { none: "gap-none", sm: "gap-sm", md: "gap-md", lg: "gap-lg" }, [wo, Eo] = Bn("CheckboxGroup"), So = ["data-parents", "data-key", "data-draggable"], _o = ["tabindex"], Co = ["data-parents", "data-level"], Do = /* @__PURE__ */ rn({
|
|
1264
|
+
...un("TreeNode"),
|
|
1265
|
+
__name: "TreeNode",
|
|
1266
|
+
props: {
|
|
1267
|
+
item: {},
|
|
1268
|
+
level: { default: 1 },
|
|
1269
|
+
parentKeys: {}
|
|
1270
|
+
},
|
|
1271
|
+
setup(o) {
|
|
1272
|
+
const e = o, n = an(), t = wo(), i = sn(t.prefixes.node, {
|
|
1273
|
+
variants: {
|
|
1274
|
+
disabled: Te("disabled", t.prefixes.node),
|
|
1275
|
+
active: Te("active", t.prefixes.node),
|
|
1276
|
+
hasChildren: Te("has-children", t.prefixes.node)
|
|
1277
|
+
}
|
|
1278
|
+
}), r = M(() => {
|
|
1279
|
+
switch (t.size.value) {
|
|
1280
|
+
case "sm":
|
|
1281
|
+
return "2xsm";
|
|
1282
|
+
case "md":
|
|
1283
|
+
case "lg":
|
|
1284
|
+
return "xsm";
|
|
1285
|
+
}
|
|
1286
|
+
}), a = M(() => {
|
|
1287
|
+
switch (t.size.value) {
|
|
1288
|
+
case "sm":
|
|
1289
|
+
return "2xsm";
|
|
1290
|
+
default:
|
|
1291
|
+
return "xsm";
|
|
1292
|
+
}
|
|
1293
|
+
}), l = (E) => t.getNodeField(E, "children"), s = (E) => t.getNodeField(E, "key"), u = M(() => l(e.item)), f = M(() => t.getNodeField(e.item, "leaf")), c = M(() => t.props.draggable ? t.getNodeField(e.item, "draggable") ?? !0 : !1), w = M(() => s(e.item)), g = M(
|
|
1294
|
+
() => !!(t.disabled.value || t.getNodeField(e.item, "disabled"))
|
|
1295
|
+
), _ = M(
|
|
1296
|
+
() => {
|
|
1297
|
+
var E;
|
|
1298
|
+
return !!((E = u.value) != null && E.some((m) => t.expandedKeys.value.includes(s(m))));
|
|
1299
|
+
}
|
|
1300
|
+
), D = M(
|
|
1301
|
+
() => !(e.item.dragging ?? !1) && t.expandedKeys.value.includes(w.value)
|
|
1302
|
+
), R = M(() => {
|
|
1303
|
+
var E;
|
|
1304
|
+
return !!(!t.dragging.value && t.props.showLine && D.value && ((E = u.value) != null && E.length));
|
|
1305
|
+
}), L = () => {
|
|
1306
|
+
g.value || (t.props.syncCheckboxAndSelect ? W() : t.onSelect(e.item));
|
|
1307
|
+
}, A = M(() => !!t.model.value.includes(w.value)), k = M(() => {
|
|
1308
|
+
const E = (T = e.item) => {
|
|
1309
|
+
const b = l(T);
|
|
1310
|
+
return (b == null ? void 0 : b.length) && b.every((N) => t.checked.value.includes(s(N)));
|
|
1311
|
+
}, m = (T = e.item) => {
|
|
1312
|
+
const b = l(T);
|
|
1313
|
+
return b != null && b.length ? !!(b != null && b.some(
|
|
1314
|
+
(N) => t.checked.value.includes(s(N)) || m(N)
|
|
1315
|
+
)) : !1;
|
|
1316
|
+
}, h = t.checked.value.includes(w.value);
|
|
1317
|
+
return E() ? (h || t.onCheck(e.item), !0) : m() ? (h && t.onCheck(e.item), "indeterminate") : !!h;
|
|
1318
|
+
}), Y = (E) => {
|
|
1319
|
+
t.props.syncCheckboxAndSelect || E == null || E.stopPropagation();
|
|
1320
|
+
}, W = (E) => {
|
|
1321
|
+
var T;
|
|
1322
|
+
if (E !== void 0 && t.props.syncCheckboxAndSelect) return;
|
|
1323
|
+
if (!((T = u.value) != null && T.length))
|
|
1324
|
+
return t.props.syncCheckboxAndSelect && t.onSelect(e.item), t.onCheck(e.item);
|
|
1325
|
+
const m = (b = e.item) => {
|
|
1326
|
+
const N = l(b);
|
|
1327
|
+
return N != null && N.length ? N.reduce((ve, ne) => {
|
|
1328
|
+
const G = l(ne), oe = s(ne);
|
|
1329
|
+
return G != null && G.length ? [...ve, oe, ...m(ne)] : [...ve, oe];
|
|
1330
|
+
}, []) : [];
|
|
1331
|
+
}, h = m(), C = {
|
|
1332
|
+
keys: [w.value, ...h],
|
|
1333
|
+
value: !t.checked.value.includes(w.value)
|
|
1334
|
+
};
|
|
1335
|
+
return t.props.syncCheckboxAndSelect && t.onSelect(e.item, C), t.onCheck(e.item, C);
|
|
1336
|
+
}, $ = M(() => [...e.parentKeys ?? [], w.value]), ee = (E) => {
|
|
1337
|
+
t.onExpandKey(e.item, E);
|
|
1338
|
+
}, j = M(() => e.item.dragging_level ?? e.level), X = M(() => j.value + 1), me = be(), ue = be();
|
|
1339
|
+
t.useSortable({
|
|
1340
|
+
root: me,
|
|
1341
|
+
instance: ue,
|
|
1342
|
+
node: e.item
|
|
1343
|
+
});
|
|
1344
|
+
const ce = M(() => {
|
|
1345
|
+
switch (t.size.value) {
|
|
1346
|
+
case "sm":
|
|
1347
|
+
return "2xsm";
|
|
1348
|
+
case "md":
|
|
1349
|
+
return "xsm";
|
|
1350
|
+
case "lg":
|
|
1351
|
+
return "sm";
|
|
1352
|
+
}
|
|
1353
|
+
}), { rootBindings: U, inputBindings: Q } = Rn({
|
|
1354
|
+
getDisabled: () => g.value
|
|
1355
|
+
}), fe = M(
|
|
1356
|
+
() => {
|
|
1357
|
+
var E, m;
|
|
1358
|
+
return !!((E = u.value) != null && E.length || (m = t.props) != null && m.lazyLoad && !f.value);
|
|
1359
|
+
}
|
|
1360
|
+
), te = _n("indent"), { width: Se, height: _e } = Ln(te);
|
|
1361
|
+
return (E, m) => {
|
|
1362
|
+
var C, T, b, N, ve, ne, G, oe, x, q;
|
|
1363
|
+
const h = Cn("TreeNode", !0);
|
|
1364
|
+
return le(), De("div", st({
|
|
1365
|
+
"data-parents": (C = y(t).props) != null && C.draggable ? E.parentKeys : void 0,
|
|
1366
|
+
"data-key": (T = y(t).props) != null && T.draggable ? w.value : void 0,
|
|
1367
|
+
"data-draggable": (b = y(t).props) != null && b.draggable ? !g.value && c.value : void 0,
|
|
1368
|
+
class: [
|
|
1369
|
+
(N = u.value) != null && N.length ? y(t).prefixes.group : "",
|
|
1370
|
+
y(ge)(y(t).prefixes.node, "root"),
|
|
1371
|
+
y(t).getNodeField(E.item, "class"),
|
|
1372
|
+
{
|
|
1373
|
+
[y(zt)(y(t).prefixes.group, "child-expanded")]: _.value,
|
|
1374
|
+
[y(zt)(y(t).prefixes.group, "draggable")]: (ve = y(t).props) == null ? void 0 : ve.draggable
|
|
1375
|
+
}
|
|
1376
|
+
]
|
|
1377
|
+
}, y(U), {
|
|
1378
|
+
style: {
|
|
1379
|
+
"--ptc-tree-node-indent-height": `${y(_e)}px`,
|
|
1380
|
+
"--ptc-tree-node-indent-width": `${y(Se)}px`
|
|
1381
|
+
}
|
|
1382
|
+
}), [
|
|
1383
|
+
R.value ? (le(), De("div", {
|
|
1384
|
+
key: 0,
|
|
1385
|
+
class: ke(y(ge)(y(t).prefixes.group, "line"))
|
|
1386
|
+
}, null, 2)) : He("", !0),
|
|
1387
|
+
Vt("div", st({
|
|
1388
|
+
tabindex: g.value ? void 0 : 0,
|
|
1389
|
+
class: [
|
|
1390
|
+
y(i)({
|
|
1391
|
+
disabled: g.value,
|
|
1392
|
+
active: A.value,
|
|
1393
|
+
hasChildren: fe.value
|
|
1394
|
+
})
|
|
1395
|
+
]
|
|
1396
|
+
}, y(Q), { onClick: L }), [
|
|
1397
|
+
(ne = y(t).props) != null && ne.draggable ? (le(), De("span", {
|
|
1398
|
+
key: 0,
|
|
1399
|
+
class: ke(y(t).prefixes.draggable)
|
|
1400
|
+
}, [
|
|
1401
|
+
!E.item.dragging && !y(t).dragging.value ? (le(), ut(zn, {
|
|
1402
|
+
key: 0,
|
|
1403
|
+
icon: "tabler:grip-vertical",
|
|
1404
|
+
size: a.value,
|
|
1405
|
+
class: ke(y(t).prefixes.draggableIcon)
|
|
1406
|
+
}, {
|
|
1407
|
+
default: dt(() => [
|
|
1408
|
+
Ve(E.$slots, "dragTrigger", Ct(Dt({ ...E.item, selected: A.value, checked: k.value, disabled: g.value, unFocusable: !0 })))
|
|
1409
|
+
]),
|
|
1410
|
+
_: 3
|
|
1411
|
+
}, 8, ["size", "class"])) : He("", !0)
|
|
1412
|
+
], 2)) : He("", !0),
|
|
1413
|
+
Tn(Mn, {
|
|
1414
|
+
ref_key: "indent",
|
|
1415
|
+
ref: te,
|
|
1416
|
+
level: j.value,
|
|
1417
|
+
children: fe.value,
|
|
1418
|
+
size: ce.value,
|
|
1419
|
+
expanded: D.value,
|
|
1420
|
+
showLine: !1,
|
|
1421
|
+
class: ke(y(ge)(y(t).prefixes.node, "indent")),
|
|
1422
|
+
loading: y(t).getNodeField(E.item, "loading"),
|
|
1423
|
+
"branch-icon": y(t).getNodeField(E.item, "switcherIcon") ?? ((G = y(t).props) == null ? void 0 : G.switcherIcon),
|
|
1424
|
+
"no-rotate-branch": y(t).getNodeField(E.item, "noRotateSwitcherIcon") ?? ((oe = y(t).props) == null ? void 0 : oe.noRotateSwitcherIcon),
|
|
1425
|
+
onToggleExpand: m[0] || (m[0] = xn((ie) => ee(), ["stop"]))
|
|
1426
|
+
}, {
|
|
1427
|
+
default: dt(() => [
|
|
1428
|
+
Ve(E.$slots, "switcherIcon", Ct(Dt({ ...E.item, selected: A.value, checked: k.value, expanded: D.value, disabled: g.value, unFocusable: !0 })))
|
|
1429
|
+
]),
|
|
1430
|
+
_: 3
|
|
1431
|
+
}, 8, ["level", "children", "size", "expanded", "class", "loading", "branch-icon", "no-rotate-branch"]),
|
|
1432
|
+
!E.item.dragging || !y(t).dragging.value ? (le(), De(Mt, { key: 1 }, [
|
|
1433
|
+
(x = y(t).props) != null && x.checkbox ? (le(), ut(Kn, {
|
|
1434
|
+
key: 0,
|
|
1435
|
+
size: r.value,
|
|
1436
|
+
onClick: Y,
|
|
1437
|
+
modelValue: k.value,
|
|
1438
|
+
"onUpdate:modelValue": W,
|
|
1439
|
+
disabled: g.value
|
|
1440
|
+
}, null, 8, ["size", "modelValue", "disabled"])) : He("", !0),
|
|
1441
|
+
Ve(E.$slots, "title", Ct(Dt({ ...E.item, selected: A.value, checked: k.value, disabled: g.value, unFocusable: !0 })), () => [
|
|
1442
|
+
Vt("div", {
|
|
1443
|
+
class: ke(y(ge)(y(t).prefixes.node, "title"))
|
|
1444
|
+
}, In(y(t).getNodeField(E.item, "title")), 3)
|
|
1445
|
+
])
|
|
1446
|
+
], 64)) : (le(), De("div", {
|
|
1447
|
+
key: 2,
|
|
1448
|
+
class: ke(y(ge)(y(t).prefixes.node, "slot"))
|
|
1449
|
+
}, null, 2))
|
|
1450
|
+
], 16, _o),
|
|
1451
|
+
(q = u.value) != null && q.length ? Dn((le(), De("div", {
|
|
1452
|
+
key: 1,
|
|
1453
|
+
class: ke(y(t).prefixes.groupList),
|
|
1454
|
+
ref_key: "root",
|
|
1455
|
+
ref: me,
|
|
1456
|
+
"data-parents": y(t).props.draggable ? $.value : void 0,
|
|
1457
|
+
"data-level": y(t).props.draggable ? X.value : void 0
|
|
1458
|
+
}, [
|
|
1459
|
+
(le(!0), De(Mt, null, mt(l(E.item), (ie) => (le(), ut(h, {
|
|
1460
|
+
key: y(t).getNodeField(ie, "key"),
|
|
1461
|
+
parentKeys: $.value,
|
|
1462
|
+
item: ie,
|
|
1463
|
+
level: X.value
|
|
1464
|
+
}, ln({ _: 2 }, [
|
|
1465
|
+
mt(Object.keys(n), (Ce) => ({
|
|
1466
|
+
name: Ce,
|
|
1467
|
+
fn: dt((Oe) => [
|
|
1468
|
+
Ve(E.$slots, Ce, st({ ref_for: !0 }, Oe))
|
|
1469
|
+
])
|
|
1470
|
+
}))
|
|
1471
|
+
]), 1032, ["parentKeys", "item", "level"]))), 128))
|
|
1472
|
+
], 10, Co)), [
|
|
1473
|
+
[Nn, D.value]
|
|
1474
|
+
]) : He("", !0)
|
|
1475
|
+
], 16, So);
|
|
1476
|
+
};
|
|
1477
|
+
}
|
|
1478
|
+
}), Ro = /* @__PURE__ */ rn({
|
|
1479
|
+
...un("Tree"),
|
|
1480
|
+
__name: "Tree",
|
|
1481
|
+
props: {
|
|
1482
|
+
class: {},
|
|
1483
|
+
size: { default: "md" },
|
|
1484
|
+
gap: {},
|
|
1485
|
+
dir: {},
|
|
1486
|
+
data: {},
|
|
1487
|
+
modelValue: {},
|
|
1488
|
+
value: {},
|
|
1489
|
+
checkedKeys: {},
|
|
1490
|
+
expandedKeys: {},
|
|
1491
|
+
multiple: { type: Boolean },
|
|
1492
|
+
checkbox: { type: Boolean },
|
|
1493
|
+
syncCheckboxAndSelect: { type: Boolean },
|
|
1494
|
+
defaultExpandAll: { type: Boolean },
|
|
1495
|
+
selectable: { type: Boolean },
|
|
1496
|
+
showLine: { type: Boolean },
|
|
1497
|
+
inlineNode: { type: Boolean },
|
|
1498
|
+
lazyLoad: { type: Boolean },
|
|
1499
|
+
forceMount: { type: Boolean },
|
|
1500
|
+
fieldNames: {},
|
|
1501
|
+
groupName: {},
|
|
1502
|
+
getSortableProps: {},
|
|
1503
|
+
switcherIcon: {},
|
|
1504
|
+
noRotateSwitcherIcon: { type: Boolean },
|
|
1505
|
+
draggable: { type: Boolean },
|
|
1506
|
+
disabled: { type: Boolean }
|
|
1507
|
+
},
|
|
1508
|
+
emits: ["update:modelValue", "update:value", "update:expandedKeys", "update:checkedKeys", "expand", "select", "check", "dragStart", "dragEnd", "move", "choose", "unchoose"],
|
|
1509
|
+
setup(o, { emit: e }) {
|
|
1510
|
+
const n = o, t = e, i = an(), r = Pn("tree"), a = ge(r, "node"), l = ge(a, "group"), s = ge(a, "draggable"), u = ge(s, "icon"), f = ge(l, "list"), c = {
|
|
1511
|
+
node: a,
|
|
1512
|
+
group: l,
|
|
1513
|
+
draggable: s,
|
|
1514
|
+
draggableIcon: u,
|
|
1515
|
+
groupList: f
|
|
1516
|
+
}, w = sn(r, {
|
|
1517
|
+
variants: {
|
|
1518
|
+
size: Te(yo, r),
|
|
1519
|
+
gap: Te(on, r),
|
|
1520
|
+
selectable: Te("selectable", r),
|
|
1521
|
+
disabled: Te("disabled", r),
|
|
1522
|
+
inlineNode: Te("inline-node", r),
|
|
1523
|
+
dragging: Te("dragging", r)
|
|
1524
|
+
}
|
|
1525
|
+
}), g = (m, h) => {
|
|
1526
|
+
var T;
|
|
1527
|
+
const C = Wt(m, h);
|
|
1528
|
+
return (T = n.fieldNames) != null && T[h] ? Wt(m, n.fieldNames[h], C) : C;
|
|
1529
|
+
}, _ = be(he(n.data)), D = () => {
|
|
1530
|
+
if (!n.lazyLoad) {
|
|
1531
|
+
const m = [], h = (C) => {
|
|
1532
|
+
for (const T of C) {
|
|
1533
|
+
const b = g(T, "children");
|
|
1534
|
+
b != null && b.length && (m.push(g(T, "key")), h(b));
|
|
1535
|
+
}
|
|
1536
|
+
};
|
|
1537
|
+
return h(_.value), m;
|
|
1538
|
+
}
|
|
1539
|
+
return [];
|
|
1540
|
+
}, R = be(
|
|
1541
|
+
n.expandedKeys ?? (n.defaultExpandAll ? D() : [])
|
|
1542
|
+
);
|
|
1543
|
+
je(
|
|
1544
|
+
() => [n.defaultExpandAll, n.expandedKeys],
|
|
1545
|
+
([m, h], [C, T]) => {
|
|
1546
|
+
h !== T ? R.value = n.expandedKeys ?? [] : m && !C && (R.value = D());
|
|
1547
|
+
}
|
|
1548
|
+
);
|
|
1549
|
+
const L = M({
|
|
1550
|
+
get() {
|
|
1551
|
+
return n.expandedKeys ? n.expandedKeys : R.value;
|
|
1552
|
+
},
|
|
1553
|
+
set(m) {
|
|
1554
|
+
n.expandedKeys || (R.value = m), t("update:expandedKeys", m);
|
|
1555
|
+
}
|
|
1556
|
+
});
|
|
1557
|
+
je(
|
|
1558
|
+
() => n.data,
|
|
1559
|
+
() => {
|
|
1560
|
+
_.value = he(n.data);
|
|
1561
|
+
const m = D();
|
|
1562
|
+
L.value = L.value.filter((h) => m.includes(h)), U.value++;
|
|
1563
|
+
},
|
|
1564
|
+
{ deep: !0 }
|
|
1565
|
+
);
|
|
1566
|
+
const A = be(n.modelValue ?? n.value ?? []);
|
|
1567
|
+
je(
|
|
1568
|
+
() => [n.modelValue, n.value],
|
|
1569
|
+
() => {
|
|
1570
|
+
A.value = n.modelValue ?? n.value ?? [];
|
|
1571
|
+
}
|
|
1572
|
+
);
|
|
1573
|
+
const k = M({
|
|
1574
|
+
get() {
|
|
1575
|
+
return n.modelValue ?? n.value ? n.modelValue ?? n.value : A.value;
|
|
1576
|
+
},
|
|
1577
|
+
set(m) {
|
|
1578
|
+
m && ((n.modelValue ?? n.value) || (A.value = m), t("update:modelValue", m), t("update:value", m));
|
|
1579
|
+
}
|
|
1580
|
+
}), { getDisabled: Y, getSize: W } = Xn(), $ = (m, h) => {
|
|
1581
|
+
var C, T;
|
|
1582
|
+
if (n.selectable && !Y.value) {
|
|
1583
|
+
let b = he(k.value);
|
|
1584
|
+
const N = g(m, "key");
|
|
1585
|
+
h != null && h.keys.length && n.multiple ? h.value ? b = Tt([...h.keys, ...b]) : b = he(k.value.filter((ne) => !h.keys.includes(ne))) : n.multiple ? (C = k.value) != null && C.includes(N) ? b = he((T = k.value) == null ? void 0 : T.filter((ne) => ne !== N)) : b = he([...k.value ?? [], N]) : k.value.includes(N) ? b = [] : b = [N], k.value = b;
|
|
1586
|
+
const ve = (h == null ? void 0 : h.value) ?? b.includes(N);
|
|
1587
|
+
t("select", m, ve, (h == null ? void 0 : h.keys) ?? N);
|
|
1588
|
+
}
|
|
1589
|
+
}, ee = be(n.checkedKeys ?? []);
|
|
1590
|
+
je(
|
|
1591
|
+
() => n.checkedKeys,
|
|
1592
|
+
() => {
|
|
1593
|
+
ee.value = n.checkedKeys ?? [];
|
|
1594
|
+
}
|
|
1595
|
+
);
|
|
1596
|
+
const j = M({
|
|
1597
|
+
get() {
|
|
1598
|
+
return n.checkedKeys ? n.checkedKeys : ee.value;
|
|
1599
|
+
},
|
|
1600
|
+
set(m) {
|
|
1601
|
+
n.checkedKeys || (ee.value = m), t("update:checkedKeys", m);
|
|
1602
|
+
}
|
|
1603
|
+
}), X = (m, h) => {
|
|
1604
|
+
if (n.checkbox && !Y.value) {
|
|
1605
|
+
let C = he(j.value);
|
|
1606
|
+
const T = g(m, "key");
|
|
1607
|
+
h != null && h.keys.length ? h.value ? C = Tt([...h.keys, ...C]) : C = he(j.value.filter((N) => !h.keys.includes(N))) : j.value.includes(T) ? C = he(j.value.filter((N) => N !== T)) : C = he([...j.value, T]), j.value = C;
|
|
1608
|
+
const b = (h == null ? void 0 : h.value) ?? C.includes(T);
|
|
1609
|
+
t("check", m, b, (h == null ? void 0 : h.keys) ?? T);
|
|
1610
|
+
}
|
|
1611
|
+
}, me = (m, h) => {
|
|
1612
|
+
let C = !0;
|
|
1613
|
+
const T = g(m, "key");
|
|
1614
|
+
let b = he(L.value);
|
|
1615
|
+
h || h !== !1 && !b.includes(T) ? (b = Tt([...b, T]), C = !0) : (b = b.filter((N) => N !== T), C = !1), L.value = b, t("expand", m, C);
|
|
1616
|
+
}, ue = M(() => {
|
|
1617
|
+
if (n.gap) {
|
|
1618
|
+
if (typeof n.gap == "number") return `${n.gap}px`;
|
|
1619
|
+
if (!Object.keys(on).includes(n.gap)) return n.gap;
|
|
1620
|
+
}
|
|
1621
|
+
}), ce = n.groupName ?? Fn(r), U = be(1), Q = be(!1), fe = be(), te = be(), Se = (m) => {
|
|
1622
|
+
const { root: h, instance: C, node: T } = m, b = (G) => {
|
|
1623
|
+
var oe;
|
|
1624
|
+
return (oe = G.getAttribute("data-parents")) == null ? void 0 : oe.split(",");
|
|
1625
|
+
}, N = (G) => {
|
|
1626
|
+
const oe = (ie, Ce = _.value) => {
|
|
1627
|
+
const { parents: Oe, self: Sn } = ie;
|
|
1628
|
+
for (const _t of Ce) {
|
|
1629
|
+
const jt = g(_t, "key").toString();
|
|
1630
|
+
if (jt === Sn) return _t;
|
|
1631
|
+
const ot = g(_t, "children");
|
|
1632
|
+
if (Oe != null && Oe.includes(jt) && (ot != null && ot.length)) return oe(ie, ot);
|
|
1633
|
+
}
|
|
1634
|
+
}, x = b(G), q = G.getAttribute("data-key") ?? "";
|
|
1635
|
+
return oe({ parents: x, self: q });
|
|
1636
|
+
}, ve = zt(ge(r, "dragging_item"), W.value), ne = () => {
|
|
1637
|
+
var G;
|
|
1638
|
+
(G = C.value) == null || G.destroy(), C.value = void 0;
|
|
1639
|
+
};
|
|
1640
|
+
kn(() => {
|
|
1641
|
+
je(
|
|
1642
|
+
() => [h.value, n.draggable, U.value],
|
|
1643
|
+
async () => {
|
|
1644
|
+
var G;
|
|
1645
|
+
if (C.value) ne();
|
|
1646
|
+
else if (h.value && n.draggable) {
|
|
1647
|
+
const { default: oe } = await Promise.resolve().then(() => bo);
|
|
1648
|
+
C.value = new oe(h.value, {
|
|
1649
|
+
...((G = n.getSortableProps) == null ? void 0 : G.call(n, T)) || {},
|
|
1650
|
+
group: Gn(ce) ? ce(T) : ce,
|
|
1651
|
+
animation: 150,
|
|
1652
|
+
forceFallback: !0,
|
|
1653
|
+
fallbackOnBody: !0,
|
|
1654
|
+
filter: "[data-draggable=false]",
|
|
1655
|
+
handle: `.${c.node} .${c.draggable} .${c.draggableIcon}`,
|
|
1656
|
+
// swapThreshold: 0.65,
|
|
1657
|
+
dataIdAttr: "data-key",
|
|
1658
|
+
dragClass: ve,
|
|
1659
|
+
onChoose(x) {
|
|
1660
|
+
const q = N(x == null ? void 0 : x.item);
|
|
1661
|
+
q && (q.dragging = !0), t("choose", x);
|
|
1662
|
+
},
|
|
1663
|
+
onStart(x) {
|
|
1664
|
+
var q;
|
|
1665
|
+
if (typeof document < "u") {
|
|
1666
|
+
const ie = document.querySelector(`.${ve}`), Ce = (q = getComputedStyle(h.value)) == null ? void 0 : q.direction;
|
|
1667
|
+
ie != null && ie.style && (ie.style.direction = Ce);
|
|
1668
|
+
}
|
|
1669
|
+
Q.value = !0, t("dragStart", x);
|
|
1670
|
+
},
|
|
1671
|
+
onUnchoose(x) {
|
|
1672
|
+
const q = N(x == null ? void 0 : x.item);
|
|
1673
|
+
q && (q.dragging = !1), t("unchoose", x);
|
|
1674
|
+
},
|
|
1675
|
+
onEnd(x) {
|
|
1676
|
+
Q.value = !1, t("dragEnd", {
|
|
1677
|
+
...x,
|
|
1678
|
+
node: N(x == null ? void 0 : x.item),
|
|
1679
|
+
oldParents: b(x == null ? void 0 : x.item),
|
|
1680
|
+
newParents: b(x == null ? void 0 : x.to)
|
|
1681
|
+
});
|
|
1682
|
+
},
|
|
1683
|
+
onMove(x, q) {
|
|
1684
|
+
var Oe;
|
|
1685
|
+
const ie = Number(((Oe = x == null ? void 0 : x.to) == null ? void 0 : Oe.getAttribute("data-level")) ?? "1"), Ce = N(x == null ? void 0 : x.dragged);
|
|
1686
|
+
Ce && (Ce.dragging_level = ie), t("move", x, q);
|
|
1687
|
+
}
|
|
1688
|
+
});
|
|
1689
|
+
}
|
|
1690
|
+
},
|
|
1691
|
+
{ immediate: !0 }
|
|
1692
|
+
);
|
|
1693
|
+
}), An(() => {
|
|
1694
|
+
C.value && ne();
|
|
1695
|
+
});
|
|
1696
|
+
};
|
|
1697
|
+
Se({
|
|
1698
|
+
root: fe,
|
|
1699
|
+
instance: te
|
|
1700
|
+
});
|
|
1701
|
+
const { getDir: _e } = Yn(), E = _e();
|
|
1702
|
+
return Eo({
|
|
1703
|
+
size: W,
|
|
1704
|
+
disabled: Y,
|
|
1705
|
+
props: n,
|
|
1706
|
+
expandedKeys: L,
|
|
1707
|
+
model: k,
|
|
1708
|
+
dir: E,
|
|
1709
|
+
checked: j,
|
|
1710
|
+
onExpandKey: me,
|
|
1711
|
+
onSelect: $,
|
|
1712
|
+
onCheck: X,
|
|
1713
|
+
getNodeField: g,
|
|
1714
|
+
useSortable: Se,
|
|
1715
|
+
dragging: Q,
|
|
1716
|
+
prefixes: c
|
|
1717
|
+
}), (m, h) => (le(), De("div", {
|
|
1718
|
+
key: U.value,
|
|
1719
|
+
role: "tree",
|
|
1720
|
+
class: ke([
|
|
1721
|
+
y(w)({
|
|
1722
|
+
size: y(W),
|
|
1723
|
+
gap: n.gap ?? y(W),
|
|
1724
|
+
selectable: n.selectable,
|
|
1725
|
+
disabled: y(Y),
|
|
1726
|
+
inlineNode: n.inlineNode,
|
|
1727
|
+
dragging: Q.value
|
|
1728
|
+
}),
|
|
1729
|
+
n.class
|
|
1730
|
+
]),
|
|
1731
|
+
style: On({
|
|
1732
|
+
"--ptc-tree-gap": ue.value
|
|
1733
|
+
}),
|
|
1734
|
+
ref_key: "root",
|
|
1735
|
+
ref: fe
|
|
1736
|
+
}, [
|
|
1737
|
+
(le(!0), De(Mt, null, mt(_.value, (C) => (le(), ut(Do, {
|
|
1738
|
+
key: g(C, "key"),
|
|
1739
|
+
item: C
|
|
1740
|
+
}, ln({ _: 2 }, [
|
|
1741
|
+
mt(Object.keys(i), (T) => ({
|
|
1742
|
+
name: T,
|
|
1743
|
+
fn: dt((b) => [
|
|
1744
|
+
Ve(m.$slots, T, st({ ref_for: !0 }, b))
|
|
1745
|
+
])
|
|
1746
|
+
}))
|
|
1747
|
+
]), 1032, ["item"]))), 128))
|
|
1748
|
+
], 6));
|
|
1749
|
+
}
|
|
1750
|
+
});
|
|
1751
|
+
export {
|
|
1752
|
+
yo as T,
|
|
1753
|
+
Ro as _,
|
|
1754
|
+
on as a,
|
|
1755
|
+
wo as i,
|
|
1756
|
+
Eo as p
|
|
1757
|
+
};
|