build-dxf 0.0.17 → 0.0.19

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.
Files changed (41) hide show
  1. package/package.json +1 -1
  2. package/src/build.d.ts +10 -1
  3. package/src/build.js +556 -450
  4. package/src/components/Editor.vue.d.ts +26 -0
  5. package/src/index.js +3 -2
  6. package/src/index2.js +373 -3426
  7. package/src/index3.js +1937 -0
  8. package/src/pages/Editor.vue.d.ts +2 -0
  9. package/src/pages/Editor02.vue.d.ts +4 -0
  10. package/src/selectLocalFile.js +3745 -0
  11. package/src/utils/CommandManager/CommandFlow.d.ts +23 -0
  12. package/src/utils/CommandManager/CommandManager.d.ts +59 -0
  13. package/src/utils/CommandManager/index.d.ts +2 -0
  14. package/src/utils/ComponentManager/EventDispatcher.d.ts +11 -1
  15. package/src/utils/DxfSystem/components/Dxf.d.ts +15 -12
  16. package/src/utils/DxfSystem/components/LineAnalysis.d.ts +5 -21
  17. package/src/utils/DxfSystem/components/Variable.d.ts +8 -0
  18. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/CommandFlowComponent.d.ts +36 -0
  19. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/Default.d.ts +57 -0
  20. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawDoorLine.d.ts +19 -0
  21. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawLine.d.ts +20 -0
  22. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/DrawWindow.d.ts +25 -0
  23. package/src/utils/DxfSystem/plugin/Editor/components/CommandFlow/PointDrag.d.ts +27 -0
  24. package/src/utils/DxfSystem/plugin/Editor/components/Editor.d.ts +22 -3
  25. package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +88 -0
  26. package/src/utils/DxfSystem/plugin/Editor/components/index.d.ts +6 -0
  27. package/src/utils/DxfSystem/plugin/Editor/pages/EditorTool.vue.d.ts +6 -0
  28. package/src/utils/DxfSystem/plugin/ModelDataPlugin/components/DxfLineModel.d.ts +7 -3
  29. package/src/utils/DxfSystem/plugin/ModelDataPlugin/index.d.ts +9 -1
  30. package/src/utils/DxfSystem/plugin/RenderPlugin/components/DomContainer.d.ts +1 -0
  31. package/src/utils/DxfSystem/plugin/RenderPlugin/components/DomEventRegister.d.ts +20 -1
  32. package/src/utils/DxfSystem/plugin/RenderPlugin/components/EventInput.d.ts +74 -0
  33. package/src/utils/DxfSystem/plugin/RenderPlugin/components/Renderer.d.ts +0 -11
  34. package/src/utils/DxfSystem/plugin/RenderPlugin/components/index.d.ts +1 -0
  35. package/src/utils/DxfSystem/plugin/RenderPlugin/index.d.ts +11 -1
  36. package/src/utils/PointVirtualGrid/index.d.ts +10 -4
  37. package/src/utils/Quadtree/Box2.d.ts +3 -2
  38. package/src/utils/Quadtree/LineSegment.d.ts +11 -9
  39. package/src/utils/Quadtree/Point.d.ts +11 -6
  40. package/src/utils/Quadtree/Quadtree.d.ts +5 -0
  41. package/src/utils/Quadtree/Rectangle.d.ts +5 -4
