@tailor-cms/ce-accordion-edit 0.0.15 → 0.1.0
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/components/AccordionItem.vue.d.ts +30 -0
- package/dist/components/Edit.vue.d.ts +14 -0
- package/dist/index.cjs +1197 -1616
- package/dist/{style.css → index.css} +7 -7
- package/dist/index.d.ts +5 -0
- package/dist/index.js +1198 -1617
- package/package.json +19 -15
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var import_index = require("./index.css");
|
|
3
3
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
4
4
|
const vue = require("vue");
|
|
5
5
|
const byteToHex = [];
|
|
@@ -23,37 +23,33 @@ function rng() {
|
|
|
23
23
|
const randomUUID = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
24
24
|
const native = { randomUUID };
|
|
25
25
|
function v4(options, buf, offset) {
|
|
26
|
-
|
|
27
|
-
if (native.randomUUID && !buf && !options) {
|
|
26
|
+
if (native.randomUUID && true && !options) {
|
|
28
27
|
return native.randomUUID();
|
|
29
28
|
}
|
|
30
29
|
options = options || {};
|
|
31
|
-
const rnds = options.random ??
|
|
30
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
32
31
|
if (rnds.length < 16) {
|
|
33
32
|
throw new Error("Random bytes length must be >= 16");
|
|
34
33
|
}
|
|
35
34
|
rnds[6] = rnds[6] & 15 | 64;
|
|
36
35
|
rnds[8] = rnds[8] & 63 | 128;
|
|
37
|
-
if (buf) {
|
|
38
|
-
offset = offset || 0;
|
|
39
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
40
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
41
|
-
}
|
|
42
|
-
for (let i = 0; i < 16; ++i) {
|
|
43
|
-
buf[offset + i] = rnds[i];
|
|
44
|
-
}
|
|
45
|
-
return buf;
|
|
46
|
-
}
|
|
47
36
|
return unsafeStringify(rnds);
|
|
48
37
|
}
|
|
49
|
-
var
|
|
38
|
+
var id1 = v4();
|
|
39
|
+
var id2 = v4();
|
|
50
40
|
var type = "ACCORDION";
|
|
51
41
|
var name = "Accordion";
|
|
52
42
|
var initState = () => ({
|
|
53
43
|
embeds: {},
|
|
54
44
|
items: {
|
|
55
|
-
[
|
|
56
|
-
id,
|
|
45
|
+
[id1]: {
|
|
46
|
+
id: id1,
|
|
47
|
+
header: "Accordion Item Title",
|
|
48
|
+
body: {},
|
|
49
|
+
position: 1
|
|
50
|
+
},
|
|
51
|
+
[id2]: {
|
|
52
|
+
id: id2,
|
|
57
53
|
header: "Accordion Item Title",
|
|
58
54
|
body: {},
|
|
59
55
|
position: 1
|
|
@@ -67,6 +63,73 @@ var ui = {
|
|
|
67
63
|
// (e.g. 50/50 layout)
|
|
68
64
|
forceFullWidth: true
|
|
69
65
|
};
|
|
66
|
+
var ai = {
|
|
67
|
+
Schema: {
|
|
68
|
+
type: "json_schema",
|
|
69
|
+
name: "ce_accordion",
|
|
70
|
+
schema: {
|
|
71
|
+
type: "object",
|
|
72
|
+
properties: {
|
|
73
|
+
items: {
|
|
74
|
+
type: "array",
|
|
75
|
+
minItems: 2,
|
|
76
|
+
items: {
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
header: { type: "string" },
|
|
80
|
+
content: { type: "string" }
|
|
81
|
+
},
|
|
82
|
+
required: ["header", "content"],
|
|
83
|
+
additionalProperties: false
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
required: ["items"],
|
|
88
|
+
additionalProperties: false
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
getPrompt: () => `
|
|
92
|
+
Generate a accordion content element as an object with the following
|
|
93
|
+
properties:
|
|
94
|
+
{
|
|
95
|
+
"items": [
|
|
96
|
+
{
|
|
97
|
+
"header": "",
|
|
98
|
+
"content": ""
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
where:
|
|
103
|
+
- 'items' is an array of accordion item objects where:
|
|
104
|
+
- 'header' is the title of the accordion item.
|
|
105
|
+
- 'content' is the text to be displayed in the accordion item.
|
|
106
|
+
The content should be relevant to the topic of the accordion and
|
|
107
|
+
have a few paragraphs about the topic.
|
|
108
|
+
`,
|
|
109
|
+
processResponse: (val) => {
|
|
110
|
+
return val.items.reduce(
|
|
111
|
+
(acc, { header, content }, index2) => {
|
|
112
|
+
const embedId = v4();
|
|
113
|
+
const itemId = v4();
|
|
114
|
+
acc.embeds[embedId] = {
|
|
115
|
+
id: embedId,
|
|
116
|
+
data: { content },
|
|
117
|
+
embedded: true,
|
|
118
|
+
position: 1,
|
|
119
|
+
type: "TIPTAP_HTML"
|
|
120
|
+
};
|
|
121
|
+
acc.items[itemId] = {
|
|
122
|
+
id: itemId,
|
|
123
|
+
body: { [embedId]: true },
|
|
124
|
+
header,
|
|
125
|
+
position: index2 + 1
|
|
126
|
+
};
|
|
127
|
+
return acc;
|
|
128
|
+
},
|
|
129
|
+
{ items: {}, embeds: {} }
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
};
|
|
70
133
|
var manifest$1 = {
|
|
71
134
|
type,
|
|
72
135
|
version: "1.0",
|
|
@@ -74,125 +137,20 @@ var manifest$1 = {
|
|
|
74
137
|
isComposite: true,
|
|
75
138
|
ssr: false,
|
|
76
139
|
initState,
|
|
77
|
-
ui
|
|
140
|
+
ui,
|
|
141
|
+
ai
|
|
78
142
|
};
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
function getDefaultExportFromCjs(x) {
|
|
82
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
83
|
-
}
|
|
84
|
-
function listCacheClear$1() {
|
|
85
|
-
this.__data__ = [];
|
|
86
|
-
this.size = 0;
|
|
87
|
-
}
|
|
88
|
-
var _listCacheClear = listCacheClear$1;
|
|
89
|
-
function eq$4(value, other) {
|
|
90
|
-
return value === other || value !== value && other !== other;
|
|
91
|
-
}
|
|
92
|
-
var eq_1 = eq$4;
|
|
93
|
-
var eq$3 = eq_1;
|
|
94
|
-
function assocIndexOf$4(array, key) {
|
|
95
|
-
var length = array.length;
|
|
96
|
-
while (length--) {
|
|
97
|
-
if (eq$3(array[length][0], key)) {
|
|
98
|
-
return length;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
return -1;
|
|
102
|
-
}
|
|
103
|
-
var _assocIndexOf = assocIndexOf$4;
|
|
104
|
-
var assocIndexOf$3 = _assocIndexOf;
|
|
105
|
-
var arrayProto$1 = Array.prototype;
|
|
106
|
-
var splice$1 = arrayProto$1.splice;
|
|
107
|
-
function listCacheDelete$1(key) {
|
|
108
|
-
var data = this.__data__, index2 = assocIndexOf$3(data, key);
|
|
109
|
-
if (index2 < 0) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
112
|
-
var lastIndex = data.length - 1;
|
|
113
|
-
if (index2 == lastIndex) {
|
|
114
|
-
data.pop();
|
|
115
|
-
} else {
|
|
116
|
-
splice$1.call(data, index2, 1);
|
|
117
|
-
}
|
|
118
|
-
--this.size;
|
|
119
|
-
return true;
|
|
120
|
-
}
|
|
121
|
-
var _listCacheDelete = listCacheDelete$1;
|
|
122
|
-
var assocIndexOf$2 = _assocIndexOf;
|
|
123
|
-
function listCacheGet$1(key) {
|
|
124
|
-
var data = this.__data__, index2 = assocIndexOf$2(data, key);
|
|
125
|
-
return index2 < 0 ? void 0 : data[index2][1];
|
|
126
|
-
}
|
|
127
|
-
var _listCacheGet = listCacheGet$1;
|
|
128
|
-
var assocIndexOf$1 = _assocIndexOf;
|
|
129
|
-
function listCacheHas$1(key) {
|
|
130
|
-
return assocIndexOf$1(this.__data__, key) > -1;
|
|
131
|
-
}
|
|
132
|
-
var _listCacheHas = listCacheHas$1;
|
|
133
|
-
var assocIndexOf = _assocIndexOf;
|
|
134
|
-
function listCacheSet$1(key, value) {
|
|
135
|
-
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
136
|
-
if (index2 < 0) {
|
|
137
|
-
++this.size;
|
|
138
|
-
data.push([key, value]);
|
|
139
|
-
} else {
|
|
140
|
-
data[index2][1] = value;
|
|
141
|
-
}
|
|
142
|
-
return this;
|
|
143
|
-
}
|
|
144
|
-
var _listCacheSet = listCacheSet$1;
|
|
145
|
-
var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet;
|
|
146
|
-
function ListCache$4(entries) {
|
|
147
|
-
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
148
|
-
this.clear();
|
|
149
|
-
while (++index2 < length) {
|
|
150
|
-
var entry = entries[index2];
|
|
151
|
-
this.set(entry[0], entry[1]);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
ListCache$4.prototype.clear = listCacheClear;
|
|
155
|
-
ListCache$4.prototype["delete"] = listCacheDelete;
|
|
156
|
-
ListCache$4.prototype.get = listCacheGet;
|
|
157
|
-
ListCache$4.prototype.has = listCacheHas;
|
|
158
|
-
ListCache$4.prototype.set = listCacheSet;
|
|
159
|
-
var _ListCache = ListCache$4;
|
|
160
|
-
var ListCache$3 = _ListCache;
|
|
161
|
-
function stackClear$1() {
|
|
162
|
-
this.__data__ = new ListCache$3();
|
|
163
|
-
this.size = 0;
|
|
164
|
-
}
|
|
165
|
-
var _stackClear = stackClear$1;
|
|
166
|
-
function stackDelete$1(key) {
|
|
167
|
-
var data = this.__data__, result = data["delete"](key);
|
|
168
|
-
this.size = data.size;
|
|
169
|
-
return result;
|
|
170
|
-
}
|
|
171
|
-
var _stackDelete = stackDelete$1;
|
|
172
|
-
function stackGet$1(key) {
|
|
173
|
-
return this.__data__.get(key);
|
|
174
|
-
}
|
|
175
|
-
var _stackGet = stackGet$1;
|
|
176
|
-
function stackHas$1(key) {
|
|
177
|
-
return this.__data__.has(key);
|
|
178
|
-
}
|
|
179
|
-
var _stackHas = stackHas$1;
|
|
180
|
-
var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
181
|
-
var _freeGlobal = freeGlobal$1;
|
|
182
|
-
var freeGlobal = _freeGlobal;
|
|
143
|
+
var index_default = manifest$1;
|
|
144
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
183
145
|
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
184
|
-
var root
|
|
185
|
-
var
|
|
186
|
-
var
|
|
187
|
-
var
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
|
|
191
|
-
var hasOwnProperty$
|
|
192
|
-
var nativeObjectToString$1 = objectProto$f.toString;
|
|
193
|
-
var symToStringTag$1 = Symbol$6 ? Symbol$6.toStringTag : void 0;
|
|
194
|
-
function getRawTag$1(value) {
|
|
195
|
-
var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
146
|
+
var root = freeGlobal || freeSelf || Function("return this")();
|
|
147
|
+
var Symbol$1 = root.Symbol;
|
|
148
|
+
var objectProto$e = Object.prototype;
|
|
149
|
+
var hasOwnProperty$b = objectProto$e.hasOwnProperty;
|
|
150
|
+
var nativeObjectToString$1 = objectProto$e.toString;
|
|
151
|
+
var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
152
|
+
function getRawTag(value) {
|
|
153
|
+
var isOwn = hasOwnProperty$b.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
196
154
|
try {
|
|
197
155
|
value[symToStringTag$1] = void 0;
|
|
198
156
|
var unmasked = true;
|
|
@@ -208,53 +166,74 @@ function getRawTag$1(value) {
|
|
|
208
166
|
}
|
|
209
167
|
return result;
|
|
210
168
|
}
|
|
211
|
-
var
|
|
212
|
-
var
|
|
213
|
-
|
|
214
|
-
function objectToString$1(value) {
|
|
169
|
+
var objectProto$d = Object.prototype;
|
|
170
|
+
var nativeObjectToString = objectProto$d.toString;
|
|
171
|
+
function objectToString(value) {
|
|
215
172
|
return nativeObjectToString.call(value);
|
|
216
173
|
}
|
|
217
|
-
var _objectToString = objectToString$1;
|
|
218
|
-
var Symbol$5 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString;
|
|
219
174
|
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
220
|
-
var symToStringTag = Symbol$
|
|
221
|
-
function baseGetTag
|
|
175
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
|
|
176
|
+
function baseGetTag(value) {
|
|
222
177
|
if (value == null) {
|
|
223
178
|
return value === void 0 ? undefinedTag : nullTag;
|
|
224
179
|
}
|
|
225
180
|
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
226
181
|
}
|
|
227
|
-
|
|
228
|
-
|
|
182
|
+
function isObjectLike(value) {
|
|
183
|
+
return value != null && typeof value == "object";
|
|
184
|
+
}
|
|
185
|
+
var symbolTag$3 = "[object Symbol]";
|
|
186
|
+
function isSymbol(value) {
|
|
187
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
|
|
188
|
+
}
|
|
189
|
+
function arrayMap(array, iteratee) {
|
|
190
|
+
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
191
|
+
while (++index2 < length) {
|
|
192
|
+
result[index2] = iteratee(array[index2], index2, array);
|
|
193
|
+
}
|
|
194
|
+
return result;
|
|
195
|
+
}
|
|
196
|
+
var isArray = Array.isArray;
|
|
197
|
+
var symbolProto$2 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
|
|
198
|
+
function baseToString(value) {
|
|
199
|
+
if (typeof value == "string") {
|
|
200
|
+
return value;
|
|
201
|
+
}
|
|
202
|
+
if (isArray(value)) {
|
|
203
|
+
return arrayMap(value, baseToString) + "";
|
|
204
|
+
}
|
|
205
|
+
if (isSymbol(value)) {
|
|
206
|
+
return symbolToString ? symbolToString.call(value) : "";
|
|
207
|
+
}
|
|
208
|
+
var result = value + "";
|
|
209
|
+
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
210
|
+
}
|
|
211
|
+
function isObject(value) {
|
|
229
212
|
var type2 = typeof value;
|
|
230
213
|
return value != null && (type2 == "object" || type2 == "function");
|
|
231
214
|
}
|
|
232
|
-
|
|
233
|
-
|
|
215
|
+
function identity(value) {
|
|
216
|
+
return value;
|
|
217
|
+
}
|
|
234
218
|
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
235
|
-
function isFunction
|
|
236
|
-
if (!isObject
|
|
219
|
+
function isFunction(value) {
|
|
220
|
+
if (!isObject(value)) {
|
|
237
221
|
return false;
|
|
238
222
|
}
|
|
239
|
-
var tag = baseGetTag
|
|
223
|
+
var tag = baseGetTag(value);
|
|
240
224
|
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
241
225
|
}
|
|
242
|
-
var
|
|
243
|
-
var root$6 = _root;
|
|
244
|
-
var coreJsData$1 = root$6["__core-js_shared__"];
|
|
245
|
-
var _coreJsData = coreJsData$1;
|
|
246
|
-
var coreJsData = _coreJsData;
|
|
226
|
+
var coreJsData = root["__core-js_shared__"];
|
|
247
227
|
var maskSrcKey = function() {
|
|
248
228
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
249
229
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
250
230
|
}();
|
|
251
|
-
function isMasked
|
|
231
|
+
function isMasked(func) {
|
|
252
232
|
return !!maskSrcKey && maskSrcKey in func;
|
|
253
233
|
}
|
|
254
|
-
var _isMasked = isMasked$1;
|
|
255
234
|
var funcProto$1 = Function.prototype;
|
|
256
235
|
var funcToString$1 = funcProto$1.toString;
|
|
257
|
-
function toSource
|
|
236
|
+
function toSource(func) {
|
|
258
237
|
if (func != null) {
|
|
259
238
|
try {
|
|
260
239
|
return funcToString$1.call(func);
|
|
@@ -267,211 +246,149 @@ function toSource$2(func) {
|
|
|
267
246
|
}
|
|
268
247
|
return "";
|
|
269
248
|
}
|
|
270
|
-
var _toSource = toSource$2;
|
|
271
|
-
var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject$6 = isObject_1, toSource$1 = _toSource;
|
|
272
249
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
273
250
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
274
|
-
var funcProto = Function.prototype, objectProto$
|
|
251
|
+
var funcProto = Function.prototype, objectProto$c = Object.prototype;
|
|
275
252
|
var funcToString = funcProto.toString;
|
|
276
|
-
var hasOwnProperty$
|
|
253
|
+
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
277
254
|
var reIsNative = RegExp(
|
|
278
|
-
"^" + funcToString.call(hasOwnProperty$
|
|
255
|
+
"^" + funcToString.call(hasOwnProperty$a).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
279
256
|
);
|
|
280
|
-
function baseIsNative
|
|
281
|
-
if (!isObject
|
|
257
|
+
function baseIsNative(value) {
|
|
258
|
+
if (!isObject(value) || isMasked(value)) {
|
|
282
259
|
return false;
|
|
283
260
|
}
|
|
284
|
-
var pattern = isFunction
|
|
285
|
-
return pattern.test(toSource
|
|
261
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
262
|
+
return pattern.test(toSource(value));
|
|
286
263
|
}
|
|
287
|
-
|
|
288
|
-
function getValue$1(object, key) {
|
|
264
|
+
function getValue(object, key) {
|
|
289
265
|
return object == null ? void 0 : object[key];
|
|
290
266
|
}
|
|
291
|
-
|
|
292
|
-
var baseIsNative = _baseIsNative, getValue = _getValue;
|
|
293
|
-
function getNative$7(object, key) {
|
|
267
|
+
function getNative(object, key) {
|
|
294
268
|
var value = getValue(object, key);
|
|
295
269
|
return baseIsNative(value) ? value : void 0;
|
|
296
270
|
}
|
|
297
|
-
var
|
|
298
|
-
var
|
|
299
|
-
var
|
|
300
|
-
|
|
301
|
-
var getNative$5 = _getNative;
|
|
302
|
-
var nativeCreate$4 = getNative$5(Object, "create");
|
|
303
|
-
var _nativeCreate = nativeCreate$4;
|
|
304
|
-
var nativeCreate$3 = _nativeCreate;
|
|
305
|
-
function hashClear$1() {
|
|
306
|
-
this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
|
|
307
|
-
this.size = 0;
|
|
308
|
-
}
|
|
309
|
-
var _hashClear = hashClear$1;
|
|
310
|
-
function hashDelete$1(key) {
|
|
311
|
-
var result = this.has(key) && delete this.__data__[key];
|
|
312
|
-
this.size -= result ? 1 : 0;
|
|
313
|
-
return result;
|
|
314
|
-
}
|
|
315
|
-
var _hashDelete = hashDelete$1;
|
|
316
|
-
var nativeCreate$2 = _nativeCreate;
|
|
317
|
-
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
318
|
-
var objectProto$c = Object.prototype;
|
|
319
|
-
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
320
|
-
function hashGet$1(key) {
|
|
321
|
-
var data = this.__data__;
|
|
322
|
-
if (nativeCreate$2) {
|
|
323
|
-
var result = data[key];
|
|
324
|
-
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
271
|
+
var WeakMap = getNative(root, "WeakMap");
|
|
272
|
+
var objectCreate = Object.create;
|
|
273
|
+
var baseCreate = /* @__PURE__ */ function() {
|
|
274
|
+
function object() {
|
|
325
275
|
}
|
|
326
|
-
return
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
function
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
276
|
+
return function(proto) {
|
|
277
|
+
if (!isObject(proto)) {
|
|
278
|
+
return {};
|
|
279
|
+
}
|
|
280
|
+
if (objectCreate) {
|
|
281
|
+
return objectCreate(proto);
|
|
282
|
+
}
|
|
283
|
+
object.prototype = proto;
|
|
284
|
+
var result = new object();
|
|
285
|
+
object.prototype = void 0;
|
|
286
|
+
return result;
|
|
287
|
+
};
|
|
288
|
+
}();
|
|
289
|
+
function apply(func, thisArg, args) {
|
|
290
|
+
switch (args.length) {
|
|
291
|
+
case 0:
|
|
292
|
+
return func.call(thisArg);
|
|
293
|
+
case 1:
|
|
294
|
+
return func.call(thisArg, args[0]);
|
|
295
|
+
case 2:
|
|
296
|
+
return func.call(thisArg, args[0], args[1]);
|
|
297
|
+
case 3:
|
|
298
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
299
|
+
}
|
|
300
|
+
return func.apply(thisArg, args);
|
|
344
301
|
}
|
|
345
|
-
|
|
346
|
-
var
|
|
347
|
-
|
|
348
|
-
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
349
|
-
this.clear();
|
|
302
|
+
function copyArray(source, array) {
|
|
303
|
+
var index2 = -1, length = source.length;
|
|
304
|
+
array || (array = Array(length));
|
|
350
305
|
while (++index2 < length) {
|
|
351
|
-
|
|
352
|
-
this.set(entry[0], entry[1]);
|
|
306
|
+
array[index2] = source[index2];
|
|
353
307
|
}
|
|
308
|
+
return array;
|
|
354
309
|
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
var
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
310
|
+
var HOT_COUNT = 800, HOT_SPAN = 16;
|
|
311
|
+
var nativeNow = Date.now;
|
|
312
|
+
function shortOut(func) {
|
|
313
|
+
var count = 0, lastCalled = 0;
|
|
314
|
+
return function() {
|
|
315
|
+
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
316
|
+
lastCalled = stamp;
|
|
317
|
+
if (remaining > 0) {
|
|
318
|
+
if (++count >= HOT_COUNT) {
|
|
319
|
+
return arguments[0];
|
|
320
|
+
}
|
|
321
|
+
} else {
|
|
322
|
+
count = 0;
|
|
323
|
+
}
|
|
324
|
+
return func.apply(void 0, arguments);
|
|
368
325
|
};
|
|
369
326
|
}
|
|
370
|
-
|
|
371
|
-
function
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
}
|
|
375
|
-
var _isKeyable = isKeyable$1;
|
|
376
|
-
var isKeyable = _isKeyable;
|
|
377
|
-
function getMapData$4(map, key) {
|
|
378
|
-
var data = map.__data__;
|
|
379
|
-
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
380
|
-
}
|
|
381
|
-
var _getMapData = getMapData$4;
|
|
382
|
-
var getMapData$3 = _getMapData;
|
|
383
|
-
function mapCacheDelete$1(key) {
|
|
384
|
-
var result = getMapData$3(this, key)["delete"](key);
|
|
385
|
-
this.size -= result ? 1 : 0;
|
|
386
|
-
return result;
|
|
387
|
-
}
|
|
388
|
-
var _mapCacheDelete = mapCacheDelete$1;
|
|
389
|
-
var getMapData$2 = _getMapData;
|
|
390
|
-
function mapCacheGet$1(key) {
|
|
391
|
-
return getMapData$2(this, key).get(key);
|
|
392
|
-
}
|
|
393
|
-
var _mapCacheGet = mapCacheGet$1;
|
|
394
|
-
var getMapData$1 = _getMapData;
|
|
395
|
-
function mapCacheHas$1(key) {
|
|
396
|
-
return getMapData$1(this, key).has(key);
|
|
397
|
-
}
|
|
398
|
-
var _mapCacheHas = mapCacheHas$1;
|
|
399
|
-
var getMapData = _getMapData;
|
|
400
|
-
function mapCacheSet$1(key, value) {
|
|
401
|
-
var data = getMapData(this, key), size = data.size;
|
|
402
|
-
data.set(key, value);
|
|
403
|
-
this.size += data.size == size ? 0 : 1;
|
|
404
|
-
return this;
|
|
327
|
+
function constant(value) {
|
|
328
|
+
return function() {
|
|
329
|
+
return value;
|
|
330
|
+
};
|
|
405
331
|
}
|
|
406
|
-
var
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
332
|
+
var defineProperty = function() {
|
|
333
|
+
try {
|
|
334
|
+
var func = getNative(Object, "defineProperty");
|
|
335
|
+
func({}, "", {});
|
|
336
|
+
return func;
|
|
337
|
+
} catch (e) {
|
|
338
|
+
}
|
|
339
|
+
}();
|
|
340
|
+
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
341
|
+
return defineProperty(func, "toString", {
|
|
342
|
+
"configurable": true,
|
|
343
|
+
"enumerable": false,
|
|
344
|
+
"value": constant(string),
|
|
345
|
+
"writable": true
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
var setToString = shortOut(baseSetToString);
|
|
349
|
+
function arrayEach(array, iteratee) {
|
|
350
|
+
var index2 = -1, length = array == null ? 0 : array.length;
|
|
411
351
|
while (++index2 < length) {
|
|
412
|
-
|
|
413
|
-
|
|
352
|
+
if (iteratee(array[index2], index2, array) === false) {
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
414
355
|
}
|
|
356
|
+
return array;
|
|
415
357
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
var _MapCache = MapCache$3;
|
|
422
|
-
var ListCache$1 = _ListCache, Map$1 = _Map, MapCache$2 = _MapCache;
|
|
423
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
424
|
-
function stackSet$1(key, value) {
|
|
425
|
-
var data = this.__data__;
|
|
426
|
-
if (data instanceof ListCache$1) {
|
|
427
|
-
var pairs = data.__data__;
|
|
428
|
-
if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
429
|
-
pairs.push([key, value]);
|
|
430
|
-
this.size = ++data.size;
|
|
431
|
-
return this;
|
|
358
|
+
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
359
|
+
var length = array.length, index2 = fromIndex + -1;
|
|
360
|
+
while (++index2 < length) {
|
|
361
|
+
if (predicate(array[index2], index2, array)) {
|
|
362
|
+
return index2;
|
|
432
363
|
}
|
|
433
|
-
data = this.__data__ = new MapCache$2(pairs);
|
|
434
364
|
}
|
|
435
|
-
|
|
436
|
-
this.size = data.size;
|
|
437
|
-
return this;
|
|
365
|
+
return -1;
|
|
438
366
|
}
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
function Stack$3(entries) {
|
|
442
|
-
var data = this.__data__ = new ListCache(entries);
|
|
443
|
-
this.size = data.size;
|
|
367
|
+
function baseIsNaN(value) {
|
|
368
|
+
return value !== value;
|
|
444
369
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
Stack$3.prototype.get = stackGet;
|
|
448
|
-
Stack$3.prototype.has = stackHas;
|
|
449
|
-
Stack$3.prototype.set = stackSet;
|
|
450
|
-
var _Stack = Stack$3;
|
|
451
|
-
function arrayEach$2(array, iteratee) {
|
|
452
|
-
var index2 = -1, length = array == null ? 0 : array.length;
|
|
370
|
+
function strictIndexOf(array, value, fromIndex) {
|
|
371
|
+
var index2 = fromIndex - 1, length = array.length;
|
|
453
372
|
while (++index2 < length) {
|
|
454
|
-
if (
|
|
455
|
-
|
|
373
|
+
if (array[index2] === value) {
|
|
374
|
+
return index2;
|
|
456
375
|
}
|
|
457
376
|
}
|
|
458
|
-
return
|
|
377
|
+
return -1;
|
|
459
378
|
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
if (key == "__proto__" && defineProperty$1) {
|
|
474
|
-
defineProperty$1(object, key, {
|
|
379
|
+
function baseIndexOf(array, value, fromIndex) {
|
|
380
|
+
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
381
|
+
}
|
|
382
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
383
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
384
|
+
function isIndex(value, length) {
|
|
385
|
+
var type2 = typeof value;
|
|
386
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
387
|
+
return !!length && (type2 == "number" || type2 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
388
|
+
}
|
|
389
|
+
function baseAssignValue(object, key, value) {
|
|
390
|
+
if (key == "__proto__" && defineProperty) {
|
|
391
|
+
defineProperty(object, key, {
|
|
475
392
|
"configurable": true,
|
|
476
393
|
"enumerable": true,
|
|
477
394
|
"value": value,
|
|
@@ -481,611 +398,320 @@ function baseAssignValue$2(object, key, value) {
|
|
|
481
398
|
object[key] = value;
|
|
482
399
|
}
|
|
483
400
|
}
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
var
|
|
488
|
-
|
|
401
|
+
function eq(value, other) {
|
|
402
|
+
return value === other || value !== value && other !== other;
|
|
403
|
+
}
|
|
404
|
+
var objectProto$b = Object.prototype;
|
|
405
|
+
var hasOwnProperty$9 = objectProto$b.hasOwnProperty;
|
|
406
|
+
function assignValue(object, key, value) {
|
|
489
407
|
var objValue = object[key];
|
|
490
|
-
if (!(hasOwnProperty$
|
|
491
|
-
baseAssignValue
|
|
408
|
+
if (!(hasOwnProperty$9.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
|
|
409
|
+
baseAssignValue(object, key, value);
|
|
492
410
|
}
|
|
493
411
|
}
|
|
494
|
-
var
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
return
|
|
412
|
+
var nativeMax = Math.max;
|
|
413
|
+
function overRest(func, start, transform) {
|
|
414
|
+
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
415
|
+
return function() {
|
|
416
|
+
var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
417
|
+
while (++index2 < length) {
|
|
418
|
+
array[index2] = args[start + index2];
|
|
419
|
+
}
|
|
420
|
+
index2 = -1;
|
|
421
|
+
var otherArgs = Array(start + 1);
|
|
422
|
+
while (++index2 < start) {
|
|
423
|
+
otherArgs[index2] = args[index2];
|
|
424
|
+
}
|
|
425
|
+
otherArgs[start] = transform(array);
|
|
426
|
+
return apply(func, this, otherArgs);
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
function baseRest(func, start) {
|
|
430
|
+
return setToString(overRest(func, start, identity), func + "");
|
|
513
431
|
}
|
|
514
|
-
var
|
|
515
|
-
function
|
|
432
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
433
|
+
function isLength(value) {
|
|
434
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
435
|
+
}
|
|
436
|
+
function isArrayLike(value) {
|
|
437
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
438
|
+
}
|
|
439
|
+
function isIterateeCall(value, index2, object) {
|
|
440
|
+
if (!isObject(object)) {
|
|
441
|
+
return false;
|
|
442
|
+
}
|
|
443
|
+
var type2 = typeof index2;
|
|
444
|
+
if (type2 == "number" ? isArrayLike(object) && isIndex(index2, object.length) : type2 == "string" && index2 in object) {
|
|
445
|
+
return eq(object[index2], value);
|
|
446
|
+
}
|
|
447
|
+
return false;
|
|
448
|
+
}
|
|
449
|
+
var objectProto$a = Object.prototype;
|
|
450
|
+
function isPrototype(value) {
|
|
451
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$a;
|
|
452
|
+
return value === proto;
|
|
453
|
+
}
|
|
454
|
+
function baseTimes(n, iteratee) {
|
|
516
455
|
var index2 = -1, result = Array(n);
|
|
517
456
|
while (++index2 < n) {
|
|
518
457
|
result[index2] = iteratee(index2);
|
|
519
458
|
}
|
|
520
459
|
return result;
|
|
521
460
|
}
|
|
522
|
-
var _baseTimes = baseTimes$1;
|
|
523
|
-
function isObjectLike$8(value) {
|
|
524
|
-
return value != null && typeof value == "object";
|
|
525
|
-
}
|
|
526
|
-
var isObjectLike_1 = isObjectLike$8;
|
|
527
|
-
var baseGetTag$4 = _baseGetTag, isObjectLike$7 = isObjectLike_1;
|
|
528
461
|
var argsTag$3 = "[object Arguments]";
|
|
529
|
-
function baseIsArguments
|
|
530
|
-
return isObjectLike
|
|
462
|
+
function baseIsArguments(value) {
|
|
463
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$3;
|
|
531
464
|
}
|
|
532
|
-
var _baseIsArguments = baseIsArguments$1;
|
|
533
|
-
var baseIsArguments = _baseIsArguments, isObjectLike$6 = isObjectLike_1;
|
|
534
465
|
var objectProto$9 = Object.prototype;
|
|
535
|
-
var hasOwnProperty$
|
|
466
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
536
467
|
var propertyIsEnumerable$1 = objectProto$9.propertyIsEnumerable;
|
|
537
|
-
var isArguments
|
|
468
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
538
469
|
return arguments;
|
|
539
470
|
}()) ? baseIsArguments : function(value) {
|
|
540
|
-
return isObjectLike
|
|
471
|
+
return isObjectLike(value) && hasOwnProperty$8.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
541
472
|
};
|
|
542
|
-
var isArguments_1 = isArguments$4;
|
|
543
|
-
var isArray$e = Array.isArray;
|
|
544
|
-
var isArray_1 = isArray$e;
|
|
545
|
-
var isBuffer$4 = { exports: {} };
|
|
546
473
|
function stubFalse() {
|
|
547
474
|
return false;
|
|
548
475
|
}
|
|
549
|
-
var
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
556
|
-
var Buffer = moduleExports ? root2.Buffer : void 0;
|
|
557
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
|
|
558
|
-
var isBuffer2 = nativeIsBuffer || stubFalse2;
|
|
559
|
-
module2.exports = isBuffer2;
|
|
560
|
-
})(isBuffer$4, isBuffer$4.exports);
|
|
561
|
-
var isBufferExports = isBuffer$4.exports;
|
|
562
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
563
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
564
|
-
function isIndex$4(value, length) {
|
|
565
|
-
var type2 = typeof value;
|
|
566
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
567
|
-
return !!length && (type2 == "number" || type2 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
568
|
-
}
|
|
569
|
-
var _isIndex = isIndex$4;
|
|
570
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
571
|
-
function isLength$3(value) {
|
|
572
|
-
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
573
|
-
}
|
|
574
|
-
var isLength_1 = isLength$3;
|
|
575
|
-
var baseGetTag$3 = _baseGetTag, isLength$2 = isLength_1, isObjectLike$5 = isObjectLike_1;
|
|
476
|
+
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
477
|
+
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
|
|
478
|
+
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
479
|
+
var Buffer$1 = moduleExports$2 ? root.Buffer : void 0;
|
|
480
|
+
var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
|
|
481
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
576
482
|
var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$6 = "[object Map]", numberTag$4 = "[object Number]", objectTag$3 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$6 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
|
|
577
483
|
var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
|
|
578
484
|
var typedArrayTags = {};
|
|
579
485
|
typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
|
|
580
486
|
typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$6] = typedArrayTags[numberTag$4] = typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$6] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
|
|
581
|
-
function baseIsTypedArray
|
|
582
|
-
return isObjectLike
|
|
487
|
+
function baseIsTypedArray(value) {
|
|
488
|
+
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
583
489
|
}
|
|
584
|
-
|
|
585
|
-
function baseUnary$5(func) {
|
|
490
|
+
function baseUnary(func) {
|
|
586
491
|
return function(value) {
|
|
587
492
|
return func(value);
|
|
588
493
|
};
|
|
589
494
|
}
|
|
590
|
-
var
|
|
591
|
-
var
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
var nodeUtil2 = function() {
|
|
600
|
-
try {
|
|
601
|
-
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
602
|
-
if (types) {
|
|
603
|
-
return types;
|
|
604
|
-
}
|
|
605
|
-
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
606
|
-
} catch (e) {
|
|
495
|
+
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
496
|
+
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
497
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
498
|
+
var freeProcess = moduleExports$1 && freeGlobal.process;
|
|
499
|
+
var nodeUtil = function() {
|
|
500
|
+
try {
|
|
501
|
+
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
502
|
+
if (types) {
|
|
503
|
+
return types;
|
|
607
504
|
}
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var isTypedArray$3 = nodeIsTypedArray ? baseUnary$4(nodeIsTypedArray) : baseIsTypedArray;
|
|
615
|
-
var isTypedArray_1 = isTypedArray$3;
|
|
616
|
-
var baseTimes = _baseTimes, isArguments$3 = isArguments_1, isArray$d = isArray_1, isBuffer$3 = isBufferExports, isIndex$3 = _isIndex, isTypedArray$2 = isTypedArray_1;
|
|
505
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
506
|
+
} catch (e) {
|
|
507
|
+
}
|
|
508
|
+
}();
|
|
509
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
510
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
617
511
|
var objectProto$8 = Object.prototype;
|
|
618
|
-
var hasOwnProperty$
|
|
619
|
-
function arrayLikeKeys
|
|
620
|
-
var isArr = isArray
|
|
512
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
513
|
+
function arrayLikeKeys(value, inherited) {
|
|
514
|
+
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
621
515
|
for (var key in value) {
|
|
622
|
-
if (
|
|
516
|
+
if (hasOwnProperty$7.call(value, key) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
623
517
|
(key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
624
518
|
isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
625
519
|
isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
|
|
626
|
-
isIndex
|
|
520
|
+
isIndex(key, length)))) {
|
|
627
521
|
result.push(key);
|
|
628
522
|
}
|
|
629
523
|
}
|
|
630
524
|
return result;
|
|
631
525
|
}
|
|
632
|
-
|
|
633
|
-
var objectProto$7 = Object.prototype;
|
|
634
|
-
function isPrototype$4(value) {
|
|
635
|
-
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$7;
|
|
636
|
-
return value === proto;
|
|
637
|
-
}
|
|
638
|
-
var _isPrototype = isPrototype$4;
|
|
639
|
-
function overArg$2(func, transform) {
|
|
526
|
+
function overArg(func, transform) {
|
|
640
527
|
return function(arg) {
|
|
641
528
|
return func(transform(arg));
|
|
642
529
|
};
|
|
643
530
|
}
|
|
644
|
-
var
|
|
645
|
-
var
|
|
646
|
-
var
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
var objectProto$6 = Object.prototype;
|
|
650
|
-
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
651
|
-
function baseKeys$2(object) {
|
|
652
|
-
if (!isPrototype$3(object)) {
|
|
531
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
532
|
+
var objectProto$7 = Object.prototype;
|
|
533
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
534
|
+
function baseKeys(object) {
|
|
535
|
+
if (!isPrototype(object)) {
|
|
653
536
|
return nativeKeys(object);
|
|
654
537
|
}
|
|
655
538
|
var result = [];
|
|
656
539
|
for (var key in Object(object)) {
|
|
657
|
-
if (hasOwnProperty$
|
|
540
|
+
if (hasOwnProperty$6.call(object, key) && key != "constructor") {
|
|
658
541
|
result.push(key);
|
|
659
542
|
}
|
|
660
543
|
}
|
|
661
544
|
return result;
|
|
662
545
|
}
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
function isArrayLike$6(value) {
|
|
666
|
-
return value != null && isLength$1(value.length) && !isFunction(value);
|
|
546
|
+
function keys(object) {
|
|
547
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
667
548
|
}
|
|
668
|
-
var
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
549
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
550
|
+
function isKey(value, object) {
|
|
551
|
+
if (isArray(value)) {
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
var type2 = typeof value;
|
|
555
|
+
if (type2 == "number" || type2 == "symbol" || type2 == "boolean" || value == null || isSymbol(value)) {
|
|
556
|
+
return true;
|
|
557
|
+
}
|
|
558
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
672
559
|
}
|
|
673
|
-
var
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
560
|
+
var nativeCreate = getNative(Object, "create");
|
|
561
|
+
function hashClear() {
|
|
562
|
+
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
563
|
+
this.size = 0;
|
|
677
564
|
}
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
if (object != null) {
|
|
682
|
-
for (var key in Object(object)) {
|
|
683
|
-
result.push(key);
|
|
684
|
-
}
|
|
685
|
-
}
|
|
565
|
+
function hashDelete(key) {
|
|
566
|
+
var result = this.has(key) && delete this.__data__[key];
|
|
567
|
+
this.size -= result ? 1 : 0;
|
|
686
568
|
return result;
|
|
687
569
|
}
|
|
688
|
-
var
|
|
689
|
-
var
|
|
570
|
+
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
571
|
+
var objectProto$6 = Object.prototype;
|
|
572
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
573
|
+
function hashGet(key) {
|
|
574
|
+
var data = this.__data__;
|
|
575
|
+
if (nativeCreate) {
|
|
576
|
+
var result = data[key];
|
|
577
|
+
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
578
|
+
}
|
|
579
|
+
return hasOwnProperty$5.call(data, key) ? data[key] : void 0;
|
|
580
|
+
}
|
|
690
581
|
var objectProto$5 = Object.prototype;
|
|
691
582
|
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
692
|
-
function
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
}
|
|
696
|
-
var isProto = isPrototype$2(object), result = [];
|
|
697
|
-
for (var key in object) {
|
|
698
|
-
if (!(key == "constructor" && (isProto || !hasOwnProperty$4.call(object, key)))) {
|
|
699
|
-
result.push(key);
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
return result;
|
|
583
|
+
function hashHas(key) {
|
|
584
|
+
var data = this.__data__;
|
|
585
|
+
return nativeCreate ? data[key] !== void 0 : hasOwnProperty$4.call(data, key);
|
|
703
586
|
}
|
|
704
|
-
var
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
var copyObject$2 = _copyObject, keysIn$2 = keysIn_1;
|
|
711
|
-
function baseAssignIn$1(object, source) {
|
|
712
|
-
return object && copyObject$2(source, keysIn$2(source), object);
|
|
713
|
-
}
|
|
714
|
-
var _baseAssignIn = baseAssignIn$1;
|
|
715
|
-
var _cloneBuffer = { exports: {} };
|
|
716
|
-
_cloneBuffer.exports;
|
|
717
|
-
(function(module2, exports2) {
|
|
718
|
-
var root2 = _root;
|
|
719
|
-
var freeExports = exports2 && !exports2.nodeType && exports2;
|
|
720
|
-
var freeModule = freeExports && true && module2 && !module2.nodeType && module2;
|
|
721
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
722
|
-
var Buffer = moduleExports ? root2.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
723
|
-
function cloneBuffer2(buffer, isDeep) {
|
|
724
|
-
if (isDeep) {
|
|
725
|
-
return buffer.slice();
|
|
726
|
-
}
|
|
727
|
-
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
728
|
-
buffer.copy(result);
|
|
729
|
-
return result;
|
|
730
|
-
}
|
|
731
|
-
module2.exports = cloneBuffer2;
|
|
732
|
-
})(_cloneBuffer, _cloneBuffer.exports);
|
|
733
|
-
var _cloneBufferExports = _cloneBuffer.exports;
|
|
734
|
-
function copyArray$2(source, array) {
|
|
735
|
-
var index2 = -1, length = source.length;
|
|
736
|
-
array || (array = Array(length));
|
|
737
|
-
while (++index2 < length) {
|
|
738
|
-
array[index2] = source[index2];
|
|
739
|
-
}
|
|
740
|
-
return array;
|
|
587
|
+
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
588
|
+
function hashSet(key, value) {
|
|
589
|
+
var data = this.__data__;
|
|
590
|
+
this.size += this.has(key) ? 0 : 1;
|
|
591
|
+
data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
592
|
+
return this;
|
|
741
593
|
}
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
594
|
+
function Hash(entries) {
|
|
595
|
+
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
596
|
+
this.clear();
|
|
745
597
|
while (++index2 < length) {
|
|
746
|
-
var
|
|
747
|
-
|
|
748
|
-
result[resIndex++] = value;
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
return result;
|
|
752
|
-
}
|
|
753
|
-
var _arrayFilter = arrayFilter$1;
|
|
754
|
-
function stubArray$2() {
|
|
755
|
-
return [];
|
|
756
|
-
}
|
|
757
|
-
var stubArray_1 = stubArray$2;
|
|
758
|
-
var arrayFilter = _arrayFilter, stubArray$1 = stubArray_1;
|
|
759
|
-
var objectProto$4 = Object.prototype;
|
|
760
|
-
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
761
|
-
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
762
|
-
var getSymbols$3 = !nativeGetSymbols$1 ? stubArray$1 : function(object) {
|
|
763
|
-
if (object == null) {
|
|
764
|
-
return [];
|
|
598
|
+
var entry = entries[index2];
|
|
599
|
+
this.set(entry[0], entry[1]);
|
|
765
600
|
}
|
|
766
|
-
object = Object(object);
|
|
767
|
-
return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
|
|
768
|
-
return propertyIsEnumerable.call(object, symbol);
|
|
769
|
-
});
|
|
770
|
-
};
|
|
771
|
-
var _getSymbols = getSymbols$3;
|
|
772
|
-
var copyObject$1 = _copyObject, getSymbols$2 = _getSymbols;
|
|
773
|
-
function copySymbols$1(source, object) {
|
|
774
|
-
return copyObject$1(source, getSymbols$2(source), object);
|
|
775
601
|
}
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
602
|
+
Hash.prototype.clear = hashClear;
|
|
603
|
+
Hash.prototype["delete"] = hashDelete;
|
|
604
|
+
Hash.prototype.get = hashGet;
|
|
605
|
+
Hash.prototype.has = hashHas;
|
|
606
|
+
Hash.prototype.set = hashSet;
|
|
607
|
+
function listCacheClear() {
|
|
608
|
+
this.__data__ = [];
|
|
609
|
+
this.size = 0;
|
|
783
610
|
}
|
|
784
|
-
|
|
785
|
-
var
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
790
|
-
var getSymbolsIn$2 = !nativeGetSymbols ? stubArray : function(object) {
|
|
791
|
-
var result = [];
|
|
792
|
-
while (object) {
|
|
793
|
-
arrayPush$2(result, getSymbols$1(object));
|
|
794
|
-
object = getPrototype$1(object);
|
|
795
|
-
}
|
|
796
|
-
return result;
|
|
797
|
-
};
|
|
798
|
-
var _getSymbolsIn = getSymbolsIn$2;
|
|
799
|
-
var copyObject = _copyObject, getSymbolsIn$1 = _getSymbolsIn;
|
|
800
|
-
function copySymbolsIn$1(source, object) {
|
|
801
|
-
return copyObject(source, getSymbolsIn$1(source), object);
|
|
802
|
-
}
|
|
803
|
-
var _copySymbolsIn = copySymbolsIn$1;
|
|
804
|
-
var arrayPush$1 = _arrayPush, isArray$c = isArray_1;
|
|
805
|
-
function baseGetAllKeys$2(object, keysFunc, symbolsFunc) {
|
|
806
|
-
var result = keysFunc(object);
|
|
807
|
-
return isArray$c(object) ? result : arrayPush$1(result, symbolsFunc(object));
|
|
808
|
-
}
|
|
809
|
-
var _baseGetAllKeys = baseGetAllKeys$2;
|
|
810
|
-
var baseGetAllKeys$1 = _baseGetAllKeys, getSymbols = _getSymbols, keys$3 = keys_1;
|
|
811
|
-
function getAllKeys$2(object) {
|
|
812
|
-
return baseGetAllKeys$1(object, keys$3, getSymbols);
|
|
813
|
-
}
|
|
814
|
-
var _getAllKeys = getAllKeys$2;
|
|
815
|
-
var baseGetAllKeys = _baseGetAllKeys, getSymbolsIn = _getSymbolsIn, keysIn$1 = keysIn_1;
|
|
816
|
-
function getAllKeysIn$1(object) {
|
|
817
|
-
return baseGetAllKeys(object, keysIn$1, getSymbolsIn);
|
|
818
|
-
}
|
|
819
|
-
var _getAllKeysIn = getAllKeysIn$1;
|
|
820
|
-
var getNative$3 = _getNative, root$4 = _root;
|
|
821
|
-
var DataView$1 = getNative$3(root$4, "DataView");
|
|
822
|
-
var _DataView = DataView$1;
|
|
823
|
-
var getNative$2 = _getNative, root$3 = _root;
|
|
824
|
-
var Promise$2 = getNative$2(root$3, "Promise");
|
|
825
|
-
var _Promise = Promise$2;
|
|
826
|
-
var getNative$1 = _getNative, root$2 = _root;
|
|
827
|
-
var Set$1 = getNative$1(root$2, "Set");
|
|
828
|
-
var _Set = Set$1;
|
|
829
|
-
var getNative = _getNative, root$1 = _root;
|
|
830
|
-
var WeakMap$1 = getNative(root$1, "WeakMap");
|
|
831
|
-
var _WeakMap = WeakMap$1;
|
|
832
|
-
var DataView = _DataView, Map = _Map, Promise$1 = _Promise, Set = _Set, WeakMap = _WeakMap, baseGetTag$2 = _baseGetTag, toSource = _toSource;
|
|
833
|
-
var mapTag$5 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$5 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
834
|
-
var dataViewTag$3 = "[object DataView]";
|
|
835
|
-
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
836
|
-
var getTag$5 = baseGetTag$2;
|
|
837
|
-
if (DataView && getTag$5(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map && getTag$5(new Map()) != mapTag$5 || Promise$1 && getTag$5(Promise$1.resolve()) != promiseTag || Set && getTag$5(new Set()) != setTag$5 || WeakMap && getTag$5(new WeakMap()) != weakMapTag$1) {
|
|
838
|
-
getTag$5 = function(value) {
|
|
839
|
-
var result = baseGetTag$2(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
840
|
-
if (ctorString) {
|
|
841
|
-
switch (ctorString) {
|
|
842
|
-
case dataViewCtorString:
|
|
843
|
-
return dataViewTag$3;
|
|
844
|
-
case mapCtorString:
|
|
845
|
-
return mapTag$5;
|
|
846
|
-
case promiseCtorString:
|
|
847
|
-
return promiseTag;
|
|
848
|
-
case setCtorString:
|
|
849
|
-
return setTag$5;
|
|
850
|
-
case weakMapCtorString:
|
|
851
|
-
return weakMapTag$1;
|
|
852
|
-
}
|
|
611
|
+
function assocIndexOf(array, key) {
|
|
612
|
+
var length = array.length;
|
|
613
|
+
while (length--) {
|
|
614
|
+
if (eq(array[length][0], key)) {
|
|
615
|
+
return length;
|
|
853
616
|
}
|
|
854
|
-
return result;
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
|
-
var _getTag = getTag$5;
|
|
858
|
-
var objectProto$3 = Object.prototype;
|
|
859
|
-
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
860
|
-
function initCloneArray$1(array) {
|
|
861
|
-
var length = array.length, result = new array.constructor(length);
|
|
862
|
-
if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
|
|
863
|
-
result.index = array.index;
|
|
864
|
-
result.input = array.input;
|
|
865
617
|
}
|
|
866
|
-
return
|
|
867
|
-
}
|
|
868
|
-
var _initCloneArray = initCloneArray$1;
|
|
869
|
-
var root = _root;
|
|
870
|
-
var Uint8Array$3 = root.Uint8Array;
|
|
871
|
-
var _Uint8Array = Uint8Array$3;
|
|
872
|
-
var Uint8Array$2 = _Uint8Array;
|
|
873
|
-
function cloneArrayBuffer$3(arrayBuffer) {
|
|
874
|
-
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
875
|
-
new Uint8Array$2(result).set(new Uint8Array$2(arrayBuffer));
|
|
876
|
-
return result;
|
|
877
|
-
}
|
|
878
|
-
var _cloneArrayBuffer = cloneArrayBuffer$3;
|
|
879
|
-
var cloneArrayBuffer$2 = _cloneArrayBuffer;
|
|
880
|
-
function cloneDataView$1(dataView, isDeep) {
|
|
881
|
-
var buffer = isDeep ? cloneArrayBuffer$2(dataView.buffer) : dataView.buffer;
|
|
882
|
-
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
883
|
-
}
|
|
884
|
-
var _cloneDataView = cloneDataView$1;
|
|
885
|
-
var reFlags = /\w*$/;
|
|
886
|
-
function cloneRegExp$1(regexp) {
|
|
887
|
-
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
888
|
-
result.lastIndex = regexp.lastIndex;
|
|
889
|
-
return result;
|
|
890
|
-
}
|
|
891
|
-
var _cloneRegExp = cloneRegExp$1;
|
|
892
|
-
var Symbol$4 = _Symbol;
|
|
893
|
-
var symbolProto$2 = Symbol$4 ? Symbol$4.prototype : void 0, symbolValueOf$1 = symbolProto$2 ? symbolProto$2.valueOf : void 0;
|
|
894
|
-
function cloneSymbol$1(symbol) {
|
|
895
|
-
return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
|
|
896
|
-
}
|
|
897
|
-
var _cloneSymbol = cloneSymbol$1;
|
|
898
|
-
var cloneArrayBuffer$1 = _cloneArrayBuffer;
|
|
899
|
-
function cloneTypedArray$1(typedArray, isDeep) {
|
|
900
|
-
var buffer = isDeep ? cloneArrayBuffer$1(typedArray.buffer) : typedArray.buffer;
|
|
901
|
-
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
618
|
+
return -1;
|
|
902
619
|
}
|
|
903
|
-
var
|
|
904
|
-
var
|
|
905
|
-
|
|
906
|
-
var
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
switch (tag) {
|
|
910
|
-
case arrayBufferTag$2:
|
|
911
|
-
return cloneArrayBuffer(object);
|
|
912
|
-
case boolTag$2:
|
|
913
|
-
case dateTag$2:
|
|
914
|
-
return new Ctor(+object);
|
|
915
|
-
case dataViewTag$2:
|
|
916
|
-
return cloneDataView(object, isDeep);
|
|
917
|
-
case float32Tag$1:
|
|
918
|
-
case float64Tag$1:
|
|
919
|
-
case int8Tag$1:
|
|
920
|
-
case int16Tag$1:
|
|
921
|
-
case int32Tag$1:
|
|
922
|
-
case uint8Tag$1:
|
|
923
|
-
case uint8ClampedTag$1:
|
|
924
|
-
case uint16Tag$1:
|
|
925
|
-
case uint32Tag$1:
|
|
926
|
-
return cloneTypedArray(object, isDeep);
|
|
927
|
-
case mapTag$4:
|
|
928
|
-
return new Ctor();
|
|
929
|
-
case numberTag$3:
|
|
930
|
-
case stringTag$2:
|
|
931
|
-
return new Ctor(object);
|
|
932
|
-
case regexpTag$2:
|
|
933
|
-
return cloneRegExp(object);
|
|
934
|
-
case setTag$4:
|
|
935
|
-
return new Ctor();
|
|
936
|
-
case symbolTag$3:
|
|
937
|
-
return cloneSymbol(object);
|
|
620
|
+
var arrayProto$1 = Array.prototype;
|
|
621
|
+
var splice$1 = arrayProto$1.splice;
|
|
622
|
+
function listCacheDelete(key) {
|
|
623
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
624
|
+
if (index2 < 0) {
|
|
625
|
+
return false;
|
|
938
626
|
}
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
function object() {
|
|
627
|
+
var lastIndex = data.length - 1;
|
|
628
|
+
if (index2 == lastIndex) {
|
|
629
|
+
data.pop();
|
|
630
|
+
} else {
|
|
631
|
+
splice$1.call(data, index2, 1);
|
|
945
632
|
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
return {};
|
|
949
|
-
}
|
|
950
|
-
if (objectCreate) {
|
|
951
|
-
return objectCreate(proto);
|
|
952
|
-
}
|
|
953
|
-
object.prototype = proto;
|
|
954
|
-
var result = new object();
|
|
955
|
-
object.prototype = void 0;
|
|
956
|
-
return result;
|
|
957
|
-
};
|
|
958
|
-
}();
|
|
959
|
-
var _baseCreate = baseCreate$1;
|
|
960
|
-
var baseCreate = _baseCreate, getPrototype = _getPrototype, isPrototype$1 = _isPrototype;
|
|
961
|
-
function initCloneObject$1(object) {
|
|
962
|
-
return typeof object.constructor == "function" && !isPrototype$1(object) ? baseCreate(getPrototype(object)) : {};
|
|
633
|
+
--this.size;
|
|
634
|
+
return true;
|
|
963
635
|
}
|
|
964
|
-
|
|
965
|
-
var
|
|
966
|
-
|
|
967
|
-
function baseIsMap$1(value) {
|
|
968
|
-
return isObjectLike$4(value) && getTag$4(value) == mapTag$3;
|
|
969
|
-
}
|
|
970
|
-
var _baseIsMap = baseIsMap$1;
|
|
971
|
-
var baseIsMap = _baseIsMap, baseUnary$3 = _baseUnary, nodeUtil$1 = _nodeUtilExports;
|
|
972
|
-
var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
|
|
973
|
-
var isMap$1 = nodeIsMap ? baseUnary$3(nodeIsMap) : baseIsMap;
|
|
974
|
-
var isMap_1 = isMap$1;
|
|
975
|
-
var getTag$3 = _getTag, isObjectLike$3 = isObjectLike_1;
|
|
976
|
-
var setTag$3 = "[object Set]";
|
|
977
|
-
function baseIsSet$1(value) {
|
|
978
|
-
return isObjectLike$3(value) && getTag$3(value) == setTag$3;
|
|
636
|
+
function listCacheGet(key) {
|
|
637
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
638
|
+
return index2 < 0 ? void 0 : data[index2][1];
|
|
979
639
|
}
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
var
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
989
|
-
var cloneableTags = {};
|
|
990
|
-
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$2] = cloneableTags[numberTag$2] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$2] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$2] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
991
|
-
cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
992
|
-
function baseClone$1(value, bitmask, customizer, key, object, stack) {
|
|
993
|
-
var result, isDeep = bitmask & CLONE_DEEP_FLAG$1, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG$1;
|
|
994
|
-
if (customizer) {
|
|
995
|
-
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
996
|
-
}
|
|
997
|
-
if (result !== void 0) {
|
|
998
|
-
return result;
|
|
999
|
-
}
|
|
1000
|
-
if (!isObject$3(value)) {
|
|
1001
|
-
return value;
|
|
1002
|
-
}
|
|
1003
|
-
var isArr = isArray$b(value);
|
|
1004
|
-
if (isArr) {
|
|
1005
|
-
result = initCloneArray(value);
|
|
1006
|
-
if (!isDeep) {
|
|
1007
|
-
return copyArray$1(value, result);
|
|
1008
|
-
}
|
|
640
|
+
function listCacheHas(key) {
|
|
641
|
+
return assocIndexOf(this.__data__, key) > -1;
|
|
642
|
+
}
|
|
643
|
+
function listCacheSet(key, value) {
|
|
644
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
645
|
+
if (index2 < 0) {
|
|
646
|
+
++this.size;
|
|
647
|
+
data.push([key, value]);
|
|
1009
648
|
} else {
|
|
1010
|
-
|
|
1011
|
-
if (isBuffer$2(value)) {
|
|
1012
|
-
return cloneBuffer(value, isDeep);
|
|
1013
|
-
}
|
|
1014
|
-
if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
|
|
1015
|
-
result = isFlat || isFunc ? {} : initCloneObject(value);
|
|
1016
|
-
if (!isDeep) {
|
|
1017
|
-
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
|
|
1018
|
-
}
|
|
1019
|
-
} else {
|
|
1020
|
-
if (!cloneableTags[tag]) {
|
|
1021
|
-
return object ? value : {};
|
|
1022
|
-
}
|
|
1023
|
-
result = initCloneByTag(value, tag, isDeep);
|
|
1024
|
-
}
|
|
1025
|
-
}
|
|
1026
|
-
stack || (stack = new Stack$2());
|
|
1027
|
-
var stacked = stack.get(value);
|
|
1028
|
-
if (stacked) {
|
|
1029
|
-
return stacked;
|
|
649
|
+
data[index2][1] = value;
|
|
1030
650
|
}
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
});
|
|
651
|
+
return this;
|
|
652
|
+
}
|
|
653
|
+
function ListCache(entries) {
|
|
654
|
+
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
655
|
+
this.clear();
|
|
656
|
+
while (++index2 < length) {
|
|
657
|
+
var entry = entries[index2];
|
|
658
|
+
this.set(entry[0], entry[1]);
|
|
1040
659
|
}
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
660
|
+
}
|
|
661
|
+
ListCache.prototype.clear = listCacheClear;
|
|
662
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
663
|
+
ListCache.prototype.get = listCacheGet;
|
|
664
|
+
ListCache.prototype.has = listCacheHas;
|
|
665
|
+
ListCache.prototype.set = listCacheSet;
|
|
666
|
+
var Map = getNative(root, "Map");
|
|
667
|
+
function mapCacheClear() {
|
|
668
|
+
this.size = 0;
|
|
669
|
+
this.__data__ = {
|
|
670
|
+
"hash": new Hash(),
|
|
671
|
+
"map": new (Map || ListCache)(),
|
|
672
|
+
"string": new Hash()
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
function isKeyable(value) {
|
|
676
|
+
var type2 = typeof value;
|
|
677
|
+
return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null;
|
|
678
|
+
}
|
|
679
|
+
function getMapData(map, key) {
|
|
680
|
+
var data = map.__data__;
|
|
681
|
+
return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
|
|
682
|
+
}
|
|
683
|
+
function mapCacheDelete(key) {
|
|
684
|
+
var result = getMapData(this, key)["delete"](key);
|
|
685
|
+
this.size -= result ? 1 : 0;
|
|
1050
686
|
return result;
|
|
1051
687
|
}
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
|
|
1055
|
-
function cloneDeep(value) {
|
|
1056
|
-
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
688
|
+
function mapCacheGet(key) {
|
|
689
|
+
return getMapData(this, key).get(key);
|
|
1057
690
|
}
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
var baseGetTag$1 = _baseGetTag, isObjectLike$2 = isObjectLike_1;
|
|
1061
|
-
var numberTag$1 = "[object Number]";
|
|
1062
|
-
function isNumber(value) {
|
|
1063
|
-
return typeof value == "number" || isObjectLike$2(value) && baseGetTag$1(value) == numberTag$1;
|
|
691
|
+
function mapCacheHas(key) {
|
|
692
|
+
return getMapData(this, key).has(key);
|
|
1064
693
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
return typeof value == "symbol" || isObjectLike$1(value) && baseGetTag(value) == symbolTag$1;
|
|
694
|
+
function mapCacheSet(key, value) {
|
|
695
|
+
var data = getMapData(this, key), size = data.size;
|
|
696
|
+
data.set(key, value);
|
|
697
|
+
this.size += data.size == size ? 0 : 1;
|
|
698
|
+
return this;
|
|
1071
699
|
}
|
|
1072
|
-
|
|
1073
|
-
var
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
}
|
|
1079
|
-
var type2 = typeof value;
|
|
1080
|
-
if (type2 == "number" || type2 == "symbol" || type2 == "boolean" || value == null || isSymbol$3(value)) {
|
|
1081
|
-
return true;
|
|
700
|
+
function MapCache(entries) {
|
|
701
|
+
var index2 = -1, length = entries == null ? 0 : entries.length;
|
|
702
|
+
this.clear();
|
|
703
|
+
while (++index2 < length) {
|
|
704
|
+
var entry = entries[index2];
|
|
705
|
+
this.set(entry[0], entry[1]);
|
|
1082
706
|
}
|
|
1083
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
1084
707
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
708
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
709
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
710
|
+
MapCache.prototype.get = mapCacheGet;
|
|
711
|
+
MapCache.prototype.has = mapCacheHas;
|
|
712
|
+
MapCache.prototype.set = mapCacheSet;
|
|
1087
713
|
var FUNC_ERROR_TEXT = "Expected a function";
|
|
1088
|
-
function memoize
|
|
714
|
+
function memoize(func, resolver) {
|
|
1089
715
|
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
1090
716
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
1091
717
|
}
|
|
@@ -1098,14 +724,12 @@ function memoize$1(func, resolver) {
|
|
|
1098
724
|
memoized.cache = cache.set(key, result) || cache;
|
|
1099
725
|
return result;
|
|
1100
726
|
};
|
|
1101
|
-
memoized.cache = new (memoize
|
|
727
|
+
memoized.cache = new (memoize.Cache || MapCache)();
|
|
1102
728
|
return memoized;
|
|
1103
729
|
}
|
|
1104
|
-
memoize
|
|
1105
|
-
var memoize_1 = memoize$1;
|
|
1106
|
-
var memoize = memoize_1;
|
|
730
|
+
memoize.Cache = MapCache;
|
|
1107
731
|
var MAX_MEMOIZE_SIZE = 500;
|
|
1108
|
-
function memoizeCapped
|
|
732
|
+
function memoizeCapped(func) {
|
|
1109
733
|
var result = memoize(func, function(key) {
|
|
1110
734
|
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
1111
735
|
cache.clear();
|
|
@@ -1115,11 +739,9 @@ function memoizeCapped$1(func) {
|
|
|
1115
739
|
var cache = result.cache;
|
|
1116
740
|
return result;
|
|
1117
741
|
}
|
|
1118
|
-
var _memoizeCapped = memoizeCapped$1;
|
|
1119
|
-
var memoizeCapped = _memoizeCapped;
|
|
1120
742
|
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
1121
743
|
var reEscapeChar = /\\(\\)?/g;
|
|
1122
|
-
var stringToPath
|
|
744
|
+
var stringToPath = memoizeCapped(function(string) {
|
|
1123
745
|
var result = [];
|
|
1124
746
|
if (string.charCodeAt(0) === 46) {
|
|
1125
747
|
result.push("");
|
|
@@ -1129,405 +751,350 @@ var stringToPath$1 = memoizeCapped(function(string) {
|
|
|
1129
751
|
});
|
|
1130
752
|
return result;
|
|
1131
753
|
});
|
|
1132
|
-
|
|
1133
|
-
function arrayMap$3(array, iteratee) {
|
|
1134
|
-
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
1135
|
-
while (++index2 < length) {
|
|
1136
|
-
result[index2] = iteratee(array[index2], index2, array);
|
|
1137
|
-
}
|
|
1138
|
-
return result;
|
|
1139
|
-
}
|
|
1140
|
-
var _arrayMap = arrayMap$3;
|
|
1141
|
-
var Symbol$3 = _Symbol, arrayMap$2 = _arrayMap, isArray$9 = isArray_1, isSymbol$2 = isSymbol_1;
|
|
1142
|
-
var INFINITY$1 = 1 / 0;
|
|
1143
|
-
var symbolProto$1 = Symbol$3 ? Symbol$3.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
|
|
1144
|
-
function baseToString$1(value) {
|
|
1145
|
-
if (typeof value == "string") {
|
|
1146
|
-
return value;
|
|
1147
|
-
}
|
|
1148
|
-
if (isArray$9(value)) {
|
|
1149
|
-
return arrayMap$2(value, baseToString$1) + "";
|
|
1150
|
-
}
|
|
1151
|
-
if (isSymbol$2(value)) {
|
|
1152
|
-
return symbolToString ? symbolToString.call(value) : "";
|
|
1153
|
-
}
|
|
1154
|
-
var result = value + "";
|
|
1155
|
-
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
1156
|
-
}
|
|
1157
|
-
var _baseToString = baseToString$1;
|
|
1158
|
-
var baseToString = _baseToString;
|
|
1159
|
-
function toString$2(value) {
|
|
754
|
+
function toString(value) {
|
|
1160
755
|
return value == null ? "" : baseToString(value);
|
|
1161
756
|
}
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
function castPath$4(value, object) {
|
|
1165
|
-
if (isArray$8(value)) {
|
|
757
|
+
function castPath(value, object) {
|
|
758
|
+
if (isArray(value)) {
|
|
1166
759
|
return value;
|
|
1167
760
|
}
|
|
1168
|
-
return isKey
|
|
761
|
+
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
1169
762
|
}
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
var INFINITY = 1 / 0;
|
|
1173
|
-
function toKey$5(value) {
|
|
1174
|
-
if (typeof value == "string" || isSymbol$1(value)) {
|
|
763
|
+
function toKey(value) {
|
|
764
|
+
if (typeof value == "string" || isSymbol(value)) {
|
|
1175
765
|
return value;
|
|
1176
766
|
}
|
|
1177
767
|
var result = value + "";
|
|
1178
|
-
return result == "0" && 1 / value == -
|
|
768
|
+
return result == "0" && 1 / value == -Infinity ? "-0" : result;
|
|
1179
769
|
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
function baseGet$4(object, path) {
|
|
1183
|
-
path = castPath$3(path, object);
|
|
770
|
+
function baseGet(object, path) {
|
|
771
|
+
path = castPath(path, object);
|
|
1184
772
|
var index2 = 0, length = path.length;
|
|
1185
773
|
while (object != null && index2 < length) {
|
|
1186
|
-
object = object[toKey
|
|
774
|
+
object = object[toKey(path[index2++])];
|
|
1187
775
|
}
|
|
1188
776
|
return index2 && index2 == length ? object : void 0;
|
|
1189
777
|
}
|
|
1190
|
-
|
|
1191
|
-
var
|
|
1192
|
-
|
|
1193
|
-
if (!isObject$2(object)) {
|
|
1194
|
-
return object;
|
|
1195
|
-
}
|
|
1196
|
-
path = castPath$2(path, object);
|
|
1197
|
-
var index2 = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
1198
|
-
while (nested != null && ++index2 < length) {
|
|
1199
|
-
var key = toKey$3(path[index2]), newValue = value;
|
|
1200
|
-
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1201
|
-
return object;
|
|
1202
|
-
}
|
|
1203
|
-
if (index2 != lastIndex) {
|
|
1204
|
-
var objValue = nested[key];
|
|
1205
|
-
newValue = customizer ? customizer(objValue, key, nested) : void 0;
|
|
1206
|
-
if (newValue === void 0) {
|
|
1207
|
-
newValue = isObject$2(objValue) ? objValue : isIndex$2(path[index2 + 1]) ? [] : {};
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
assignValue(nested, key, newValue);
|
|
1211
|
-
nested = nested[key];
|
|
1212
|
-
}
|
|
1213
|
-
return object;
|
|
1214
|
-
}
|
|
1215
|
-
var _baseSet = baseSet$1;
|
|
1216
|
-
var baseGet$3 = _baseGet, baseSet = _baseSet, castPath$1 = _castPath;
|
|
1217
|
-
function basePickBy$1(object, paths, predicate) {
|
|
1218
|
-
var index2 = -1, length = paths.length, result = {};
|
|
1219
|
-
while (++index2 < length) {
|
|
1220
|
-
var path = paths[index2], value = baseGet$3(object, path);
|
|
1221
|
-
if (predicate(value, path)) {
|
|
1222
|
-
baseSet(result, castPath$1(path, object), value);
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
return result;
|
|
1226
|
-
}
|
|
1227
|
-
var _basePickBy = basePickBy$1;
|
|
1228
|
-
function baseHasIn$1(object, key) {
|
|
1229
|
-
return object != null && key in Object(object);
|
|
778
|
+
function get(object, path, defaultValue) {
|
|
779
|
+
var result = object == null ? void 0 : baseGet(object, path);
|
|
780
|
+
return result === void 0 ? defaultValue : result;
|
|
1230
781
|
}
|
|
1231
|
-
|
|
1232
|
-
var
|
|
1233
|
-
function hasPath$1(object, path, hasFunc) {
|
|
1234
|
-
path = castPath(path, object);
|
|
1235
|
-
var index2 = -1, length = path.length, result = false;
|
|
782
|
+
function arrayPush(array, values) {
|
|
783
|
+
var index2 = -1, length = values.length, offset = array.length;
|
|
1236
784
|
while (++index2 < length) {
|
|
1237
|
-
|
|
1238
|
-
if (!(result = object != null && hasFunc(object, key))) {
|
|
1239
|
-
break;
|
|
1240
|
-
}
|
|
1241
|
-
object = object[key];
|
|
1242
|
-
}
|
|
1243
|
-
if (result || ++index2 != length) {
|
|
1244
|
-
return result;
|
|
785
|
+
array[offset + index2] = values[index2];
|
|
1245
786
|
}
|
|
1246
|
-
|
|
1247
|
-
return !!length && isLength(length) && isIndex$1(key, length) && (isArray$7(object) || isArguments$2(object));
|
|
1248
|
-
}
|
|
1249
|
-
var _hasPath = hasPath$1;
|
|
1250
|
-
var baseHasIn = _baseHasIn, hasPath = _hasPath;
|
|
1251
|
-
function hasIn$2(object, path) {
|
|
1252
|
-
return object != null && hasPath(object, path, baseHasIn);
|
|
1253
|
-
}
|
|
1254
|
-
var hasIn_1 = hasIn$2;
|
|
1255
|
-
var basePickBy = _basePickBy, hasIn$1 = hasIn_1;
|
|
1256
|
-
function basePick$1(object, paths) {
|
|
1257
|
-
return basePickBy(object, paths, function(value, path) {
|
|
1258
|
-
return hasIn$1(object, path);
|
|
1259
|
-
});
|
|
787
|
+
return array;
|
|
1260
788
|
}
|
|
1261
|
-
var
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
function isFlattenable$1(value) {
|
|
1265
|
-
return isArray$6(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
789
|
+
var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
|
|
790
|
+
function isFlattenable(value) {
|
|
791
|
+
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
1266
792
|
}
|
|
1267
|
-
|
|
1268
|
-
var arrayPush = _arrayPush, isFlattenable = _isFlattenable;
|
|
1269
|
-
function baseFlatten$2(array, depth, predicate, isStrict, result) {
|
|
793
|
+
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
1270
794
|
var index2 = -1, length = array.length;
|
|
1271
795
|
predicate || (predicate = isFlattenable);
|
|
1272
796
|
result || (result = []);
|
|
1273
797
|
while (++index2 < length) {
|
|
1274
798
|
var value = array[index2];
|
|
1275
|
-
if (
|
|
1276
|
-
|
|
1277
|
-
baseFlatten$2(value, depth - 1, predicate, isStrict, result);
|
|
1278
|
-
} else {
|
|
799
|
+
if (predicate(value)) {
|
|
800
|
+
{
|
|
1279
801
|
arrayPush(result, value);
|
|
1280
802
|
}
|
|
1281
|
-
} else
|
|
803
|
+
} else {
|
|
1282
804
|
result[result.length] = value;
|
|
1283
805
|
}
|
|
1284
806
|
}
|
|
1285
807
|
return result;
|
|
1286
808
|
}
|
|
1287
|
-
|
|
1288
|
-
var baseFlatten$1 = _baseFlatten;
|
|
1289
|
-
function flatten$1(array) {
|
|
809
|
+
function flatten(array) {
|
|
1290
810
|
var length = array == null ? 0 : array.length;
|
|
1291
|
-
return length ? baseFlatten
|
|
811
|
+
return length ? baseFlatten(array) : [];
|
|
1292
812
|
}
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
return func.call(thisArg, args[0], args[1]);
|
|
1302
|
-
case 3:
|
|
1303
|
-
return func.call(thisArg, args[0], args[1], args[2]);
|
|
813
|
+
function flatRest(func) {
|
|
814
|
+
return setToString(overRest(func, void 0, flatten), func + "");
|
|
815
|
+
}
|
|
816
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
817
|
+
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
818
|
+
var index2 = -1, length = array == null ? 0 : array.length;
|
|
819
|
+
if (initAccum && length) {
|
|
820
|
+
accumulator = array[++index2];
|
|
1304
821
|
}
|
|
1305
|
-
|
|
822
|
+
while (++index2 < length) {
|
|
823
|
+
accumulator = iteratee(accumulator, array[index2], index2, array);
|
|
824
|
+
}
|
|
825
|
+
return accumulator;
|
|
1306
826
|
}
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
827
|
+
function stackClear() {
|
|
828
|
+
this.__data__ = new ListCache();
|
|
829
|
+
this.size = 0;
|
|
830
|
+
}
|
|
831
|
+
function stackDelete(key) {
|
|
832
|
+
var data = this.__data__, result = data["delete"](key);
|
|
833
|
+
this.size = data.size;
|
|
834
|
+
return result;
|
|
835
|
+
}
|
|
836
|
+
function stackGet(key) {
|
|
837
|
+
return this.__data__.get(key);
|
|
838
|
+
}
|
|
839
|
+
function stackHas(key) {
|
|
840
|
+
return this.__data__.has(key);
|
|
841
|
+
}
|
|
842
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
843
|
+
function stackSet(key, value) {
|
|
844
|
+
var data = this.__data__;
|
|
845
|
+
if (data instanceof ListCache) {
|
|
846
|
+
var pairs = data.__data__;
|
|
847
|
+
if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
848
|
+
pairs.push([key, value]);
|
|
849
|
+
this.size = ++data.size;
|
|
850
|
+
return this;
|
|
1321
851
|
}
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
852
|
+
data = this.__data__ = new MapCache(pairs);
|
|
853
|
+
}
|
|
854
|
+
data.set(key, value);
|
|
855
|
+
this.size = data.size;
|
|
856
|
+
return this;
|
|
1325
857
|
}
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
return value;
|
|
1330
|
-
};
|
|
858
|
+
function Stack(entries) {
|
|
859
|
+
var data = this.__data__ = new ListCache(entries);
|
|
860
|
+
this.size = data.size;
|
|
1331
861
|
}
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
862
|
+
Stack.prototype.clear = stackClear;
|
|
863
|
+
Stack.prototype["delete"] = stackDelete;
|
|
864
|
+
Stack.prototype.get = stackGet;
|
|
865
|
+
Stack.prototype.has = stackHas;
|
|
866
|
+
Stack.prototype.set = stackSet;
|
|
867
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
868
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
869
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
870
|
+
var Buffer = moduleExports ? root.Buffer : void 0;
|
|
871
|
+
Buffer ? Buffer.allocUnsafe : void 0;
|
|
872
|
+
function cloneBuffer(buffer, isDeep) {
|
|
873
|
+
{
|
|
874
|
+
return buffer.slice();
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
function arrayFilter(array, predicate) {
|
|
878
|
+
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
879
|
+
while (++index2 < length) {
|
|
880
|
+
var value = array[index2];
|
|
881
|
+
if (predicate(value, index2, array)) {
|
|
882
|
+
result[resIndex++] = value;
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
return result;
|
|
1335
886
|
}
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
887
|
+
function stubArray() {
|
|
888
|
+
return [];
|
|
889
|
+
}
|
|
890
|
+
var objectProto$4 = Object.prototype;
|
|
891
|
+
var propertyIsEnumerable = objectProto$4.propertyIsEnumerable;
|
|
892
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
893
|
+
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
894
|
+
if (object == null) {
|
|
895
|
+
return [];
|
|
896
|
+
}
|
|
897
|
+
object = Object(object);
|
|
898
|
+
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
899
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
1344
900
|
});
|
|
1345
901
|
};
|
|
1346
|
-
|
|
1347
|
-
var
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
return
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
902
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
903
|
+
var result = keysFunc(object);
|
|
904
|
+
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
905
|
+
}
|
|
906
|
+
function getAllKeys(object) {
|
|
907
|
+
return baseGetAllKeys(object, keys, getSymbols);
|
|
908
|
+
}
|
|
909
|
+
var DataView = getNative(root, "DataView");
|
|
910
|
+
var Promise$1 = getNative(root, "Promise");
|
|
911
|
+
var Set = getNative(root, "Set");
|
|
912
|
+
var mapTag$5 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$5 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
913
|
+
var dataViewTag$3 = "[object DataView]";
|
|
914
|
+
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap);
|
|
915
|
+
var getTag = baseGetTag;
|
|
916
|
+
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$3 || Map && getTag(new Map()) != mapTag$5 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set && getTag(new Set()) != setTag$5 || WeakMap && getTag(new WeakMap()) != weakMapTag$1) {
|
|
917
|
+
getTag = function(value) {
|
|
918
|
+
var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
919
|
+
if (ctorString) {
|
|
920
|
+
switch (ctorString) {
|
|
921
|
+
case dataViewCtorString:
|
|
922
|
+
return dataViewTag$3;
|
|
923
|
+
case mapCtorString:
|
|
924
|
+
return mapTag$5;
|
|
925
|
+
case promiseCtorString:
|
|
926
|
+
return promiseTag;
|
|
927
|
+
case setCtorString:
|
|
928
|
+
return setTag$5;
|
|
929
|
+
case weakMapCtorString:
|
|
930
|
+
return weakMapTag$1;
|
|
1357
931
|
}
|
|
1358
|
-
} else {
|
|
1359
|
-
count = 0;
|
|
1360
932
|
}
|
|
1361
|
-
return
|
|
933
|
+
return result;
|
|
1362
934
|
};
|
|
1363
935
|
}
|
|
1364
|
-
var
|
|
1365
|
-
var
|
|
1366
|
-
|
|
1367
|
-
var
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
936
|
+
var objectProto$3 = Object.prototype;
|
|
937
|
+
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
938
|
+
function initCloneArray(array) {
|
|
939
|
+
var length = array.length, result = new array.constructor(length);
|
|
940
|
+
if (length && typeof array[0] == "string" && hasOwnProperty$3.call(array, "index")) {
|
|
941
|
+
result.index = array.index;
|
|
942
|
+
result.input = array.input;
|
|
943
|
+
}
|
|
944
|
+
return result;
|
|
945
|
+
}
|
|
946
|
+
var Uint8Array$1 = root.Uint8Array;
|
|
947
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
948
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
949
|
+
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
950
|
+
return result;
|
|
1371
951
|
}
|
|
1372
|
-
|
|
1373
|
-
var
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
952
|
+
function cloneDataView(dataView, isDeep) {
|
|
953
|
+
var buffer = cloneArrayBuffer(dataView.buffer);
|
|
954
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
955
|
+
}
|
|
956
|
+
var reFlags = /\w*$/;
|
|
957
|
+
function cloneRegExp(regexp) {
|
|
958
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
959
|
+
result.lastIndex = regexp.lastIndex;
|
|
960
|
+
return result;
|
|
961
|
+
}
|
|
962
|
+
var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
|
|
963
|
+
function cloneSymbol(symbol) {
|
|
964
|
+
return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
|
|
965
|
+
}
|
|
966
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
967
|
+
var buffer = cloneArrayBuffer(typedArray.buffer);
|
|
968
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
969
|
+
}
|
|
970
|
+
var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$4 = "[object Map]", numberTag$3 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$4 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
|
|
971
|
+
var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
|
|
972
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
973
|
+
var Ctor = object.constructor;
|
|
974
|
+
switch (tag) {
|
|
975
|
+
case arrayBufferTag$2:
|
|
976
|
+
return cloneArrayBuffer(object);
|
|
977
|
+
case boolTag$2:
|
|
978
|
+
case dateTag$2:
|
|
979
|
+
return new Ctor(+object);
|
|
980
|
+
case dataViewTag$2:
|
|
981
|
+
return cloneDataView(object);
|
|
982
|
+
case float32Tag$1:
|
|
983
|
+
case float64Tag$1:
|
|
984
|
+
case int8Tag$1:
|
|
985
|
+
case int16Tag$1:
|
|
986
|
+
case int32Tag$1:
|
|
987
|
+
case uint8Tag$1:
|
|
988
|
+
case uint8ClampedTag$1:
|
|
989
|
+
case uint16Tag$1:
|
|
990
|
+
case uint32Tag$1:
|
|
991
|
+
return cloneTypedArray(object);
|
|
992
|
+
case mapTag$4:
|
|
993
|
+
return new Ctor();
|
|
994
|
+
case numberTag$3:
|
|
995
|
+
case stringTag$2:
|
|
996
|
+
return new Ctor(object);
|
|
997
|
+
case regexpTag$2:
|
|
998
|
+
return cloneRegExp(object);
|
|
999
|
+
case setTag$4:
|
|
1000
|
+
return new Ctor();
|
|
1001
|
+
case symbolTag$2:
|
|
1002
|
+
return cloneSymbol(object);
|
|
1390
1003
|
}
|
|
1391
|
-
return -1;
|
|
1392
|
-
}
|
|
1393
|
-
var _baseFindIndex = baseFindIndex$1;
|
|
1394
|
-
function baseIsNaN$1(value) {
|
|
1395
|
-
return value !== value;
|
|
1396
1004
|
}
|
|
1397
|
-
|
|
1398
|
-
function
|
|
1399
|
-
var index2 = fromIndex - 1, length = array.length;
|
|
1400
|
-
while (++index2 < length) {
|
|
1401
|
-
if (array[index2] === value) {
|
|
1402
|
-
return index2;
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
return -1;
|
|
1005
|
+
function initCloneObject(object) {
|
|
1006
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
|
|
1406
1007
|
}
|
|
1407
|
-
var
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
|
|
1008
|
+
var mapTag$3 = "[object Map]";
|
|
1009
|
+
function baseIsMap(value) {
|
|
1010
|
+
return isObjectLike(value) && getTag(value) == mapTag$3;
|
|
1411
1011
|
}
|
|
1412
|
-
var
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
return index2;
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
return -1;
|
|
1012
|
+
var nodeIsMap = nodeUtil && nodeUtil.isMap;
|
|
1013
|
+
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
1014
|
+
var setTag$3 = "[object Set]";
|
|
1015
|
+
function baseIsSet(value) {
|
|
1016
|
+
return isObjectLike(value) && getTag(value) == setTag$3;
|
|
1421
1017
|
}
|
|
1422
|
-
var
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1425
|
-
var
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1018
|
+
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
1019
|
+
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
1020
|
+
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$2 = "[object Map]", numberTag$2 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
|
|
1021
|
+
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
1022
|
+
var cloneableTags = {};
|
|
1023
|
+
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$2] = cloneableTags[numberTag$2] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$2] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
1024
|
+
cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
1025
|
+
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
1026
|
+
var result;
|
|
1027
|
+
if (result !== void 0) {
|
|
1028
|
+
return result;
|
|
1430
1029
|
}
|
|
1431
|
-
if (
|
|
1432
|
-
|
|
1030
|
+
if (!isObject(value)) {
|
|
1031
|
+
return value;
|
|
1433
1032
|
}
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1033
|
+
var isArr = isArray(value);
|
|
1034
|
+
if (isArr) {
|
|
1035
|
+
result = initCloneArray(value);
|
|
1036
|
+
} else {
|
|
1037
|
+
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
|
|
1038
|
+
if (isBuffer(value)) {
|
|
1039
|
+
return cloneBuffer(value);
|
|
1040
|
+
}
|
|
1041
|
+
if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
|
|
1042
|
+
result = isFunc ? {} : initCloneObject(value);
|
|
1043
|
+
} else {
|
|
1044
|
+
if (!cloneableTags[tag]) {
|
|
1045
|
+
return object ? value : {};
|
|
1439
1046
|
}
|
|
1440
|
-
|
|
1047
|
+
result = initCloneByTag(value, tag);
|
|
1441
1048
|
}
|
|
1442
1049
|
}
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
function pullAll$1(array, values) {
|
|
1448
|
-
return array && array.length && values && values.length ? basePullAll(array, values) : array;
|
|
1449
|
-
}
|
|
1450
|
-
var pullAll_1 = pullAll$1;
|
|
1451
|
-
var baseRest$1 = _baseRest, pullAll = pullAll_1;
|
|
1452
|
-
var pull = baseRest$1(pullAll);
|
|
1453
|
-
var pull_1 = pull;
|
|
1454
|
-
const pull$1 = /* @__PURE__ */ getDefaultExportFromCjs(pull_1);
|
|
1455
|
-
function arrayReduce$1(array, iteratee, accumulator, initAccum) {
|
|
1456
|
-
var index2 = -1, length = array == null ? 0 : array.length;
|
|
1457
|
-
if (initAccum && length) {
|
|
1458
|
-
accumulator = array[++index2];
|
|
1050
|
+
stack || (stack = new Stack());
|
|
1051
|
+
var stacked = stack.get(value);
|
|
1052
|
+
if (stacked) {
|
|
1053
|
+
return stacked;
|
|
1459
1054
|
}
|
|
1460
|
-
|
|
1461
|
-
|
|
1055
|
+
stack.set(value, result);
|
|
1056
|
+
if (isSet(value)) {
|
|
1057
|
+
value.forEach(function(subValue) {
|
|
1058
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
1059
|
+
});
|
|
1060
|
+
} else if (isMap(value)) {
|
|
1061
|
+
value.forEach(function(subValue, key2) {
|
|
1062
|
+
result.set(key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1063
|
+
});
|
|
1462
1064
|
}
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
while (length--) {
|
|
1470
|
-
var key = props[fromRight ? length : ++index2];
|
|
1471
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
1472
|
-
break;
|
|
1473
|
-
}
|
|
1065
|
+
var keysFunc = getAllKeys;
|
|
1066
|
+
var props = isArr ? void 0 : keysFunc(value);
|
|
1067
|
+
arrayEach(props || value, function(subValue, key2) {
|
|
1068
|
+
if (props) {
|
|
1069
|
+
key2 = subValue;
|
|
1070
|
+
subValue = value[key2];
|
|
1474
1071
|
}
|
|
1475
|
-
|
|
1476
|
-
};
|
|
1072
|
+
assignValue(result, key2, baseClone(subValue, bitmask, customizer, key2, value, stack));
|
|
1073
|
+
});
|
|
1074
|
+
return result;
|
|
1477
1075
|
}
|
|
1478
|
-
var
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
var _baseFor = baseFor$1;
|
|
1482
|
-
var baseFor = _baseFor, keys$1 = keys_1;
|
|
1483
|
-
function baseForOwn$1(object, iteratee) {
|
|
1484
|
-
return object && baseFor(object, iteratee, keys$1);
|
|
1485
|
-
}
|
|
1486
|
-
var _baseForOwn = baseForOwn$1;
|
|
1487
|
-
var isArrayLike$3 = isArrayLike_1;
|
|
1488
|
-
function createBaseEach$1(eachFunc, fromRight) {
|
|
1489
|
-
return function(collection, iteratee) {
|
|
1490
|
-
if (collection == null) {
|
|
1491
|
-
return collection;
|
|
1492
|
-
}
|
|
1493
|
-
if (!isArrayLike$3(collection)) {
|
|
1494
|
-
return eachFunc(collection, iteratee);
|
|
1495
|
-
}
|
|
1496
|
-
var length = collection.length, index2 = fromRight ? length : -1, iterable = Object(collection);
|
|
1497
|
-
while (fromRight ? index2-- : ++index2 < length) {
|
|
1498
|
-
if (iteratee(iterable[index2], index2, iterable) === false) {
|
|
1499
|
-
break;
|
|
1500
|
-
}
|
|
1501
|
-
}
|
|
1502
|
-
return collection;
|
|
1503
|
-
};
|
|
1076
|
+
var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4;
|
|
1077
|
+
function cloneDeep(value) {
|
|
1078
|
+
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
|
1504
1079
|
}
|
|
1505
|
-
var _createBaseEach = createBaseEach$1;
|
|
1506
|
-
var baseForOwn = _baseForOwn, createBaseEach = _createBaseEach;
|
|
1507
|
-
var baseEach$3 = createBaseEach(baseForOwn);
|
|
1508
|
-
var _baseEach = baseEach$3;
|
|
1509
1080
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
1510
|
-
function setCacheAdd
|
|
1081
|
+
function setCacheAdd(value) {
|
|
1511
1082
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
1512
1083
|
return this;
|
|
1513
1084
|
}
|
|
1514
|
-
|
|
1515
|
-
function setCacheHas$1(value) {
|
|
1085
|
+
function setCacheHas(value) {
|
|
1516
1086
|
return this.__data__.has(value);
|
|
1517
1087
|
}
|
|
1518
|
-
|
|
1519
|
-
var MapCache = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas;
|
|
1520
|
-
function SetCache$1(values) {
|
|
1088
|
+
function SetCache(values) {
|
|
1521
1089
|
var index2 = -1, length = values == null ? 0 : values.length;
|
|
1522
1090
|
this.__data__ = new MapCache();
|
|
1523
1091
|
while (++index2 < length) {
|
|
1524
1092
|
this.add(values[index2]);
|
|
1525
1093
|
}
|
|
1526
1094
|
}
|
|
1527
|
-
SetCache
|
|
1528
|
-
SetCache
|
|
1529
|
-
|
|
1530
|
-
function arraySome$1(array, predicate) {
|
|
1095
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
1096
|
+
SetCache.prototype.has = setCacheHas;
|
|
1097
|
+
function arraySome(array, predicate) {
|
|
1531
1098
|
var index2 = -1, length = array == null ? 0 : array.length;
|
|
1532
1099
|
while (++index2 < length) {
|
|
1533
1100
|
if (predicate(array[index2], index2, array)) {
|
|
@@ -1536,14 +1103,11 @@ function arraySome$1(array, predicate) {
|
|
|
1536
1103
|
}
|
|
1537
1104
|
return false;
|
|
1538
1105
|
}
|
|
1539
|
-
|
|
1540
|
-
function cacheHas$1(cache, key) {
|
|
1106
|
+
function cacheHas(cache, key) {
|
|
1541
1107
|
return cache.has(key);
|
|
1542
1108
|
}
|
|
1543
|
-
var _cacheHas = cacheHas$1;
|
|
1544
|
-
var SetCache = _SetCache, arraySome = _arraySome, cacheHas = _cacheHas;
|
|
1545
1109
|
var COMPARE_PARTIAL_FLAG$5 = 1, COMPARE_UNORDERED_FLAG$3 = 2;
|
|
1546
|
-
function equalArrays
|
|
1110
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
1547
1111
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$5, arrLength = array.length, othLength = other.length;
|
|
1548
1112
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
1549
1113
|
return false;
|
|
@@ -1586,29 +1150,25 @@ function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) {
|
|
|
1586
1150
|
stack["delete"](other);
|
|
1587
1151
|
return result;
|
|
1588
1152
|
}
|
|
1589
|
-
|
|
1590
|
-
function mapToArray$1(map) {
|
|
1153
|
+
function mapToArray(map) {
|
|
1591
1154
|
var index2 = -1, result = Array(map.size);
|
|
1592
1155
|
map.forEach(function(value, key) {
|
|
1593
1156
|
result[++index2] = [key, value];
|
|
1594
1157
|
});
|
|
1595
1158
|
return result;
|
|
1596
1159
|
}
|
|
1597
|
-
|
|
1598
|
-
function setToArray$1(set) {
|
|
1160
|
+
function setToArray(set) {
|
|
1599
1161
|
var index2 = -1, result = Array(set.size);
|
|
1600
1162
|
set.forEach(function(value) {
|
|
1601
1163
|
result[++index2] = value;
|
|
1602
1164
|
});
|
|
1603
1165
|
return result;
|
|
1604
1166
|
}
|
|
1605
|
-
var _setToArray = setToArray$1;
|
|
1606
|
-
var Symbol$1 = _Symbol, Uint8Array$1 = _Uint8Array, eq$1 = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray;
|
|
1607
1167
|
var COMPARE_PARTIAL_FLAG$4 = 1, COMPARE_UNORDERED_FLAG$2 = 2;
|
|
1608
|
-
var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$1 = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
|
|
1168
|
+
var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
|
|
1609
1169
|
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
|
|
1610
1170
|
var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
1611
|
-
function equalByTag
|
|
1171
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
1612
1172
|
switch (tag) {
|
|
1613
1173
|
case dataViewTag:
|
|
1614
1174
|
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
@@ -1623,8 +1183,8 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
1623
1183
|
return true;
|
|
1624
1184
|
case boolTag:
|
|
1625
1185
|
case dateTag:
|
|
1626
|
-
case numberTag:
|
|
1627
|
-
return eq
|
|
1186
|
+
case numberTag$1:
|
|
1187
|
+
return eq(+object, +other);
|
|
1628
1188
|
case errorTag:
|
|
1629
1189
|
return object.name == other.name && object.message == other.message;
|
|
1630
1190
|
case regexpTag:
|
|
@@ -1644,7 +1204,7 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
1644
1204
|
}
|
|
1645
1205
|
bitmask |= COMPARE_UNORDERED_FLAG$2;
|
|
1646
1206
|
stack.set(object, other);
|
|
1647
|
-
var result = equalArrays
|
|
1207
|
+
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
1648
1208
|
stack["delete"](object);
|
|
1649
1209
|
return result;
|
|
1650
1210
|
case symbolTag:
|
|
@@ -1654,12 +1214,10 @@ function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack)
|
|
|
1654
1214
|
}
|
|
1655
1215
|
return false;
|
|
1656
1216
|
}
|
|
1657
|
-
var _equalByTag = equalByTag$1;
|
|
1658
|
-
var getAllKeys = _getAllKeys;
|
|
1659
1217
|
var COMPARE_PARTIAL_FLAG$3 = 1;
|
|
1660
1218
|
var objectProto$2 = Object.prototype;
|
|
1661
1219
|
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
1662
|
-
function equalObjects
|
|
1220
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1663
1221
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
1664
1222
|
if (objLength != othLength && !isPartial) {
|
|
1665
1223
|
return false;
|
|
@@ -1702,189 +1260,392 @@ function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) {
|
|
|
1702
1260
|
stack["delete"](other);
|
|
1703
1261
|
return result;
|
|
1704
1262
|
}
|
|
1705
|
-
var _equalObjects = equalObjects$1;
|
|
1706
|
-
var Stack$1 = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag$1 = _getTag, isArray$5 = isArray_1, isBuffer$1 = isBufferExports, isTypedArray$1 = isTypedArray_1;
|
|
1707
1263
|
var COMPARE_PARTIAL_FLAG$2 = 1;
|
|
1708
1264
|
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
1709
1265
|
var objectProto$1 = Object.prototype;
|
|
1710
1266
|
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1711
|
-
function baseIsEqualDeep
|
|
1712
|
-
var objIsArr = isArray
|
|
1267
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
1268
|
+
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
|
|
1713
1269
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
1714
1270
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
1715
1271
|
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
1716
|
-
if (isSameTag && isBuffer
|
|
1717
|
-
if (!isBuffer
|
|
1272
|
+
if (isSameTag && isBuffer(object)) {
|
|
1273
|
+
if (!isBuffer(other)) {
|
|
1718
1274
|
return false;
|
|
1719
1275
|
}
|
|
1720
1276
|
objIsArr = true;
|
|
1721
1277
|
objIsObj = false;
|
|
1722
1278
|
}
|
|
1723
1279
|
if (isSameTag && !objIsObj) {
|
|
1724
|
-
stack || (stack = new Stack
|
|
1725
|
-
return objIsArr || isTypedArray
|
|
1280
|
+
stack || (stack = new Stack());
|
|
1281
|
+
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
1726
1282
|
}
|
|
1727
1283
|
if (!(bitmask & COMPARE_PARTIAL_FLAG$2)) {
|
|
1728
1284
|
var objIsWrapped = objIsObj && hasOwnProperty$1.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty$1.call(other, "__wrapped__");
|
|
1729
1285
|
if (objIsWrapped || othIsWrapped) {
|
|
1730
1286
|
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
1731
|
-
stack || (stack = new Stack
|
|
1287
|
+
stack || (stack = new Stack());
|
|
1732
1288
|
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
1733
1289
|
}
|
|
1734
1290
|
}
|
|
1735
1291
|
if (!isSameTag) {
|
|
1736
1292
|
return false;
|
|
1737
1293
|
}
|
|
1738
|
-
stack || (stack = new Stack
|
|
1294
|
+
stack || (stack = new Stack());
|
|
1739
1295
|
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
1740
1296
|
}
|
|
1741
|
-
|
|
1742
|
-
var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike = isObjectLike_1;
|
|
1743
|
-
function baseIsEqual$2(value, other, bitmask, customizer, stack) {
|
|
1297
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
1744
1298
|
if (value === other) {
|
|
1745
1299
|
return true;
|
|
1746
1300
|
}
|
|
1747
1301
|
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
1748
1302
|
return value !== value && other !== other;
|
|
1749
1303
|
}
|
|
1750
|
-
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual
|
|
1304
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
1751
1305
|
}
|
|
1752
|
-
var _baseIsEqual = baseIsEqual$2;
|
|
1753
|
-
var Stack = _Stack, baseIsEqual$1 = _baseIsEqual;
|
|
1754
1306
|
var COMPARE_PARTIAL_FLAG$1 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
1755
|
-
function baseIsMatch
|
|
1756
|
-
var index2 = matchData.length, length = index2
|
|
1307
|
+
function baseIsMatch(object, source, matchData, customizer) {
|
|
1308
|
+
var index2 = matchData.length, length = index2;
|
|
1757
1309
|
if (object == null) {
|
|
1758
1310
|
return !length;
|
|
1759
1311
|
}
|
|
1760
1312
|
object = Object(object);
|
|
1761
1313
|
while (index2--) {
|
|
1762
1314
|
var data = matchData[index2];
|
|
1763
|
-
if (
|
|
1315
|
+
if (data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
|
|
1764
1316
|
return false;
|
|
1765
1317
|
}
|
|
1766
1318
|
}
|
|
1767
1319
|
while (++index2 < length) {
|
|
1768
1320
|
data = matchData[index2];
|
|
1769
1321
|
var key = data[0], objValue = object[key], srcValue = data[1];
|
|
1770
|
-
if (
|
|
1322
|
+
if (data[2]) {
|
|
1771
1323
|
if (objValue === void 0 && !(key in object)) {
|
|
1772
1324
|
return false;
|
|
1773
1325
|
}
|
|
1774
1326
|
} else {
|
|
1775
1327
|
var stack = new Stack();
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
}
|
|
1779
|
-
if (!(result === void 0 ? baseIsEqual$1(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
|
|
1328
|
+
var result;
|
|
1329
|
+
if (!(result === void 0 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG$1 | COMPARE_UNORDERED_FLAG$1, customizer, stack) : result)) {
|
|
1780
1330
|
return false;
|
|
1781
1331
|
}
|
|
1782
1332
|
}
|
|
1783
1333
|
}
|
|
1784
|
-
return true;
|
|
1785
|
-
}
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1334
|
+
return true;
|
|
1335
|
+
}
|
|
1336
|
+
function isStrictComparable(value) {
|
|
1337
|
+
return value === value && !isObject(value);
|
|
1338
|
+
}
|
|
1339
|
+
function getMatchData(object) {
|
|
1340
|
+
var result = keys(object), length = result.length;
|
|
1341
|
+
while (length--) {
|
|
1342
|
+
var key = result[length], value = object[key];
|
|
1343
|
+
result[length] = [key, value, isStrictComparable(value)];
|
|
1344
|
+
}
|
|
1345
|
+
return result;
|
|
1346
|
+
}
|
|
1347
|
+
function matchesStrictComparable(key, srcValue) {
|
|
1348
|
+
return function(object) {
|
|
1349
|
+
if (object == null) {
|
|
1350
|
+
return false;
|
|
1351
|
+
}
|
|
1352
|
+
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
1353
|
+
};
|
|
1354
|
+
}
|
|
1355
|
+
function baseMatches(source) {
|
|
1356
|
+
var matchData = getMatchData(source);
|
|
1357
|
+
if (matchData.length == 1 && matchData[0][2]) {
|
|
1358
|
+
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
1359
|
+
}
|
|
1360
|
+
return function(object) {
|
|
1361
|
+
return object === source || baseIsMatch(object, source, matchData);
|
|
1362
|
+
};
|
|
1363
|
+
}
|
|
1364
|
+
function baseHasIn(object, key) {
|
|
1365
|
+
return object != null && key in Object(object);
|
|
1366
|
+
}
|
|
1367
|
+
function hasPath(object, path, hasFunc) {
|
|
1368
|
+
path = castPath(path, object);
|
|
1369
|
+
var index2 = -1, length = path.length, result = false;
|
|
1370
|
+
while (++index2 < length) {
|
|
1371
|
+
var key = toKey(path[index2]);
|
|
1372
|
+
if (!(result = object != null && hasFunc(object, key))) {
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1375
|
+
object = object[key];
|
|
1376
|
+
}
|
|
1377
|
+
if (result || ++index2 != length) {
|
|
1378
|
+
return result;
|
|
1379
|
+
}
|
|
1380
|
+
length = object == null ? 0 : object.length;
|
|
1381
|
+
return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
|
|
1382
|
+
}
|
|
1383
|
+
function hasIn(object, path) {
|
|
1384
|
+
return object != null && hasPath(object, path, baseHasIn);
|
|
1385
|
+
}
|
|
1386
|
+
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
1387
|
+
function baseMatchesProperty(path, srcValue) {
|
|
1388
|
+
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
1389
|
+
return matchesStrictComparable(toKey(path), srcValue);
|
|
1390
|
+
}
|
|
1391
|
+
return function(object) {
|
|
1392
|
+
var objValue = get(object, path);
|
|
1393
|
+
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1394
|
+
};
|
|
1395
|
+
}
|
|
1396
|
+
function baseProperty(key) {
|
|
1397
|
+
return function(object) {
|
|
1398
|
+
return object == null ? void 0 : object[key];
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
function basePropertyDeep(path) {
|
|
1402
|
+
return function(object) {
|
|
1403
|
+
return baseGet(object, path);
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
function property(path) {
|
|
1407
|
+
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
1408
|
+
}
|
|
1409
|
+
function baseIteratee(value) {
|
|
1410
|
+
if (typeof value == "function") {
|
|
1411
|
+
return value;
|
|
1412
|
+
}
|
|
1413
|
+
if (value == null) {
|
|
1414
|
+
return identity;
|
|
1415
|
+
}
|
|
1416
|
+
if (typeof value == "object") {
|
|
1417
|
+
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
|
|
1418
|
+
}
|
|
1419
|
+
return property(value);
|
|
1420
|
+
}
|
|
1421
|
+
function createBaseFor(fromRight) {
|
|
1422
|
+
return function(object, iteratee, keysFunc) {
|
|
1423
|
+
var index2 = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
|
|
1424
|
+
while (length--) {
|
|
1425
|
+
var key = props[++index2];
|
|
1426
|
+
if (iteratee(iterable[key], key, iterable) === false) {
|
|
1427
|
+
break;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
return object;
|
|
1431
|
+
};
|
|
1432
|
+
}
|
|
1433
|
+
var baseFor = createBaseFor();
|
|
1434
|
+
function baseForOwn(object, iteratee) {
|
|
1435
|
+
return object && baseFor(object, iteratee, keys);
|
|
1436
|
+
}
|
|
1437
|
+
function createBaseEach(eachFunc, fromRight) {
|
|
1438
|
+
return function(collection, iteratee) {
|
|
1439
|
+
if (collection == null) {
|
|
1440
|
+
return collection;
|
|
1441
|
+
}
|
|
1442
|
+
if (!isArrayLike(collection)) {
|
|
1443
|
+
return eachFunc(collection, iteratee);
|
|
1444
|
+
}
|
|
1445
|
+
var length = collection.length, index2 = -1, iterable = Object(collection);
|
|
1446
|
+
while (++index2 < length) {
|
|
1447
|
+
if (iteratee(iterable[index2], index2, iterable) === false) {
|
|
1448
|
+
break;
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
return collection;
|
|
1452
|
+
};
|
|
1453
|
+
}
|
|
1454
|
+
var baseEach = createBaseEach(baseForOwn);
|
|
1455
|
+
function castFunction(value) {
|
|
1456
|
+
return typeof value == "function" ? value : identity;
|
|
1457
|
+
}
|
|
1458
|
+
function forEach(collection, iteratee) {
|
|
1459
|
+
var func = isArray(collection) ? arrayEach : baseEach;
|
|
1460
|
+
return func(collection, castFunction(iteratee));
|
|
1461
|
+
}
|
|
1462
|
+
function baseMap(collection, iteratee) {
|
|
1463
|
+
var index2 = -1, result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
1464
|
+
baseEach(collection, function(value, key, collection2) {
|
|
1465
|
+
result[++index2] = iteratee(value, key, collection2);
|
|
1466
|
+
});
|
|
1467
|
+
return result;
|
|
1468
|
+
}
|
|
1469
|
+
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
1470
|
+
var objectProto = Object.prototype;
|
|
1471
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1472
|
+
function isEmpty(value) {
|
|
1473
|
+
if (value == null) {
|
|
1474
|
+
return true;
|
|
1475
|
+
}
|
|
1476
|
+
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
1477
|
+
return !value.length;
|
|
1478
|
+
}
|
|
1479
|
+
var tag = getTag(value);
|
|
1480
|
+
if (tag == mapTag || tag == setTag) {
|
|
1481
|
+
return !value.size;
|
|
1482
|
+
}
|
|
1483
|
+
if (isPrototype(value)) {
|
|
1484
|
+
return !baseKeys(value).length;
|
|
1485
|
+
}
|
|
1486
|
+
for (var key in value) {
|
|
1487
|
+
if (hasOwnProperty.call(value, key)) {
|
|
1488
|
+
return false;
|
|
1489
|
+
}
|
|
1490
|
+
}
|
|
1491
|
+
return true;
|
|
1492
|
+
}
|
|
1493
|
+
var numberTag = "[object Number]";
|
|
1494
|
+
function isNumber(value) {
|
|
1495
|
+
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
|
|
1496
|
+
}
|
|
1497
|
+
function baseSet(object, path, value, customizer) {
|
|
1498
|
+
if (!isObject(object)) {
|
|
1499
|
+
return object;
|
|
1500
|
+
}
|
|
1501
|
+
path = castPath(path, object);
|
|
1502
|
+
var index2 = -1, length = path.length, lastIndex = length - 1, nested = object;
|
|
1503
|
+
while (nested != null && ++index2 < length) {
|
|
1504
|
+
var key = toKey(path[index2]), newValue = value;
|
|
1505
|
+
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
1506
|
+
return object;
|
|
1507
|
+
}
|
|
1508
|
+
if (index2 != lastIndex) {
|
|
1509
|
+
var objValue = nested[key];
|
|
1510
|
+
newValue = void 0;
|
|
1511
|
+
if (newValue === void 0) {
|
|
1512
|
+
newValue = isObject(objValue) ? objValue : isIndex(path[index2 + 1]) ? [] : {};
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
assignValue(nested, key, newValue);
|
|
1516
|
+
nested = nested[key];
|
|
1517
|
+
}
|
|
1518
|
+
return object;
|
|
1519
|
+
}
|
|
1520
|
+
function basePickBy(object, paths, predicate) {
|
|
1521
|
+
var index2 = -1, length = paths.length, result = {};
|
|
1522
|
+
while (++index2 < length) {
|
|
1523
|
+
var path = paths[index2], value = baseGet(object, path);
|
|
1524
|
+
if (predicate(value, path)) {
|
|
1525
|
+
baseSet(result, castPath(path, object), value);
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
return result;
|
|
1790
1529
|
}
|
|
1791
|
-
|
|
1792
|
-
var
|
|
1793
|
-
|
|
1794
|
-
var result = keys(object), length = result.length;
|
|
1530
|
+
function baseSortBy(array, comparer) {
|
|
1531
|
+
var length = array.length;
|
|
1532
|
+
array.sort(comparer);
|
|
1795
1533
|
while (length--) {
|
|
1796
|
-
|
|
1797
|
-
result[length] = [key, value, isStrictComparable$1(value)];
|
|
1534
|
+
array[length] = array[length].value;
|
|
1798
1535
|
}
|
|
1799
|
-
return
|
|
1536
|
+
return array;
|
|
1800
1537
|
}
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1538
|
+
function compareAscending(value, other) {
|
|
1539
|
+
if (value !== other) {
|
|
1540
|
+
var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
|
|
1541
|
+
var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
|
|
1542
|
+
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
|
1543
|
+
return 1;
|
|
1544
|
+
}
|
|
1545
|
+
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
|
|
1546
|
+
return -1;
|
|
1806
1547
|
}
|
|
1807
|
-
return object[key] === srcValue && (srcValue !== void 0 || key in Object(object));
|
|
1808
|
-
};
|
|
1809
|
-
}
|
|
1810
|
-
var _matchesStrictComparable = matchesStrictComparable$2;
|
|
1811
|
-
var baseIsMatch = _baseIsMatch, getMatchData = _getMatchData, matchesStrictComparable$1 = _matchesStrictComparable;
|
|
1812
|
-
function baseMatches$1(source) {
|
|
1813
|
-
var matchData = getMatchData(source);
|
|
1814
|
-
if (matchData.length == 1 && matchData[0][2]) {
|
|
1815
|
-
return matchesStrictComparable$1(matchData[0][0], matchData[0][1]);
|
|
1816
1548
|
}
|
|
1817
|
-
return
|
|
1818
|
-
return object === source || baseIsMatch(object, source, matchData);
|
|
1819
|
-
};
|
|
1820
|
-
}
|
|
1821
|
-
var _baseMatches = baseMatches$1;
|
|
1822
|
-
var baseGet$2 = _baseGet;
|
|
1823
|
-
function get$1(object, path, defaultValue) {
|
|
1824
|
-
var result = object == null ? void 0 : baseGet$2(object, path);
|
|
1825
|
-
return result === void 0 ? defaultValue : result;
|
|
1549
|
+
return 0;
|
|
1826
1550
|
}
|
|
1827
|
-
|
|
1828
|
-
var
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1551
|
+
function compareMultiple(object, other, orders) {
|
|
1552
|
+
var index2 = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
1553
|
+
while (++index2 < length) {
|
|
1554
|
+
var result = compareAscending(objCriteria[index2], othCriteria[index2]);
|
|
1555
|
+
if (result) {
|
|
1556
|
+
if (index2 >= ordersLength) {
|
|
1557
|
+
return result;
|
|
1558
|
+
}
|
|
1559
|
+
var order = orders[index2];
|
|
1560
|
+
return result * (order == "desc" ? -1 : 1);
|
|
1561
|
+
}
|
|
1833
1562
|
}
|
|
1834
|
-
return
|
|
1835
|
-
var objValue = get(object, path);
|
|
1836
|
-
return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
1837
|
-
};
|
|
1838
|
-
}
|
|
1839
|
-
var _baseMatchesProperty = baseMatchesProperty$1;
|
|
1840
|
-
function baseProperty$1(key) {
|
|
1841
|
-
return function(object) {
|
|
1842
|
-
return object == null ? void 0 : object[key];
|
|
1843
|
-
};
|
|
1563
|
+
return object.index - other.index;
|
|
1844
1564
|
}
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1565
|
+
function baseOrderBy(collection, iteratees, orders) {
|
|
1566
|
+
if (iteratees.length) {
|
|
1567
|
+
iteratees = arrayMap(iteratees, function(iteratee) {
|
|
1568
|
+
if (isArray(iteratee)) {
|
|
1569
|
+
return function(value) {
|
|
1570
|
+
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
1571
|
+
};
|
|
1572
|
+
}
|
|
1573
|
+
return iteratee;
|
|
1574
|
+
});
|
|
1575
|
+
} else {
|
|
1576
|
+
iteratees = [identity];
|
|
1577
|
+
}
|
|
1578
|
+
var index2 = -1;
|
|
1579
|
+
iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
|
|
1580
|
+
var result = baseMap(collection, function(value, key, collection2) {
|
|
1581
|
+
var criteria = arrayMap(iteratees, function(iteratee) {
|
|
1582
|
+
return iteratee(value);
|
|
1583
|
+
});
|
|
1584
|
+
return { "criteria": criteria, "index": ++index2, "value": value };
|
|
1585
|
+
});
|
|
1586
|
+
return baseSortBy(result, function(object, other) {
|
|
1587
|
+
return compareMultiple(object, other, orders);
|
|
1588
|
+
});
|
|
1851
1589
|
}
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1590
|
+
function basePick(object, paths) {
|
|
1591
|
+
return basePickBy(object, paths, function(value, path) {
|
|
1592
|
+
return hasIn(object, path);
|
|
1593
|
+
});
|
|
1856
1594
|
}
|
|
1857
|
-
var
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1595
|
+
var pick = flatRest(function(object, paths) {
|
|
1596
|
+
return object == null ? {} : basePick(object, paths);
|
|
1597
|
+
});
|
|
1598
|
+
var arrayProto = Array.prototype;
|
|
1599
|
+
var splice = arrayProto.splice;
|
|
1600
|
+
function basePullAll(array, values, iteratee, comparator) {
|
|
1601
|
+
var indexOf = baseIndexOf, index2 = -1, length = values.length, seen = array;
|
|
1602
|
+
if (array === values) {
|
|
1603
|
+
values = copyArray(values);
|
|
1865
1604
|
}
|
|
1866
|
-
|
|
1867
|
-
|
|
1605
|
+
while (++index2 < length) {
|
|
1606
|
+
var fromIndex = 0, value = values[index2], computed = value;
|
|
1607
|
+
while ((fromIndex = indexOf(seen, computed, fromIndex)) > -1) {
|
|
1608
|
+
if (seen !== array) {
|
|
1609
|
+
splice.call(seen, fromIndex, 1);
|
|
1610
|
+
}
|
|
1611
|
+
splice.call(array, fromIndex, 1);
|
|
1612
|
+
}
|
|
1868
1613
|
}
|
|
1869
|
-
return
|
|
1614
|
+
return array;
|
|
1615
|
+
}
|
|
1616
|
+
function pullAll(array, values) {
|
|
1617
|
+
return array && array.length && values && values.length ? basePullAll(array, values) : array;
|
|
1870
1618
|
}
|
|
1871
|
-
var
|
|
1872
|
-
function baseReduce
|
|
1619
|
+
var pull = baseRest(pullAll);
|
|
1620
|
+
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
1873
1621
|
eachFunc(collection, function(value, index2, collection2) {
|
|
1874
1622
|
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index2, collection2);
|
|
1875
1623
|
});
|
|
1876
1624
|
return accumulator;
|
|
1877
1625
|
}
|
|
1878
|
-
var _baseReduce = baseReduce$1;
|
|
1879
|
-
var arrayReduce = _arrayReduce, baseEach$2 = _baseEach, baseIteratee$1 = _baseIteratee, baseReduce = _baseReduce, isArray$3 = isArray_1;
|
|
1880
1626
|
function reduce(collection, iteratee, accumulator) {
|
|
1881
|
-
var func = isArray
|
|
1882
|
-
return func(collection, baseIteratee
|
|
1627
|
+
var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
|
|
1628
|
+
return func(collection, baseIteratee(iteratee), accumulator, initAccum, baseEach);
|
|
1629
|
+
}
|
|
1630
|
+
var sortBy = baseRest(function(collection, iteratees) {
|
|
1631
|
+
if (collection == null) {
|
|
1632
|
+
return [];
|
|
1633
|
+
}
|
|
1634
|
+
var length = iteratees.length;
|
|
1635
|
+
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
|
1636
|
+
iteratees = [];
|
|
1637
|
+
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
|
1638
|
+
iteratees = [iteratees[0]];
|
|
1639
|
+
}
|
|
1640
|
+
return baseOrderBy(collection, baseFlatten(iteratees), []);
|
|
1641
|
+
});
|
|
1642
|
+
var idCounter = 0;
|
|
1643
|
+
function uniqueId(prefix) {
|
|
1644
|
+
var id = ++idCounter;
|
|
1645
|
+
return toString(prefix) + id;
|
|
1883
1646
|
}
|
|
1884
|
-
var reduce_1 = reduce;
|
|
1885
|
-
const reduce$1 = /* @__PURE__ */ getDefaultExportFromCjs(reduce_1);
|
|
1886
1647
|
/**!
|
|
1887
|
-
* Sortable 1.15.
|
|
1648
|
+
* Sortable 1.15.6
|
|
1888
1649
|
* @author RubaXa <trash@rubaxa.org>
|
|
1889
1650
|
* @author owenm <owen23355@gmail.com>
|
|
1890
1651
|
* @license MIT
|
|
@@ -1960,38 +1721,33 @@ function _extends() {
|
|
|
1960
1721
|
return _extends.apply(this, arguments);
|
|
1961
1722
|
}
|
|
1962
1723
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
1963
|
-
if (source == null)
|
|
1964
|
-
return {};
|
|
1724
|
+
if (source == null) return {};
|
|
1965
1725
|
var target = {};
|
|
1966
1726
|
var sourceKeys = Object.keys(source);
|
|
1967
1727
|
var key, i;
|
|
1968
1728
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
1969
1729
|
key = sourceKeys[i];
|
|
1970
|
-
if (excluded.indexOf(key) >= 0)
|
|
1971
|
-
continue;
|
|
1730
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1972
1731
|
target[key] = source[key];
|
|
1973
1732
|
}
|
|
1974
1733
|
return target;
|
|
1975
1734
|
}
|
|
1976
1735
|
function _objectWithoutProperties(source, excluded) {
|
|
1977
|
-
if (source == null)
|
|
1978
|
-
return {};
|
|
1736
|
+
if (source == null) return {};
|
|
1979
1737
|
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
1980
1738
|
var key, i;
|
|
1981
1739
|
if (Object.getOwnPropertySymbols) {
|
|
1982
1740
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
1983
1741
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
1984
1742
|
key = sourceSymbolKeys[i];
|
|
1985
|
-
if (excluded.indexOf(key) >= 0)
|
|
1986
|
-
|
|
1987
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key))
|
|
1988
|
-
continue;
|
|
1743
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
1744
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
1989
1745
|
target[key] = source[key];
|
|
1990
1746
|
}
|
|
1991
1747
|
}
|
|
1992
1748
|
return target;
|
|
1993
1749
|
}
|
|
1994
|
-
var version = "1.15.
|
|
1750
|
+
var version = "1.15.6";
|
|
1995
1751
|
function userAgent(pattern) {
|
|
1996
1752
|
if (typeof window !== "undefined" && window.navigator) {
|
|
1997
1753
|
return !!/* @__PURE__ */ navigator.userAgent.match(pattern);
|
|
@@ -2014,8 +1770,7 @@ function off(el, event, fn) {
|
|
|
2014
1770
|
el.removeEventListener(event, fn, !IE11OrLess && captureMode);
|
|
2015
1771
|
}
|
|
2016
1772
|
function matches(el, selector) {
|
|
2017
|
-
if (!selector)
|
|
2018
|
-
return;
|
|
1773
|
+
if (!selector) return;
|
|
2019
1774
|
selector[0] === ">" && (selector = selector.substring(1));
|
|
2020
1775
|
if (el) {
|
|
2021
1776
|
try {
|
|
@@ -2042,8 +1797,7 @@ function closest(el, selector, ctx, includeCTX) {
|
|
|
2042
1797
|
if (selector != null && (selector[0] === ">" ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
|
|
2043
1798
|
return el;
|
|
2044
1799
|
}
|
|
2045
|
-
if (el === ctx)
|
|
2046
|
-
break;
|
|
1800
|
+
if (el === ctx) break;
|
|
2047
1801
|
} while (el = getParentOrHost(el));
|
|
2048
1802
|
}
|
|
2049
1803
|
return null;
|
|
@@ -2113,8 +1867,7 @@ function getWindowScrollingElement() {
|
|
|
2113
1867
|
}
|
|
2114
1868
|
}
|
|
2115
1869
|
function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
|
|
2116
|
-
if (!el.getBoundingClientRect && el !== window)
|
|
2117
|
-
return;
|
|
1870
|
+
if (!el.getBoundingClientRect && el !== window) return;
|
|
2118
1871
|
var elRect, top, left, bottom, right, height, width;
|
|
2119
1872
|
if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
|
|
2120
1873
|
elRect = el.getBoundingClientRect();
|
|
@@ -2171,15 +1924,11 @@ function isScrolledPast(el, elSide, parentSide) {
|
|
|
2171
1924
|
var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide];
|
|
2172
1925
|
while (parent) {
|
|
2173
1926
|
var parentSideVal = getRect(parent)[parentSide], visible = void 0;
|
|
2174
|
-
|
|
1927
|
+
{
|
|
2175
1928
|
visible = elSideVal >= parentSideVal;
|
|
2176
|
-
} else {
|
|
2177
|
-
visible = elSideVal <= parentSideVal;
|
|
2178
1929
|
}
|
|
2179
|
-
if (!visible)
|
|
2180
|
-
|
|
2181
|
-
if (parent === getWindowScrollingElement())
|
|
2182
|
-
break;
|
|
1930
|
+
if (!visible) return parent;
|
|
1931
|
+
if (parent === getWindowScrollingElement()) break;
|
|
2183
1932
|
parent = getParentAutoScrollElement(parent, false);
|
|
2184
1933
|
}
|
|
2185
1934
|
return false;
|
|
@@ -2229,28 +1978,23 @@ function getRelativeScrollOffset(el) {
|
|
|
2229
1978
|
}
|
|
2230
1979
|
function indexOfObject(arr, obj) {
|
|
2231
1980
|
for (var i in arr) {
|
|
2232
|
-
if (!arr.hasOwnProperty(i))
|
|
2233
|
-
continue;
|
|
1981
|
+
if (!arr.hasOwnProperty(i)) continue;
|
|
2234
1982
|
for (var key in obj) {
|
|
2235
|
-
if (obj.hasOwnProperty(key) && obj[key] === arr[i][key])
|
|
2236
|
-
return Number(i);
|
|
1983
|
+
if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i);
|
|
2237
1984
|
}
|
|
2238
1985
|
}
|
|
2239
1986
|
return -1;
|
|
2240
1987
|
}
|
|
2241
1988
|
function getParentAutoScrollElement(el, includeSelf) {
|
|
2242
|
-
if (!el || !el.getBoundingClientRect)
|
|
2243
|
-
return getWindowScrollingElement();
|
|
1989
|
+
if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
|
|
2244
1990
|
var elem = el;
|
|
2245
1991
|
var gotSelf = false;
|
|
2246
1992
|
do {
|
|
2247
1993
|
if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
|
|
2248
1994
|
var elemCSS = css(elem);
|
|
2249
1995
|
if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == "auto" || elemCSS.overflowX == "scroll") || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == "auto" || elemCSS.overflowY == "scroll")) {
|
|
2250
|
-
if (!elem.getBoundingClientRect || elem === document.body)
|
|
2251
|
-
|
|
2252
|
-
if (gotSelf || includeSelf)
|
|
2253
|
-
return elem;
|
|
1996
|
+
if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
|
|
1997
|
+
if (gotSelf || includeSelf) return elem;
|
|
2254
1998
|
gotSelf = true;
|
|
2255
1999
|
}
|
|
2256
2000
|
}
|
|
@@ -2309,8 +2053,7 @@ function getChildContainingRectFromElement(container, options, ghostEl2) {
|
|
|
2309
2053
|
var rect = {};
|
|
2310
2054
|
Array.from(container.children).forEach(function(child) {
|
|
2311
2055
|
var _rect$left, _rect$top, _rect$right, _rect$bottom;
|
|
2312
|
-
if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl2)
|
|
2313
|
-
return;
|
|
2056
|
+
if (!closest(child, options.draggable, container, false) || child.animated || child === ghostEl2) return;
|
|
2314
2057
|
var childRect = getRect(child);
|
|
2315
2058
|
rect.left = Math.min((_rect$left = rect.left) !== null && _rect$left !== void 0 ? _rect$left : Infinity, childRect.left);
|
|
2316
2059
|
rect.top = Math.min((_rect$top = rect.top) !== null && _rect$top !== void 0 ? _rect$top : Infinity, childRect.top);
|
|
@@ -2329,12 +2072,10 @@ function AnimationStateManager() {
|
|
|
2329
2072
|
return {
|
|
2330
2073
|
captureAnimationState: function captureAnimationState() {
|
|
2331
2074
|
animationStates = [];
|
|
2332
|
-
if (!this.options.animation)
|
|
2333
|
-
return;
|
|
2075
|
+
if (!this.options.animation) return;
|
|
2334
2076
|
var children = [].slice.call(this.el.children);
|
|
2335
2077
|
children.forEach(function(child) {
|
|
2336
|
-
if (css(child, "display") === "none" || child === Sortable.ghost)
|
|
2337
|
-
return;
|
|
2078
|
+
if (css(child, "display") === "none" || child === Sortable.ghost) return;
|
|
2338
2079
|
animationStates.push({
|
|
2339
2080
|
target: child,
|
|
2340
2081
|
rect: getRect(child)
|
|
@@ -2362,8 +2103,7 @@ function AnimationStateManager() {
|
|
|
2362
2103
|
var _this = this;
|
|
2363
2104
|
if (!this.options.animation) {
|
|
2364
2105
|
clearTimeout(animationCallbackId);
|
|
2365
|
-
if (typeof callback === "function")
|
|
2366
|
-
callback();
|
|
2106
|
+
if (typeof callback === "function") callback();
|
|
2367
2107
|
return;
|
|
2368
2108
|
}
|
|
2369
2109
|
var animating = false, animationTime = 0;
|
|
@@ -2404,12 +2144,10 @@ function AnimationStateManager() {
|
|
|
2404
2144
|
});
|
|
2405
2145
|
clearTimeout(animationCallbackId);
|
|
2406
2146
|
if (!animating) {
|
|
2407
|
-
if (typeof callback === "function")
|
|
2408
|
-
callback();
|
|
2147
|
+
if (typeof callback === "function") callback();
|
|
2409
2148
|
} else {
|
|
2410
2149
|
animationCallbackId = setTimeout(function() {
|
|
2411
|
-
if (typeof callback === "function")
|
|
2412
|
-
callback();
|
|
2150
|
+
if (typeof callback === "function") callback();
|
|
2413
2151
|
}, animationTime);
|
|
2414
2152
|
}
|
|
2415
2153
|
animationStates = [];
|
|
@@ -2469,8 +2207,7 @@ var PluginManager = {
|
|
|
2469
2207
|
};
|
|
2470
2208
|
var eventNameGlobal = eventName + "Global";
|
|
2471
2209
|
plugins.forEach(function(plugin) {
|
|
2472
|
-
if (!sortable[plugin.pluginName])
|
|
2473
|
-
return;
|
|
2210
|
+
if (!sortable[plugin.pluginName]) return;
|
|
2474
2211
|
if (sortable[plugin.pluginName][eventNameGlobal]) {
|
|
2475
2212
|
sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({
|
|
2476
2213
|
sortable
|
|
@@ -2486,8 +2223,7 @@ var PluginManager = {
|
|
|
2486
2223
|
initializePlugins: function initializePlugins(sortable, el, defaults2, options) {
|
|
2487
2224
|
plugins.forEach(function(plugin) {
|
|
2488
2225
|
var pluginName = plugin.pluginName;
|
|
2489
|
-
if (!sortable.options[pluginName] && !plugin.initializeByDefault)
|
|
2490
|
-
return;
|
|
2226
|
+
if (!sortable.options[pluginName] && !plugin.initializeByDefault) return;
|
|
2491
2227
|
var initialized = new plugin(sortable, el, sortable.options);
|
|
2492
2228
|
initialized.sortable = sortable;
|
|
2493
2229
|
initialized.options = sortable.options;
|
|
@@ -2495,8 +2231,7 @@ var PluginManager = {
|
|
|
2495
2231
|
_extends(defaults2, initialized.defaults);
|
|
2496
2232
|
});
|
|
2497
2233
|
for (var option2 in sortable.options) {
|
|
2498
|
-
if (!sortable.options.hasOwnProperty(option2))
|
|
2499
|
-
continue;
|
|
2234
|
+
if (!sortable.options.hasOwnProperty(option2)) continue;
|
|
2500
2235
|
var modified = this.modifyOption(sortable, option2, sortable.options[option2]);
|
|
2501
2236
|
if (typeof modified !== "undefined") {
|
|
2502
2237
|
sortable.options[option2] = modified;
|
|
@@ -2506,8 +2241,7 @@ var PluginManager = {
|
|
|
2506
2241
|
getEventProperties: function getEventProperties(name2, sortable) {
|
|
2507
2242
|
var eventProperties = {};
|
|
2508
2243
|
plugins.forEach(function(plugin) {
|
|
2509
|
-
if (typeof plugin.eventProperties !== "function")
|
|
2510
|
-
return;
|
|
2244
|
+
if (typeof plugin.eventProperties !== "function") return;
|
|
2511
2245
|
_extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name2));
|
|
2512
2246
|
});
|
|
2513
2247
|
return eventProperties;
|
|
@@ -2515,8 +2249,7 @@ var PluginManager = {
|
|
|
2515
2249
|
modifyOption: function modifyOption(sortable, name2, value) {
|
|
2516
2250
|
var modifiedValue;
|
|
2517
2251
|
plugins.forEach(function(plugin) {
|
|
2518
|
-
if (!sortable[plugin.pluginName])
|
|
2519
|
-
return;
|
|
2252
|
+
if (!sortable[plugin.pluginName]) return;
|
|
2520
2253
|
if (plugin.optionListeners && typeof plugin.optionListeners[name2] === "function") {
|
|
2521
2254
|
modifiedValue = plugin.optionListeners[name2].call(sortable[plugin.pluginName], value);
|
|
2522
2255
|
}
|
|
@@ -2527,8 +2260,7 @@ var PluginManager = {
|
|
|
2527
2260
|
function dispatchEvent(_ref) {
|
|
2528
2261
|
var sortable = _ref.sortable, rootEl2 = _ref.rootEl, name2 = _ref.name, targetEl = _ref.targetEl, cloneEl2 = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex2 = _ref.oldIndex, newIndex2 = _ref.newIndex, oldDraggableIndex2 = _ref.oldDraggableIndex, newDraggableIndex2 = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, extraEventProperties = _ref.extraEventProperties;
|
|
2529
2262
|
sortable = sortable || rootEl2 && rootEl2[expando];
|
|
2530
|
-
if (!sortable)
|
|
2531
|
-
return;
|
|
2263
|
+
if (!sortable) return;
|
|
2532
2264
|
var evt, options = sortable.options, onName = "on" + name2.charAt(0).toUpperCase() + name2.substr(1);
|
|
2533
2265
|
if (window.CustomEvent && !IE11OrLess && !Edge) {
|
|
2534
2266
|
evt = new CustomEvent(name2, {
|
|
@@ -2611,8 +2343,7 @@ function _dispatchEvent(info) {
|
|
|
2611
2343
|
}
|
|
2612
2344
|
var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = false, ignoreNextClick = false, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = false, isCircumstantialInvert = false, targetMoveDistance, ghostRelativeParent, ghostRelativeParentInitialScroll = [], _silent = false, savedInputChecked = [];
|
|
2613
2345
|
var documentExists = typeof document !== "undefined", PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? "cssFloat" : "float", supportDraggable = documentExists && !ChromeForAndroid && !IOS && "draggable" in document.createElement("div"), supportCssPointerEvents = function() {
|
|
2614
|
-
if (!documentExists)
|
|
2615
|
-
return;
|
|
2346
|
+
if (!documentExists) return;
|
|
2616
2347
|
if (IE11OrLess) {
|
|
2617
2348
|
return false;
|
|
2618
2349
|
}
|
|
@@ -2639,8 +2370,7 @@ var documentExists = typeof document !== "undefined", PositionGhostAbsolutely =
|
|
|
2639
2370
|
var ret;
|
|
2640
2371
|
sortables.some(function(sortable) {
|
|
2641
2372
|
var threshold = sortable[expando].options.emptyInsertThreshold;
|
|
2642
|
-
if (!threshold || lastChild(sortable))
|
|
2643
|
-
return;
|
|
2373
|
+
if (!threshold || lastChild(sortable)) return;
|
|
2644
2374
|
var rect = getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
|
|
2645
2375
|
if (insideHorizontally && insideVertically) {
|
|
2646
2376
|
return ret = sortable;
|
|
@@ -2769,7 +2499,8 @@ function Sortable(el, options) {
|
|
|
2769
2499
|
x: 0,
|
|
2770
2500
|
y: 0
|
|
2771
2501
|
},
|
|
2772
|
-
|
|
2502
|
+
// Disabled on Safari: #1571; Enabled on Safari IOS: #2244
|
|
2503
|
+
supportPointer: Sortable.supportPointer !== false && "PointerEvent" in window && (!Safari || IOS),
|
|
2773
2504
|
emptyInsertThreshold: 5
|
|
2774
2505
|
};
|
|
2775
2506
|
PluginManager.initializePlugins(this, el, defaults2);
|
|
@@ -2812,8 +2543,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2812
2543
|
return typeof this.options.direction === "function" ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
|
|
2813
2544
|
},
|
|
2814
2545
|
_onTapStart: function _onTapStart(evt) {
|
|
2815
|
-
if (!evt.cancelable)
|
|
2816
|
-
return;
|
|
2546
|
+
if (!evt.cancelable) return;
|
|
2817
2547
|
var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type2 = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === "touch" && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter;
|
|
2818
2548
|
_saveInputCheckedState(el);
|
|
2819
2549
|
if (dragEl) {
|
|
@@ -2850,7 +2580,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2850
2580
|
pluginEvent2("filter", _this, {
|
|
2851
2581
|
evt
|
|
2852
2582
|
});
|
|
2853
|
-
preventOnFilter && evt.
|
|
2583
|
+
preventOnFilter && evt.preventDefault();
|
|
2854
2584
|
return;
|
|
2855
2585
|
}
|
|
2856
2586
|
} else if (filter) {
|
|
@@ -2872,7 +2602,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2872
2602
|
}
|
|
2873
2603
|
});
|
|
2874
2604
|
if (filter) {
|
|
2875
|
-
preventOnFilter && evt.
|
|
2605
|
+
preventOnFilter && evt.preventDefault();
|
|
2876
2606
|
return;
|
|
2877
2607
|
}
|
|
2878
2608
|
}
|
|
@@ -2928,9 +2658,14 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2928
2658
|
on(ownerDocument, "dragover", nearestEmptyInsertDetectEvent);
|
|
2929
2659
|
on(ownerDocument, "mousemove", nearestEmptyInsertDetectEvent);
|
|
2930
2660
|
on(ownerDocument, "touchmove", nearestEmptyInsertDetectEvent);
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2661
|
+
if (options.supportPointer) {
|
|
2662
|
+
on(ownerDocument, "pointerup", _this._onDrop);
|
|
2663
|
+
!this.nativeDraggable && on(ownerDocument, "pointercancel", _this._onDrop);
|
|
2664
|
+
} else {
|
|
2665
|
+
on(ownerDocument, "mouseup", _this._onDrop);
|
|
2666
|
+
on(ownerDocument, "touchend", _this._onDrop);
|
|
2667
|
+
on(ownerDocument, "touchcancel", _this._onDrop);
|
|
2668
|
+
}
|
|
2934
2669
|
if (FireFox && this.nativeDraggable) {
|
|
2935
2670
|
this.options.touchStartThreshold = 4;
|
|
2936
2671
|
dragEl.draggable = true;
|
|
@@ -2943,9 +2678,14 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2943
2678
|
this._onDrop();
|
|
2944
2679
|
return;
|
|
2945
2680
|
}
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2681
|
+
if (options.supportPointer) {
|
|
2682
|
+
on(ownerDocument, "pointerup", _this._disableDelayedDrag);
|
|
2683
|
+
on(ownerDocument, "pointercancel", _this._disableDelayedDrag);
|
|
2684
|
+
} else {
|
|
2685
|
+
on(ownerDocument, "mouseup", _this._disableDelayedDrag);
|
|
2686
|
+
on(ownerDocument, "touchend", _this._disableDelayedDrag);
|
|
2687
|
+
on(ownerDocument, "touchcancel", _this._disableDelayedDrag);
|
|
2688
|
+
}
|
|
2949
2689
|
on(ownerDocument, "mousemove", _this._delayedDragTouchMoveHandler);
|
|
2950
2690
|
on(ownerDocument, "touchmove", _this._delayedDragTouchMoveHandler);
|
|
2951
2691
|
options.supportPointer && on(ownerDocument, "pointermove", _this._delayedDragTouchMoveHandler);
|
|
@@ -2971,6 +2711,8 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
2971
2711
|
off(ownerDocument, "mouseup", this._disableDelayedDrag);
|
|
2972
2712
|
off(ownerDocument, "touchend", this._disableDelayedDrag);
|
|
2973
2713
|
off(ownerDocument, "touchcancel", this._disableDelayedDrag);
|
|
2714
|
+
off(ownerDocument, "pointerup", this._disableDelayedDrag);
|
|
2715
|
+
off(ownerDocument, "pointercancel", this._disableDelayedDrag);
|
|
2974
2716
|
off(ownerDocument, "mousemove", this._delayedDragTouchMoveHandler);
|
|
2975
2717
|
off(ownerDocument, "touchmove", this._delayedDragTouchMoveHandler);
|
|
2976
2718
|
off(ownerDocument, "pointermove", this._delayedDragTouchMoveHandler);
|
|
@@ -3032,8 +2774,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3032
2774
|
var parent = target;
|
|
3033
2775
|
while (target && target.shadowRoot) {
|
|
3034
2776
|
target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
|
|
3035
|
-
if (target === parent)
|
|
3036
|
-
break;
|
|
2777
|
+
if (target === parent) break;
|
|
3037
2778
|
parent = target;
|
|
3038
2779
|
}
|
|
3039
2780
|
dragEl.parentNode[expando]._isOutsideThisEl(target);
|
|
@@ -3101,8 +2842,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3101
2842
|
ghostRelativeParent = ghostRelativeParent.parentNode;
|
|
3102
2843
|
}
|
|
3103
2844
|
if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
|
|
3104
|
-
if (ghostRelativeParent === document)
|
|
3105
|
-
ghostRelativeParent = getWindowScrollingElement();
|
|
2845
|
+
if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
|
|
3106
2846
|
rect.top += ghostRelativeParent.scrollTop;
|
|
3107
2847
|
rect.left += ghostRelativeParent.scrollLeft;
|
|
3108
2848
|
} else {
|
|
@@ -3154,8 +2894,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3154
2894
|
}
|
|
3155
2895
|
_this.cloneId = _nextTick(function() {
|
|
3156
2896
|
pluginEvent2("clone", _this);
|
|
3157
|
-
if (Sortable.eventCanceled)
|
|
3158
|
-
return;
|
|
2897
|
+
if (Sortable.eventCanceled) return;
|
|
3159
2898
|
if (!_this.options.removeCloneOnHide) {
|
|
3160
2899
|
rootEl.insertBefore(cloneEl, dragEl);
|
|
3161
2900
|
}
|
|
@@ -3184,6 +2923,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3184
2923
|
_this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
|
|
3185
2924
|
on(document, "selectstart", _this);
|
|
3186
2925
|
moved = true;
|
|
2926
|
+
window.getSelection().removeAllRanges();
|
|
3187
2927
|
if (Safari) {
|
|
3188
2928
|
css(document.body, "user-select", "none");
|
|
3189
2929
|
}
|
|
@@ -3191,8 +2931,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3191
2931
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
3192
2932
|
_onDragOver: function _onDragOver(evt) {
|
|
3193
2933
|
var el = this.el, target = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = Sortable.active, isOwner = activeGroup === group, canSort = options.sort, fromSortable = putSortable || activeSortable, vertical, _this = this, completedFired = false;
|
|
3194
|
-
if (_silent)
|
|
3195
|
-
return;
|
|
2934
|
+
if (_silent) return;
|
|
3196
2935
|
function dragOverEvent(name2, extra) {
|
|
3197
2936
|
pluginEvent2(name2, _this, _objectSpread2({
|
|
3198
2937
|
evt,
|
|
@@ -3276,8 +3015,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3276
3015
|
}
|
|
3277
3016
|
target = closest(target, options.draggable, el, true);
|
|
3278
3017
|
dragOverEvent("dragOver");
|
|
3279
|
-
if (Sortable.eventCanceled)
|
|
3280
|
-
return completedFired;
|
|
3018
|
+
if (Sortable.eventCanceled) return completedFired;
|
|
3281
3019
|
if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
|
|
3282
3020
|
return completed(false);
|
|
3283
3021
|
}
|
|
@@ -3286,8 +3024,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3286
3024
|
vertical = this._getDirection(evt, target) === "vertical";
|
|
3287
3025
|
dragRect = getRect(dragEl);
|
|
3288
3026
|
dragOverEvent("dragOverValid");
|
|
3289
|
-
if (Sortable.eventCanceled)
|
|
3290
|
-
return completedFired;
|
|
3027
|
+
if (Sortable.eventCanceled) return completedFired;
|
|
3291
3028
|
if (revert) {
|
|
3292
3029
|
parentEl = rootEl;
|
|
3293
3030
|
capture();
|
|
@@ -3406,6 +3143,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3406
3143
|
off(ownerDocument, "mouseup", this._onDrop);
|
|
3407
3144
|
off(ownerDocument, "touchend", this._onDrop);
|
|
3408
3145
|
off(ownerDocument, "pointerup", this._onDrop);
|
|
3146
|
+
off(ownerDocument, "pointercancel", this._onDrop);
|
|
3409
3147
|
off(ownerDocument, "touchcancel", this._onDrop);
|
|
3410
3148
|
off(document, "selectstart", this);
|
|
3411
3149
|
},
|
|
@@ -3578,17 +3316,17 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3578
3316
|
*/
|
|
3579
3317
|
sort: function sort(order, useAnimation) {
|
|
3580
3318
|
var items = {}, rootEl2 = this.el;
|
|
3581
|
-
this.toArray().forEach(function(
|
|
3319
|
+
this.toArray().forEach(function(id, i) {
|
|
3582
3320
|
var el = rootEl2.children[i];
|
|
3583
3321
|
if (closest(el, this.options.draggable, rootEl2, false)) {
|
|
3584
|
-
items[
|
|
3322
|
+
items[id] = el;
|
|
3585
3323
|
}
|
|
3586
3324
|
}, this);
|
|
3587
3325
|
useAnimation && this.captureAnimationState();
|
|
3588
|
-
order.forEach(function(
|
|
3589
|
-
if (items[
|
|
3590
|
-
rootEl2.removeChild(items[
|
|
3591
|
-
rootEl2.appendChild(items[
|
|
3326
|
+
order.forEach(function(id) {
|
|
3327
|
+
if (items[id]) {
|
|
3328
|
+
rootEl2.removeChild(items[id]);
|
|
3329
|
+
rootEl2.appendChild(items[id]);
|
|
3592
3330
|
}
|
|
3593
3331
|
});
|
|
3594
3332
|
useAnimation && this.animateAll();
|
|
@@ -3656,8 +3394,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3656
3394
|
_hideClone: function _hideClone() {
|
|
3657
3395
|
if (!cloneHidden) {
|
|
3658
3396
|
pluginEvent2("hideClone", this);
|
|
3659
|
-
if (Sortable.eventCanceled)
|
|
3660
|
-
return;
|
|
3397
|
+
if (Sortable.eventCanceled) return;
|
|
3661
3398
|
css(cloneEl, "display", "none");
|
|
3662
3399
|
if (this.options.removeCloneOnHide && cloneEl.parentNode) {
|
|
3663
3400
|
cloneEl.parentNode.removeChild(cloneEl);
|
|
@@ -3672,8 +3409,7 @@ Sortable.prototype = /** @lends Sortable.prototype */
|
|
|
3672
3409
|
}
|
|
3673
3410
|
if (cloneHidden) {
|
|
3674
3411
|
pluginEvent2("showClone", this);
|
|
3675
|
-
if (Sortable.eventCanceled)
|
|
3676
|
-
return;
|
|
3412
|
+
if (Sortable.eventCanceled) return;
|
|
3677
3413
|
if (dragEl.parentNode == rootEl && !this.options.group.revertClone) {
|
|
3678
3414
|
rootEl.insertBefore(cloneEl, dragEl);
|
|
3679
3415
|
} else if (nextEl) {
|
|
@@ -3792,8 +3528,8 @@ function _saveInputCheckedState(root2) {
|
|
|
3792
3528
|
function _nextTick(fn) {
|
|
3793
3529
|
return setTimeout(fn, 0);
|
|
3794
3530
|
}
|
|
3795
|
-
function _cancelNextTick(
|
|
3796
|
-
return clearTimeout(
|
|
3531
|
+
function _cancelNextTick(id) {
|
|
3532
|
+
return clearTimeout(id);
|
|
3797
3533
|
}
|
|
3798
3534
|
if (documentExists) {
|
|
3799
3535
|
on(document, "touchmove", function(evt) {
|
|
@@ -3829,14 +3565,12 @@ Sortable.mount = function() {
|
|
|
3829
3565
|
for (var _len = arguments.length, plugins2 = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3830
3566
|
plugins2[_key] = arguments[_key];
|
|
3831
3567
|
}
|
|
3832
|
-
if (plugins2[0].constructor === Array)
|
|
3833
|
-
plugins2 = plugins2[0];
|
|
3568
|
+
if (plugins2[0].constructor === Array) plugins2 = plugins2[0];
|
|
3834
3569
|
plugins2.forEach(function(plugin) {
|
|
3835
3570
|
if (!plugin.prototype || !plugin.prototype.constructor) {
|
|
3836
3571
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin));
|
|
3837
3572
|
}
|
|
3838
|
-
if (plugin.utils)
|
|
3839
|
-
Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
|
|
3573
|
+
if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils);
|
|
3840
3574
|
PluginManager.mount(plugin);
|
|
3841
3575
|
});
|
|
3842
3576
|
};
|
|
@@ -3944,8 +3678,7 @@ function clearPointerElemChangedInterval() {
|
|
|
3944
3678
|
clearInterval(pointerElemChangedInterval);
|
|
3945
3679
|
}
|
|
3946
3680
|
var autoScroll = throttle(function(evt, options, rootEl2, isFallback) {
|
|
3947
|
-
if (!options.scroll)
|
|
3948
|
-
return;
|
|
3681
|
+
if (!options.scroll) return;
|
|
3949
3682
|
var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement();
|
|
3950
3683
|
var scrollThisInstance = false, scrollCustomFn;
|
|
3951
3684
|
if (scrollRootEl !== rootEl2) {
|
|
@@ -4007,8 +3740,7 @@ var autoScroll = throttle(function(evt, options, rootEl2, isFallback) {
|
|
|
4007
3740
|
}, 30);
|
|
4008
3741
|
var drop = function drop2(_ref) {
|
|
4009
3742
|
var originalEvent = _ref.originalEvent, putSortable2 = _ref.putSortable, dragEl2 = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget;
|
|
4010
|
-
if (!originalEvent)
|
|
4011
|
-
return;
|
|
3743
|
+
if (!originalEvent) return;
|
|
4012
3744
|
var toSortable = putSortable2 || activeSortable;
|
|
4013
3745
|
hideGhostForTarget();
|
|
4014
3746
|
var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent;
|
|
@@ -4069,156 +3801,6 @@ _extends(Remove, {
|
|
|
4069
3801
|
});
|
|
4070
3802
|
Sortable.mount(new AutoScrollPlugin());
|
|
4071
3803
|
Sortable.mount(Remove, Revert);
|
|
4072
|
-
var baseEach$1 = _baseEach, isArrayLike$2 = isArrayLike_1;
|
|
4073
|
-
function baseMap$1(collection, iteratee) {
|
|
4074
|
-
var index2 = -1, result = isArrayLike$2(collection) ? Array(collection.length) : [];
|
|
4075
|
-
baseEach$1(collection, function(value, key, collection2) {
|
|
4076
|
-
result[++index2] = iteratee(value, key, collection2);
|
|
4077
|
-
});
|
|
4078
|
-
return result;
|
|
4079
|
-
}
|
|
4080
|
-
var _baseMap = baseMap$1;
|
|
4081
|
-
function baseSortBy$1(array, comparer) {
|
|
4082
|
-
var length = array.length;
|
|
4083
|
-
array.sort(comparer);
|
|
4084
|
-
while (length--) {
|
|
4085
|
-
array[length] = array[length].value;
|
|
4086
|
-
}
|
|
4087
|
-
return array;
|
|
4088
|
-
}
|
|
4089
|
-
var _baseSortBy = baseSortBy$1;
|
|
4090
|
-
var isSymbol = isSymbol_1;
|
|
4091
|
-
function compareAscending$1(value, other) {
|
|
4092
|
-
if (value !== other) {
|
|
4093
|
-
var valIsDefined = value !== void 0, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
|
|
4094
|
-
var othIsDefined = other !== void 0, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
|
|
4095
|
-
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
|
|
4096
|
-
return 1;
|
|
4097
|
-
}
|
|
4098
|
-
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
|
|
4099
|
-
return -1;
|
|
4100
|
-
}
|
|
4101
|
-
}
|
|
4102
|
-
return 0;
|
|
4103
|
-
}
|
|
4104
|
-
var _compareAscending = compareAscending$1;
|
|
4105
|
-
var compareAscending = _compareAscending;
|
|
4106
|
-
function compareMultiple$1(object, other, orders) {
|
|
4107
|
-
var index2 = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
|
|
4108
|
-
while (++index2 < length) {
|
|
4109
|
-
var result = compareAscending(objCriteria[index2], othCriteria[index2]);
|
|
4110
|
-
if (result) {
|
|
4111
|
-
if (index2 >= ordersLength) {
|
|
4112
|
-
return result;
|
|
4113
|
-
}
|
|
4114
|
-
var order = orders[index2];
|
|
4115
|
-
return result * (order == "desc" ? -1 : 1);
|
|
4116
|
-
}
|
|
4117
|
-
}
|
|
4118
|
-
return object.index - other.index;
|
|
4119
|
-
}
|
|
4120
|
-
var _compareMultiple = compareMultiple$1;
|
|
4121
|
-
var arrayMap = _arrayMap, baseGet = _baseGet, baseIteratee = _baseIteratee, baseMap = _baseMap, baseSortBy = _baseSortBy, baseUnary = _baseUnary, compareMultiple = _compareMultiple, identity$1 = identity_1, isArray$2 = isArray_1;
|
|
4122
|
-
function baseOrderBy$1(collection, iteratees, orders) {
|
|
4123
|
-
if (iteratees.length) {
|
|
4124
|
-
iteratees = arrayMap(iteratees, function(iteratee) {
|
|
4125
|
-
if (isArray$2(iteratee)) {
|
|
4126
|
-
return function(value) {
|
|
4127
|
-
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
|
|
4128
|
-
};
|
|
4129
|
-
}
|
|
4130
|
-
return iteratee;
|
|
4131
|
-
});
|
|
4132
|
-
} else {
|
|
4133
|
-
iteratees = [identity$1];
|
|
4134
|
-
}
|
|
4135
|
-
var index2 = -1;
|
|
4136
|
-
iteratees = arrayMap(iteratees, baseUnary(baseIteratee));
|
|
4137
|
-
var result = baseMap(collection, function(value, key, collection2) {
|
|
4138
|
-
var criteria = arrayMap(iteratees, function(iteratee) {
|
|
4139
|
-
return iteratee(value);
|
|
4140
|
-
});
|
|
4141
|
-
return { "criteria": criteria, "index": ++index2, "value": value };
|
|
4142
|
-
});
|
|
4143
|
-
return baseSortBy(result, function(object, other) {
|
|
4144
|
-
return compareMultiple(object, other, orders);
|
|
4145
|
-
});
|
|
4146
|
-
}
|
|
4147
|
-
var _baseOrderBy = baseOrderBy$1;
|
|
4148
|
-
var eq = eq_1, isArrayLike$1 = isArrayLike_1, isIndex = _isIndex, isObject = isObject_1;
|
|
4149
|
-
function isIterateeCall$1(value, index2, object) {
|
|
4150
|
-
if (!isObject(object)) {
|
|
4151
|
-
return false;
|
|
4152
|
-
}
|
|
4153
|
-
var type2 = typeof index2;
|
|
4154
|
-
if (type2 == "number" ? isArrayLike$1(object) && isIndex(index2, object.length) : type2 == "string" && index2 in object) {
|
|
4155
|
-
return eq(object[index2], value);
|
|
4156
|
-
}
|
|
4157
|
-
return false;
|
|
4158
|
-
}
|
|
4159
|
-
var _isIterateeCall = isIterateeCall$1;
|
|
4160
|
-
var baseFlatten = _baseFlatten, baseOrderBy = _baseOrderBy, baseRest = _baseRest, isIterateeCall = _isIterateeCall;
|
|
4161
|
-
var sortBy = baseRest(function(collection, iteratees) {
|
|
4162
|
-
if (collection == null) {
|
|
4163
|
-
return [];
|
|
4164
|
-
}
|
|
4165
|
-
var length = iteratees.length;
|
|
4166
|
-
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
|
|
4167
|
-
iteratees = [];
|
|
4168
|
-
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
|
|
4169
|
-
iteratees = [iteratees[0]];
|
|
4170
|
-
}
|
|
4171
|
-
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
|
|
4172
|
-
});
|
|
4173
|
-
var sortBy_1 = sortBy;
|
|
4174
|
-
const sortBy$1 = /* @__PURE__ */ getDefaultExportFromCjs(sortBy_1);
|
|
4175
|
-
var toString = toString_1;
|
|
4176
|
-
var idCounter = 0;
|
|
4177
|
-
function uniqueId(prefix) {
|
|
4178
|
-
var id2 = ++idCounter;
|
|
4179
|
-
return toString(prefix) + id2;
|
|
4180
|
-
}
|
|
4181
|
-
var uniqueId_1 = uniqueId;
|
|
4182
|
-
const uniqueId$1 = /* @__PURE__ */ getDefaultExportFromCjs(uniqueId_1);
|
|
4183
|
-
var identity = identity_1;
|
|
4184
|
-
function castFunction$1(value) {
|
|
4185
|
-
return typeof value == "function" ? value : identity;
|
|
4186
|
-
}
|
|
4187
|
-
var _castFunction = castFunction$1;
|
|
4188
|
-
var arrayEach = _arrayEach, baseEach = _baseEach, castFunction = _castFunction, isArray$1 = isArray_1;
|
|
4189
|
-
function forEach(collection, iteratee) {
|
|
4190
|
-
var func = isArray$1(collection) ? arrayEach : baseEach;
|
|
4191
|
-
return func(collection, castFunction(iteratee));
|
|
4192
|
-
}
|
|
4193
|
-
var forEach_1 = forEach;
|
|
4194
|
-
const forEach$1 = /* @__PURE__ */ getDefaultExportFromCjs(forEach_1);
|
|
4195
|
-
var baseKeys = _baseKeys, getTag = _getTag, isArguments = isArguments_1, isArray = isArray_1, isArrayLike = isArrayLike_1, isBuffer = isBufferExports, isPrototype = _isPrototype, isTypedArray = isTypedArray_1;
|
|
4196
|
-
var mapTag = "[object Map]", setTag = "[object Set]";
|
|
4197
|
-
var objectProto = Object.prototype;
|
|
4198
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
4199
|
-
function isEmpty(value) {
|
|
4200
|
-
if (value == null) {
|
|
4201
|
-
return true;
|
|
4202
|
-
}
|
|
4203
|
-
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
4204
|
-
return !value.length;
|
|
4205
|
-
}
|
|
4206
|
-
var tag = getTag(value);
|
|
4207
|
-
if (tag == mapTag || tag == setTag) {
|
|
4208
|
-
return !value.size;
|
|
4209
|
-
}
|
|
4210
|
-
if (isPrototype(value)) {
|
|
4211
|
-
return !baseKeys(value).length;
|
|
4212
|
-
}
|
|
4213
|
-
for (var key in value) {
|
|
4214
|
-
if (hasOwnProperty.call(value, key)) {
|
|
4215
|
-
return false;
|
|
4216
|
-
}
|
|
4217
|
-
}
|
|
4218
|
-
return true;
|
|
4219
|
-
}
|
|
4220
|
-
var isEmpty_1 = isEmpty;
|
|
4221
|
-
const isEmpty$1 = /* @__PURE__ */ getDefaultExportFromCjs(isEmpty_1);
|
|
4222
3804
|
const _hoisted_1$1 = {
|
|
4223
3805
|
key: 2,
|
|
4224
3806
|
class: "accordion-title ml-4"
|
|
@@ -4235,33 +3817,33 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4235
3817
|
embedElementConfig: {},
|
|
4236
3818
|
embeds: { default: () => ({}) },
|
|
4237
3819
|
isFocused: { type: Boolean, default: false },
|
|
4238
|
-
|
|
3820
|
+
isReadonly: { type: Boolean, default: false },
|
|
4239
3821
|
isExpanded: { type: Boolean, default: false }
|
|
4240
3822
|
},
|
|
4241
3823
|
emits: ["save", "delete"],
|
|
4242
|
-
setup(__props, { emit }) {
|
|
3824
|
+
setup(__props, { emit: __emit }) {
|
|
4243
3825
|
const props = __props;
|
|
3826
|
+
const emit = __emit;
|
|
4244
3827
|
const eventBus = vue.inject("$eventBus");
|
|
4245
3828
|
const isEditing = vue.ref(!props.item.header);
|
|
4246
3829
|
const form = vue.ref();
|
|
4247
3830
|
const header = vue.ref(props.item.header);
|
|
4248
|
-
const hasElements = vue.computed(() => !isEmpty
|
|
3831
|
+
const hasElements = vue.computed(() => !isEmpty(props.embeds));
|
|
4249
3832
|
const cancel = () => {
|
|
4250
3833
|
header.value = props.item.header;
|
|
4251
3834
|
isEditing.value = false;
|
|
4252
3835
|
};
|
|
4253
3836
|
const saveHeader = async () => {
|
|
4254
|
-
|
|
4255
|
-
const { valid } = await
|
|
4256
|
-
if (!valid)
|
|
4257
|
-
return;
|
|
3837
|
+
if (!form.value) return;
|
|
3838
|
+
const { valid } = await form.value.validate();
|
|
3839
|
+
if (!valid) return;
|
|
4258
3840
|
isEditing.value = false;
|
|
4259
3841
|
const item = { ...props.item, header: header.value };
|
|
4260
3842
|
emit("save", { item, embeds: props.embeds });
|
|
4261
3843
|
};
|
|
4262
3844
|
const saveEmbed = (embeds) => {
|
|
4263
|
-
const item = cloneDeep
|
|
4264
|
-
forEach
|
|
3845
|
+
const item = cloneDeep(props.item);
|
|
3846
|
+
forEach(embeds, (it) => item.body[it.id] = true);
|
|
4265
3847
|
emit("save", { item, embeds });
|
|
4266
3848
|
};
|
|
4267
3849
|
const deleteItem = () => {
|
|
@@ -4272,8 +3854,8 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4272
3854
|
});
|
|
4273
3855
|
};
|
|
4274
3856
|
const deleteEmbed = (embed) => {
|
|
4275
|
-
const embeds = cloneDeep
|
|
4276
|
-
const item = cloneDeep
|
|
3857
|
+
const embeds = cloneDeep(props.embeds);
|
|
3858
|
+
const item = cloneDeep(props.item);
|
|
4277
3859
|
delete embeds[embed.id];
|
|
4278
3860
|
delete item.body[embed.id];
|
|
4279
3861
|
emit("save", { item, embeds });
|
|
@@ -4312,7 +3894,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4312
3894
|
onSubmit: vue.withModifiers(saveHeader, ["prevent"])
|
|
4313
3895
|
}, {
|
|
4314
3896
|
default: vue.withCtx(() => [
|
|
4315
|
-
!_ctx.
|
|
3897
|
+
!_ctx.isReadonly ? (vue.openBlock(), vue.createElementBlock("span", {
|
|
4316
3898
|
key: 0,
|
|
4317
3899
|
class: "accordion-drag-handle",
|
|
4318
3900
|
onDrag: _cache[0] || (_cache[0] = vue.withModifiers(() => {
|
|
@@ -4337,7 +3919,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4337
3919
|
}, ["prevent"]), ["space"]))
|
|
4338
3920
|
}, null, 8, ["modelValue", "rules"])) : (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, vue.toDisplayString(_ctx.item.header), 1)),
|
|
4339
3921
|
vue.createVNode(_component_VSpacer),
|
|
4340
|
-
!_ctx.
|
|
3922
|
+
!_ctx.isReadonly ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
|
|
4341
3923
|
isEditing.value ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4342
3924
|
vue.createVNode(_component_VBtn, {
|
|
4343
3925
|
disabled: header.value === props.item.header,
|
|
@@ -4354,7 +3936,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4354
3936
|
text: "Cancel",
|
|
4355
3937
|
variant: "text",
|
|
4356
3938
|
onClick: vue.withModifiers(cancel, ["stop"])
|
|
4357
|
-
}, null, 8, ["disabled"
|
|
3939
|
+
}, null, 8, ["disabled"])
|
|
4358
3940
|
], 64)) : (vue.openBlock(), vue.createBlock(_component_VFadeTransition, {
|
|
4359
3941
|
key: 1,
|
|
4360
3942
|
group: ""
|
|
@@ -4393,7 +3975,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4393
3975
|
})
|
|
4394
3976
|
]),
|
|
4395
3977
|
_: 1
|
|
4396
|
-
}
|
|
3978
|
+
})), [
|
|
4397
3979
|
[_directive_tooltip, { text: "Delete item", openDelay: 300 }, "bottom"]
|
|
4398
3980
|
]) : vue.createCommentVNode("", true)
|
|
4399
3981
|
], 64)) : vue.createCommentVNode("", true)
|
|
@@ -4403,7 +3985,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4403
3985
|
])) : vue.createCommentVNode("", true)
|
|
4404
3986
|
]),
|
|
4405
3987
|
_: 2
|
|
4406
|
-
},
|
|
3988
|
+
}, 1536)
|
|
4407
3989
|
]),
|
|
4408
3990
|
_: 2
|
|
4409
3991
|
}, 1040)
|
|
@@ -4414,13 +3996,14 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4414
3996
|
default: vue.withCtx(() => [
|
|
4415
3997
|
!hasElements.value ? (vue.openBlock(), vue.createBlock(_component_VAlert, {
|
|
4416
3998
|
key: 0,
|
|
4417
|
-
|
|
4418
|
-
|
|
3999
|
+
class: "mx-6 mt-4 mb-2",
|
|
4000
|
+
color: "primary-darken-1",
|
|
4001
|
+
icon: "mdi-information-outline",
|
|
4419
4002
|
variant: "tonal",
|
|
4420
4003
|
prominent: ""
|
|
4421
4004
|
}, {
|
|
4422
4005
|
default: vue.withCtx(() => [
|
|
4423
|
-
_ctx.
|
|
4006
|
+
_ctx.isReadonly ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
|
|
4424
4007
|
vue.createTextVNode(" No content elements added to this item. ")
|
|
4425
4008
|
], 64)) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
4426
4009
|
vue.createTextVNode(" Click the button below to add content element. ")
|
|
@@ -4431,7 +4014,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4431
4014
|
vue.createVNode(_component_TailorEmbeddedContainer, {
|
|
4432
4015
|
"allowed-element-config": _ctx.embedElementConfig,
|
|
4433
4016
|
container: { embeds: _ctx.embeds },
|
|
4434
|
-
"is-disabled": _ctx.
|
|
4017
|
+
"is-disabled": _ctx.isReadonly,
|
|
4435
4018
|
onDelete: deleteEmbed,
|
|
4436
4019
|
onSave: _cache[6] || (_cache[6] = ($event) => saveEmbed($event.embeds))
|
|
4437
4020
|
}, null, 8, ["allowed-element-config", "container", "is-disabled"])
|
|
@@ -4444,7 +4027,6 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
|
|
|
4444
4027
|
};
|
|
4445
4028
|
}
|
|
4446
4029
|
});
|
|
4447
|
-
const AccordionItem_vue_vue_type_style_index_0_scoped_890bcc09_lang = "";
|
|
4448
4030
|
const _export_sfc = (sfc, props) => {
|
|
4449
4031
|
const target = sfc.__vccOpts || sfc;
|
|
4450
4032
|
for (const [key, val] of props) {
|
|
@@ -4452,7 +4034,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
4452
4034
|
}
|
|
4453
4035
|
return target;
|
|
4454
4036
|
};
|
|
4455
|
-
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
4037
|
+
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-dbced97c"]]);
|
|
4456
4038
|
const _hoisted_1 = { class: "text-subtitle-2" };
|
|
4457
4039
|
const _hoisted_2 = { class: "pa-6 text-center" };
|
|
4458
4040
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
@@ -4460,23 +4042,25 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4460
4042
|
props: {
|
|
4461
4043
|
element: {},
|
|
4462
4044
|
embedElementConfig: {},
|
|
4045
|
+
isDragged: { type: Boolean },
|
|
4463
4046
|
isFocused: { type: Boolean },
|
|
4464
|
-
|
|
4047
|
+
isReadonly: { type: Boolean }
|
|
4465
4048
|
},
|
|
4466
4049
|
emits: ["save"],
|
|
4467
|
-
setup(__props, { emit }) {
|
|
4050
|
+
setup(__props, { emit: __emit }) {
|
|
4468
4051
|
const props = __props;
|
|
4052
|
+
const emit = __emit;
|
|
4469
4053
|
const expanded = vue.ref([]);
|
|
4470
|
-
const elementData = vue.reactive(cloneDeep
|
|
4054
|
+
const elementData = vue.reactive(cloneDeep(props.element.data));
|
|
4471
4055
|
const panels = vue.ref();
|
|
4472
4056
|
const sortable = vue.ref();
|
|
4473
|
-
const accordionItems = vue.computed(() => sortBy
|
|
4057
|
+
const accordionItems = vue.computed(() => sortBy(elementData.items, "position"));
|
|
4474
4058
|
const accordionItemCount = vue.computed(() => accordionItems.value.length);
|
|
4475
4059
|
const embedsByItem = vue.computed(
|
|
4476
|
-
() => reduce
|
|
4060
|
+
() => reduce(
|
|
4477
4061
|
elementData.items,
|
|
4478
4062
|
(acc, item) => {
|
|
4479
|
-
acc[item.id] = pick
|
|
4063
|
+
acc[item.id] = pick(elementData.embeds, Object.keys(item.body));
|
|
4480
4064
|
return acc;
|
|
4481
4065
|
},
|
|
4482
4066
|
{}
|
|
@@ -4487,28 +4071,26 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4487
4071
|
Object.assign(elementData.embeds, embeds);
|
|
4488
4072
|
emit("save", elementData);
|
|
4489
4073
|
};
|
|
4490
|
-
const deleteItem = (
|
|
4491
|
-
const { body } = elementData.items[
|
|
4074
|
+
const deleteItem = (id) => {
|
|
4075
|
+
const { body } = elementData.items[id];
|
|
4492
4076
|
Object.keys(body).forEach((id22) => delete elementData.embeds[id22]);
|
|
4493
|
-
delete elementData.items[
|
|
4494
|
-
if (expanded.value.includes(
|
|
4495
|
-
pull$1(expanded.value, id2);
|
|
4077
|
+
delete elementData.items[id];
|
|
4078
|
+
if (expanded.value.includes(id)) pull(expanded.value, id);
|
|
4496
4079
|
emit("save", elementData);
|
|
4497
4080
|
};
|
|
4498
4081
|
const addAccordionItem = () => {
|
|
4499
|
-
const
|
|
4500
|
-
elementData.items[
|
|
4501
|
-
id
|
|
4082
|
+
const id = v4();
|
|
4083
|
+
elementData.items[id] = {
|
|
4084
|
+
id,
|
|
4502
4085
|
header: `Accordion Item Title`,
|
|
4503
4086
|
body: {},
|
|
4504
4087
|
position: accordionItemCount.value + 1
|
|
4505
4088
|
};
|
|
4506
|
-
expanded.value.push(
|
|
4089
|
+
expanded.value.push(id);
|
|
4507
4090
|
emit("save", elementData);
|
|
4508
4091
|
};
|
|
4509
4092
|
const calculateNewPosition = (oldIndex2, newIndex2) => {
|
|
4510
|
-
if (!newIndex2)
|
|
4511
|
-
return accordionItems.value[newIndex2].position / 2;
|
|
4093
|
+
if (!newIndex2) return accordionItems.value[newIndex2].position / 2;
|
|
4512
4094
|
if (newIndex2 + 1 === accordionItemCount.value) {
|
|
4513
4095
|
return accordionItems.value[newIndex2].position + 1;
|
|
4514
4096
|
}
|
|
@@ -4520,11 +4102,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4520
4102
|
vue.onMounted(() => {
|
|
4521
4103
|
sortable.value = Sortable.create(panels.value.$el, {
|
|
4522
4104
|
animation: 150,
|
|
4523
|
-
group: `dragDrop-${uniqueId
|
|
4105
|
+
group: `dragDrop-${uniqueId()}`,
|
|
4524
4106
|
handle: ".accordion-drag-handle",
|
|
4525
4107
|
onEnd: ({ oldIndex: oldIndex2, newIndex: newIndex2 }) => {
|
|
4526
|
-
if (!isNumber
|
|
4527
|
-
return;
|
|
4108
|
+
if (!isNumber(newIndex2) || !isNumber(oldIndex2)) return;
|
|
4528
4109
|
const position = calculateNewPosition(oldIndex2, newIndex2);
|
|
4529
4110
|
const currentItem = accordionItems.value[oldIndex2];
|
|
4530
4111
|
Object.assign(elementData.items[currentItem.id], { position });
|
|
@@ -4554,12 +4135,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4554
4135
|
}, {
|
|
4555
4136
|
default: vue.withCtx(() => [
|
|
4556
4137
|
vue.createVNode(_component_VIcon, {
|
|
4557
|
-
icon: vue.unref(
|
|
4138
|
+
icon: vue.unref(index_default).ui.icon,
|
|
4558
4139
|
color: "secondary-lighten-2",
|
|
4559
4140
|
size: "18",
|
|
4560
4141
|
start: ""
|
|
4561
4142
|
}, null, 8, ["icon"]),
|
|
4562
|
-
vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(vue.unref(
|
|
4143
|
+
vue.createElementVNode("span", _hoisted_1, vue.toDisplayString(vue.unref(index_default).name), 1)
|
|
4563
4144
|
]),
|
|
4564
4145
|
_: 1
|
|
4565
4146
|
}),
|
|
@@ -4585,7 +4166,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4585
4166
|
"allow-deletion": accordionItemCount.value > 1,
|
|
4586
4167
|
"embed-element-config": _ctx.embedElementConfig,
|
|
4587
4168
|
embeds: embedsByItem.value[item.id],
|
|
4588
|
-
"is-disabled": _ctx.
|
|
4169
|
+
"is-disabled": _ctx.isReadonly,
|
|
4589
4170
|
"is-expanded": expanded.value.includes(item.id),
|
|
4590
4171
|
"is-focused": _ctx.isFocused,
|
|
4591
4172
|
item,
|
|
@@ -4600,7 +4181,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4600
4181
|
]),
|
|
4601
4182
|
_: 1
|
|
4602
4183
|
}, 8, ["modelValue"]),
|
|
4603
|
-
!_ctx.
|
|
4184
|
+
!_ctx.isReadonly ? (vue.openBlock(), vue.createBlock(_component_VBtn, {
|
|
4604
4185
|
key: 0,
|
|
4605
4186
|
class: "mt-6",
|
|
4606
4187
|
color: "primary-darken-4",
|
|
@@ -4608,10 +4189,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4608
4189
|
variant: "text",
|
|
4609
4190
|
onClick: addAccordionItem
|
|
4610
4191
|
}, {
|
|
4611
|
-
default: vue.withCtx(() => [
|
|
4192
|
+
default: vue.withCtx(() => _cache[2] || (_cache[2] = [
|
|
4612
4193
|
vue.createTextVNode(" Add Accordion Item ")
|
|
4613
|
-
]),
|
|
4614
|
-
_: 1
|
|
4194
|
+
])),
|
|
4195
|
+
_: 1,
|
|
4196
|
+
__: [2]
|
|
4615
4197
|
})) : vue.createCommentVNode("", true)
|
|
4616
4198
|
])
|
|
4617
4199
|
]),
|
|
@@ -4620,10 +4202,9 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
4620
4202
|
};
|
|
4621
4203
|
}
|
|
4622
4204
|
});
|
|
4623
|
-
const
|
|
4624
|
-
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6cfc3c31"]]);
|
|
4205
|
+
const Edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7a90551b"]]);
|
|
4625
4206
|
const manifest = {
|
|
4626
|
-
...
|
|
4207
|
+
...index_default,
|
|
4627
4208
|
Edit
|
|
4628
4209
|
};
|
|
4629
4210
|
exports.Edit = Edit;
|