@@ -0,0 +1,3745 @@
1
+ import { getCurrentInstance, inject, ref, computed, unref, shallowRef, watchEffect, readonly, getCurrentScope, onScopeDispose, onMounted, nextTick, isRef, warn, provide, defineComponent, createElementBlock, openBlock, mergeProps, renderSlot, createElementVNode, watch, toRef, onUnmounted, useSlots, Text, createBlock, resolveDynamicComponent, withCtx, createCommentVNode, Fragment, normalizeClass, reactive, toRaw, withDirectives, withModifiers, vModelCheckbox, createTextVNode, toDisplayString, normalizeStyle, toRefs } from "vue";
2
+ import * as THREE from "three";
3
+ const configProviderContextKey = Symbol();
4
+ const defaultNamespace = "el";
5
+ const statePrefix = "is-";
6
+ const _bem = (namespace, block, blockSuffix, element, modifier) => {
7
+ let cls = `${namespace}-${block}`;
8
+ if (blockSuffix) {
9
+ cls += `-${blockSuffix}`;
10
+ }
11
+ if (element) {
12
+ cls += `__${element}`;
13
+ }
14
+ if (modifier) {
15
+ cls += `--${modifier}`;
16
+ }
17
+ return cls;
18
+ };
19
+ const namespaceContextKey = Symbol("namespaceContextKey");
20
+ const useGetDerivedNamespace = (namespaceOverrides) => {
21
+ const derivedNamespace = namespaceOverrides || (getCurrentInstance() ? inject(namespaceContextKey, ref(defaultNamespace)) : ref(defaultNamespace));
22
+ const namespace = computed(() => {
23
+ return unref(derivedNamespace) || defaultNamespace;
24
+ });
25
+ return namespace;
26
+ };
27
+ const useNamespace = (block, namespaceOverrides) => {
28
+ const namespace = useGetDerivedNamespace(namespaceOverrides);
29
+ const b = (blockSuffix = "") => _bem(namespace.value, block, blockSuffix, "", "");
30
+ const e = (element) => element ? _bem(namespace.value, block, "", element, "") : "";
31
+ const m = (modifier) => modifier ? _bem(namespace.value, block, "", "", modifier) : "";
32
+ const be = (blockSuffix, element) => blockSuffix && element ? _bem(namespace.value, block, blockSuffix, element, "") : "";
33
+ const em = (element, modifier) => element && modifier ? _bem(namespace.value, block, "", element, modifier) : "";
34
+ const bm = (blockSuffix, modifier) => blockSuffix && modifier ? _bem(namespace.value, block, blockSuffix, "", modifier) : "";
35
+ const bem = (blockSuffix, element, modifier) => blockSuffix && element && modifier ? _bem(namespace.value, block, blockSuffix, element, modifier) : "";
36
+ const is = (name, ...args) => {
37
+ const state = args.length >= 1 ? args[0] : true;
38
+ return name && state ? `${statePrefix}${name}` : "";
39
+ };
40
+ const cssVar = (object) => {
41
+ const styles = {};
42
+ for (const key in object) {
43
+ if (object[key]) {
44
+ styles[`--${namespace.value}-${key}`] = object[key];
45
+ }
46
+ }
47
+ return styles;
48
+ };
49
+ const cssVarBlock = (object) => {
50
+ const styles = {};
51
+ for (const key in object) {
52
+ if (object[key]) {
53
+ styles[`--${namespace.value}-${block}-${key}`] = object[key];
54
+ }
55
+ }
56
+ return styles;
57
+ };
58
+ const cssVarName = (name) => `--${namespace.value}-${name}`;
59
+ const cssVarBlockName = (name) => `--${namespace.value}-${block}-${name}`;
60
+ return {
61
+ namespace,
62
+ b,
63
+ e,
64
+ m,
65
+ be,
66
+ em,
67
+ bm,
68
+ bem,
69
+ is,
70
+ cssVar,
71
+ cssVarName,
72
+ cssVarBlock,
73
+ cssVarBlockName
74
+ };
75
+ };
76
+ /**
77
+ * @vue/shared v3.5.18
78
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
79
+ * @license MIT
80
+ **/
81
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
82
+ !!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
83
+ const NOOP = () => {
84
+ };
85
+ const hasOwnProperty$a = Object.prototype.hasOwnProperty;
86
+ const hasOwn = (val, key) => hasOwnProperty$a.call(val, key);
87
+ const isArray$1 = Array.isArray;
88
+ const isFunction$1 = (val) => typeof val === "function";
89
+ const isString$1 = (val) => typeof val === "string";
90
+ const isObject$1 = (val) => val !== null && typeof val === "object";
91
+ var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
92
+ var freeSelf = typeof self == "object" && self && self.Object === Object && self;
93
+ var root = freeGlobal || freeSelf || Function("return this")();
94
+ var Symbol$1 = root.Symbol;
95
+ var objectProto$c = Object.prototype;
96
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
97
+ var nativeObjectToString$1 = objectProto$c.toString;
98
+ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0;
99
+ function getRawTag(value) {
100
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1), tag = value[symToStringTag$1];
101
+ try {
102
+ value[symToStringTag$1] = void 0;
103
+ var unmasked = true;
104
+ } catch (e) {
105
+ }
106
+ var result = nativeObjectToString$1.call(value);
107
+ if (unmasked) {
108
+ if (isOwn) {
109
+ value[symToStringTag$1] = tag;
110
+ } else {
111
+ delete value[symToStringTag$1];
112
+ }
113
+ }
114
+ return result;
115
+ }
116
+ var objectProto$b = Object.prototype;
117
+ var nativeObjectToString = objectProto$b.toString;
118
+ function objectToString(value) {
119
+ return nativeObjectToString.call(value);
120
+ }
121
+ var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
122
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0;
123
+ function baseGetTag(value) {
124
+ if (value == null) {
125
+ return value === void 0 ? undefinedTag : nullTag;
126
+ }
127
+ return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
128
+ }
129
+ function isObjectLike(value) {
130
+ return value != null && typeof value == "object";
131
+ }
132
+ var symbolTag$1 = "[object Symbol]";
133
+ function isSymbol(value) {
134
+ return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$1;
135
+ }
136
+ function arrayMap(array, iteratee) {
137
+ var index = -1, length = array == null ? 0 : array.length, result = Array(length);
138
+ while (++index < length) {
139
+ result[index] = iteratee(array[index], index, array);
140
+ }
141
+ return result;
142
+ }
143
+ var isArray = Array.isArray;
144
+ var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : void 0, symbolToString = symbolProto$1 ? symbolProto$1.toString : void 0;
145
+ function baseToString(value) {
146
+ if (typeof value == "string") {
147
+ return value;
148
+ }
149
+ if (isArray(value)) {
150
+ return arrayMap(value, baseToString) + "";
151
+ }
152
+ if (isSymbol(value)) {
153
+ return symbolToString ? symbolToString.call(value) : "";
154
+ }
155
+ var result = value + "";
156
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
157
+ }
158
+ function isObject(value) {
159
+ var type = typeof value;
160
+ return value != null && (type == "object" || type == "function");
161
+ }
162
+ function identity$1(value) {
163
+ return value;
164
+ }
165
+ var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
166
+ function isFunction(value) {
167
+ if (!isObject(value)) {
168
+ return false;
169
+ }
170
+ var tag = baseGetTag(value);
171
+ return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
172
+ }
173
+ var coreJsData = root["__core-js_shared__"];
174
+ var maskSrcKey = (function() {
175
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
176
+ return uid ? "Symbol(src)_1." + uid : "";
177
+ })();
178
+ function isMasked(func) {
179
+ return !!maskSrcKey && maskSrcKey in func;
180
+ }
181
+ var funcProto$1 = Function.prototype;
182
+ var funcToString$1 = funcProto$1.toString;
183
+ function toSource(func) {
184
+ if (func != null) {
185
+ try {
186
+ return funcToString$1.call(func);
187
+ } catch (e) {
188
+ }
189
+ try {
190
+ return func + "";
191
+ } catch (e) {
192
+ }
193
+ }
194
+ return "";
195
+ }
196
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
197
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
198
+ var funcProto = Function.prototype, objectProto$a = Object.prototype;
199
+ var funcToString = funcProto.toString;
200
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
201
+ var reIsNative = RegExp(
202
+ "^" + funcToString.call(hasOwnProperty$8).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
203
+ );
204
+ function baseIsNative(value) {
205
+ if (!isObject(value) || isMasked(value)) {
206
+ return false;
207
+ }
208
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
209
+ return pattern.test(toSource(value));
210
+ }
211
+ function getValue(object, key) {
212
+ return object == null ? void 0 : object[key];
213
+ }
214
+ function getNative(object, key) {
215
+ var value = getValue(object, key);
216
+ return baseIsNative(value) ? value : void 0;
217
+ }
218
+ var WeakMap = getNative(root, "WeakMap");
219
+ function apply(func, thisArg, args) {
220
+ switch (args.length) {
221
+ case 0:
222
+ return func.call(thisArg);
223
+ case 1:
224
+ return func.call(thisArg, args[0]);
225
+ case 2:
226
+ return func.call(thisArg, args[0], args[1]);
227
+ case 3:
228
+ return func.call(thisArg, args[0], args[1], args[2]);
229
+ }
230
+ return func.apply(thisArg, args);
231
+ }
232
+ var HOT_COUNT = 800, HOT_SPAN = 16;
233
+ var nativeNow = Date.now;
234
+ function shortOut(func) {
235
+ var count = 0, lastCalled = 0;
236
+ return function() {
237
+ var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
238
+ lastCalled = stamp;
239
+ if (remaining > 0) {
240
+ if (++count >= HOT_COUNT) {
241
+ return arguments[0];
242
+ }
243
+ } else {
244
+ count = 0;
245
+ }
246
+ return func.apply(void 0, arguments);
247
+ };
248
+ }
249
+ function constant(value) {
250
+ return function() {
251
+ return value;
252
+ };
253
+ }
254
+ var defineProperty = (function() {
255
+ try {
256
+ var func = getNative(Object, "defineProperty");
257
+ func({}, "", {});
258
+ return func;
259
+ } catch (e) {
260
+ }
261
+ })();
262
+ var baseSetToString = !defineProperty ? identity$1 : function(func, string) {
263
+ return defineProperty(func, "toString", {
264
+ "configurable": true,
265
+ "enumerable": false,
266
+ "value": constant(string),
267
+ "writable": true
268
+ });
269
+ };
270
+ var setToString = shortOut(baseSetToString);
271
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
272
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
273
+ function isIndex(value, length) {
274
+ var type = typeof value;
275
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
276
+ return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
277
+ }
278
+ function baseAssignValue(object, key, value) {
279
+ if (key == "__proto__" && defineProperty) {
280
+ defineProperty(object, key, {
281
+ "configurable": true,
282
+ "enumerable": true,
283
+ "value": value,
284
+ "writable": true
285
+ });
286
+ } else {
287
+ object[key] = value;
288
+ }
289
+ }
290
+ function eq(value, other) {
291
+ return value === other || value !== value && other !== other;
292
+ }
293
+ var objectProto$9 = Object.prototype;
294
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
295
+ function assignValue(object, key, value) {
296
+ var objValue = object[key];
297
+ if (!(hasOwnProperty$7.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) {
298
+ baseAssignValue(object, key, value);
299
+ }
300
+ }
301
+ var nativeMax = Math.max;
302
+ function overRest(func, start, transform) {
303
+ start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
304
+ return function() {
305
+ var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
306
+ while (++index < length) {
307
+ array[index] = args[start + index];
308
+ }
309
+ index = -1;
310
+ var otherArgs = Array(start + 1);
311
+ while (++index < start) {
312
+ otherArgs[index] = args[index];
313
+ }
314
+ otherArgs[start] = transform(array);
315
+ return apply(func, this, otherArgs);
316
+ };
317
+ }
318
+ var MAX_SAFE_INTEGER = 9007199254740991;
319
+ function isLength(value) {
320
+ return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
321
+ }
322
+ function isArrayLike(value) {
323
+ return value != null && isLength(value.length) && !isFunction(value);
324
+ }
325
+ var objectProto$8 = Object.prototype;
326
+ function isPrototype(value) {
327
+ var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$8;
328
+ return value === proto;
329
+ }
330
+ function baseTimes(n, iteratee) {
331
+ var index = -1, result = Array(n);
332
+ while (++index < n) {
333
+ result[index] = iteratee(index);
334
+ }
335
+ return result;
336
+ }
337
+ var argsTag$2 = "[object Arguments]";
338
+ function baseIsArguments(value) {
339
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
340
+ }
341
+ var objectProto$7 = Object.prototype;
342
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
343
+ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
344
+ var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
345
+ return arguments;
346
+ })()) ? baseIsArguments : function(value) {
347
+ return isObjectLike(value) && hasOwnProperty$6.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
348
+ };
349
+ function stubFalse() {
350
+ return false;
351
+ }
352
+ var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
353
+ var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
354
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
355
+ var Buffer = moduleExports$1 ? root.Buffer : void 0;
356
+ var nativeIsBuffer = Buffer ? Buffer.isBuffer : void 0;
357
+ var isBuffer = nativeIsBuffer || stubFalse;
358
+ var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", objectTag$2 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", weakMapTag$1 = "[object WeakMap]";
359
+ var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[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]";
360
+ var typedArrayTags = {};
361
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
362
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag$1] = typedArrayTags[boolTag$1] = typedArrayTags[dataViewTag$2] = typedArrayTags[dateTag$1] = typedArrayTags[errorTag$1] = typedArrayTags[funcTag] = typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag$1] = typedArrayTags[setTag$2] = typedArrayTags[stringTag$1] = typedArrayTags[weakMapTag$1] = false;
363
+ function baseIsTypedArray(value) {
364
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
365
+ }
366
+ function baseUnary(func) {
367
+ return function(value) {
368
+ return func(value);
369
+ };
370
+ }
371
+ var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
372
+ var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
373
+ var moduleExports = freeModule && freeModule.exports === freeExports;
374
+ var freeProcess = moduleExports && freeGlobal.process;
375
+ var nodeUtil = (function() {
376
+ try {
377
+ var types = freeModule && freeModule.require && freeModule.require("util").types;
378
+ if (types) {
379
+ return types;
380
+ }
381
+ return freeProcess && freeProcess.binding && freeProcess.binding("util");
382
+ } catch (e) {
383
+ }
384
+ })();
385
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
386
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
387
+ var objectProto$6 = Object.prototype;
388
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
389
+ function arrayLikeKeys(value, inherited) {
390
+ 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;
391
+ for (var key in value) {
392
+ if (hasOwnProperty$5.call(value, key) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
393
+ (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
394
+ isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
395
+ isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties.
396
+ isIndex(key, length)))) {
397
+ result.push(key);
398
+ }
399
+ }
400
+ return result;
401
+ }
402
+ function overArg(func, transform) {
403
+ return function(arg) {
404
+ return func(transform(arg));
405
+ };
406
+ }
407
+ var nativeKeys = overArg(Object.keys, Object);
408
+ var objectProto$5 = Object.prototype;
409
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
410
+ function baseKeys(object) {
411
+ if (!isPrototype(object)) {
412
+ return nativeKeys(object);
413
+ }
414
+ var result = [];
415
+ for (var key in Object(object)) {
416
+ if (hasOwnProperty$4.call(object, key) && key != "constructor") {
417
+ result.push(key);
418
+ }
419
+ }
420
+ return result;
421
+ }
422
+ function keys(object) {
423
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
424
+ }
425
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
426
+ function isKey(value, object) {
427
+ if (isArray(value)) {
428
+ return false;
429
+ }
430
+ var type = typeof value;
431
+ if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
432
+ return true;
433
+ }
434
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
435
+ }
436
+ var nativeCreate = getNative(Object, "create");
437
+ function hashClear() {
438
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
439
+ this.size = 0;
440
+ }
441
+ function hashDelete(key) {
442
+ var result = this.has(key) && delete this.__data__[key];
443
+ this.size -= result ? 1 : 0;
444
+ return result;
445
+ }
446
+ var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
447
+ var objectProto$4 = Object.prototype;
448
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
449
+ function hashGet(key) {
450
+ var data = this.__data__;
451
+ if (nativeCreate) {
452
+ var result = data[key];
453
+ return result === HASH_UNDEFINED$2 ? void 0 : result;
454
+ }
455
+ return hasOwnProperty$3.call(data, key) ? data[key] : void 0;
456
+ }
457
+ var objectProto$3 = Object.prototype;
458
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
459
+ function hashHas(key) {
460
+ var data = this.__data__;
461
+ return nativeCreate ? data[key] !== void 0 : hasOwnProperty$2.call(data, key);
462
+ }
463
+ var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
464
+ function hashSet(key, value) {
465
+ var data = this.__data__;
466
+ this.size += this.has(key) ? 0 : 1;
467
+ data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value;
468
+ return this;
469
+ }
470
+ function Hash(entries) {
471
+ var index = -1, length = entries == null ? 0 : entries.length;
472
+ this.clear();
473
+ while (++index < length) {
474
+ var entry = entries[index];
475
+ this.set(entry[0], entry[1]);
476
+ }
477
+ }
478
+ Hash.prototype.clear = hashClear;
479
+ Hash.prototype["delete"] = hashDelete;
480
+ Hash.prototype.get = hashGet;
481
+ Hash.prototype.has = hashHas;
482
+ Hash.prototype.set = hashSet;
483
+ function listCacheClear() {
484
+ this.__data__ = [];
485
+ this.size = 0;
486
+ }
487
+ function assocIndexOf(array, key) {
488
+ var length = array.length;
489
+ while (length--) {
490
+ if (eq(array[length][0], key)) {
491
+ return length;
492
+ }
493
+ }
494
+ return -1;
495
+ }
496
+ var arrayProto = Array.prototype;
497
+ var splice = arrayProto.splice;
498
+ function listCacheDelete(key) {
499
+ var data = this.__data__, index = assocIndexOf(data, key);
500
+ if (index < 0) {
501
+ return false;
502
+ }
503
+ var lastIndex = data.length - 1;
504
+ if (index == lastIndex) {
505
+ data.pop();
506
+ } else {
507
+ splice.call(data, index, 1);
508
+ }
509
+ --this.size;
510
+ return true;
511
+ }
512
+ function listCacheGet(key) {
513
+ var data = this.__data__, index = assocIndexOf(data, key);
514
+ return index < 0 ? void 0 : data[index][1];
515
+ }
516
+ function listCacheHas(key) {
517
+ return assocIndexOf(this.__data__, key) > -1;
518
+ }
519
+ function listCacheSet(key, value) {
520
+ var data = this.__data__, index = assocIndexOf(data, key);
521
+ if (index < 0) {
522
+ ++this.size;
523
+ data.push([key, value]);
524
+ } else {
525
+ data[index][1] = value;
526
+ }
527
+ return this;
528
+ }
529
+ function ListCache(entries) {
530
+ var index = -1, length = entries == null ? 0 : entries.length;
531
+ this.clear();
532
+ while (++index < length) {
533
+ var entry = entries[index];
534
+ this.set(entry[0], entry[1]);
535
+ }
536
+ }
537
+ ListCache.prototype.clear = listCacheClear;
538
+ ListCache.prototype["delete"] = listCacheDelete;
539
+ ListCache.prototype.get = listCacheGet;
540
+ ListCache.prototype.has = listCacheHas;
541
+ ListCache.prototype.set = listCacheSet;
542
+ var Map = getNative(root, "Map");
543
+ function mapCacheClear() {
544
+ this.size = 0;
545
+ this.__data__ = {
546
+ "hash": new Hash(),
547
+ "map": new (Map || ListCache)(),
548
+ "string": new Hash()
549
+ };
550
+ }
551
+ function isKeyable(value) {
552
+ var type = typeof value;
553
+ return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
554
+ }
555
+ function getMapData(map, key) {
556
+ var data = map.__data__;
557
+ return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
558
+ }
559
+ function mapCacheDelete(key) {
560
+ var result = getMapData(this, key)["delete"](key);
561
+ this.size -= result ? 1 : 0;
562
+ return result;
563
+ }
564
+ function mapCacheGet(key) {
565
+ return getMapData(this, key).get(key);
566
+ }
567
+ function mapCacheHas(key) {
568
+ return getMapData(this, key).has(key);
569
+ }
570
+ function mapCacheSet(key, value) {
571
+ var data = getMapData(this, key), size = data.size;
572
+ data.set(key, value);
573
+ this.size += data.size == size ? 0 : 1;
574
+ return this;
575
+ }
576
+ function MapCache(entries) {
577
+ var index = -1, length = entries == null ? 0 : entries.length;
578
+ this.clear();
579
+ while (++index < length) {
580
+ var entry = entries[index];
581
+ this.set(entry[0], entry[1]);
582
+ }
583
+ }
584
+ MapCache.prototype.clear = mapCacheClear;
585
+ MapCache.prototype["delete"] = mapCacheDelete;
586
+ MapCache.prototype.get = mapCacheGet;
587
+ MapCache.prototype.has = mapCacheHas;
588
+ MapCache.prototype.set = mapCacheSet;
589
+ var FUNC_ERROR_TEXT = "Expected a function";
590
+ function memoize(func, resolver) {
591
+ if (typeof func != "function" || resolver != null && typeof resolver != "function") {
592
+ throw new TypeError(FUNC_ERROR_TEXT);
593
+ }
594
+ var memoized = function() {
595
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
596
+ if (cache.has(key)) {
597
+ return cache.get(key);
598
+ }
599
+ var result = func.apply(this, args);
600
+ memoized.cache = cache.set(key, result) || cache;
601
+ return result;
602
+ };
603
+ memoized.cache = new (memoize.Cache || MapCache)();
604
+ return memoized;
605
+ }
606
+ memoize.Cache = MapCache;
607
+ var MAX_MEMOIZE_SIZE = 500;
608
+ function memoizeCapped(func) {
609
+ var result = memoize(func, function(key) {
610
+ if (cache.size === MAX_MEMOIZE_SIZE) {
611
+ cache.clear();
612
+ }
613
+ return key;
614
+ });
615
+ var cache = result.cache;
616
+ return result;
617
+ }
618
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
619
+ var reEscapeChar = /\\(\\)?/g;
620
+ var stringToPath = memoizeCapped(function(string) {
621
+ var result = [];
622
+ if (string.charCodeAt(0) === 46) {
623
+ result.push("");
624
+ }
625
+ string.replace(rePropName, function(match, number, quote, subString) {
626
+ result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
627
+ });
628
+ return result;
629
+ });
630
+ function toString(value) {
631
+ return value == null ? "" : baseToString(value);
632
+ }
633
+ function castPath(value, object) {
634
+ if (isArray(value)) {
635
+ return value;
636
+ }
637
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
638
+ }
639
+ function toKey(value) {
640
+ if (typeof value == "string" || isSymbol(value)) {
641
+ return value;
642
+ }
643
+ var result = value + "";
644
+ return result == "0" && 1 / value == -Infinity ? "-0" : result;
645
+ }
646
+ function baseGet(object, path) {
647
+ path = castPath(path, object);
648
+ var index = 0, length = path.length;
649
+ while (object != null && index < length) {
650
+ object = object[toKey(path[index++])];
651
+ }
652
+ return index && index == length ? object : void 0;
653
+ }
654
+ function get(object, path, defaultValue) {
655
+ var result = object == null ? void 0 : baseGet(object, path);
656
+ return result === void 0 ? defaultValue : result;
657
+ }
658
+ function arrayPush(array, values) {
659
+ var index = -1, length = values.length, offset = array.length;
660
+ while (++index < length) {
661
+ array[offset + index] = values[index];
662
+ }
663
+ return array;
664
+ }
665
+ var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : void 0;
666
+ function isFlattenable(value) {
667
+ return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
668
+ }
669
+ function baseFlatten(array, depth, predicate, isStrict, result) {
670
+ var index = -1, length = array.length;
671
+ predicate || (predicate = isFlattenable);
672
+ result || (result = []);
673
+ while (++index < length) {
674
+ var value = array[index];
675
+ if (predicate(value)) {
676
+ {
677
+ arrayPush(result, value);
678
+ }
679
+ } else {
680
+ result[result.length] = value;
681
+ }
682
+ }
683
+ return result;
684
+ }
685
+ function flatten(array) {
686
+ var length = array == null ? 0 : array.length;
687
+ return length ? baseFlatten(array) : [];
688
+ }
689
+ function flatRest(func) {
690
+ return setToString(overRest(func, void 0, flatten), func + "");
691
+ }
692
+ function stackClear() {
693
+ this.__data__ = new ListCache();
694
+ this.size = 0;
695
+ }
696
+ function stackDelete(key) {
697
+ var data = this.__data__, result = data["delete"](key);
698
+ this.size = data.size;
699
+ return result;
700
+ }
701
+ function stackGet(key) {
702
+ return this.__data__.get(key);
703
+ }
704
+ function stackHas(key) {
705
+ return this.__data__.has(key);
706
+ }
707
+ var LARGE_ARRAY_SIZE = 200;
708
+ function stackSet(key, value) {
709
+ var data = this.__data__;
710
+ if (data instanceof ListCache) {
711
+ var pairs = data.__data__;
712
+ if (!Map || pairs.length < LARGE_ARRAY_SIZE - 1) {
713
+ pairs.push([key, value]);
714
+ this.size = ++data.size;
715
+ return this;
716
+ }
717
+ data = this.__data__ = new MapCache(pairs);
718
+ }
719
+ data.set(key, value);
720
+ this.size = data.size;
721
+ return this;
722
+ }
723
+ function Stack(entries) {
724
+ var data = this.__data__ = new ListCache(entries);
725
+ this.size = data.size;
726
+ }
727
+ Stack.prototype.clear = stackClear;
728
+ Stack.prototype["delete"] = stackDelete;
729
+ Stack.prototype.get = stackGet;
730
+ Stack.prototype.has = stackHas;
731
+ Stack.prototype.set = stackSet;
732
+ function arrayFilter(array, predicate) {
733
+ var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
734
+ while (++index < length) {
735
+ var value = array[index];
736
+ if (predicate(value, index, array)) {
737
+ result[resIndex++] = value;
738
+ }
739
+ }
740
+ return result;
741
+ }
742
+ function stubArray() {
743
+ return [];
744
+ }
745
+ var objectProto$2 = Object.prototype;
746
+ var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
747
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
748
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
749
+ if (object == null) {
750
+ return [];
751
+ }
752
+ object = Object(object);
753
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
754
+ return propertyIsEnumerable.call(object, symbol);
755
+ });
756
+ };
757
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
758
+ var result = keysFunc(object);
759
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
760
+ }
761
+ function getAllKeys(object) {
762
+ return baseGetAllKeys(object, keys, getSymbols);
763
+ }
764
+ var DataView = getNative(root, "DataView");
765
+ var Promise$1 = getNative(root, "Promise");
766
+ var Set$1 = getNative(root, "Set");
767
+ var mapTag$1 = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag$1 = "[object Set]", weakMapTag = "[object WeakMap]";
768
+ var dataViewTag$1 = "[object DataView]";
769
+ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap);
770
+ var getTag = baseGetTag;
771
+ if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$1 || Map && getTag(new Map()) != mapTag$1 || Promise$1 && getTag(Promise$1.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$1 || WeakMap && getTag(new WeakMap()) != weakMapTag) {
772
+ getTag = function(value) {
773
+ var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
774
+ if (ctorString) {
775
+ switch (ctorString) {
776
+ case dataViewCtorString:
777
+ return dataViewTag$1;
778
+ case mapCtorString:
779
+ return mapTag$1;
780
+ case promiseCtorString:
781
+ return promiseTag;
782
+ case setCtorString:
783
+ return setTag$1;
784
+ case weakMapCtorString:
785
+ return weakMapTag;
786
+ }
787
+ }
788
+ return result;
789
+ };
790
+ }
791
+ var Uint8Array = root.Uint8Array;
792
+ var HASH_UNDEFINED = "__lodash_hash_undefined__";
793
+ function setCacheAdd(value) {
794
+ this.__data__.set(value, HASH_UNDEFINED);
795
+ return this;
796
+ }
797
+ function setCacheHas(value) {
798
+ return this.__data__.has(value);
799
+ }
800
+ function SetCache(values) {
801
+ var index = -1, length = values == null ? 0 : values.length;
802
+ this.__data__ = new MapCache();
803
+ while (++index < length) {
804
+ this.add(values[index]);
805
+ }
806
+ }
807
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
808
+ SetCache.prototype.has = setCacheHas;
809
+ function arraySome(array, predicate) {
810
+ var index = -1, length = array == null ? 0 : array.length;
811
+ while (++index < length) {
812
+ if (predicate(array[index], index, array)) {
813
+ return true;
814
+ }
815
+ }
816
+ return false;
817
+ }
818
+ function cacheHas(cache, key) {
819
+ return cache.has(key);
820
+ }
821
+ var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
822
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
823
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
824
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
825
+ return false;
826
+ }
827
+ var arrStacked = stack.get(array);
828
+ var othStacked = stack.get(other);
829
+ if (arrStacked && othStacked) {
830
+ return arrStacked == other && othStacked == array;
831
+ }
832
+ var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
833
+ stack.set(array, other);
834
+ stack.set(other, array);
835
+ while (++index < arrLength) {
836
+ var arrValue = array[index], othValue = other[index];
837
+ if (customizer) {
838
+ var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
839
+ }
840
+ if (compared !== void 0) {
841
+ if (compared) {
842
+ continue;
843
+ }
844
+ result = false;
845
+ break;
846
+ }
847
+ if (seen) {
848
+ if (!arraySome(other, function(othValue2, othIndex) {
849
+ if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
850
+ return seen.push(othIndex);
851
+ }
852
+ })) {
853
+ result = false;
854
+ break;
855
+ }
856
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
857
+ result = false;
858
+ break;
859
+ }
860
+ }
861
+ stack["delete"](array);
862
+ stack["delete"](other);
863
+ return result;
864
+ }
865
+ function mapToArray(map) {
866
+ var index = -1, result = Array(map.size);
867
+ map.forEach(function(value, key) {
868
+ result[++index] = [key, value];
869
+ });
870
+ return result;
871
+ }
872
+ function setToArray(set) {
873
+ var index = -1, result = Array(set.size);
874
+ set.forEach(function(value) {
875
+ result[++index] = value;
876
+ });
877
+ return result;
878
+ }
879
+ var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
880
+ var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
881
+ var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
882
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
883
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
884
+ switch (tag) {
885
+ case dataViewTag:
886
+ if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
887
+ return false;
888
+ }
889
+ object = object.buffer;
890
+ other = other.buffer;
891
+ case arrayBufferTag:
892
+ if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
893
+ return false;
894
+ }
895
+ return true;
896
+ case boolTag:
897
+ case dateTag:
898
+ case numberTag:
899
+ return eq(+object, +other);
900
+ case errorTag:
901
+ return object.name == other.name && object.message == other.message;
902
+ case regexpTag:
903
+ case stringTag:
904
+ return object == other + "";
905
+ case mapTag:
906
+ var convert = mapToArray;
907
+ case setTag:
908
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
909
+ convert || (convert = setToArray);
910
+ if (object.size != other.size && !isPartial) {
911
+ return false;
912
+ }
913
+ var stacked = stack.get(object);
914
+ if (stacked) {
915
+ return stacked == other;
916
+ }
917
+ bitmask |= COMPARE_UNORDERED_FLAG;
918
+ stack.set(object, other);
919
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
920
+ stack["delete"](object);
921
+ return result;
922
+ case symbolTag:
923
+ if (symbolValueOf) {
924
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
925
+ }
926
+ }
927
+ return false;
928
+ }
929
+ var COMPARE_PARTIAL_FLAG$1 = 1;
930
+ var objectProto$1 = Object.prototype;
931
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
932
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
933
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
934
+ if (objLength != othLength && !isPartial) {
935
+ return false;
936
+ }
937
+ var index = objLength;
938
+ while (index--) {
939
+ var key = objProps[index];
940
+ if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
941
+ return false;
942
+ }
943
+ }
944
+ var objStacked = stack.get(object);
945
+ var othStacked = stack.get(other);
946
+ if (objStacked && othStacked) {
947
+ return objStacked == other && othStacked == object;
948
+ }
949
+ var result = true;
950
+ stack.set(object, other);
951
+ stack.set(other, object);
952
+ var skipCtor = isPartial;
953
+ while (++index < objLength) {
954
+ key = objProps[index];
955
+ var objValue = object[key], othValue = other[key];
956
+ if (customizer) {
957
+ var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
958
+ }
959
+ if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
960
+ result = false;
961
+ break;
962
+ }
963
+ skipCtor || (skipCtor = key == "constructor");
964
+ }
965
+ if (result && !skipCtor) {
966
+ var objCtor = object.constructor, othCtor = other.constructor;
967
+ if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
968
+ result = false;
969
+ }
970
+ }
971
+ stack["delete"](object);
972
+ stack["delete"](other);
973
+ return result;
974
+ }
975
+ var COMPARE_PARTIAL_FLAG = 1;
976
+ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
977
+ var objectProto = Object.prototype;
978
+ var hasOwnProperty = objectProto.hasOwnProperty;
979
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
980
+ var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
981
+ objTag = objTag == argsTag ? objectTag : objTag;
982
+ othTag = othTag == argsTag ? objectTag : othTag;
983
+ var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
984
+ if (isSameTag && isBuffer(object)) {
985
+ if (!isBuffer(other)) {
986
+ return false;
987
+ }
988
+ objIsArr = true;
989
+ objIsObj = false;
990
+ }
991
+ if (isSameTag && !objIsObj) {
992
+ stack || (stack = new Stack());
993
+ return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
994
+ }
995
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
996
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
997
+ if (objIsWrapped || othIsWrapped) {
998
+ var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
999
+ stack || (stack = new Stack());
1000
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1001
+ }
1002
+ }
1003
+ if (!isSameTag) {
1004
+ return false;
1005
+ }
1006
+ stack || (stack = new Stack());
1007
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1008
+ }
1009
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
1010
+ if (value === other) {
1011
+ return true;
1012
+ }
1013
+ if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
1014
+ return value !== value && other !== other;
1015
+ }
1016
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
1017
+ }
1018
+ function baseHasIn(object, key) {
1019
+ return object != null && key in Object(object);
1020
+ }
1021
+ function hasPath(object, path, hasFunc) {
1022
+ path = castPath(path, object);
1023
+ var index = -1, length = path.length, result = false;
1024
+ while (++index < length) {
1025
+ var key = toKey(path[index]);
1026
+ if (!(result = object != null && hasFunc(object, key))) {
1027
+ break;
1028
+ }
1029
+ object = object[key];
1030
+ }
1031
+ if (result || ++index != length) {
1032
+ return result;
1033
+ }
1034
+ length = object == null ? 0 : object.length;
1035
+ return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object));
1036
+ }
1037
+ function hasIn(object, path) {
1038
+ return object != null && hasPath(object, path, baseHasIn);
1039
+ }
1040
+ function fromPairs(pairs) {
1041
+ var index = -1, length = pairs == null ? 0 : pairs.length, result = {};
1042
+ while (++index < length) {
1043
+ var pair = pairs[index];
1044
+ result[pair[0]] = pair[1];
1045
+ }
1046
+ return result;
1047
+ }
1048
+ function isEqual(value, other) {
1049
+ return baseIsEqual(value, other);
1050
+ }
1051
+ function isNil(value) {
1052
+ return value == null;
1053
+ }
1054
+ function baseSet(object, path, value, customizer) {
1055
+ if (!isObject(object)) {
1056
+ return object;
1057
+ }
1058
+ path = castPath(path, object);
1059
+ var index = -1, length = path.length, lastIndex = length - 1, nested = object;
1060
+ while (nested != null && ++index < length) {
1061
+ var key = toKey(path[index]), newValue = value;
1062
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
1063
+ return object;
1064
+ }
1065
+ if (index != lastIndex) {
1066
+ var objValue = nested[key];
1067
+ newValue = void 0;
1068
+ if (newValue === void 0) {
1069
+ newValue = isObject(objValue) ? objValue : isIndex(path[index + 1]) ? [] : {};
1070
+ }
1071
+ }
1072
+ assignValue(nested, key, newValue);
1073
+ nested = nested[key];
1074
+ }
1075
+ return object;
1076
+ }
1077
+ function basePickBy(object, paths, predicate) {
1078
+ var index = -1, length = paths.length, result = {};
1079
+ while (++index < length) {
1080
+ var path = paths[index], value = baseGet(object, path);
1081
+ if (predicate(value, path)) {
1082
+ baseSet(result, castPath(path, object), value);
1083
+ }
1084
+ }
1085
+ return result;
1086
+ }
1087
+ function basePick(object, paths) {
1088
+ return basePickBy(object, paths, function(value, path) {
1089
+ return hasIn(object, path);
1090
+ });
1091
+ }
1092
+ var pick = flatRest(function(object, paths) {
1093
+ return object == null ? {} : basePick(object, paths);
1094
+ });
1095
+ const isUndefined = (val) => val === void 0;
1096
+ const isBoolean = (val) => typeof val === "boolean";
1097
+ const isNumber = (val) => typeof val === "number";
1098
+ const isElement = (e) => {
1099
+ if (typeof Element === "undefined")
1100
+ return false;
1101
+ return e instanceof Element;
1102
+ };
1103
+ const isPropAbsent = (prop) => isNil(prop);
1104
+ const isStringNumber = (val) => {
1105
+ if (!isString$1(val)) {
1106
+ return false;
1107
+ }
1108
+ return !Number.isNaN(Number(val));
1109
+ };
1110
+ var __defProp$9 = Object.defineProperty;
1111
+ var __defProps$6 = Object.defineProperties;
1112
+ var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
1113
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
1114
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
1115
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
1116
+ var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
1117
+ var __spreadValues$9 = (a, b) => {
1118
+ for (var prop in b || (b = {}))
1119
+ if (__hasOwnProp$b.call(b, prop))
1120
+ __defNormalProp$9(a, prop, b[prop]);
1121
+ if (__getOwnPropSymbols$b)
1122
+ for (var prop of __getOwnPropSymbols$b(b)) {
1123
+ if (__propIsEnum$b.call(b, prop))
1124
+ __defNormalProp$9(a, prop, b[prop]);
1125
+ }
1126
+ return a;
1127
+ };
1128
+ var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
1129
+ function computedEager(fn, options) {
1130
+ var _a2;
1131
+ const result = shallowRef();
1132
+ watchEffect(() => {
1133
+ result.value = fn();
1134
+ }, __spreadProps$6(__spreadValues$9({}, options), {
1135
+ flush: (_a2 = void 0) != null ? _a2 : "sync"
1136
+ }));
1137
+ return readonly(result);
1138
+ }
1139
+ var _a;
1140
+ const isClient = typeof window !== "undefined";
1141
+ const isString = (val) => typeof val === "string";
1142
+ const noop = () => {
1143
+ };
1144
+ isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
1145
+ function resolveUnref(r) {
1146
+ return typeof r === "function" ? r() : unref(r);
1147
+ }
1148
+ function identity(arg) {
1149
+ return arg;
1150
+ }
1151
+ function tryOnScopeDispose(fn) {
1152
+ if (getCurrentScope()) {
1153
+ onScopeDispose(fn);
1154
+ return true;
1155
+ }
1156
+ return false;
1157
+ }
1158
+ function tryOnMounted(fn, sync = true) {
1159
+ if (getCurrentInstance())
1160
+ onMounted(fn);
1161
+ else if (sync)
1162
+ fn();
1163
+ else
1164
+ nextTick(fn);
1165
+ }
1166
+ function useTimeoutFn(cb, interval, options = {}) {
1167
+ const {
1168
+ immediate = true
1169
+ } = options;
1170
+ const isPending = ref(false);
1171
+ let timer = null;
1172
+ function clear() {
1173
+ if (timer) {
1174
+ clearTimeout(timer);
1175
+ timer = null;
1176
+ }
1177
+ }
1178
+ function stop() {
1179
+ isPending.value = false;
1180
+ clear();
1181
+ }
1182
+ function start(...args) {
1183
+ clear();
1184
+ isPending.value = true;
1185
+ timer = setTimeout(() => {
1186
+ isPending.value = false;
1187
+ timer = null;
1188
+ cb(...args);
1189
+ }, resolveUnref(interval));
1190
+ }
1191
+ if (immediate) {
1192
+ isPending.value = true;
1193
+ if (isClient)
1194
+ start();
1195
+ }
1196
+ tryOnScopeDispose(stop);
1197
+ return {
1198
+ isPending: readonly(isPending),
1199
+ start,
1200
+ stop
1201
+ };
1202
+ }
1203
+ const initial = {
1204
+ current: 0
1205
+ };
1206
+ const zIndex = ref(0);
1207
+ const defaultInitialZIndex = 2e3;
1208
+ const ZINDEX_INJECTION_KEY = Symbol("elZIndexContextKey");
1209
+ const zIndexContextKey = Symbol("zIndexContextKey");
1210
+ const useZIndex = (zIndexOverrides) => {
1211
+ const increasingInjection = getCurrentInstance() ? inject(ZINDEX_INJECTION_KEY, initial) : initial;
1212
+ const zIndexInjection = zIndexOverrides || (getCurrentInstance() ? inject(zIndexContextKey, void 0) : void 0);
1213
+ const initialZIndex = computed(() => {
1214
+ const zIndexFromInjection = unref(zIndexInjection);
1215
+ return isNumber(zIndexFromInjection) ? zIndexFromInjection : defaultInitialZIndex;
1216
+ });
1217
+ const currentZIndex = computed(() => initialZIndex.value + zIndex.value);
1218
+ const nextZIndex = () => {
1219
+ increasingInjection.current++;
1220
+ zIndex.value = increasingInjection.current;
1221
+ return currentZIndex.value;
1222
+ };
1223
+ if (!isClient && !inject(ZINDEX_INJECTION_KEY)) ;
1224
+ return {
1225
+ initialZIndex,
1226
+ currentZIndex,
1227
+ nextZIndex
1228
+ };
1229
+ };
1230
+ var English = {
1231
+ name: "en",
1232
+ el: {
1233
+ breadcrumb: {
1234
+ label: "Breadcrumb"
1235
+ },
1236
+ colorpicker: {
1237
+ confirm: "OK",
1238
+ clear: "Clear",
1239
+ defaultLabel: "color picker",
1240
+ description: "current color is {color}. press enter to select a new color.",
1241
+ alphaLabel: "pick alpha value"
1242
+ },
1243
+ datepicker: {
1244
+ now: "Now",
1245
+ today: "Today",
1246
+ cancel: "Cancel",
1247
+ clear: "Clear",
1248
+ confirm: "OK",
1249
+ dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
1250
+ monthTablePrompt: "Use the arrow keys and enter to select the month",
1251
+ yearTablePrompt: "Use the arrow keys and enter to select the year",
1252
+ selectedDate: "Selected date",
1253
+ selectDate: "Select date",
1254
+ selectTime: "Select time",
1255
+ startDate: "Start Date",
1256
+ startTime: "Start Time",
1257
+ endDate: "End Date",
1258
+ endTime: "End Time",
1259
+ prevYear: "Previous Year",
1260
+ nextYear: "Next Year",
1261
+ prevMonth: "Previous Month",
1262
+ nextMonth: "Next Month",
1263
+ year: "",
1264
+ month1: "January",
1265
+ month2: "February",
1266
+ month3: "March",
1267
+ month4: "April",
1268
+ month5: "May",
1269
+ month6: "June",
1270
+ month7: "July",
1271
+ month8: "August",
1272
+ month9: "September",
1273
+ month10: "October",
1274
+ month11: "November",
1275
+ month12: "December",
1276
+ week: "week",
1277
+ weeks: {
1278
+ sun: "Sun",
1279
+ mon: "Mon",
1280
+ tue: "Tue",
1281
+ wed: "Wed",
1282
+ thu: "Thu",
1283
+ fri: "Fri",
1284
+ sat: "Sat"
1285
+ },
1286
+ weeksFull: {
1287
+ sun: "Sunday",
1288
+ mon: "Monday",
1289
+ tue: "Tuesday",
1290
+ wed: "Wednesday",
1291
+ thu: "Thursday",
1292
+ fri: "Friday",
1293
+ sat: "Saturday"
1294
+ },
1295
+ months: {
1296
+ jan: "Jan",
1297
+ feb: "Feb",
1298
+ mar: "Mar",
1299
+ apr: "Apr",
1300
+ may: "May",
1301
+ jun: "Jun",
1302
+ jul: "Jul",
1303
+ aug: "Aug",
1304
+ sep: "Sep",
1305
+ oct: "Oct",
1306
+ nov: "Nov",
1307
+ dec: "Dec"
1308
+ }
1309
+ },
1310
+ inputNumber: {
1311
+ decrease: "decrease number",
1312
+ increase: "increase number"
1313
+ },
1314
+ select: {
1315
+ loading: "Loading",
1316
+ noMatch: "No matching data",
1317
+ noData: "No data",
1318
+ placeholder: "Select"
1319
+ },
1320
+ mention: {
1321
+ loading: "Loading"
1322
+ },
1323
+ dropdown: {
1324
+ toggleDropdown: "Toggle Dropdown"
1325
+ },
1326
+ cascader: {
1327
+ noMatch: "No matching data",
1328
+ loading: "Loading",
1329
+ placeholder: "Select",
1330
+ noData: "No data"
1331
+ },
1332
+ pagination: {
1333
+ goto: "Go to",
1334
+ pagesize: "/page",
1335
+ total: "Total {total}",
1336
+ pageClassifier: "",
1337
+ page: "Page",
1338
+ prev: "Go to previous page",
1339
+ next: "Go to next page",
1340
+ currentPage: "page {pager}",
1341
+ prevPages: "Previous {pager} pages",
1342
+ nextPages: "Next {pager} pages",
1343
+ deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
1344
+ },
1345
+ dialog: {
1346
+ close: "Close this dialog"
1347
+ },
1348
+ drawer: {
1349
+ close: "Close this dialog"
1350
+ },
1351
+ messagebox: {
1352
+ title: "Message",
1353
+ confirm: "OK",
1354
+ cancel: "Cancel",
1355
+ error: "Illegal input",
1356
+ close: "Close this dialog"
1357
+ },
1358
+ upload: {
1359
+ deleteTip: "press delete to remove",
1360
+ delete: "Delete",
1361
+ preview: "Preview",
1362
+ continue: "Continue"
1363
+ },
1364
+ slider: {
1365
+ defaultLabel: "slider between {min} and {max}",
1366
+ defaultRangeStartLabel: "pick start value",
1367
+ defaultRangeEndLabel: "pick end value"
1368
+ },
1369
+ table: {
1370
+ emptyText: "No Data",
1371
+ confirmFilter: "Confirm",
1372
+ resetFilter: "Reset",
1373
+ clearFilter: "All",
1374
+ sumText: "Sum"
1375
+ },
1376
+ tour: {
1377
+ next: "Next",
1378
+ previous: "Previous",
1379
+ finish: "Finish"
1380
+ },
1381
+ tree: {
1382
+ emptyText: "No Data"
1383
+ },
1384
+ transfer: {
1385
+ noMatch: "No matching data",
1386
+ noData: "No data",
1387
+ titles: ["List 1", "List 2"],
1388
+ filterPlaceholder: "Enter keyword",
1389
+ noCheckedFormat: "{total} items",
1390
+ hasCheckedFormat: "{checked}/{total} checked"
1391
+ },
1392
+ image: {
1393
+ error: "FAILED"
1394
+ },
1395
+ pageHeader: {
1396
+ title: "Back"
1397
+ },
1398
+ popconfirm: {
1399
+ confirmButtonText: "Yes",
1400
+ cancelButtonText: "No"
1401
+ },
1402
+ carousel: {
1403
+ leftArrow: "Carousel arrow left",
1404
+ rightArrow: "Carousel arrow right",
1405
+ indicator: "Carousel switch to index {index}"
1406
+ }
1407
+ }
1408
+ };
1409
+ const buildTranslator = (locale) => (path, option) => translate(path, option, unref(locale));
1410
+ const translate = (path, option, locale) => get(locale, path, path).replace(/\{(\w+)\}/g, (_, key) => {
1411
+ var _a2;
1412
+ return `${(_a2 = option == null ? void 0 : option[key]) != null ? _a2 : `{${key}}`}`;
1413
+ });
1414
+ const buildLocaleContext = (locale) => {
1415
+ const lang = computed(() => unref(locale).name);
1416
+ const localeRef = isRef(locale) ? locale : ref(locale);
1417
+ return {
1418
+ lang,
1419
+ locale: localeRef,
1420
+ t: buildTranslator(locale)
1421
+ };
1422
+ };
1423
+ const localeContextKey = Symbol("localeContextKey");
1424
+ const useLocale = (localeOverrides) => {
1425
+ const locale = localeOverrides || inject(localeContextKey, ref());
1426
+ return buildLocaleContext(computed(() => locale.value || English));
1427
+ };
1428
+ const epPropKey = "__epPropKey";
1429
+ const definePropType = (val) => val;
1430
+ const isEpProp = (val) => isObject$1(val) && !!val[epPropKey];
1431
+ const buildProp = (prop, key) => {
1432
+ if (!isObject$1(prop) || isEpProp(prop))
1433
+ return prop;
1434
+ const { values, required, default: defaultValue, type, validator } = prop;
1435
+ const _validator = values || validator ? (val) => {
1436
+ let valid = false;
1437
+ let allowedValues = [];
1438
+ if (values) {
1439
+ allowedValues = Array.from(values);
1440
+ if (hasOwn(prop, "default")) {
1441
+ allowedValues.push(defaultValue);
1442
+ }
1443
+ valid || (valid = allowedValues.includes(val));
1444
+ }
1445
+ if (validator)
1446
+ valid || (valid = validator(val));
1447
+ if (!valid && allowedValues.length > 0) {
1448
+ const allowValuesText = [...new Set(allowedValues)].map((value) => JSON.stringify(value)).join(", ");
1449
+ warn(`Invalid prop: validation failed${key ? ` for prop "${key}"` : ""}. Expected one of [${allowValuesText}], got value ${JSON.stringify(val)}.`);
1450
+ }
1451
+ return valid;
1452
+ } : void 0;
1453
+ const epProp = {
1454
+ type,
1455
+ required: !!required,
1456
+ validator: _validator,
1457
+ [epPropKey]: true
1458
+ };
1459
+ if (hasOwn(prop, "default"))
1460
+ epProp.default = defaultValue;
1461
+ return epProp;
1462
+ };
1463
+ const buildProps = (props) => fromPairs(Object.entries(props).map(([key, option]) => [
1464
+ key,
1465
+ buildProp(option, key)
1466
+ ]));
1467
+ const componentSizes = ["", "default", "small", "large"];
1468
+ const useSizeProp = buildProp({
1469
+ type: String,
1470
+ values: componentSizes,
1471
+ required: false
1472
+ });
1473
+ const SIZE_INJECTION_KEY = Symbol("size");
1474
+ const useGlobalSize = () => {
1475
+ const injectedSize = inject(SIZE_INJECTION_KEY, {});
1476
+ return computed(() => {
1477
+ return unref(injectedSize.size) || "";
1478
+ });
1479
+ };
1480
+ const emptyValuesContextKey = Symbol("emptyValuesContextKey");
1481
+ const useEmptyValuesProps = buildProps({
1482
+ emptyValues: Array,
1483
+ valueOnClear: {
1484
+ type: definePropType([
1485
+ String,
1486
+ Number,
1487
+ Boolean,
1488
+ Function
1489
+ ]),
1490
+ default: void 0,
1491
+ validator: (val) => isFunction$1(val) ? !val() : !val
1492
+ }
1493
+ });
1494
+ const keysOf = (arr) => Object.keys(arr);
1495
+ const globalConfig = ref();
1496
+ function useGlobalConfig(key, defaultValue = void 0) {
1497
+ const config = getCurrentInstance() ? inject(configProviderContextKey, globalConfig) : globalConfig;
1498
+ if (key) {
1499
+ return computed(() => {
1500
+ var _a2, _b;
1501
+ return (_b = (_a2 = config.value) == null ? void 0 : _a2[key]) != null ? _b : defaultValue;
1502
+ });
1503
+ } else {
1504
+ return config;
1505
+ }
1506
+ }
1507
+ function useGlobalComponentSettings(block, sizeFallback) {
1508
+ const config = useGlobalConfig();
1509
+ const ns = useNamespace(block, computed(() => {
1510
+ var _a2;
1511
+ return ((_a2 = config.value) == null ? void 0 : _a2.namespace) || defaultNamespace;
1512
+ }));
1513
+ const locale = useLocale(computed(() => {
1514
+ var _a2;
1515
+ return (_a2 = config.value) == null ? void 0 : _a2.locale;
1516
+ }));
1517
+ const zIndex2 = useZIndex(computed(() => {
1518
+ var _a2;
1519
+ return ((_a2 = config.value) == null ? void 0 : _a2.zIndex) || defaultInitialZIndex;
1520
+ }));
1521
+ const size = computed(() => {
1522
+ var _a2;
1523
+ return unref(sizeFallback) || ((_a2 = config.value) == null ? void 0 : _a2.size) || "";
1524
+ });
1525
+ provideGlobalConfig(computed(() => unref(config) || {}));
1526
+ return {
1527
+ ns,
1528
+ locale,
1529
+ zIndex: zIndex2,
1530
+ size
1531
+ };
1532
+ }
1533
+ const provideGlobalConfig = (config, app, global2 = false) => {
1534
+ var _a2;
1535
+ const inSetup = !!getCurrentInstance();
1536
+ const oldConfig = inSetup ? useGlobalConfig() : void 0;
1537
+ const provideFn = (_a2 = void 0) != null ? _a2 : inSetup ? provide : void 0;
1538
+ if (!provideFn) {
1539
+ return;
1540
+ }
1541
+ const context = computed(() => {
1542
+ const cfg = unref(config);
1543
+ if (!(oldConfig == null ? void 0 : oldConfig.value))
1544
+ return cfg;
1545
+ return mergeConfig(oldConfig.value, cfg);
1546
+ });
1547
+ provideFn(configProviderContextKey, context);
1548
+ provideFn(localeContextKey, computed(() => context.value.locale));
1549
+ provideFn(namespaceContextKey, computed(() => context.value.namespace));
1550
+ provideFn(zIndexContextKey, computed(() => context.value.zIndex));
1551
+ provideFn(SIZE_INJECTION_KEY, {
1552
+ size: computed(() => context.value.size || "")
1553
+ });
1554
+ provideFn(emptyValuesContextKey, computed(() => ({
1555
+ emptyValues: context.value.emptyValues,
1556
+ valueOnClear: context.value.valueOnClear
1557
+ })));
1558
+ if (global2 || !globalConfig.value) {
1559
+ globalConfig.value = context.value;
1560
+ }
1561
+ return context;
1562
+ };
1563
+ const mergeConfig = (a, b) => {
1564
+ const keys2 = [.../* @__PURE__ */ new Set([...keysOf(a), ...keysOf(b)])];
1565
+ const obj = {};
1566
+ for (const key of keys2) {
1567
+ obj[key] = b[key] !== void 0 ? b[key] : a[key];
1568
+ }
1569
+ return obj;
1570
+ };
1571
+ const UPDATE_MODEL_EVENT = "update:modelValue";
1572
+ const CHANGE_EVENT = "change";
1573
+ var _export_sfc = (sfc, props) => {
1574
+ const target = sfc.__vccOpts || sfc;
1575
+ for (const [key, val] of props) {
1576
+ target[key] = val;
1577
+ }
1578
+ return target;
1579
+ };
1580
+ function addUnit(value, defaultUnit = "px") {
1581
+ if (!value)
1582
+ return "";
1583
+ if (isNumber(value) || isStringNumber(value)) {
1584
+ return `${value}${defaultUnit}`;
1585
+ } else if (isString$1(value)) {
1586
+ return value;
1587
+ }
1588
+ }
1589
+ function debugWarn(scope, message) {
1590
+ }
1591
+ const withInstall = (main, extra) => {
1592
+ main.install = (app) => {
1593
+ for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
1594
+ app.component(comp.name, comp);
1595
+ }
1596
+ };
1597
+ if (extra) {
1598
+ for (const [key, comp] of Object.entries(extra)) {
1599
+ main[key] = comp;
1600
+ }
1601
+ }
1602
+ return main;
1603
+ };
1604
+ const withInstallFunction = (fn, name) => {
1605
+ fn.install = (app) => {
1606
+ fn._context = app._context;
1607
+ app.config.globalProperties[name] = fn;
1608
+ };
1609
+ return fn;
1610
+ };
1611
+ const withNoopInstall = (component) => {
1612
+ component.install = NOOP;
1613
+ return component;
1614
+ };
1615
+ const iconProps = buildProps({
1616
+ size: {
1617
+ type: definePropType([Number, String])
1618
+ },
1619
+ color: {
1620
+ type: String
1621
+ }
1622
+ });
1623
+ const __default__$5 = defineComponent({
1624
+ name: "ElIcon",
1625
+ inheritAttrs: false
1626
+ });
1627
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
1628
+ ...__default__$5,
1629
+ props: iconProps,
1630
+ setup(__props) {
1631
+ const props = __props;
1632
+ const ns = useNamespace("icon");
1633
+ const style = computed(() => {
1634
+ const { size, color } = props;
1635
+ if (!size && !color)
1636
+ return {};
1637
+ return {
1638
+ fontSize: isUndefined(size) ? void 0 : addUnit(size),
1639
+ "--color": color
1640
+ };
1641
+ });
1642
+ return (_ctx, _cache) => {
1643
+ return openBlock(), createElementBlock("i", mergeProps({
1644
+ class: unref(ns).b(),
1645
+ style: unref(style)
1646
+ }, _ctx.$attrs), [
1647
+ renderSlot(_ctx.$slots, "default")
1648
+ ], 16);
1649
+ };
1650
+ }
1651
+ });
1652
+ var Icon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "icon.vue"]]);
1653
+ const ElIcon = withInstall(Icon);
1654
+ /*! Element Plus Icons Vue v2.3.2 */
1655
+ var _sfc_main50 = /* @__PURE__ */ defineComponent({
1656
+ name: "CircleCloseFilled",
1657
+ __name: "circle-close-filled",
1658
+ setup(__props) {
1659
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1660
+ xmlns: "http://www.w3.org/2000/svg",
1661
+ viewBox: "0 0 1024 1024"
1662
+ }, [
1663
+ createElementVNode("path", {
1664
+ fill: "currentColor",
1665
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
1666
+ })
1667
+ ]));
1668
+ }
1669
+ }), circle_close_filled_default = _sfc_main50;
1670
+ var _sfc_main56 = /* @__PURE__ */ defineComponent({
1671
+ name: "Close",
1672
+ __name: "close",
1673
+ setup(__props) {
1674
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1675
+ xmlns: "http://www.w3.org/2000/svg",
1676
+ viewBox: "0 0 1024 1024"
1677
+ }, [
1678
+ createElementVNode("path", {
1679
+ fill: "currentColor",
1680
+ d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
1681
+ })
1682
+ ]));
1683
+ }
1684
+ }), close_default = _sfc_main56;
1685
+ var _sfc_main143 = /* @__PURE__ */ defineComponent({
1686
+ name: "InfoFilled",
1687
+ __name: "info-filled",
1688
+ setup(__props) {
1689
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1690
+ xmlns: "http://www.w3.org/2000/svg",
1691
+ viewBox: "0 0 1024 1024"
1692
+ }, [
1693
+ createElementVNode("path", {
1694
+ fill: "currentColor",
1695
+ d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
1696
+ })
1697
+ ]));
1698
+ }
1699
+ }), info_filled_default = _sfc_main143;
1700
+ var _sfc_main150 = /* @__PURE__ */ defineComponent({
1701
+ name: "Loading",
1702
+ __name: "loading",
1703
+ setup(__props) {
1704
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1705
+ xmlns: "http://www.w3.org/2000/svg",
1706
+ viewBox: "0 0 1024 1024"
1707
+ }, [
1708
+ createElementVNode("path", {
1709
+ fill: "currentColor",
1710
+ d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
1711
+ })
1712
+ ]));
1713
+ }
1714
+ }), loading_default = _sfc_main150;
1715
+ var _sfc_main249 = /* @__PURE__ */ defineComponent({
1716
+ name: "SuccessFilled",
1717
+ __name: "success-filled",
1718
+ setup(__props) {
1719
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1720
+ xmlns: "http://www.w3.org/2000/svg",
1721
+ viewBox: "0 0 1024 1024"
1722
+ }, [
1723
+ createElementVNode("path", {
1724
+ fill: "currentColor",
1725
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
1726
+ })
1727
+ ]));
1728
+ }
1729
+ }), success_filled_default = _sfc_main249;
1730
+ var _sfc_main287 = /* @__PURE__ */ defineComponent({
1731
+ name: "WarningFilled",
1732
+ __name: "warning-filled",
1733
+ setup(__props) {
1734
+ return (_ctx, _cache) => (openBlock(), createElementBlock("svg", {
1735
+ xmlns: "http://www.w3.org/2000/svg",
1736
+ viewBox: "0 0 1024 1024"
1737
+ }, [
1738
+ createElementVNode("path", {
1739
+ fill: "currentColor",
1740
+ d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
1741
+ })
1742
+ ]));
1743
+ }
1744
+ }), warning_filled_default = _sfc_main287;
1745
+ const iconPropType = definePropType([
1746
+ String,
1747
+ Object,
1748
+ Function
1749
+ ]);
1750
+ const TypeComponents = {
1751
+ Close: close_default
1752
+ };
1753
+ const TypeComponentsMap = {
1754
+ primary: info_filled_default,
1755
+ success: success_filled_default,
1756
+ warning: warning_filled_default,
1757
+ error: circle_close_filled_default,
1758
+ info: info_filled_default
1759
+ };
1760
+ const ariaProps = buildProps({
1761
+ ariaLabel: String,
1762
+ ariaOrientation: {
1763
+ type: String,
1764
+ values: ["horizontal", "vertical", "undefined"]
1765
+ },
1766
+ ariaControls: String
1767
+ });
1768
+ const useAriaProps = (arias) => {
1769
+ return pick(ariaProps, arias);
1770
+ };
1771
+ const defaultIdInjection = {
1772
+ prefix: Math.floor(Math.random() * 1e4),
1773
+ current: 0
1774
+ };
1775
+ const ID_INJECTION_KEY = Symbol("elIdInjection");
1776
+ const useIdInjection = () => {
1777
+ return getCurrentInstance() ? inject(ID_INJECTION_KEY, defaultIdInjection) : defaultIdInjection;
1778
+ };
1779
+ const useId = (deterministicId) => {
1780
+ const idInjection = useIdInjection();
1781
+ const namespace = useGetDerivedNamespace();
1782
+ const idRef = computedEager(() => unref(deterministicId) || `${namespace.value}-id-${idInjection.prefix}-${idInjection.current++}`);
1783
+ return idRef;
1784
+ };
1785
+ const formContextKey = Symbol("formContextKey");
1786
+ const formItemContextKey = Symbol("formItemContextKey");
1787
+ const useFormItem = () => {
1788
+ const form = inject(formContextKey, void 0);
1789
+ const formItem = inject(formItemContextKey, void 0);
1790
+ return {
1791
+ form,
1792
+ formItem
1793
+ };
1794
+ };
1795
+ const useFormItemInputId = (props, {
1796
+ formItemContext,
1797
+ disableIdGeneration,
1798
+ disableIdManagement
1799
+ }) => {
1800
+ if (!disableIdGeneration) {
1801
+ disableIdGeneration = ref(false);
1802
+ }
1803
+ if (!disableIdManagement) {
1804
+ disableIdManagement = ref(false);
1805
+ }
1806
+ const instance = getCurrentInstance();
1807
+ const inLabel = () => {
1808
+ let parent = instance == null ? void 0 : instance.parent;
1809
+ while (parent) {
1810
+ if (parent.type.name === "ElFormItem") {
1811
+ return false;
1812
+ }
1813
+ if (parent.type.name === "ElLabelWrap") {
1814
+ return true;
1815
+ }
1816
+ parent = parent.parent;
1817
+ }
1818
+ return false;
1819
+ };
1820
+ const inputId = ref();
1821
+ let idUnwatch = void 0;
1822
+ const isLabeledByFormItem = computed(() => {
1823
+ var _a2;
1824
+ return !!(!(props.label || props.ariaLabel) && formItemContext && formItemContext.inputIds && ((_a2 = formItemContext.inputIds) == null ? void 0 : _a2.length) <= 1);
1825
+ });
1826
+ onMounted(() => {
1827
+ idUnwatch = watch([toRef(props, "id"), disableIdGeneration], ([id, disableIdGeneration2]) => {
1828
+ const newId = id != null ? id : !disableIdGeneration2 ? useId().value : void 0;
1829
+ if (newId !== inputId.value) {
1830
+ if ((formItemContext == null ? void 0 : formItemContext.removeInputId) && !inLabel()) {
1831
+ inputId.value && formItemContext.removeInputId(inputId.value);
1832
+ if (!(disableIdManagement == null ? void 0 : disableIdManagement.value) && !disableIdGeneration2 && newId) {
1833
+ formItemContext.addInputId(newId);
1834
+ }
1835
+ }
1836
+ inputId.value = newId;
1837
+ }
1838
+ }, { immediate: true });
1839
+ });
1840
+ onUnmounted(() => {
1841
+ idUnwatch && idUnwatch();
1842
+ if (formItemContext == null ? void 0 : formItemContext.removeInputId) {
1843
+ inputId.value && formItemContext.removeInputId(inputId.value);
1844
+ }
1845
+ });
1846
+ return {
1847
+ isLabeledByFormItem,
1848
+ inputId
1849
+ };
1850
+ };
1851
+ const useProp = (name) => {
1852
+ const vm = getCurrentInstance();
1853
+ return computed(() => {
1854
+ var _a2, _b;
1855
+ return (_b = (_a2 = vm == null ? void 0 : vm.proxy) == null ? void 0 : _a2.$props) == null ? void 0 : _b[name];
1856
+ });
1857
+ };
1858
+ const useFormSize = (fallback, ignore = {}) => {
1859
+ const emptyRef = ref(void 0);
1860
+ const size = ignore.prop ? emptyRef : useProp("size");
1861
+ const globalConfig2 = ignore.global ? emptyRef : useGlobalSize();
1862
+ const form = ignore.form ? { size: void 0 } : inject(formContextKey, void 0);
1863
+ const formItem = ignore.formItem ? { size: void 0 } : inject(formItemContextKey, void 0);
1864
+ return computed(() => size.value || unref(fallback) || (formItem == null ? void 0 : formItem.size) || (form == null ? void 0 : form.size) || globalConfig2.value || "");
1865
+ };
1866
+ const useFormDisabled = (fallback) => {
1867
+ const disabled = useProp("disabled");
1868
+ const form = inject(formContextKey, void 0);
1869
+ return computed(() => disabled.value || unref(fallback) || (form == null ? void 0 : form.disabled) || false);
1870
+ };
1871
+ const buttonGroupContextKey = Symbol("buttonGroupContextKey");
1872
+ const useDeprecated = ({ from, replacement, scope, version, ref: ref2, type = "API" }, condition) => {
1873
+ watch(() => unref(condition), (val) => {
1874
+ }, {
1875
+ immediate: true
1876
+ });
1877
+ };
1878
+ const useButton = (props, emit) => {
1879
+ useDeprecated({
1880
+ from: "type.text",
1881
+ replacement: "link",
1882
+ version: "3.0.0",
1883
+ scope: "props",
1884
+ ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
1885
+ }, computed(() => props.type === "text"));
1886
+ const buttonGroupContext = inject(buttonGroupContextKey, void 0);
1887
+ const globalConfig2 = useGlobalConfig("button");
1888
+ const { form } = useFormItem();
1889
+ const _size = useFormSize(computed(() => buttonGroupContext == null ? void 0 : buttonGroupContext.size));
1890
+ const _disabled = useFormDisabled();
1891
+ const _ref = ref();
1892
+ const slots = useSlots();
1893
+ const _type = computed(() => {
1894
+ var _a2;
1895
+ return props.type || (buttonGroupContext == null ? void 0 : buttonGroupContext.type) || ((_a2 = globalConfig2.value) == null ? void 0 : _a2.type) || "";
1896
+ });
1897
+ const autoInsertSpace = computed(() => {
1898
+ var _a2, _b, _c;
1899
+ return (_c = (_b = props.autoInsertSpace) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.autoInsertSpace) != null ? _c : false;
1900
+ });
1901
+ const _plain = computed(() => {
1902
+ var _a2, _b, _c;
1903
+ return (_c = (_b = props.plain) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.plain) != null ? _c : false;
1904
+ });
1905
+ const _round = computed(() => {
1906
+ var _a2, _b, _c;
1907
+ return (_c = (_b = props.round) != null ? _b : (_a2 = globalConfig2.value) == null ? void 0 : _a2.round) != null ? _c : false;
1908
+ });
1909
+ const _props = computed(() => {
1910
+ if (props.tag === "button") {
1911
+ return {
1912
+ ariaDisabled: _disabled.value || props.loading,
1913
+ disabled: _disabled.value || props.loading,
1914
+ autofocus: props.autofocus,
1915
+ type: props.nativeType
1916
+ };
1917
+ }
1918
+ return {};
1919
+ });
1920
+ const shouldAddSpace = computed(() => {
1921
+ var _a2;
1922
+ const defaultSlot = (_a2 = slots.default) == null ? void 0 : _a2.call(slots);
1923
+ if (autoInsertSpace.value && (defaultSlot == null ? void 0 : defaultSlot.length) === 1) {
1924
+ const slot = defaultSlot[0];
1925
+ if ((slot == null ? void 0 : slot.type) === Text) {
1926
+ const text = slot.children;
1927
+ return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(text.trim());
1928
+ }
1929
+ }
1930
+ return false;
1931
+ });
1932
+ const handleClick = (evt) => {
1933
+ if (_disabled.value || props.loading) {
1934
+ evt.stopPropagation();
1935
+ return;
1936
+ }
1937
+ if (props.nativeType === "reset") {
1938
+ form == null ? void 0 : form.resetFields();
1939
+ }
1940
+ emit("click", evt);
1941
+ };
1942
+ return {
1943
+ _disabled,
1944
+ _size,
1945
+ _type,
1946
+ _ref,
1947
+ _props,
1948
+ _plain,
1949
+ _round,
1950
+ shouldAddSpace,
1951
+ handleClick
1952
+ };
1953
+ };
1954
+ const buttonTypes = [
1955
+ "default",
1956
+ "primary",
1957
+ "success",
1958
+ "warning",
1959
+ "info",
1960
+ "danger",
1961
+ "text",
1962
+ ""
1963
+ ];
1964
+ const buttonNativeTypes = ["button", "submit", "reset"];
1965
+ const buttonProps = buildProps({
1966
+ size: useSizeProp,
1967
+ disabled: Boolean,
1968
+ type: {
1969
+ type: String,
1970
+ values: buttonTypes,
1971
+ default: ""
1972
+ },
1973
+ icon: {
1974
+ type: iconPropType
1975
+ },
1976
+ nativeType: {
1977
+ type: String,
1978
+ values: buttonNativeTypes,
1979
+ default: "button"
1980
+ },
1981
+ loading: Boolean,
1982
+ loadingIcon: {
1983
+ type: iconPropType,
1984
+ default: () => loading_default
1985
+ },
1986
+ plain: {
1987
+ type: Boolean,
1988
+ default: void 0
1989
+ },
1990
+ text: Boolean,
1991
+ link: Boolean,
1992
+ bg: Boolean,
1993
+ autofocus: Boolean,
1994
+ round: {
1995
+ type: Boolean,
1996
+ default: void 0
1997
+ },
1998
+ circle: Boolean,
1999
+ color: String,
2000
+ dark: Boolean,
2001
+ autoInsertSpace: {
2002
+ type: Boolean,
2003
+ default: void 0
2004
+ },
2005
+ tag: {
2006
+ type: definePropType([String, Object]),
2007
+ default: "button"
2008
+ }
2009
+ });
2010
+ const buttonEmits = {
2011
+ click: (evt) => evt instanceof MouseEvent
2012
+ };
2013
+ function bound01(n, max) {
2014
+ if (isOnePointZero(n)) {
2015
+ n = "100%";
2016
+ }
2017
+ var isPercent = isPercentage(n);
2018
+ n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
2019
+ if (isPercent) {
2020
+ n = parseInt(String(n * max), 10) / 100;
2021
+ }
2022
+ if (Math.abs(n - max) < 1e-6) {
2023
+ return 1;
2024
+ }
2025
+ if (max === 360) {
2026
+ n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
2027
+ } else {
2028
+ n = n % max / parseFloat(String(max));
2029
+ }
2030
+ return n;
2031
+ }
2032
+ function clamp01(val) {
2033
+ return Math.min(1, Math.max(0, val));
2034
+ }
2035
+ function isOnePointZero(n) {
2036
+ return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
2037
+ }
2038
+ function isPercentage(n) {
2039
+ return typeof n === "string" && n.indexOf("%") !== -1;
2040
+ }
2041
+ function boundAlpha(a) {
2042
+ a = parseFloat(a);
2043
+ if (isNaN(a) || a < 0 || a > 1) {
2044
+ a = 1;
2045
+ }
2046
+ return a;
2047
+ }
2048
+ function convertToPercentage(n) {
2049
+ if (n <= 1) {
2050
+ return "".concat(Number(n) * 100, "%");
2051
+ }
2052
+ return n;
2053
+ }
2054
+ function pad2(c) {
2055
+ return c.length === 1 ? "0" + c : String(c);
2056
+ }
2057
+ function rgbToRgb(r, g, b) {
2058
+ return {
2059
+ r: bound01(r, 255) * 255,
2060
+ g: bound01(g, 255) * 255,
2061
+ b: bound01(b, 255) * 255
2062
+ };
2063
+ }
2064
+ function rgbToHsl(r, g, b) {
2065
+ r = bound01(r, 255);
2066
+ g = bound01(g, 255);
2067
+ b = bound01(b, 255);
2068
+ var max = Math.max(r, g, b);
2069
+ var min = Math.min(r, g, b);
2070
+ var h = 0;
2071
+ var s = 0;
2072
+ var l = (max + min) / 2;
2073
+ if (max === min) {
2074
+ s = 0;
2075
+ h = 0;
2076
+ } else {
2077
+ var d = max - min;
2078
+ s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
2079
+ switch (max) {
2080
+ case r:
2081
+ h = (g - b) / d + (g < b ? 6 : 0);
2082
+ break;
2083
+ case g:
2084
+ h = (b - r) / d + 2;
2085
+ break;
2086
+ case b:
2087
+ h = (r - g) / d + 4;
2088
+ break;
2089
+ }
2090
+ h /= 6;
2091
+ }
2092
+ return { h, s, l };
2093
+ }
2094
+ function hue2rgb(p, q, t) {
2095
+ if (t < 0) {
2096
+ t += 1;
2097
+ }
2098
+ if (t > 1) {
2099
+ t -= 1;
2100
+ }
2101
+ if (t < 1 / 6) {
2102
+ return p + (q - p) * (6 * t);
2103
+ }
2104
+ if (t < 1 / 2) {
2105
+ return q;
2106
+ }
2107
+ if (t < 2 / 3) {
2108
+ return p + (q - p) * (2 / 3 - t) * 6;
2109
+ }
2110
+ return p;
2111
+ }
2112
+ function hslToRgb(h, s, l) {
2113
+ var r;
2114
+ var g;
2115
+ var b;
2116
+ h = bound01(h, 360);
2117
+ s = bound01(s, 100);
2118
+ l = bound01(l, 100);
2119
+ if (s === 0) {
2120
+ g = l;
2121
+ b = l;
2122
+ r = l;
2123
+ } else {
2124
+ var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
2125
+ var p = 2 * l - q;
2126
+ r = hue2rgb(p, q, h + 1 / 3);
2127
+ g = hue2rgb(p, q, h);
2128
+ b = hue2rgb(p, q, h - 1 / 3);
2129
+ }
2130
+ return { r: r * 255, g: g * 255, b: b * 255 };
2131
+ }
2132
+ function rgbToHsv(r, g, b) {
2133
+ r = bound01(r, 255);
2134
+ g = bound01(g, 255);
2135
+ b = bound01(b, 255);
2136
+ var max = Math.max(r, g, b);
2137
+ var min = Math.min(r, g, b);
2138
+ var h = 0;
2139
+ var v = max;
2140
+ var d = max - min;
2141
+ var s = max === 0 ? 0 : d / max;
2142
+ if (max === min) {
2143
+ h = 0;
2144
+ } else {
2145
+ switch (max) {
2146
+ case r:
2147
+ h = (g - b) / d + (g < b ? 6 : 0);
2148
+ break;
2149
+ case g:
2150
+ h = (b - r) / d + 2;
2151
+ break;
2152
+ case b:
2153
+ h = (r - g) / d + 4;
2154
+ break;
2155
+ }
2156
+ h /= 6;
2157
+ }
2158
+ return { h, s, v };
2159
+ }
2160
+ function hsvToRgb(h, s, v) {
2161
+ h = bound01(h, 360) * 6;
2162
+ s = bound01(s, 100);
2163
+ v = bound01(v, 100);
2164
+ var i = Math.floor(h);
2165
+ var f = h - i;
2166
+ var p = v * (1 - s);
2167
+ var q = v * (1 - f * s);
2168
+ var t = v * (1 - (1 - f) * s);
2169
+ var mod = i % 6;
2170
+ var r = [v, q, p, p, t, v][mod];
2171
+ var g = [t, v, v, q, p, p][mod];
2172
+ var b = [p, p, t, v, v, q][mod];
2173
+ return { r: r * 255, g: g * 255, b: b * 255 };
2174
+ }
2175
+ function rgbToHex(r, g, b, allow3Char) {
2176
+ var hex = [
2177
+ pad2(Math.round(r).toString(16)),
2178
+ pad2(Math.round(g).toString(16)),
2179
+ pad2(Math.round(b).toString(16))
2180
+ ];
2181
+ if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) {
2182
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
2183
+ }
2184
+ return hex.join("");
2185
+ }
2186
+ function rgbaToHex(r, g, b, a, allow4Char) {
2187
+ var hex = [
2188
+ pad2(Math.round(r).toString(16)),
2189
+ pad2(Math.round(g).toString(16)),
2190
+ pad2(Math.round(b).toString(16)),
2191
+ pad2(convertDecimalToHex(a))
2192
+ ];
2193
+ if (allow4Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1)) && hex[3].startsWith(hex[3].charAt(1))) {
2194
+ return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
2195
+ }
2196
+ return hex.join("");
2197
+ }
2198
+ function convertDecimalToHex(d) {
2199
+ return Math.round(parseFloat(d) * 255).toString(16);
2200
+ }
2201
+ function convertHexToDecimal(h) {
2202
+ return parseIntFromHex(h) / 255;
2203
+ }
2204
+ function parseIntFromHex(val) {
2205
+ return parseInt(val, 16);
2206
+ }
2207
+ function numberInputToObject(color) {
2208
+ return {
2209
+ r: color >> 16,
2210
+ g: (color & 65280) >> 8,
2211
+ b: color & 255
2212
+ };
2213
+ }
2214
+ var names = {
2215
+ aliceblue: "#f0f8ff",
2216
+ antiquewhite: "#faebd7",
2217
+ aqua: "#00ffff",
2218
+ aquamarine: "#7fffd4",
2219
+ azure: "#f0ffff",
2220
+ beige: "#f5f5dc",
2221
+ bisque: "#ffe4c4",
2222
+ black: "#000000",
2223
+ blanchedalmond: "#ffebcd",
2224
+ blue: "#0000ff",
2225
+ blueviolet: "#8a2be2",
2226
+ brown: "#a52a2a",
2227
+ burlywood: "#deb887",
2228
+ cadetblue: "#5f9ea0",
2229
+ chartreuse: "#7fff00",
2230
+ chocolate: "#d2691e",
2231
+ coral: "#ff7f50",
2232
+ cornflowerblue: "#6495ed",
2233
+ cornsilk: "#fff8dc",
2234
+ crimson: "#dc143c",
2235
+ cyan: "#00ffff",
2236
+ darkblue: "#00008b",
2237
+ darkcyan: "#008b8b",
2238
+ darkgoldenrod: "#b8860b",
2239
+ darkgray: "#a9a9a9",
2240
+ darkgreen: "#006400",
2241
+ darkgrey: "#a9a9a9",
2242
+ darkkhaki: "#bdb76b",
2243
+ darkmagenta: "#8b008b",
2244
+ darkolivegreen: "#556b2f",
2245
+ darkorange: "#ff8c00",
2246
+ darkorchid: "#9932cc",
2247
+ darkred: "#8b0000",
2248
+ darksalmon: "#e9967a",
2249
+ darkseagreen: "#8fbc8f",
2250
+ darkslateblue: "#483d8b",
2251
+ darkslategray: "#2f4f4f",
2252
+ darkslategrey: "#2f4f4f",
2253
+ darkturquoise: "#00ced1",
2254
+ darkviolet: "#9400d3",
2255
+ deeppink: "#ff1493",
2256
+ deepskyblue: "#00bfff",
2257
+ dimgray: "#696969",
2258
+ dimgrey: "#696969",
2259
+ dodgerblue: "#1e90ff",
2260
+ firebrick: "#b22222",
2261
+ floralwhite: "#fffaf0",
2262
+ forestgreen: "#228b22",
2263
+ fuchsia: "#ff00ff",
2264
+ gainsboro: "#dcdcdc",
2265
+ ghostwhite: "#f8f8ff",
2266
+ goldenrod: "#daa520",
2267
+ gold: "#ffd700",
2268
+ gray: "#808080",
2269
+ green: "#008000",
2270
+ greenyellow: "#adff2f",
2271
+ grey: "#808080",
2272
+ honeydew: "#f0fff0",
2273
+ hotpink: "#ff69b4",
2274
+ indianred: "#cd5c5c",
2275
+ indigo: "#4b0082",
2276
+ ivory: "#fffff0",
2277
+ khaki: "#f0e68c",
2278
+ lavenderblush: "#fff0f5",
2279
+ lavender: "#e6e6fa",
2280
+ lawngreen: "#7cfc00",
2281
+ lemonchiffon: "#fffacd",
2282
+ lightblue: "#add8e6",
2283
+ lightcoral: "#f08080",
2284
+ lightcyan: "#e0ffff",
2285
+ lightgoldenrodyellow: "#fafad2",
2286
+ lightgray: "#d3d3d3",
2287
+ lightgreen: "#90ee90",
2288
+ lightgrey: "#d3d3d3",
2289
+ lightpink: "#ffb6c1",
2290
+ lightsalmon: "#ffa07a",
2291
+ lightseagreen: "#20b2aa",
2292
+ lightskyblue: "#87cefa",
2293
+ lightslategray: "#778899",
2294
+ lightslategrey: "#778899",
2295
+ lightsteelblue: "#b0c4de",
2296
+ lightyellow: "#ffffe0",
2297
+ lime: "#00ff00",
2298
+ limegreen: "#32cd32",
2299
+ linen: "#faf0e6",
2300
+ magenta: "#ff00ff",
2301
+ maroon: "#800000",
2302
+ mediumaquamarine: "#66cdaa",
2303
+ mediumblue: "#0000cd",
2304
+ mediumorchid: "#ba55d3",
2305
+ mediumpurple: "#9370db",
2306
+ mediumseagreen: "#3cb371",
2307
+ mediumslateblue: "#7b68ee",
2308
+ mediumspringgreen: "#00fa9a",
2309
+ mediumturquoise: "#48d1cc",
2310
+ mediumvioletred: "#c71585",
2311
+ midnightblue: "#191970",
2312
+ mintcream: "#f5fffa",
2313
+ mistyrose: "#ffe4e1",
2314
+ moccasin: "#ffe4b5",
2315
+ navajowhite: "#ffdead",
2316
+ navy: "#000080",
2317
+ oldlace: "#fdf5e6",
2318
+ olive: "#808000",
2319
+ olivedrab: "#6b8e23",
2320
+ orange: "#ffa500",
2321
+ orangered: "#ff4500",
2322
+ orchid: "#da70d6",
2323
+ palegoldenrod: "#eee8aa",
2324
+ palegreen: "#98fb98",
2325
+ paleturquoise: "#afeeee",
2326
+ palevioletred: "#db7093",
2327
+ papayawhip: "#ffefd5",
2328
+ peachpuff: "#ffdab9",
2329
+ peru: "#cd853f",
2330
+ pink: "#ffc0cb",
2331
+ plum: "#dda0dd",
2332
+ powderblue: "#b0e0e6",
2333
+ purple: "#800080",
2334
+ rebeccapurple: "#663399",
2335
+ red: "#ff0000",
2336
+ rosybrown: "#bc8f8f",
2337
+ royalblue: "#4169e1",
2338
+ saddlebrown: "#8b4513",
2339
+ salmon: "#fa8072",
2340
+ sandybrown: "#f4a460",
2341
+ seagreen: "#2e8b57",
2342
+ seashell: "#fff5ee",
2343
+ sienna: "#a0522d",
2344
+ silver: "#c0c0c0",
2345
+ skyblue: "#87ceeb",
2346
+ slateblue: "#6a5acd",
2347
+ slategray: "#708090",
2348
+ slategrey: "#708090",
2349
+ snow: "#fffafa",
2350
+ springgreen: "#00ff7f",
2351
+ steelblue: "#4682b4",
2352
+ tan: "#d2b48c",
2353
+ teal: "#008080",
2354
+ thistle: "#d8bfd8",
2355
+ tomato: "#ff6347",
2356
+ turquoise: "#40e0d0",
2357
+ violet: "#ee82ee",
2358
+ wheat: "#f5deb3",
2359
+ white: "#ffffff",
2360
+ whitesmoke: "#f5f5f5",
2361
+ yellow: "#ffff00",
2362
+ yellowgreen: "#9acd32"
2363
+ };
2364
+ function inputToRGB(color) {
2365
+ var rgb = { r: 0, g: 0, b: 0 };
2366
+ var a = 1;
2367
+ var s = null;
2368
+ var v = null;
2369
+ var l = null;
2370
+ var ok = false;
2371
+ var format = false;
2372
+ if (typeof color === "string") {
2373
+ color = stringInputToObject(color);
2374
+ }
2375
+ if (typeof color === "object") {
2376
+ if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
2377
+ rgb = rgbToRgb(color.r, color.g, color.b);
2378
+ ok = true;
2379
+ format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
2380
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
2381
+ s = convertToPercentage(color.s);
2382
+ v = convertToPercentage(color.v);
2383
+ rgb = hsvToRgb(color.h, s, v);
2384
+ ok = true;
2385
+ format = "hsv";
2386
+ } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
2387
+ s = convertToPercentage(color.s);
2388
+ l = convertToPercentage(color.l);
2389
+ rgb = hslToRgb(color.h, s, l);
2390
+ ok = true;
2391
+ format = "hsl";
2392
+ }
2393
+ if (Object.prototype.hasOwnProperty.call(color, "a")) {
2394
+ a = color.a;
2395
+ }
2396
+ }
2397
+ a = boundAlpha(a);
2398
+ return {
2399
+ ok,
2400
+ format: color.format || format,
2401
+ r: Math.min(255, Math.max(rgb.r, 0)),
2402
+ g: Math.min(255, Math.max(rgb.g, 0)),
2403
+ b: Math.min(255, Math.max(rgb.b, 0)),
2404
+ a
2405
+ };
2406
+ }
2407
+ var CSS_INTEGER = "[-\\+]?\\d+%?";
2408
+ var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
2409
+ var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
2410
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
2411
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
2412
+ var matchers = {
2413
+ CSS_UNIT: new RegExp(CSS_UNIT),
2414
+ rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
2415
+ rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
2416
+ hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
2417
+ hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
2418
+ hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
2419
+ hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
2420
+ hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
2421
+ hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
2422
+ hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
2423
+ hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
2424
+ };
2425
+ function stringInputToObject(color) {
2426
+ color = color.trim().toLowerCase();
2427
+ if (color.length === 0) {
2428
+ return false;
2429
+ }
2430
+ var named = false;
2431
+ if (names[color]) {
2432
+ color = names[color];
2433
+ named = true;
2434
+ } else if (color === "transparent") {
2435
+ return { r: 0, g: 0, b: 0, a: 0, format: "name" };
2436
+ }
2437
+ var match = matchers.rgb.exec(color);
2438
+ if (match) {
2439
+ return { r: match[1], g: match[2], b: match[3] };
2440
+ }
2441
+ match = matchers.rgba.exec(color);
2442
+ if (match) {
2443
+ return { r: match[1], g: match[2], b: match[3], a: match[4] };
2444
+ }
2445
+ match = matchers.hsl.exec(color);
2446
+ if (match) {
2447
+ return { h: match[1], s: match[2], l: match[3] };
2448
+ }
2449
+ match = matchers.hsla.exec(color);
2450
+ if (match) {
2451
+ return { h: match[1], s: match[2], l: match[3], a: match[4] };
2452
+ }
2453
+ match = matchers.hsv.exec(color);
2454
+ if (match) {
2455
+ return { h: match[1], s: match[2], v: match[3] };
2456
+ }
2457
+ match = matchers.hsva.exec(color);
2458
+ if (match) {
2459
+ return { h: match[1], s: match[2], v: match[3], a: match[4] };
2460
+ }
2461
+ match = matchers.hex8.exec(color);
2462
+ if (match) {
2463
+ return {
2464
+ r: parseIntFromHex(match[1]),
2465
+ g: parseIntFromHex(match[2]),
2466
+ b: parseIntFromHex(match[3]),
2467
+ a: convertHexToDecimal(match[4]),
2468
+ format: named ? "name" : "hex8"
2469
+ };
2470
+ }
2471
+ match = matchers.hex6.exec(color);
2472
+ if (match) {
2473
+ return {
2474
+ r: parseIntFromHex(match[1]),
2475
+ g: parseIntFromHex(match[2]),
2476
+ b: parseIntFromHex(match[3]),
2477
+ format: named ? "name" : "hex"
2478
+ };
2479
+ }
2480
+ match = matchers.hex4.exec(color);
2481
+ if (match) {
2482
+ return {
2483
+ r: parseIntFromHex(match[1] + match[1]),
2484
+ g: parseIntFromHex(match[2] + match[2]),
2485
+ b: parseIntFromHex(match[3] + match[3]),
2486
+ a: convertHexToDecimal(match[4] + match[4]),
2487
+ format: named ? "name" : "hex8"
2488
+ };
2489
+ }
2490
+ match = matchers.hex3.exec(color);
2491
+ if (match) {
2492
+ return {
2493
+ r: parseIntFromHex(match[1] + match[1]),
2494
+ g: parseIntFromHex(match[2] + match[2]),
2495
+ b: parseIntFromHex(match[3] + match[3]),
2496
+ format: named ? "name" : "hex"
2497
+ };
2498
+ }
2499
+ return false;
2500
+ }
2501
+ function isValidCSSUnit(color) {
2502
+ return Boolean(matchers.CSS_UNIT.exec(String(color)));
2503
+ }
2504
+ var TinyColor = (
2505
+ /** @class */
2506
+ (function() {
2507
+ function TinyColor2(color, opts) {
2508
+ if (color === void 0) {
2509
+ color = "";
2510
+ }
2511
+ if (opts === void 0) {
2512
+ opts = {};
2513
+ }
2514
+ var _a2;
2515
+ if (color instanceof TinyColor2) {
2516
+ return color;
2517
+ }
2518
+ if (typeof color === "number") {
2519
+ color = numberInputToObject(color);
2520
+ }
2521
+ this.originalInput = color;
2522
+ var rgb = inputToRGB(color);
2523
+ this.originalInput = color;
2524
+ this.r = rgb.r;
2525
+ this.g = rgb.g;
2526
+ this.b = rgb.b;
2527
+ this.a = rgb.a;
2528
+ this.roundA = Math.round(100 * this.a) / 100;
2529
+ this.format = (_a2 = opts.format) !== null && _a2 !== void 0 ? _a2 : rgb.format;
2530
+ this.gradientType = opts.gradientType;
2531
+ if (this.r < 1) {
2532
+ this.r = Math.round(this.r);
2533
+ }
2534
+ if (this.g < 1) {
2535
+ this.g = Math.round(this.g);
2536
+ }
2537
+ if (this.b < 1) {
2538
+ this.b = Math.round(this.b);
2539
+ }
2540
+ this.isValid = rgb.ok;
2541
+ }
2542
+ TinyColor2.prototype.isDark = function() {
2543
+ return this.getBrightness() < 128;
2544
+ };
2545
+ TinyColor2.prototype.isLight = function() {
2546
+ return !this.isDark();
2547
+ };
2548
+ TinyColor2.prototype.getBrightness = function() {
2549
+ var rgb = this.toRgb();
2550
+ return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1e3;
2551
+ };
2552
+ TinyColor2.prototype.getLuminance = function() {
2553
+ var rgb = this.toRgb();
2554
+ var R;
2555
+ var G;
2556
+ var B;
2557
+ var RsRGB = rgb.r / 255;
2558
+ var GsRGB = rgb.g / 255;
2559
+ var BsRGB = rgb.b / 255;
2560
+ if (RsRGB <= 0.03928) {
2561
+ R = RsRGB / 12.92;
2562
+ } else {
2563
+ R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);
2564
+ }
2565
+ if (GsRGB <= 0.03928) {
2566
+ G = GsRGB / 12.92;
2567
+ } else {
2568
+ G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);
2569
+ }
2570
+ if (BsRGB <= 0.03928) {
2571
+ B = BsRGB / 12.92;
2572
+ } else {
2573
+ B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);
2574
+ }
2575
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
2576
+ };
2577
+ TinyColor2.prototype.getAlpha = function() {
2578
+ return this.a;
2579
+ };
2580
+ TinyColor2.prototype.setAlpha = function(alpha) {
2581
+ this.a = boundAlpha(alpha);
2582
+ this.roundA = Math.round(100 * this.a) / 100;
2583
+ return this;
2584
+ };
2585
+ TinyColor2.prototype.isMonochrome = function() {
2586
+ var s = this.toHsl().s;
2587
+ return s === 0;
2588
+ };
2589
+ TinyColor2.prototype.toHsv = function() {
2590
+ var hsv = rgbToHsv(this.r, this.g, this.b);
2591
+ return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this.a };
2592
+ };
2593
+ TinyColor2.prototype.toHsvString = function() {
2594
+ var hsv = rgbToHsv(this.r, this.g, this.b);
2595
+ var h = Math.round(hsv.h * 360);
2596
+ var s = Math.round(hsv.s * 100);
2597
+ var v = Math.round(hsv.v * 100);
2598
+ return this.a === 1 ? "hsv(".concat(h, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h, ", ").concat(s, "%, ").concat(v, "%, ").concat(this.roundA, ")");
2599
+ };
2600
+ TinyColor2.prototype.toHsl = function() {
2601
+ var hsl = rgbToHsl(this.r, this.g, this.b);
2602
+ return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this.a };
2603
+ };
2604
+ TinyColor2.prototype.toHslString = function() {
2605
+ var hsl = rgbToHsl(this.r, this.g, this.b);
2606
+ var h = Math.round(hsl.h * 360);
2607
+ var s = Math.round(hsl.s * 100);
2608
+ var l = Math.round(hsl.l * 100);
2609
+ return this.a === 1 ? "hsl(".concat(h, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h, ", ").concat(s, "%, ").concat(l, "%, ").concat(this.roundA, ")");
2610
+ };
2611
+ TinyColor2.prototype.toHex = function(allow3Char) {
2612
+ if (allow3Char === void 0) {
2613
+ allow3Char = false;
2614
+ }
2615
+ return rgbToHex(this.r, this.g, this.b, allow3Char);
2616
+ };
2617
+ TinyColor2.prototype.toHexString = function(allow3Char) {
2618
+ if (allow3Char === void 0) {
2619
+ allow3Char = false;
2620
+ }
2621
+ return "#" + this.toHex(allow3Char);
2622
+ };
2623
+ TinyColor2.prototype.toHex8 = function(allow4Char) {
2624
+ if (allow4Char === void 0) {
2625
+ allow4Char = false;
2626
+ }
2627
+ return rgbaToHex(this.r, this.g, this.b, this.a, allow4Char);
2628
+ };
2629
+ TinyColor2.prototype.toHex8String = function(allow4Char) {
2630
+ if (allow4Char === void 0) {
2631
+ allow4Char = false;
2632
+ }
2633
+ return "#" + this.toHex8(allow4Char);
2634
+ };
2635
+ TinyColor2.prototype.toHexShortString = function(allowShortChar) {
2636
+ if (allowShortChar === void 0) {
2637
+ allowShortChar = false;
2638
+ }
2639
+ return this.a === 1 ? this.toHexString(allowShortChar) : this.toHex8String(allowShortChar);
2640
+ };
2641
+ TinyColor2.prototype.toRgb = function() {
2642
+ return {
2643
+ r: Math.round(this.r),
2644
+ g: Math.round(this.g),
2645
+ b: Math.round(this.b),
2646
+ a: this.a
2647
+ };
2648
+ };
2649
+ TinyColor2.prototype.toRgbString = function() {
2650
+ var r = Math.round(this.r);
2651
+ var g = Math.round(this.g);
2652
+ var b = Math.round(this.b);
2653
+ return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(this.roundA, ")");
2654
+ };
2655
+ TinyColor2.prototype.toPercentageRgb = function() {
2656
+ var fmt = function(x) {
2657
+ return "".concat(Math.round(bound01(x, 255) * 100), "%");
2658
+ };
2659
+ return {
2660
+ r: fmt(this.r),
2661
+ g: fmt(this.g),
2662
+ b: fmt(this.b),
2663
+ a: this.a
2664
+ };
2665
+ };
2666
+ TinyColor2.prototype.toPercentageRgbString = function() {
2667
+ var rnd = function(x) {
2668
+ return Math.round(bound01(x, 255) * 100);
2669
+ };
2670
+ return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
2671
+ };
2672
+ TinyColor2.prototype.toName = function() {
2673
+ if (this.a === 0) {
2674
+ return "transparent";
2675
+ }
2676
+ if (this.a < 1) {
2677
+ return false;
2678
+ }
2679
+ var hex = "#" + rgbToHex(this.r, this.g, this.b, false);
2680
+ for (var _i = 0, _a2 = Object.entries(names); _i < _a2.length; _i++) {
2681
+ var _b = _a2[_i], key = _b[0], value = _b[1];
2682
+ if (hex === value) {
2683
+ return key;
2684
+ }
2685
+ }
2686
+ return false;
2687
+ };
2688
+ TinyColor2.prototype.toString = function(format) {
2689
+ var formatSet = Boolean(format);
2690
+ format = format !== null && format !== void 0 ? format : this.format;
2691
+ var formattedString = false;
2692
+ var hasAlpha = this.a < 1 && this.a >= 0;
2693
+ var needsAlphaFormat = !formatSet && hasAlpha && (format.startsWith("hex") || format === "name");
2694
+ if (needsAlphaFormat) {
2695
+ if (format === "name" && this.a === 0) {
2696
+ return this.toName();
2697
+ }
2698
+ return this.toRgbString();
2699
+ }
2700
+ if (format === "rgb") {
2701
+ formattedString = this.toRgbString();
2702
+ }
2703
+ if (format === "prgb") {
2704
+ formattedString = this.toPercentageRgbString();
2705
+ }
2706
+ if (format === "hex" || format === "hex6") {
2707
+ formattedString = this.toHexString();
2708
+ }
2709
+ if (format === "hex3") {
2710
+ formattedString = this.toHexString(true);
2711
+ }
2712
+ if (format === "hex4") {
2713
+ formattedString = this.toHex8String(true);
2714
+ }
2715
+ if (format === "hex8") {
2716
+ formattedString = this.toHex8String();
2717
+ }
2718
+ if (format === "name") {
2719
+ formattedString = this.toName();
2720
+ }
2721
+ if (format === "hsl") {
2722
+ formattedString = this.toHslString();
2723
+ }
2724
+ if (format === "hsv") {
2725
+ formattedString = this.toHsvString();
2726
+ }
2727
+ return formattedString || this.toHexString();
2728
+ };
2729
+ TinyColor2.prototype.toNumber = function() {
2730
+ return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
2731
+ };
2732
+ TinyColor2.prototype.clone = function() {
2733
+ return new TinyColor2(this.toString());
2734
+ };
2735
+ TinyColor2.prototype.lighten = function(amount) {
2736
+ if (amount === void 0) {
2737
+ amount = 10;
2738
+ }
2739
+ var hsl = this.toHsl();
2740
+ hsl.l += amount / 100;
2741
+ hsl.l = clamp01(hsl.l);
2742
+ return new TinyColor2(hsl);
2743
+ };
2744
+ TinyColor2.prototype.brighten = function(amount) {
2745
+ if (amount === void 0) {
2746
+ amount = 10;
2747
+ }
2748
+ var rgb = this.toRgb();
2749
+ rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));
2750
+ rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));
2751
+ rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));
2752
+ return new TinyColor2(rgb);
2753
+ };
2754
+ TinyColor2.prototype.darken = function(amount) {
2755
+ if (amount === void 0) {
2756
+ amount = 10;
2757
+ }
2758
+ var hsl = this.toHsl();
2759
+ hsl.l -= amount / 100;
2760
+ hsl.l = clamp01(hsl.l);
2761
+ return new TinyColor2(hsl);
2762
+ };
2763
+ TinyColor2.prototype.tint = function(amount) {
2764
+ if (amount === void 0) {
2765
+ amount = 10;
2766
+ }
2767
+ return this.mix("white", amount);
2768
+ };
2769
+ TinyColor2.prototype.shade = function(amount) {
2770
+ if (amount === void 0) {
2771
+ amount = 10;
2772
+ }
2773
+ return this.mix("black", amount);
2774
+ };
2775
+ TinyColor2.prototype.desaturate = function(amount) {
2776
+ if (amount === void 0) {
2777
+ amount = 10;
2778
+ }
2779
+ var hsl = this.toHsl();
2780
+ hsl.s -= amount / 100;
2781
+ hsl.s = clamp01(hsl.s);
2782
+ return new TinyColor2(hsl);
2783
+ };
2784
+ TinyColor2.prototype.saturate = function(amount) {
2785
+ if (amount === void 0) {
2786
+ amount = 10;
2787
+ }
2788
+ var hsl = this.toHsl();
2789
+ hsl.s += amount / 100;
2790
+ hsl.s = clamp01(hsl.s);
2791
+ return new TinyColor2(hsl);
2792
+ };
2793
+ TinyColor2.prototype.greyscale = function() {
2794
+ return this.desaturate(100);
2795
+ };
2796
+ TinyColor2.prototype.spin = function(amount) {
2797
+ var hsl = this.toHsl();
2798
+ var hue = (hsl.h + amount) % 360;
2799
+ hsl.h = hue < 0 ? 360 + hue : hue;
2800
+ return new TinyColor2(hsl);
2801
+ };
2802
+ TinyColor2.prototype.mix = function(color, amount) {
2803
+ if (amount === void 0) {
2804
+ amount = 50;
2805
+ }
2806
+ var rgb1 = this.toRgb();
2807
+ var rgb2 = new TinyColor2(color).toRgb();
2808
+ var p = amount / 100;
2809
+ var rgba = {
2810
+ r: (rgb2.r - rgb1.r) * p + rgb1.r,
2811
+ g: (rgb2.g - rgb1.g) * p + rgb1.g,
2812
+ b: (rgb2.b - rgb1.b) * p + rgb1.b,
2813
+ a: (rgb2.a - rgb1.a) * p + rgb1.a
2814
+ };
2815
+ return new TinyColor2(rgba);
2816
+ };
2817
+ TinyColor2.prototype.analogous = function(results, slices) {
2818
+ if (results === void 0) {
2819
+ results = 6;
2820
+ }
2821
+ if (slices === void 0) {
2822
+ slices = 30;
2823
+ }
2824
+ var hsl = this.toHsl();
2825
+ var part = 360 / slices;
2826
+ var ret = [this];
2827
+ for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results; ) {
2828
+ hsl.h = (hsl.h + part) % 360;
2829
+ ret.push(new TinyColor2(hsl));
2830
+ }
2831
+ return ret;
2832
+ };
2833
+ TinyColor2.prototype.complement = function() {
2834
+ var hsl = this.toHsl();
2835
+ hsl.h = (hsl.h + 180) % 360;
2836
+ return new TinyColor2(hsl);
2837
+ };
2838
+ TinyColor2.prototype.monochromatic = function(results) {
2839
+ if (results === void 0) {
2840
+ results = 6;
2841
+ }
2842
+ var hsv = this.toHsv();
2843
+ var h = hsv.h;
2844
+ var s = hsv.s;
2845
+ var v = hsv.v;
2846
+ var res = [];
2847
+ var modification = 1 / results;
2848
+ while (results--) {
2849
+ res.push(new TinyColor2({ h, s, v }));
2850
+ v = (v + modification) % 1;
2851
+ }
2852
+ return res;
2853
+ };
2854
+ TinyColor2.prototype.splitcomplement = function() {
2855
+ var hsl = this.toHsl();
2856
+ var h = hsl.h;
2857
+ return [
2858
+ this,
2859
+ new TinyColor2({ h: (h + 72) % 360, s: hsl.s, l: hsl.l }),
2860
+ new TinyColor2({ h: (h + 216) % 360, s: hsl.s, l: hsl.l })
2861
+ ];
2862
+ };
2863
+ TinyColor2.prototype.onBackground = function(background) {
2864
+ var fg = this.toRgb();
2865
+ var bg = new TinyColor2(background).toRgb();
2866
+ var alpha = fg.a + bg.a * (1 - fg.a);
2867
+ return new TinyColor2({
2868
+ r: (fg.r * fg.a + bg.r * bg.a * (1 - fg.a)) / alpha,
2869
+ g: (fg.g * fg.a + bg.g * bg.a * (1 - fg.a)) / alpha,
2870
+ b: (fg.b * fg.a + bg.b * bg.a * (1 - fg.a)) / alpha,
2871
+ a: alpha
2872
+ });
2873
+ };
2874
+ TinyColor2.prototype.triad = function() {
2875
+ return this.polyad(3);
2876
+ };
2877
+ TinyColor2.prototype.tetrad = function() {
2878
+ return this.polyad(4);
2879
+ };
2880
+ TinyColor2.prototype.polyad = function(n) {
2881
+ var hsl = this.toHsl();
2882
+ var h = hsl.h;
2883
+ var result = [this];
2884
+ var increment = 360 / n;
2885
+ for (var i = 1; i < n; i++) {
2886
+ result.push(new TinyColor2({ h: (h + i * increment) % 360, s: hsl.s, l: hsl.l }));
2887
+ }
2888
+ return result;
2889
+ };
2890
+ TinyColor2.prototype.equals = function(color) {
2891
+ return this.toRgbString() === new TinyColor2(color).toRgbString();
2892
+ };
2893
+ return TinyColor2;
2894
+ })()
2895
+ );
2896
+ function darken(color, amount = 20) {
2897
+ return color.mix("#141414", amount).toString();
2898
+ }
2899
+ function useButtonCustomStyle(props) {
2900
+ const _disabled = useFormDisabled();
2901
+ const ns = useNamespace("button");
2902
+ return computed(() => {
2903
+ let styles = {};
2904
+ let buttonColor = props.color;
2905
+ if (buttonColor) {
2906
+ const match = buttonColor.match(/var\((.*?)\)/);
2907
+ if (match) {
2908
+ buttonColor = window.getComputedStyle(window.document.documentElement).getPropertyValue(match[1]);
2909
+ }
2910
+ const color = new TinyColor(buttonColor);
2911
+ const activeBgColor = props.dark ? color.tint(20).toString() : darken(color, 20);
2912
+ if (props.plain) {
2913
+ styles = ns.cssVarBlock({
2914
+ "bg-color": props.dark ? darken(color, 90) : color.tint(90).toString(),
2915
+ "text-color": buttonColor,
2916
+ "border-color": props.dark ? darken(color, 50) : color.tint(50).toString(),
2917
+ "hover-text-color": `var(${ns.cssVarName("color-white")})`,
2918
+ "hover-bg-color": buttonColor,
2919
+ "hover-border-color": buttonColor,
2920
+ "active-bg-color": activeBgColor,
2921
+ "active-text-color": `var(${ns.cssVarName("color-white")})`,
2922
+ "active-border-color": activeBgColor
2923
+ });
2924
+ if (_disabled.value) {
2925
+ styles[ns.cssVarBlockName("disabled-bg-color")] = props.dark ? darken(color, 90) : color.tint(90).toString();
2926
+ styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? darken(color, 50) : color.tint(50).toString();
2927
+ styles[ns.cssVarBlockName("disabled-border-color")] = props.dark ? darken(color, 80) : color.tint(80).toString();
2928
+ }
2929
+ } else {
2930
+ const hoverBgColor = props.dark ? darken(color, 30) : color.tint(30).toString();
2931
+ const textColor = color.isDark() ? `var(${ns.cssVarName("color-white")})` : `var(${ns.cssVarName("color-black")})`;
2932
+ styles = ns.cssVarBlock({
2933
+ "bg-color": buttonColor,
2934
+ "text-color": textColor,
2935
+ "border-color": buttonColor,
2936
+ "hover-bg-color": hoverBgColor,
2937
+ "hover-text-color": textColor,
2938
+ "hover-border-color": hoverBgColor,
2939
+ "active-bg-color": activeBgColor,
2940
+ "active-border-color": activeBgColor
2941
+ });
2942
+ if (_disabled.value) {
2943
+ const disabledButtonColor = props.dark ? darken(color, 50) : color.tint(50).toString();
2944
+ styles[ns.cssVarBlockName("disabled-bg-color")] = disabledButtonColor;
2945
+ styles[ns.cssVarBlockName("disabled-text-color")] = props.dark ? "rgba(255, 255, 255, 0.5)" : `var(${ns.cssVarName("color-white")})`;
2946
+ styles[ns.cssVarBlockName("disabled-border-color")] = disabledButtonColor;
2947
+ }
2948
+ }
2949
+ }
2950
+ return styles;
2951
+ });
2952
+ }
2953
+ const __default__$4 = defineComponent({
2954
+ name: "ElButton"
2955
+ });
2956
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
2957
+ ...__default__$4,
2958
+ props: buttonProps,
2959
+ emits: buttonEmits,
2960
+ setup(__props, { expose, emit }) {
2961
+ const props = __props;
2962
+ const buttonStyle = useButtonCustomStyle(props);
2963
+ const ns = useNamespace("button");
2964
+ const {
2965
+ _ref,
2966
+ _size,
2967
+ _type,
2968
+ _disabled,
2969
+ _props,
2970
+ _plain,
2971
+ _round,
2972
+ shouldAddSpace,
2973
+ handleClick
2974
+ } = useButton(props, emit);
2975
+ const buttonKls = computed(() => [
2976
+ ns.b(),
2977
+ ns.m(_type.value),
2978
+ ns.m(_size.value),
2979
+ ns.is("disabled", _disabled.value),
2980
+ ns.is("loading", props.loading),
2981
+ ns.is("plain", _plain.value),
2982
+ ns.is("round", _round.value),
2983
+ ns.is("circle", props.circle),
2984
+ ns.is("text", props.text),
2985
+ ns.is("link", props.link),
2986
+ ns.is("has-bg", props.bg)
2987
+ ]);
2988
+ expose({
2989
+ ref: _ref,
2990
+ size: _size,
2991
+ type: _type,
2992
+ disabled: _disabled,
2993
+ shouldAddSpace
2994
+ });
2995
+ return (_ctx, _cache) => {
2996
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), mergeProps({
2997
+ ref_key: "_ref",
2998
+ ref: _ref
2999
+ }, unref(_props), {
3000
+ class: unref(buttonKls),
3001
+ style: unref(buttonStyle),
3002
+ onClick: unref(handleClick)
3003
+ }), {
3004
+ default: withCtx(() => [
3005
+ _ctx.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3006
+ _ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", { key: 0 }) : (openBlock(), createBlock(unref(ElIcon), {
3007
+ key: 1,
3008
+ class: normalizeClass(unref(ns).is("loading"))
3009
+ }, {
3010
+ default: withCtx(() => [
3011
+ (openBlock(), createBlock(resolveDynamicComponent(_ctx.loadingIcon)))
3012
+ ]),
3013
+ _: 1
3014
+ }, 8, ["class"]))
3015
+ ], 64)) : _ctx.icon || _ctx.$slots.icon ? (openBlock(), createBlock(unref(ElIcon), { key: 1 }, {
3016
+ default: withCtx(() => [
3017
+ _ctx.icon ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.icon), { key: 0 })) : renderSlot(_ctx.$slots, "icon", { key: 1 })
3018
+ ]),
3019
+ _: 3
3020
+ })) : createCommentVNode("v-if", true),
3021
+ _ctx.$slots.default ? (openBlock(), createElementBlock("span", {
3022
+ key: 2,
3023
+ class: normalizeClass({ [unref(ns).em("text", "expand")]: unref(shouldAddSpace) })
3024
+ }, [
3025
+ renderSlot(_ctx.$slots, "default")
3026
+ ], 2)) : createCommentVNode("v-if", true)
3027
+ ]),
3028
+ _: 3
3029
+ }, 16, ["class", "style", "onClick"]);
3030
+ };
3031
+ }
3032
+ });
3033
+ var Button = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "button.vue"]]);
3034
+ const buttonGroupProps = {
3035
+ size: buttonProps.size,
3036
+ type: buttonProps.type
3037
+ };
3038
+ const __default__$3 = defineComponent({
3039
+ name: "ElButtonGroup"
3040
+ });
3041
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
3042
+ ...__default__$3,
3043
+ props: buttonGroupProps,
3044
+ setup(__props) {
3045
+ const props = __props;
3046
+ provide(buttonGroupContextKey, reactive({
3047
+ size: toRef(props, "size"),
3048
+ type: toRef(props, "type")
3049
+ }));
3050
+ const ns = useNamespace("button");
3051
+ return (_ctx, _cache) => {
3052
+ return openBlock(), createElementBlock("div", {
3053
+ class: normalizeClass(unref(ns).b("group"))
3054
+ }, [
3055
+ renderSlot(_ctx.$slots, "default")
3056
+ ], 2);
3057
+ };
3058
+ }
3059
+ });
3060
+ var ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "button-group.vue"]]);
3061
+ const ElButton = withInstall(Button, {
3062
+ ButtonGroup
3063
+ });
3064
+ withNoopInstall(ButtonGroup);
3065
+ const checkboxProps = {
3066
+ modelValue: {
3067
+ type: [Number, String, Boolean],
3068
+ default: void 0
3069
+ },
3070
+ label: {
3071
+ type: [String, Boolean, Number, Object],
3072
+ default: void 0
3073
+ },
3074
+ value: {
3075
+ type: [String, Boolean, Number, Object],
3076
+ default: void 0
3077
+ },
3078
+ indeterminate: Boolean,
3079
+ disabled: Boolean,
3080
+ checked: Boolean,
3081
+ name: {
3082
+ type: String,
3083
+ default: void 0
3084
+ },
3085
+ trueValue: {
3086
+ type: [String, Number],
3087
+ default: void 0
3088
+ },
3089
+ falseValue: {
3090
+ type: [String, Number],
3091
+ default: void 0
3092
+ },
3093
+ trueLabel: {
3094
+ type: [String, Number],
3095
+ default: void 0
3096
+ },
3097
+ falseLabel: {
3098
+ type: [String, Number],
3099
+ default: void 0
3100
+ },
3101
+ id: {
3102
+ type: String,
3103
+ default: void 0
3104
+ },
3105
+ border: Boolean,
3106
+ size: useSizeProp,
3107
+ tabindex: [String, Number],
3108
+ validateEvent: {
3109
+ type: Boolean,
3110
+ default: true
3111
+ },
3112
+ ...useAriaProps(["ariaControls"])
3113
+ };
3114
+ const checkboxEmits = {
3115
+ [UPDATE_MODEL_EVENT]: (val) => isString$1(val) || isNumber(val) || isBoolean(val),
3116
+ change: (val) => isString$1(val) || isNumber(val) || isBoolean(val)
3117
+ };
3118
+ const checkboxGroupContextKey = Symbol("checkboxGroupContextKey");
3119
+ const useCheckboxDisabled = ({
3120
+ model,
3121
+ isChecked
3122
+ }) => {
3123
+ const checkboxGroup = inject(checkboxGroupContextKey, void 0);
3124
+ const isLimitDisabled = computed(() => {
3125
+ var _a2, _b;
3126
+ const max = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value;
3127
+ const min = (_b = checkboxGroup == null ? void 0 : checkboxGroup.min) == null ? void 0 : _b.value;
3128
+ return !isUndefined(max) && model.value.length >= max && !isChecked.value || !isUndefined(min) && model.value.length <= min && isChecked.value;
3129
+ });
3130
+ const isDisabled = useFormDisabled(computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.disabled.value) || isLimitDisabled.value));
3131
+ return {
3132
+ isDisabled,
3133
+ isLimitDisabled
3134
+ };
3135
+ };
3136
+ const useCheckboxEvent = (props, {
3137
+ model,
3138
+ isLimitExceeded,
3139
+ hasOwnLabel,
3140
+ isDisabled,
3141
+ isLabeledByFormItem
3142
+ }) => {
3143
+ const checkboxGroup = inject(checkboxGroupContextKey, void 0);
3144
+ const { formItem } = useFormItem();
3145
+ const { emit } = getCurrentInstance();
3146
+ function getLabeledValue(value) {
3147
+ var _a2, _b, _c, _d;
3148
+ return [true, props.trueValue, props.trueLabel].includes(value) ? (_b = (_a2 = props.trueValue) != null ? _a2 : props.trueLabel) != null ? _b : true : (_d = (_c = props.falseValue) != null ? _c : props.falseLabel) != null ? _d : false;
3149
+ }
3150
+ function emitChangeEvent(checked, e) {
3151
+ emit(CHANGE_EVENT, getLabeledValue(checked), e);
3152
+ }
3153
+ function handleChange(e) {
3154
+ if (isLimitExceeded.value)
3155
+ return;
3156
+ const target = e.target;
3157
+ emit(CHANGE_EVENT, getLabeledValue(target.checked), e);
3158
+ }
3159
+ async function onClickRoot(e) {
3160
+ if (isLimitExceeded.value)
3161
+ return;
3162
+ if (!hasOwnLabel.value && !isDisabled.value && isLabeledByFormItem.value) {
3163
+ const eventTargets = e.composedPath();
3164
+ const hasLabel = eventTargets.some((item) => item.tagName === "LABEL");
3165
+ if (!hasLabel) {
3166
+ model.value = getLabeledValue([false, props.falseValue, props.falseLabel].includes(model.value));
3167
+ await nextTick();
3168
+ emitChangeEvent(model.value, e);
3169
+ }
3170
+ }
3171
+ }
3172
+ const validateEvent = computed(() => (checkboxGroup == null ? void 0 : checkboxGroup.validateEvent) || props.validateEvent);
3173
+ watch(() => props.modelValue, () => {
3174
+ if (validateEvent.value) {
3175
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
3176
+ }
3177
+ });
3178
+ return {
3179
+ handleChange,
3180
+ onClickRoot
3181
+ };
3182
+ };
3183
+ const useCheckboxModel = (props) => {
3184
+ const selfModel = ref(false);
3185
+ const { emit } = getCurrentInstance();
3186
+ const checkboxGroup = inject(checkboxGroupContextKey, void 0);
3187
+ const isGroup = computed(() => isUndefined(checkboxGroup) === false);
3188
+ const isLimitExceeded = ref(false);
3189
+ const model = computed({
3190
+ get() {
3191
+ var _a2, _b;
3192
+ return isGroup.value ? (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.modelValue) == null ? void 0 : _a2.value : (_b = props.modelValue) != null ? _b : selfModel.value;
3193
+ },
3194
+ set(val) {
3195
+ var _a2, _b;
3196
+ if (isGroup.value && isArray$1(val)) {
3197
+ isLimitExceeded.value = ((_a2 = checkboxGroup == null ? void 0 : checkboxGroup.max) == null ? void 0 : _a2.value) !== void 0 && val.length > (checkboxGroup == null ? void 0 : checkboxGroup.max.value) && val.length > model.value.length;
3198
+ isLimitExceeded.value === false && ((_b = checkboxGroup == null ? void 0 : checkboxGroup.changeEvent) == null ? void 0 : _b.call(checkboxGroup, val));
3199
+ } else {
3200
+ emit(UPDATE_MODEL_EVENT, val);
3201
+ selfModel.value = val;
3202
+ }
3203
+ }
3204
+ });
3205
+ return {
3206
+ model,
3207
+ isGroup,
3208
+ isLimitExceeded
3209
+ };
3210
+ };
3211
+ const useCheckboxStatus = (props, slots, { model }) => {
3212
+ const checkboxGroup = inject(checkboxGroupContextKey, void 0);
3213
+ const isFocused = ref(false);
3214
+ const actualValue = computed(() => {
3215
+ if (!isPropAbsent(props.value)) {
3216
+ return props.value;
3217
+ }
3218
+ return props.label;
3219
+ });
3220
+ const isChecked = computed(() => {
3221
+ const value = model.value;
3222
+ if (isBoolean(value)) {
3223
+ return value;
3224
+ } else if (isArray$1(value)) {
3225
+ if (isObject$1(actualValue.value)) {
3226
+ return value.map(toRaw).some((o) => isEqual(o, actualValue.value));
3227
+ } else {
3228
+ return value.map(toRaw).includes(actualValue.value);
3229
+ }
3230
+ } else if (value !== null && value !== void 0) {
3231
+ return value === props.trueValue || value === props.trueLabel;
3232
+ } else {
3233
+ return !!value;
3234
+ }
3235
+ });
3236
+ const checkboxButtonSize = useFormSize(computed(() => {
3237
+ var _a2;
3238
+ return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
3239
+ }), {
3240
+ prop: true
3241
+ });
3242
+ const checkboxSize = useFormSize(computed(() => {
3243
+ var _a2;
3244
+ return (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.size) == null ? void 0 : _a2.value;
3245
+ }));
3246
+ const hasOwnLabel = computed(() => {
3247
+ return !!slots.default || !isPropAbsent(actualValue.value);
3248
+ });
3249
+ return {
3250
+ checkboxButtonSize,
3251
+ isChecked,
3252
+ isFocused,
3253
+ checkboxSize,
3254
+ hasOwnLabel,
3255
+ actualValue
3256
+ };
3257
+ };
3258
+ const useCheckbox = (props, slots) => {
3259
+ const { formItem: elFormItem } = useFormItem();
3260
+ const { model, isGroup, isLimitExceeded } = useCheckboxModel(props);
3261
+ const {
3262
+ isFocused,
3263
+ isChecked,
3264
+ checkboxButtonSize,
3265
+ checkboxSize,
3266
+ hasOwnLabel,
3267
+ actualValue
3268
+ } = useCheckboxStatus(props, slots, { model });
3269
+ const { isDisabled } = useCheckboxDisabled({ model, isChecked });
3270
+ const { inputId, isLabeledByFormItem } = useFormItemInputId(props, {
3271
+ formItemContext: elFormItem,
3272
+ disableIdGeneration: hasOwnLabel,
3273
+ disableIdManagement: isGroup
3274
+ });
3275
+ const { handleChange, onClickRoot } = useCheckboxEvent(props, {
3276
+ model,
3277
+ isLimitExceeded,
3278
+ hasOwnLabel,
3279
+ isDisabled,
3280
+ isLabeledByFormItem
3281
+ });
3282
+ const setStoreValue = () => {
3283
+ function addToStore() {
3284
+ var _a2, _b;
3285
+ if (isArray$1(model.value) && !model.value.includes(actualValue.value)) {
3286
+ model.value.push(actualValue.value);
3287
+ } else {
3288
+ model.value = (_b = (_a2 = props.trueValue) != null ? _a2 : props.trueLabel) != null ? _b : true;
3289
+ }
3290
+ }
3291
+ props.checked && addToStore();
3292
+ };
3293
+ setStoreValue();
3294
+ useDeprecated({
3295
+ from: "label act as value",
3296
+ replacement: "value",
3297
+ version: "3.0.0",
3298
+ scope: "el-checkbox",
3299
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
3300
+ }, computed(() => isGroup.value && isPropAbsent(props.value)));
3301
+ useDeprecated({
3302
+ from: "true-label",
3303
+ replacement: "true-value",
3304
+ version: "3.0.0",
3305
+ scope: "el-checkbox",
3306
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
3307
+ }, computed(() => !!props.trueLabel));
3308
+ useDeprecated({
3309
+ from: "false-label",
3310
+ replacement: "false-value",
3311
+ version: "3.0.0",
3312
+ scope: "el-checkbox",
3313
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
3314
+ }, computed(() => !!props.falseLabel));
3315
+ return {
3316
+ inputId,
3317
+ isLabeledByFormItem,
3318
+ isChecked,
3319
+ isDisabled,
3320
+ isFocused,
3321
+ checkboxButtonSize,
3322
+ checkboxSize,
3323
+ hasOwnLabel,
3324
+ model,
3325
+ actualValue,
3326
+ handleChange,
3327
+ onClickRoot
3328
+ };
3329
+ };
3330
+ const __default__$2 = defineComponent({
3331
+ name: "ElCheckbox"
3332
+ });
3333
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
3334
+ ...__default__$2,
3335
+ props: checkboxProps,
3336
+ emits: checkboxEmits,
3337
+ setup(__props) {
3338
+ const props = __props;
3339
+ const slots = useSlots();
3340
+ const {
3341
+ inputId,
3342
+ isLabeledByFormItem,
3343
+ isChecked,
3344
+ isDisabled,
3345
+ isFocused,
3346
+ checkboxSize,
3347
+ hasOwnLabel,
3348
+ model,
3349
+ actualValue,
3350
+ handleChange,
3351
+ onClickRoot
3352
+ } = useCheckbox(props, slots);
3353
+ const ns = useNamespace("checkbox");
3354
+ const compKls = computed(() => {
3355
+ return [
3356
+ ns.b(),
3357
+ ns.m(checkboxSize.value),
3358
+ ns.is("disabled", isDisabled.value),
3359
+ ns.is("bordered", props.border),
3360
+ ns.is("checked", isChecked.value)
3361
+ ];
3362
+ });
3363
+ const spanKls = computed(() => {
3364
+ return [
3365
+ ns.e("input"),
3366
+ ns.is("disabled", isDisabled.value),
3367
+ ns.is("checked", isChecked.value),
3368
+ ns.is("indeterminate", props.indeterminate),
3369
+ ns.is("focus", isFocused.value)
3370
+ ];
3371
+ });
3372
+ return (_ctx, _cache) => {
3373
+ return openBlock(), createBlock(resolveDynamicComponent(!unref(hasOwnLabel) && unref(isLabeledByFormItem) ? "span" : "label"), {
3374
+ class: normalizeClass(unref(compKls)),
3375
+ "aria-controls": _ctx.indeterminate ? _ctx.ariaControls : null,
3376
+ onClick: unref(onClickRoot)
3377
+ }, {
3378
+ default: withCtx(() => {
3379
+ var _a2, _b, _c, _d;
3380
+ return [
3381
+ createElementVNode("span", {
3382
+ class: normalizeClass(unref(spanKls))
3383
+ }, [
3384
+ _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
3385
+ key: 0,
3386
+ id: unref(inputId),
3387
+ "onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
3388
+ class: normalizeClass(unref(ns).e("original")),
3389
+ type: "checkbox",
3390
+ indeterminate: _ctx.indeterminate,
3391
+ name: _ctx.name,
3392
+ tabindex: _ctx.tabindex,
3393
+ disabled: unref(isDisabled),
3394
+ "true-value": (_b = (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel) != null ? _b : true,
3395
+ "false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false,
3396
+ onChange: unref(handleChange),
3397
+ onFocus: ($event) => isFocused.value = true,
3398
+ onBlur: ($event) => isFocused.value = false,
3399
+ onClick: withModifiers(() => {
3400
+ }, ["stop"])
3401
+ }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
3402
+ [vModelCheckbox, unref(model)]
3403
+ ]) : withDirectives((openBlock(), createElementBlock("input", {
3404
+ key: 1,
3405
+ id: unref(inputId),
3406
+ "onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
3407
+ class: normalizeClass(unref(ns).e("original")),
3408
+ type: "checkbox",
3409
+ indeterminate: _ctx.indeterminate,
3410
+ disabled: unref(isDisabled),
3411
+ value: unref(actualValue),
3412
+ name: _ctx.name,
3413
+ tabindex: _ctx.tabindex,
3414
+ onChange: unref(handleChange),
3415
+ onFocus: ($event) => isFocused.value = true,
3416
+ onBlur: ($event) => isFocused.value = false,
3417
+ onClick: withModifiers(() => {
3418
+ }, ["stop"])
3419
+ }, null, 42, ["id", "onUpdate:modelValue", "indeterminate", "disabled", "value", "name", "tabindex", "onChange", "onFocus", "onBlur", "onClick"])), [
3420
+ [vModelCheckbox, unref(model)]
3421
+ ]),
3422
+ createElementVNode("span", {
3423
+ class: normalizeClass(unref(ns).e("inner"))
3424
+ }, null, 2)
3425
+ ], 2),
3426
+ unref(hasOwnLabel) ? (openBlock(), createElementBlock("span", {
3427
+ key: 0,
3428
+ class: normalizeClass(unref(ns).e("label"))
3429
+ }, [
3430
+ renderSlot(_ctx.$slots, "default"),
3431
+ !_ctx.$slots.default ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
3432
+ createTextVNode(toDisplayString(_ctx.label), 1)
3433
+ ], 64)) : createCommentVNode("v-if", true)
3434
+ ], 2)) : createCommentVNode("v-if", true)
3435
+ ];
3436
+ }),
3437
+ _: 3
3438
+ }, 8, ["class", "aria-controls", "onClick"]);
3439
+ };
3440
+ }
3441
+ });
3442
+ var Checkbox = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "checkbox.vue"]]);
3443
+ const __default__$1 = defineComponent({
3444
+ name: "ElCheckboxButton"
3445
+ });
3446
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
3447
+ ...__default__$1,
3448
+ props: checkboxProps,
3449
+ emits: checkboxEmits,
3450
+ setup(__props) {
3451
+ const props = __props;
3452
+ const slots = useSlots();
3453
+ const {
3454
+ isFocused,
3455
+ isChecked,
3456
+ isDisabled,
3457
+ checkboxButtonSize,
3458
+ model,
3459
+ actualValue,
3460
+ handleChange
3461
+ } = useCheckbox(props, slots);
3462
+ const checkboxGroup = inject(checkboxGroupContextKey, void 0);
3463
+ const ns = useNamespace("checkbox");
3464
+ const activeStyle = computed(() => {
3465
+ var _a2, _b, _c, _d;
3466
+ const fillValue = (_b = (_a2 = checkboxGroup == null ? void 0 : checkboxGroup.fill) == null ? void 0 : _a2.value) != null ? _b : "";
3467
+ return {
3468
+ backgroundColor: fillValue,
3469
+ borderColor: fillValue,
3470
+ color: (_d = (_c = checkboxGroup == null ? void 0 : checkboxGroup.textColor) == null ? void 0 : _c.value) != null ? _d : "",
3471
+ boxShadow: fillValue ? `-1px 0 0 0 ${fillValue}` : void 0
3472
+ };
3473
+ });
3474
+ const labelKls = computed(() => {
3475
+ return [
3476
+ ns.b("button"),
3477
+ ns.bm("button", checkboxButtonSize.value),
3478
+ ns.is("disabled", isDisabled.value),
3479
+ ns.is("checked", isChecked.value),
3480
+ ns.is("focus", isFocused.value)
3481
+ ];
3482
+ });
3483
+ return (_ctx, _cache) => {
3484
+ var _a2, _b, _c, _d;
3485
+ return openBlock(), createElementBlock("label", {
3486
+ class: normalizeClass(unref(labelKls))
3487
+ }, [
3488
+ _ctx.trueValue || _ctx.falseValue || _ctx.trueLabel || _ctx.falseLabel ? withDirectives((openBlock(), createElementBlock("input", {
3489
+ key: 0,
3490
+ "onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
3491
+ class: normalizeClass(unref(ns).be("button", "original")),
3492
+ type: "checkbox",
3493
+ name: _ctx.name,
3494
+ tabindex: _ctx.tabindex,
3495
+ disabled: unref(isDisabled),
3496
+ "true-value": (_b = (_a2 = _ctx.trueValue) != null ? _a2 : _ctx.trueLabel) != null ? _b : true,
3497
+ "false-value": (_d = (_c = _ctx.falseValue) != null ? _c : _ctx.falseLabel) != null ? _d : false,
3498
+ onChange: unref(handleChange),
3499
+ onFocus: ($event) => isFocused.value = true,
3500
+ onBlur: ($event) => isFocused.value = false,
3501
+ onClick: withModifiers(() => {
3502
+ }, ["stop"])
3503
+ }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "true-value", "false-value", "onChange", "onFocus", "onBlur", "onClick"])), [
3504
+ [vModelCheckbox, unref(model)]
3505
+ ]) : withDirectives((openBlock(), createElementBlock("input", {
3506
+ key: 1,
3507
+ "onUpdate:modelValue": ($event) => isRef(model) ? model.value = $event : null,
3508
+ class: normalizeClass(unref(ns).be("button", "original")),
3509
+ type: "checkbox",
3510
+ name: _ctx.name,
3511
+ tabindex: _ctx.tabindex,
3512
+ disabled: unref(isDisabled),
3513
+ value: unref(actualValue),
3514
+ onChange: unref(handleChange),
3515
+ onFocus: ($event) => isFocused.value = true,
3516
+ onBlur: ($event) => isFocused.value = false,
3517
+ onClick: withModifiers(() => {
3518
+ }, ["stop"])
3519
+ }, null, 42, ["onUpdate:modelValue", "name", "tabindex", "disabled", "value", "onChange", "onFocus", "onBlur", "onClick"])), [
3520
+ [vModelCheckbox, unref(model)]
3521
+ ]),
3522
+ _ctx.$slots.default || _ctx.label ? (openBlock(), createElementBlock("span", {
3523
+ key: 2,
3524
+ class: normalizeClass(unref(ns).be("button", "inner")),
3525
+ style: normalizeStyle(unref(isChecked) ? unref(activeStyle) : void 0)
3526
+ }, [
3527
+ renderSlot(_ctx.$slots, "default", {}, () => [
3528
+ createTextVNode(toDisplayString(_ctx.label), 1)
3529
+ ])
3530
+ ], 6)) : createCommentVNode("v-if", true)
3531
+ ], 2);
3532
+ };
3533
+ }
3534
+ });
3535
+ var CheckboxButton = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "checkbox-button.vue"]]);
3536
+ const checkboxGroupProps = buildProps({
3537
+ modelValue: {
3538
+ type: definePropType(Array),
3539
+ default: () => []
3540
+ },
3541
+ disabled: Boolean,
3542
+ min: Number,
3543
+ max: Number,
3544
+ size: useSizeProp,
3545
+ fill: String,
3546
+ textColor: String,
3547
+ tag: {
3548
+ type: String,
3549
+ default: "div"
3550
+ },
3551
+ validateEvent: {
3552
+ type: Boolean,
3553
+ default: true
3554
+ },
3555
+ ...useAriaProps(["ariaLabel"])
3556
+ });
3557
+ const checkboxGroupEmits = {
3558
+ [UPDATE_MODEL_EVENT]: (val) => isArray$1(val),
3559
+ change: (val) => isArray$1(val)
3560
+ };
3561
+ const __default__ = defineComponent({
3562
+ name: "ElCheckboxGroup"
3563
+ });
3564
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3565
+ ...__default__,
3566
+ props: checkboxGroupProps,
3567
+ emits: checkboxGroupEmits,
3568
+ setup(__props, { emit }) {
3569
+ const props = __props;
3570
+ const ns = useNamespace("checkbox");
3571
+ const { formItem } = useFormItem();
3572
+ const { inputId: groupId, isLabeledByFormItem } = useFormItemInputId(props, {
3573
+ formItemContext: formItem
3574
+ });
3575
+ const changeEvent = async (value) => {
3576
+ emit(UPDATE_MODEL_EVENT, value);
3577
+ await nextTick();
3578
+ emit(CHANGE_EVENT, value);
3579
+ };
3580
+ const modelValue = computed({
3581
+ get() {
3582
+ return props.modelValue;
3583
+ },
3584
+ set(val) {
3585
+ changeEvent(val);
3586
+ }
3587
+ });
3588
+ provide(checkboxGroupContextKey, {
3589
+ ...pick(toRefs(props), [
3590
+ "size",
3591
+ "min",
3592
+ "max",
3593
+ "disabled",
3594
+ "validateEvent",
3595
+ "fill",
3596
+ "textColor"
3597
+ ]),
3598
+ modelValue,
3599
+ changeEvent
3600
+ });
3601
+ watch(() => props.modelValue, (newVal, oldValue) => {
3602
+ if (props.validateEvent && !isEqual(newVal, oldValue)) {
3603
+ formItem == null ? void 0 : formItem.validate("change").catch((err) => debugWarn());
3604
+ }
3605
+ });
3606
+ return (_ctx, _cache) => {
3607
+ var _a2;
3608
+ return openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
3609
+ id: unref(groupId),
3610
+ class: normalizeClass(unref(ns).b("group")),
3611
+ role: "group",
3612
+ "aria-label": !unref(isLabeledByFormItem) ? _ctx.ariaLabel || "checkbox-group" : void 0,
3613
+ "aria-labelledby": unref(isLabeledByFormItem) ? (_a2 = unref(formItem)) == null ? void 0 : _a2.labelId : void 0
3614
+ }, {
3615
+ default: withCtx(() => [
3616
+ renderSlot(_ctx.$slots, "default")
3617
+ ]),
3618
+ _: 3
3619
+ }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
3620
+ };
3621
+ }
3622
+ });
3623
+ var CheckboxGroup = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "checkbox-group.vue"]]);
3624
+ const ElCheckbox = withInstall(Checkbox, {
3625
+ CheckboxButton,
3626
+ CheckboxGroup
3627
+ });
3628
+ withNoopInstall(CheckboxButton);
3629
+ withNoopInstall(CheckboxGroup);
3630
+ class Lines extends THREE.LineSegments {
3631
+ geometry = new THREE.BufferGeometry();
3632
+ points = [];
3633
+ pointsObject3D;
3634
+ constructor(points = [], color = 16777215) {
3635
+ super();
3636
+ this.geometry = this.geometry;
3637
+ this.addPoint(...points);
3638
+ this.frustumCulled = false;
3639
+ this.pointsObject3D = new THREE.Points(this.geometry, new THREE.PointsMaterial({
3640
+ sizeAttenuation: false,
3641
+ size: 10
3642
+ }));
3643
+ this.material = new THREE.LineBasicMaterial({ color });
3644
+ }
3645
+ addPoint(...points) {
3646
+ this.points.push(...points);
3647
+ this.updateGeometry();
3648
+ }
3649
+ setPoint(...points) {
3650
+ this.points.length = 0;
3651
+ this.addPoint(...points);
3652
+ }
3653
+ _timer = null;
3654
+ updateGeometry() {
3655
+ if (this._timer) clearTimeout(this._timer);
3656
+ this._timer = setTimeout(() => {
3657
+ const array = this.points.flatMap((p, i) => {
3658
+ if (i === 0) return [];
3659
+ else {
3660
+ const p0 = this.points[i - 1];
3661
+ return [p0.x, p0.y, p0.z, p.x, p.y, p.z];
3662
+ }
3663
+ });
3664
+ const position = new THREE.BufferAttribute(new Float32Array(array), 3);
3665
+ this.geometry.setAttribute("position", position);
3666
+ this._timer = null;
3667
+ });
3668
+ }
3669
+ }
3670
+ function selectLocalFileFun() {
3671
+ return new Promise((resolve) => {
3672
+ const input = document.createElement("input");
3673
+ input.type = "file";
3674
+ input.accept = "application/json";
3675
+ input.click();
3676
+ input.onchange = () => {
3677
+ if (input.files?.length) resolve(input.files[0]);
3678
+ else resolve(null);
3679
+ };
3680
+ });
3681
+ }
3682
+ const SelectLocalFile = Object.assign(selectLocalFileFun, {
3683
+ arrayBuffer() {
3684
+ return new Promise(async (resolve) => {
3685
+ const file = await selectLocalFileFun();
3686
+ if (file instanceof File) {
3687
+ const fileReader = new FileReader();
3688
+ fileReader.onload = () => {
3689
+ resolve(fileReader.result);
3690
+ };
3691
+ fileReader.readAsArrayBuffer(file);
3692
+ } else resolve(null);
3693
+ });
3694
+ },
3695
+ text() {
3696
+ return new Promise(async (resolve) => {
3697
+ const file = await selectLocalFileFun();
3698
+ if (file instanceof File) {
3699
+ const fileReader = new FileReader();
3700
+ fileReader.onload = () => {
3701
+ resolve(fileReader.result);
3702
+ };
3703
+ fileReader.readAsText(file, "utf-8");
3704
+ } else resolve(null);
3705
+ });
3706
+ },
3707
+ async json() {
3708
+ const text = await this.text();
3709
+ if (text) return JSON.parse(text);
3710
+ }
3711
+ });
3712
+ export {
3713
+ withInstallFunction as A,
3714
+ ElButton as E,
3715
+ Lines as L,
3716
+ SelectLocalFile as S,
3717
+ TypeComponentsMap as T,
3718
+ _export_sfc as _,
3719
+ ElCheckbox as a,
3720
+ isClient as b,
3721
+ tryOnMounted as c,
3722
+ identity as d,
3723
+ buildProps as e,
3724
+ definePropType as f,
3725
+ isNumber as g,
3726
+ addUnit as h,
3727
+ isString as i,
3728
+ useEmptyValuesProps as j,
3729
+ useSizeProp as k,
3730
+ iconPropType as l,
3731
+ useGlobalComponentSettings as m,
3732
+ noop as n,
3733
+ ElIcon as o,
3734
+ provideGlobalConfig as p,
3735
+ TypeComponents as q,
3736
+ resolveUnref as r,
3737
+ useTimeoutFn as s,
3738
+ tryOnScopeDispose as t,
3739
+ useNamespace as u,
3740
+ isString$1 as v,
3741
+ withInstall as w,
3742
+ isFunction$1 as x,
3743
+ isBoolean as y,
3744
+ isElement as z
3745
+ };