3h1-ui 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +4765 -94
- package/es/style.css +246 -18
- package/es/types/global.d.ts +102 -0
- package/es/types/index.d.ts +28 -0
- package/lib/index.js +4761 -90
- package/lib/types/global.d.ts +102 -0
- package/lib/types/index.d.ts +28 -0
- package/package.json +29 -26
package/es/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
1
|
+
var _a2;
|
|
2
|
+
import { defineComponent, ref, openBlock, createBlock, unref, withCtx, createElementVNode, createVNode, createTextVNode, renderSlot, getCurrentScope, onScopeDispose, getCurrentInstance, onMounted, nextTick, onUnmounted, watch, watchEffect, shallowRef, reactive, toRefs, isVNode, inject, computed, h, provide, onBeforeUnmount, resolveComponent, createElementBlock, normalizeClass, normalizeStyle, resolveDynamicComponent, Fragment, createCommentVNode, mergeProps, readonly, toDisplayString, useSlots, toRef, createSlots, renderList, normalizeProps, guardReactiveProps, toRaw, withModifiers } from "vue";
|
|
3
|
+
import { Modal as Modal$1, Button, Tooltip, Tag, Tabs, TabPane, Input, Tree, Checkbox } from "ant-design-vue";
|
|
4
|
+
const _hoisted_1$3 = { class: "dialog-footer" };
|
|
5
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "indexView",
|
|
6
7
|
props: {
|
|
7
8
|
isButton: { type: Boolean, default: true }
|
|
@@ -24,12 +25,12 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24
25
|
};
|
|
25
26
|
expose({ open, close });
|
|
26
27
|
return (_ctx, _cache) => {
|
|
27
|
-
return openBlock(), createBlock(unref(Modal), {
|
|
28
|
+
return openBlock(), createBlock(unref(Modal$1), {
|
|
28
29
|
visible: visible.value,
|
|
29
30
|
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => visible.value = $event)
|
|
30
31
|
}, {
|
|
31
32
|
footer: withCtx(() => [
|
|
32
|
-
createElementVNode("div", _hoisted_1$
|
|
33
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
33
34
|
createVNode(unref(Button), {
|
|
34
35
|
key: "back",
|
|
35
36
|
type: "primary",
|
|
@@ -61,14 +62,4688 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
61
62
|
}
|
|
62
63
|
});
|
|
63
64
|
const indexView_vue_vue_type_style_index_0_scoped_350b63a4_lang = "";
|
|
64
|
-
const _export_sfc = (sfc,
|
|
65
|
+
const _export_sfc = (sfc, props2) => {
|
|
65
66
|
const target = sfc.__vccOpts || sfc;
|
|
66
|
-
for (const [
|
|
67
|
-
target[
|
|
67
|
+
for (const [key2, val] of props2) {
|
|
68
|
+
target[key2] = val;
|
|
68
69
|
}
|
|
69
70
|
return target;
|
|
70
71
|
};
|
|
71
|
-
const ShyDialog = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
72
|
+
const ShyDialog = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-350b63a4"]]);
|
|
73
|
+
function getKey(namespace, key2) {
|
|
74
|
+
if (!namespace) {
|
|
75
|
+
return key2;
|
|
76
|
+
}
|
|
77
|
+
if (key2.startsWith(namespace)) {
|
|
78
|
+
return key2;
|
|
79
|
+
}
|
|
80
|
+
return `${namespace}.${key2}`;
|
|
81
|
+
}
|
|
82
|
+
function useI18n(namespace) {
|
|
83
|
+
const normalFn = {
|
|
84
|
+
t: (key2) => {
|
|
85
|
+
return getKey(namespace, key2);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
{
|
|
89
|
+
return normalFn;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const { t } = useI18n();
|
|
93
|
+
const modalProps = {
|
|
94
|
+
visible: { type: Boolean },
|
|
95
|
+
scrollTop: { type: Boolean, default: true },
|
|
96
|
+
height: { type: Number },
|
|
97
|
+
minHeight: { type: Number },
|
|
98
|
+
draggable: { type: Boolean, default: true },
|
|
99
|
+
centered: { type: Boolean },
|
|
100
|
+
cancelText: { type: String, default: t("common.cancelText") },
|
|
101
|
+
okText: { type: String, default: t("common.okText") },
|
|
102
|
+
closeFunc: Function
|
|
103
|
+
};
|
|
104
|
+
const basicProps = Object.assign({}, modalProps, {
|
|
105
|
+
defaultFullscreen: { type: Boolean },
|
|
106
|
+
canFullscreen: { type: Boolean, default: true },
|
|
107
|
+
wrapperFooterOffset: { type: Number, default: 0 },
|
|
108
|
+
helpMessage: [String, Array],
|
|
109
|
+
useWrapper: { type: Boolean, default: true },
|
|
110
|
+
loading: { type: Boolean },
|
|
111
|
+
loadingTip: { type: String },
|
|
112
|
+
showCancelBtn: { type: Boolean, default: true },
|
|
113
|
+
showOkBtn: { type: Boolean, default: true },
|
|
114
|
+
wrapperProps: Object,
|
|
115
|
+
afterClose: Function,
|
|
116
|
+
bodyStyle: Object,
|
|
117
|
+
closable: { type: Boolean, default: true },
|
|
118
|
+
closeIcon: Object,
|
|
119
|
+
confirmLoading: { type: Boolean },
|
|
120
|
+
destroyOnClose: { type: Boolean },
|
|
121
|
+
footer: Object,
|
|
122
|
+
getContainer: Function,
|
|
123
|
+
mask: { type: Boolean, default: true },
|
|
124
|
+
maskClosable: { type: Boolean, default: true },
|
|
125
|
+
keyboard: { type: Boolean, default: true },
|
|
126
|
+
maskStyle: Object,
|
|
127
|
+
okType: { type: String, default: "primary" },
|
|
128
|
+
okButtonProps: Object,
|
|
129
|
+
cancelButtonProps: Object,
|
|
130
|
+
title: { type: String },
|
|
131
|
+
visible: { type: Boolean },
|
|
132
|
+
width: [String, Number],
|
|
133
|
+
wrapClassName: { type: String },
|
|
134
|
+
zIndex: { type: Number }
|
|
135
|
+
});
|
|
136
|
+
var _a;
|
|
137
|
+
const isClient = typeof window !== "undefined";
|
|
138
|
+
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
139
|
+
function resolveUnref(r) {
|
|
140
|
+
return typeof r === "function" ? r() : unref(r);
|
|
141
|
+
}
|
|
142
|
+
function createFilterWrapper(filter, fn) {
|
|
143
|
+
function wrapper(...args) {
|
|
144
|
+
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
145
|
+
}
|
|
146
|
+
return wrapper;
|
|
147
|
+
}
|
|
148
|
+
function debounceFilter(ms, options = {}) {
|
|
149
|
+
let timer;
|
|
150
|
+
let maxTimer;
|
|
151
|
+
const filter = (invoke) => {
|
|
152
|
+
const duration = resolveUnref(ms);
|
|
153
|
+
const maxDuration = resolveUnref(options.maxWait);
|
|
154
|
+
if (timer)
|
|
155
|
+
clearTimeout(timer);
|
|
156
|
+
if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
|
|
157
|
+
if (maxTimer) {
|
|
158
|
+
clearTimeout(maxTimer);
|
|
159
|
+
maxTimer = null;
|
|
160
|
+
}
|
|
161
|
+
return invoke();
|
|
162
|
+
}
|
|
163
|
+
if (maxDuration && !maxTimer) {
|
|
164
|
+
maxTimer = setTimeout(() => {
|
|
165
|
+
if (timer)
|
|
166
|
+
clearTimeout(timer);
|
|
167
|
+
maxTimer = null;
|
|
168
|
+
invoke();
|
|
169
|
+
}, maxDuration);
|
|
170
|
+
}
|
|
171
|
+
timer = setTimeout(() => {
|
|
172
|
+
if (maxTimer)
|
|
173
|
+
clearTimeout(maxTimer);
|
|
174
|
+
maxTimer = null;
|
|
175
|
+
invoke();
|
|
176
|
+
}, duration);
|
|
177
|
+
};
|
|
178
|
+
return filter;
|
|
179
|
+
}
|
|
180
|
+
function identity$1(arg) {
|
|
181
|
+
return arg;
|
|
182
|
+
}
|
|
183
|
+
function tryOnScopeDispose(fn) {
|
|
184
|
+
if (getCurrentScope()) {
|
|
185
|
+
onScopeDispose(fn);
|
|
186
|
+
return true;
|
|
187
|
+
}
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
function useDebounceFn(fn, ms = 200, options = {}) {
|
|
191
|
+
return createFilterWrapper(debounceFilter(ms, options), fn);
|
|
192
|
+
}
|
|
193
|
+
function tryOnMounted(fn, sync = true) {
|
|
194
|
+
if (getCurrentInstance())
|
|
195
|
+
onMounted(fn);
|
|
196
|
+
else if (sync)
|
|
197
|
+
fn();
|
|
198
|
+
else
|
|
199
|
+
nextTick(fn);
|
|
200
|
+
}
|
|
201
|
+
function tryOnUnmounted(fn) {
|
|
202
|
+
if (getCurrentInstance())
|
|
203
|
+
onUnmounted(fn);
|
|
204
|
+
}
|
|
205
|
+
function unrefElement(elRef) {
|
|
206
|
+
var _a3;
|
|
207
|
+
const plain = resolveUnref(elRef);
|
|
208
|
+
return (_a3 = plain == null ? void 0 : plain.$el) != null ? _a3 : plain;
|
|
209
|
+
}
|
|
210
|
+
const defaultWindow = isClient ? window : void 0;
|
|
211
|
+
isClient ? window.document : void 0;
|
|
212
|
+
isClient ? window.navigator : void 0;
|
|
213
|
+
isClient ? window.location : void 0;
|
|
214
|
+
function useSupported(callback, sync = false) {
|
|
215
|
+
const isSupported = ref();
|
|
216
|
+
const update = () => isSupported.value = Boolean(callback());
|
|
217
|
+
update();
|
|
218
|
+
tryOnMounted(update, sync);
|
|
219
|
+
return isSupported;
|
|
220
|
+
}
|
|
221
|
+
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
222
|
+
const globalKey = "__vueuse_ssr_handlers__";
|
|
223
|
+
_global[globalKey] = _global[globalKey] || {};
|
|
224
|
+
_global[globalKey];
|
|
225
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
226
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
227
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
228
|
+
var __objRest$1 = (source, exclude) => {
|
|
229
|
+
var target = {};
|
|
230
|
+
for (var prop in source)
|
|
231
|
+
if (__hasOwnProp$7.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
232
|
+
target[prop] = source[prop];
|
|
233
|
+
if (source != null && __getOwnPropSymbols$7)
|
|
234
|
+
for (var prop of __getOwnPropSymbols$7(source)) {
|
|
235
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$7.call(source, prop))
|
|
236
|
+
target[prop] = source[prop];
|
|
237
|
+
}
|
|
238
|
+
return target;
|
|
239
|
+
};
|
|
240
|
+
function useMutationObserver(target, callback, options = {}) {
|
|
241
|
+
const _a3 = options, { window: window2 = defaultWindow } = _a3, mutationOptions = __objRest$1(_a3, ["window"]);
|
|
242
|
+
let observer;
|
|
243
|
+
const isSupported = useSupported(() => window2 && "MutationObserver" in window2);
|
|
244
|
+
const cleanup = () => {
|
|
245
|
+
if (observer) {
|
|
246
|
+
observer.disconnect();
|
|
247
|
+
observer = void 0;
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
const stopWatch = watch(() => unrefElement(target), (el) => {
|
|
251
|
+
cleanup();
|
|
252
|
+
if (isSupported.value && window2 && el) {
|
|
253
|
+
observer = new MutationObserver(callback);
|
|
254
|
+
observer.observe(el, mutationOptions);
|
|
255
|
+
}
|
|
256
|
+
}, { immediate: true });
|
|
257
|
+
const stop = () => {
|
|
258
|
+
cleanup();
|
|
259
|
+
stopWatch();
|
|
260
|
+
};
|
|
261
|
+
tryOnScopeDispose(stop);
|
|
262
|
+
return {
|
|
263
|
+
isSupported,
|
|
264
|
+
stop
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
var SwipeDirection;
|
|
268
|
+
(function(SwipeDirection2) {
|
|
269
|
+
SwipeDirection2["UP"] = "UP";
|
|
270
|
+
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
271
|
+
SwipeDirection2["DOWN"] = "DOWN";
|
|
272
|
+
SwipeDirection2["LEFT"] = "LEFT";
|
|
273
|
+
SwipeDirection2["NONE"] = "NONE";
|
|
274
|
+
})(SwipeDirection || (SwipeDirection = {}));
|
|
275
|
+
var __defProp = Object.defineProperty;
|
|
276
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
277
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
278
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
279
|
+
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
|
|
280
|
+
var __spreadValues = (a, b) => {
|
|
281
|
+
for (var prop in b || (b = {}))
|
|
282
|
+
if (__hasOwnProp.call(b, prop))
|
|
283
|
+
__defNormalProp(a, prop, b[prop]);
|
|
284
|
+
if (__getOwnPropSymbols)
|
|
285
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
286
|
+
if (__propIsEnum.call(b, prop))
|
|
287
|
+
__defNormalProp(a, prop, b[prop]);
|
|
288
|
+
}
|
|
289
|
+
return a;
|
|
290
|
+
};
|
|
291
|
+
const _TransitionPresets = {
|
|
292
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
|
293
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
|
294
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
295
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
|
296
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
297
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
298
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
|
299
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
300
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
301
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
|
302
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
303
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
304
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
|
305
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
306
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
307
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
|
308
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
309
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
310
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
|
311
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
312
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
313
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
314
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
315
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
316
|
+
};
|
|
317
|
+
__spreadValues({
|
|
318
|
+
linear: identity$1
|
|
319
|
+
}, _TransitionPresets);
|
|
320
|
+
function is(val, type) {
|
|
321
|
+
return toString.call(val) === `[object ${type}]`;
|
|
322
|
+
}
|
|
323
|
+
function isFunction$1(val) {
|
|
324
|
+
return typeof val === "function";
|
|
325
|
+
}
|
|
326
|
+
function isObject$1(val) {
|
|
327
|
+
return val !== null && is(val, "Object");
|
|
328
|
+
}
|
|
329
|
+
function isDef(val) {
|
|
330
|
+
return typeof val !== "undefined";
|
|
331
|
+
}
|
|
332
|
+
function isUnDef(val) {
|
|
333
|
+
return !isDef(val);
|
|
334
|
+
}
|
|
335
|
+
function isString(val) {
|
|
336
|
+
return is(val, "String");
|
|
337
|
+
}
|
|
338
|
+
function isArray$2(val) {
|
|
339
|
+
return val && Array.isArray(val);
|
|
340
|
+
}
|
|
341
|
+
function useTimeoutFn(handle, wait, native = false) {
|
|
342
|
+
if (!isFunction$1(handle)) {
|
|
343
|
+
throw new Error("handle is not Function!");
|
|
344
|
+
}
|
|
345
|
+
const { readyRef, stop, start } = useTimeoutRef(wait);
|
|
346
|
+
if (native) {
|
|
347
|
+
handle();
|
|
348
|
+
} else {
|
|
349
|
+
watch(
|
|
350
|
+
readyRef,
|
|
351
|
+
(maturity) => {
|
|
352
|
+
maturity && handle();
|
|
353
|
+
},
|
|
354
|
+
{ immediate: false }
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
return { readyRef, stop, start };
|
|
358
|
+
}
|
|
359
|
+
function useTimeoutRef(wait) {
|
|
360
|
+
const readyRef = ref(false);
|
|
361
|
+
let timer;
|
|
362
|
+
function stop() {
|
|
363
|
+
readyRef.value = false;
|
|
364
|
+
timer && window.clearTimeout(timer);
|
|
365
|
+
}
|
|
366
|
+
function start() {
|
|
367
|
+
stop();
|
|
368
|
+
timer = setTimeout(() => {
|
|
369
|
+
readyRef.value = true;
|
|
370
|
+
}, wait);
|
|
371
|
+
}
|
|
372
|
+
start();
|
|
373
|
+
tryOnUnmounted(stop);
|
|
374
|
+
return { readyRef, stop, start };
|
|
375
|
+
}
|
|
376
|
+
function useModalDragMove(context) {
|
|
377
|
+
const getStyle = (dom, attr) => {
|
|
378
|
+
return getComputedStyle(dom)[attr];
|
|
379
|
+
};
|
|
380
|
+
const drag = (wrap) => {
|
|
381
|
+
if (!wrap)
|
|
382
|
+
return;
|
|
383
|
+
wrap.setAttribute("data-drag", unref(context.draggable));
|
|
384
|
+
const dialogHeaderEl = wrap.querySelector(".ant-modal-header");
|
|
385
|
+
const dragDom = wrap.querySelector(".ant-modal");
|
|
386
|
+
if (!dialogHeaderEl || !dragDom || !unref(context.draggable))
|
|
387
|
+
return;
|
|
388
|
+
dialogHeaderEl.style.cursor = "move";
|
|
389
|
+
dialogHeaderEl.onmousedown = (e) => {
|
|
390
|
+
if (!e)
|
|
391
|
+
return;
|
|
392
|
+
const disX = e.clientX;
|
|
393
|
+
const disY = e.clientY;
|
|
394
|
+
const screenWidth = document.body.clientWidth;
|
|
395
|
+
const screenHeight = document.documentElement.clientHeight;
|
|
396
|
+
const dragDomWidth = dragDom.offsetWidth;
|
|
397
|
+
const dragDomheight = dragDom.offsetHeight;
|
|
398
|
+
const minDragDomLeft = dragDom.offsetLeft;
|
|
399
|
+
const maxDragDomLeft = screenWidth - dragDom.offsetLeft - dragDomWidth;
|
|
400
|
+
const minDragDomTop = dragDom.offsetTop;
|
|
401
|
+
const maxDragDomTop = screenHeight - dragDom.offsetTop - dragDomheight;
|
|
402
|
+
const domLeft = getStyle(dragDom, "left");
|
|
403
|
+
const domTop = getStyle(dragDom, "top");
|
|
404
|
+
let styL = +domLeft;
|
|
405
|
+
let styT = +domTop;
|
|
406
|
+
if (domLeft.includes("%")) {
|
|
407
|
+
styL = +document.body.clientWidth * (+domLeft.replace(/%/g, "") / 100);
|
|
408
|
+
styT = +document.body.clientHeight * (+domTop.replace(/%/g, "") / 100);
|
|
409
|
+
} else {
|
|
410
|
+
styL = +domLeft.replace(/px/g, "");
|
|
411
|
+
styT = +domTop.replace(/px/g, "");
|
|
412
|
+
}
|
|
413
|
+
document.onmousemove = function(e2) {
|
|
414
|
+
let left = e2.clientX - disX;
|
|
415
|
+
let top = e2.clientY - disY;
|
|
416
|
+
if (-left > minDragDomLeft) {
|
|
417
|
+
left = -minDragDomLeft;
|
|
418
|
+
} else if (left > maxDragDomLeft) {
|
|
419
|
+
left = maxDragDomLeft;
|
|
420
|
+
}
|
|
421
|
+
if (-top > minDragDomTop) {
|
|
422
|
+
top = -minDragDomTop;
|
|
423
|
+
} else if (top > maxDragDomTop) {
|
|
424
|
+
top = maxDragDomTop;
|
|
425
|
+
}
|
|
426
|
+
dragDom.style.cssText += `;left:${left + styL}px;top:${top + styT}px;`;
|
|
427
|
+
};
|
|
428
|
+
document.onmouseup = () => {
|
|
429
|
+
document.onmousemove = null;
|
|
430
|
+
document.onmouseup = null;
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
const handleDrag = () => {
|
|
435
|
+
const dragWraps = document.querySelectorAll(".ant-modal-wrap");
|
|
436
|
+
for (const wrap of Array.from(dragWraps)) {
|
|
437
|
+
if (!wrap)
|
|
438
|
+
continue;
|
|
439
|
+
const display = getStyle(wrap, "display");
|
|
440
|
+
const draggable = wrap.getAttribute("data-drag");
|
|
441
|
+
if (display !== "none") {
|
|
442
|
+
if (draggable === null || unref(context.destroyOnClose)) {
|
|
443
|
+
drag(wrap);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
watchEffect(() => {
|
|
449
|
+
if (!unref(context.visible) || !unref(context.draggable)) {
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
useTimeoutFn(() => {
|
|
453
|
+
handleDrag();
|
|
454
|
+
}, 30);
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
const DEFAULT_EXCLUDE_KEYS = ["class", "style"];
|
|
458
|
+
const LISTENER_PREFIX = /^on[A-Z]/;
|
|
459
|
+
function entries(obj) {
|
|
460
|
+
return Object.keys(obj).map((key2) => [key2, obj[key2]]);
|
|
461
|
+
}
|
|
462
|
+
function useAttrs(params = {}) {
|
|
463
|
+
const instance = getCurrentInstance();
|
|
464
|
+
if (!instance)
|
|
465
|
+
return {};
|
|
466
|
+
const {
|
|
467
|
+
excludeListeners = false,
|
|
468
|
+
excludeKeys = [],
|
|
469
|
+
excludeDefaultKeys = true
|
|
470
|
+
} = params;
|
|
471
|
+
const attrs = shallowRef({});
|
|
472
|
+
const allExcludeKeys = excludeKeys.concat(
|
|
473
|
+
excludeDefaultKeys ? DEFAULT_EXCLUDE_KEYS : []
|
|
474
|
+
);
|
|
475
|
+
instance.attrs = reactive(instance.attrs);
|
|
476
|
+
watchEffect(() => {
|
|
477
|
+
const res = entries(instance.attrs).reduce((acm, [key2, val]) => {
|
|
478
|
+
if (!allExcludeKeys.includes(key2) && !(excludeListeners && LISTENER_PREFIX.test(key2))) {
|
|
479
|
+
acm[key2] = val;
|
|
480
|
+
}
|
|
481
|
+
return acm;
|
|
482
|
+
}, {});
|
|
483
|
+
attrs.value = res;
|
|
484
|
+
});
|
|
485
|
+
return attrs;
|
|
486
|
+
}
|
|
487
|
+
function getSlot(slots, slot = "default", data) {
|
|
488
|
+
if (!slots || !Reflect.has(slots, slot)) {
|
|
489
|
+
return null;
|
|
490
|
+
}
|
|
491
|
+
if (!isFunction$1(slots[slot])) {
|
|
492
|
+
console.error(`${slot} is not a function!`);
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
const slotFn = slots[slot];
|
|
496
|
+
if (!slotFn)
|
|
497
|
+
return null;
|
|
498
|
+
return slotFn(data);
|
|
499
|
+
}
|
|
500
|
+
function extendSlots(slots, excludeKeys = []) {
|
|
501
|
+
const slotKeys = Object.keys(slots);
|
|
502
|
+
const ret = {};
|
|
503
|
+
slotKeys.map((key2) => {
|
|
504
|
+
if (excludeKeys.includes(key2)) {
|
|
505
|
+
return null;
|
|
506
|
+
}
|
|
507
|
+
ret[key2] = (data) => getSlot(slots, key2, data);
|
|
508
|
+
});
|
|
509
|
+
return ret;
|
|
510
|
+
}
|
|
511
|
+
function _isSlot(s) {
|
|
512
|
+
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
|
|
513
|
+
}
|
|
514
|
+
const Modal = /* @__PURE__ */ defineComponent({
|
|
515
|
+
name: "Modal",
|
|
516
|
+
inheritAttrs: false,
|
|
517
|
+
props: basicProps,
|
|
518
|
+
emits: ["cancel"],
|
|
519
|
+
setup(props2, {
|
|
520
|
+
slots,
|
|
521
|
+
emit
|
|
522
|
+
}) {
|
|
523
|
+
const {
|
|
524
|
+
visible,
|
|
525
|
+
draggable,
|
|
526
|
+
destroyOnClose
|
|
527
|
+
} = toRefs(props2);
|
|
528
|
+
const attrs = useAttrs();
|
|
529
|
+
useModalDragMove({
|
|
530
|
+
visible,
|
|
531
|
+
destroyOnClose,
|
|
532
|
+
draggable
|
|
533
|
+
});
|
|
534
|
+
const onCancel = (e) => {
|
|
535
|
+
emit("cancel", e);
|
|
536
|
+
};
|
|
537
|
+
return () => {
|
|
538
|
+
let _slot;
|
|
539
|
+
const propsData = {
|
|
540
|
+
...unref(attrs),
|
|
541
|
+
...props2,
|
|
542
|
+
onCancel
|
|
543
|
+
};
|
|
544
|
+
return createVNode(Modal$1, propsData, _isSlot(_slot = extendSlots(slots)) ? _slot : {
|
|
545
|
+
default: () => [_slot]
|
|
546
|
+
});
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
function useWindowSizeFn(fn, wait = 150, options) {
|
|
551
|
+
let handler = () => {
|
|
552
|
+
fn();
|
|
553
|
+
};
|
|
554
|
+
const handleSize = useDebounceFn(handler, wait);
|
|
555
|
+
handler = handleSize;
|
|
556
|
+
const start = () => {
|
|
557
|
+
if (options && options.immediate) {
|
|
558
|
+
handler();
|
|
559
|
+
}
|
|
560
|
+
window.addEventListener("resize", handler);
|
|
561
|
+
};
|
|
562
|
+
const stop = () => {
|
|
563
|
+
window.removeEventListener("resize", handler);
|
|
564
|
+
};
|
|
565
|
+
tryOnMounted(() => {
|
|
566
|
+
start();
|
|
567
|
+
});
|
|
568
|
+
tryOnUnmounted(() => {
|
|
569
|
+
stop();
|
|
570
|
+
});
|
|
571
|
+
return [start, stop];
|
|
572
|
+
}
|
|
573
|
+
var MapShim = function() {
|
|
574
|
+
if (typeof Map !== "undefined") {
|
|
575
|
+
return Map;
|
|
576
|
+
}
|
|
577
|
+
function getIndex(arr, key2) {
|
|
578
|
+
var result = -1;
|
|
579
|
+
arr.some(function(entry, index2) {
|
|
580
|
+
if (entry[0] === key2) {
|
|
581
|
+
result = index2;
|
|
582
|
+
return true;
|
|
583
|
+
}
|
|
584
|
+
return false;
|
|
585
|
+
});
|
|
586
|
+
return result;
|
|
587
|
+
}
|
|
588
|
+
return function() {
|
|
589
|
+
function class_1() {
|
|
590
|
+
this.__entries__ = [];
|
|
591
|
+
}
|
|
592
|
+
Object.defineProperty(class_1.prototype, "size", {
|
|
593
|
+
get: function() {
|
|
594
|
+
return this.__entries__.length;
|
|
595
|
+
},
|
|
596
|
+
enumerable: true,
|
|
597
|
+
configurable: true
|
|
598
|
+
});
|
|
599
|
+
class_1.prototype.get = function(key2) {
|
|
600
|
+
var index2 = getIndex(this.__entries__, key2);
|
|
601
|
+
var entry = this.__entries__[index2];
|
|
602
|
+
return entry && entry[1];
|
|
603
|
+
};
|
|
604
|
+
class_1.prototype.set = function(key2, value) {
|
|
605
|
+
var index2 = getIndex(this.__entries__, key2);
|
|
606
|
+
if (~index2) {
|
|
607
|
+
this.__entries__[index2][1] = value;
|
|
608
|
+
} else {
|
|
609
|
+
this.__entries__.push([key2, value]);
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
class_1.prototype.delete = function(key2) {
|
|
613
|
+
var entries2 = this.__entries__;
|
|
614
|
+
var index2 = getIndex(entries2, key2);
|
|
615
|
+
if (~index2) {
|
|
616
|
+
entries2.splice(index2, 1);
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
class_1.prototype.has = function(key2) {
|
|
620
|
+
return !!~getIndex(this.__entries__, key2);
|
|
621
|
+
};
|
|
622
|
+
class_1.prototype.clear = function() {
|
|
623
|
+
this.__entries__.splice(0);
|
|
624
|
+
};
|
|
625
|
+
class_1.prototype.forEach = function(callback, ctx) {
|
|
626
|
+
if (ctx === void 0) {
|
|
627
|
+
ctx = null;
|
|
628
|
+
}
|
|
629
|
+
for (var _i = 0, _a3 = this.__entries__; _i < _a3.length; _i++) {
|
|
630
|
+
var entry = _a3[_i];
|
|
631
|
+
callback.call(ctx, entry[1], entry[0]);
|
|
632
|
+
}
|
|
633
|
+
};
|
|
634
|
+
return class_1;
|
|
635
|
+
}();
|
|
636
|
+
}();
|
|
637
|
+
var isBrowser = typeof window !== "undefined" && typeof document !== "undefined" && window.document === document;
|
|
638
|
+
var global$1 = function() {
|
|
639
|
+
if (typeof global !== "undefined" && global.Math === Math) {
|
|
640
|
+
return global;
|
|
641
|
+
}
|
|
642
|
+
if (typeof self !== "undefined" && self.Math === Math) {
|
|
643
|
+
return self;
|
|
644
|
+
}
|
|
645
|
+
if (typeof window !== "undefined" && window.Math === Math) {
|
|
646
|
+
return window;
|
|
647
|
+
}
|
|
648
|
+
return Function("return this")();
|
|
649
|
+
}();
|
|
650
|
+
var requestAnimationFrame$1 = function() {
|
|
651
|
+
if (typeof requestAnimationFrame === "function") {
|
|
652
|
+
return requestAnimationFrame.bind(global$1);
|
|
653
|
+
}
|
|
654
|
+
return function(callback) {
|
|
655
|
+
return setTimeout(function() {
|
|
656
|
+
return callback(Date.now());
|
|
657
|
+
}, 1e3 / 60);
|
|
658
|
+
};
|
|
659
|
+
}();
|
|
660
|
+
var trailingTimeout = 2;
|
|
661
|
+
function throttle(callback, delay) {
|
|
662
|
+
var leadingCall = false, trailingCall = false, lastCallTime = 0;
|
|
663
|
+
function resolvePending() {
|
|
664
|
+
if (leadingCall) {
|
|
665
|
+
leadingCall = false;
|
|
666
|
+
callback();
|
|
667
|
+
}
|
|
668
|
+
if (trailingCall) {
|
|
669
|
+
proxy();
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
function timeoutCallback() {
|
|
673
|
+
requestAnimationFrame$1(resolvePending);
|
|
674
|
+
}
|
|
675
|
+
function proxy() {
|
|
676
|
+
var timeStamp = Date.now();
|
|
677
|
+
if (leadingCall) {
|
|
678
|
+
if (timeStamp - lastCallTime < trailingTimeout) {
|
|
679
|
+
return;
|
|
680
|
+
}
|
|
681
|
+
trailingCall = true;
|
|
682
|
+
} else {
|
|
683
|
+
leadingCall = true;
|
|
684
|
+
trailingCall = false;
|
|
685
|
+
setTimeout(timeoutCallback, delay);
|
|
686
|
+
}
|
|
687
|
+
lastCallTime = timeStamp;
|
|
688
|
+
}
|
|
689
|
+
return proxy;
|
|
690
|
+
}
|
|
691
|
+
var REFRESH_DELAY = 20;
|
|
692
|
+
var transitionKeys = ["top", "right", "bottom", "left", "width", "height", "size", "weight"];
|
|
693
|
+
var mutationObserverSupported = typeof MutationObserver !== "undefined";
|
|
694
|
+
var ResizeObserverController = function() {
|
|
695
|
+
function ResizeObserverController2() {
|
|
696
|
+
this.connected_ = false;
|
|
697
|
+
this.mutationEventsAdded_ = false;
|
|
698
|
+
this.mutationsObserver_ = null;
|
|
699
|
+
this.observers_ = [];
|
|
700
|
+
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
|
|
701
|
+
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
|
|
702
|
+
}
|
|
703
|
+
ResizeObserverController2.prototype.addObserver = function(observer) {
|
|
704
|
+
if (!~this.observers_.indexOf(observer)) {
|
|
705
|
+
this.observers_.push(observer);
|
|
706
|
+
}
|
|
707
|
+
if (!this.connected_) {
|
|
708
|
+
this.connect_();
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
ResizeObserverController2.prototype.removeObserver = function(observer) {
|
|
712
|
+
var observers2 = this.observers_;
|
|
713
|
+
var index2 = observers2.indexOf(observer);
|
|
714
|
+
if (~index2) {
|
|
715
|
+
observers2.splice(index2, 1);
|
|
716
|
+
}
|
|
717
|
+
if (!observers2.length && this.connected_) {
|
|
718
|
+
this.disconnect_();
|
|
719
|
+
}
|
|
720
|
+
};
|
|
721
|
+
ResizeObserverController2.prototype.refresh = function() {
|
|
722
|
+
var changesDetected = this.updateObservers_();
|
|
723
|
+
if (changesDetected) {
|
|
724
|
+
this.refresh();
|
|
725
|
+
}
|
|
726
|
+
};
|
|
727
|
+
ResizeObserverController2.prototype.updateObservers_ = function() {
|
|
728
|
+
var activeObservers = this.observers_.filter(function(observer) {
|
|
729
|
+
return observer.gatherActive(), observer.hasActive();
|
|
730
|
+
});
|
|
731
|
+
activeObservers.forEach(function(observer) {
|
|
732
|
+
return observer.broadcastActive();
|
|
733
|
+
});
|
|
734
|
+
return activeObservers.length > 0;
|
|
735
|
+
};
|
|
736
|
+
ResizeObserverController2.prototype.connect_ = function() {
|
|
737
|
+
if (!isBrowser || this.connected_) {
|
|
738
|
+
return;
|
|
739
|
+
}
|
|
740
|
+
document.addEventListener("transitionend", this.onTransitionEnd_);
|
|
741
|
+
window.addEventListener("resize", this.refresh);
|
|
742
|
+
if (mutationObserverSupported) {
|
|
743
|
+
this.mutationsObserver_ = new MutationObserver(this.refresh);
|
|
744
|
+
this.mutationsObserver_.observe(document, {
|
|
745
|
+
attributes: true,
|
|
746
|
+
childList: true,
|
|
747
|
+
characterData: true,
|
|
748
|
+
subtree: true
|
|
749
|
+
});
|
|
750
|
+
} else {
|
|
751
|
+
document.addEventListener("DOMSubtreeModified", this.refresh);
|
|
752
|
+
this.mutationEventsAdded_ = true;
|
|
753
|
+
}
|
|
754
|
+
this.connected_ = true;
|
|
755
|
+
};
|
|
756
|
+
ResizeObserverController2.prototype.disconnect_ = function() {
|
|
757
|
+
if (!isBrowser || !this.connected_) {
|
|
758
|
+
return;
|
|
759
|
+
}
|
|
760
|
+
document.removeEventListener("transitionend", this.onTransitionEnd_);
|
|
761
|
+
window.removeEventListener("resize", this.refresh);
|
|
762
|
+
if (this.mutationsObserver_) {
|
|
763
|
+
this.mutationsObserver_.disconnect();
|
|
764
|
+
}
|
|
765
|
+
if (this.mutationEventsAdded_) {
|
|
766
|
+
document.removeEventListener("DOMSubtreeModified", this.refresh);
|
|
767
|
+
}
|
|
768
|
+
this.mutationsObserver_ = null;
|
|
769
|
+
this.mutationEventsAdded_ = false;
|
|
770
|
+
this.connected_ = false;
|
|
771
|
+
};
|
|
772
|
+
ResizeObserverController2.prototype.onTransitionEnd_ = function(_a3) {
|
|
773
|
+
var _b = _a3.propertyName, propertyName = _b === void 0 ? "" : _b;
|
|
774
|
+
var isReflowProperty = transitionKeys.some(function(key2) {
|
|
775
|
+
return !!~propertyName.indexOf(key2);
|
|
776
|
+
});
|
|
777
|
+
if (isReflowProperty) {
|
|
778
|
+
this.refresh();
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
ResizeObserverController2.getInstance = function() {
|
|
782
|
+
if (!this.instance_) {
|
|
783
|
+
this.instance_ = new ResizeObserverController2();
|
|
784
|
+
}
|
|
785
|
+
return this.instance_;
|
|
786
|
+
};
|
|
787
|
+
ResizeObserverController2.instance_ = null;
|
|
788
|
+
return ResizeObserverController2;
|
|
789
|
+
}();
|
|
790
|
+
var defineConfigurable = function(target, props2) {
|
|
791
|
+
for (var _i = 0, _a3 = Object.keys(props2); _i < _a3.length; _i++) {
|
|
792
|
+
var key2 = _a3[_i];
|
|
793
|
+
Object.defineProperty(target, key2, {
|
|
794
|
+
value: props2[key2],
|
|
795
|
+
enumerable: false,
|
|
796
|
+
writable: false,
|
|
797
|
+
configurable: true
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
return target;
|
|
801
|
+
};
|
|
802
|
+
var getWindowOf = function(target) {
|
|
803
|
+
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
|
|
804
|
+
return ownerGlobal || global$1;
|
|
805
|
+
};
|
|
806
|
+
var emptyRect = createRectInit(0, 0, 0, 0);
|
|
807
|
+
function toFloat(value) {
|
|
808
|
+
return parseFloat(value) || 0;
|
|
809
|
+
}
|
|
810
|
+
function getBordersSize(styles) {
|
|
811
|
+
var positions = [];
|
|
812
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
813
|
+
positions[_i - 1] = arguments[_i];
|
|
814
|
+
}
|
|
815
|
+
return positions.reduce(function(size, position2) {
|
|
816
|
+
var value = styles["border-" + position2 + "-width"];
|
|
817
|
+
return size + toFloat(value);
|
|
818
|
+
}, 0);
|
|
819
|
+
}
|
|
820
|
+
function getPaddings(styles) {
|
|
821
|
+
var positions = ["top", "right", "bottom", "left"];
|
|
822
|
+
var paddings = {};
|
|
823
|
+
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
|
|
824
|
+
var position2 = positions_1[_i];
|
|
825
|
+
var value = styles["padding-" + position2];
|
|
826
|
+
paddings[position2] = toFloat(value);
|
|
827
|
+
}
|
|
828
|
+
return paddings;
|
|
829
|
+
}
|
|
830
|
+
function getSVGContentRect(target) {
|
|
831
|
+
var bbox = target.getBBox();
|
|
832
|
+
return createRectInit(0, 0, bbox.width, bbox.height);
|
|
833
|
+
}
|
|
834
|
+
function getHTMLElementContentRect(target) {
|
|
835
|
+
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
|
|
836
|
+
if (!clientWidth && !clientHeight) {
|
|
837
|
+
return emptyRect;
|
|
838
|
+
}
|
|
839
|
+
var styles = getWindowOf(target).getComputedStyle(target);
|
|
840
|
+
var paddings = getPaddings(styles);
|
|
841
|
+
var horizPad = paddings.left + paddings.right;
|
|
842
|
+
var vertPad = paddings.top + paddings.bottom;
|
|
843
|
+
var width = toFloat(styles.width), height = toFloat(styles.height);
|
|
844
|
+
if (styles.boxSizing === "border-box") {
|
|
845
|
+
if (Math.round(width + horizPad) !== clientWidth) {
|
|
846
|
+
width -= getBordersSize(styles, "left", "right") + horizPad;
|
|
847
|
+
}
|
|
848
|
+
if (Math.round(height + vertPad) !== clientHeight) {
|
|
849
|
+
height -= getBordersSize(styles, "top", "bottom") + vertPad;
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
if (!isDocumentElement(target)) {
|
|
853
|
+
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
|
|
854
|
+
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
|
|
855
|
+
if (Math.abs(vertScrollbar) !== 1) {
|
|
856
|
+
width -= vertScrollbar;
|
|
857
|
+
}
|
|
858
|
+
if (Math.abs(horizScrollbar) !== 1) {
|
|
859
|
+
height -= horizScrollbar;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
return createRectInit(paddings.left, paddings.top, width, height);
|
|
863
|
+
}
|
|
864
|
+
var isSVGGraphicsElement = function() {
|
|
865
|
+
if (typeof SVGGraphicsElement !== "undefined") {
|
|
866
|
+
return function(target) {
|
|
867
|
+
return target instanceof getWindowOf(target).SVGGraphicsElement;
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
return function(target) {
|
|
871
|
+
return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === "function";
|
|
872
|
+
};
|
|
873
|
+
}();
|
|
874
|
+
function isDocumentElement(target) {
|
|
875
|
+
return target === getWindowOf(target).document.documentElement;
|
|
876
|
+
}
|
|
877
|
+
function getContentRect(target) {
|
|
878
|
+
if (!isBrowser) {
|
|
879
|
+
return emptyRect;
|
|
880
|
+
}
|
|
881
|
+
if (isSVGGraphicsElement(target)) {
|
|
882
|
+
return getSVGContentRect(target);
|
|
883
|
+
}
|
|
884
|
+
return getHTMLElementContentRect(target);
|
|
885
|
+
}
|
|
886
|
+
function createReadOnlyRect(_a3) {
|
|
887
|
+
var x = _a3.x, y = _a3.y, width = _a3.width, height = _a3.height;
|
|
888
|
+
var Constr = typeof DOMRectReadOnly !== "undefined" ? DOMRectReadOnly : Object;
|
|
889
|
+
var rect = Object.create(Constr.prototype);
|
|
890
|
+
defineConfigurable(rect, {
|
|
891
|
+
x,
|
|
892
|
+
y,
|
|
893
|
+
width,
|
|
894
|
+
height,
|
|
895
|
+
top: y,
|
|
896
|
+
right: x + width,
|
|
897
|
+
bottom: height + y,
|
|
898
|
+
left: x
|
|
899
|
+
});
|
|
900
|
+
return rect;
|
|
901
|
+
}
|
|
902
|
+
function createRectInit(x, y, width, height) {
|
|
903
|
+
return { x, y, width, height };
|
|
904
|
+
}
|
|
905
|
+
var ResizeObservation = function() {
|
|
906
|
+
function ResizeObservation2(target) {
|
|
907
|
+
this.broadcastWidth = 0;
|
|
908
|
+
this.broadcastHeight = 0;
|
|
909
|
+
this.contentRect_ = createRectInit(0, 0, 0, 0);
|
|
910
|
+
this.target = target;
|
|
911
|
+
}
|
|
912
|
+
ResizeObservation2.prototype.isActive = function() {
|
|
913
|
+
var rect = getContentRect(this.target);
|
|
914
|
+
this.contentRect_ = rect;
|
|
915
|
+
return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;
|
|
916
|
+
};
|
|
917
|
+
ResizeObservation2.prototype.broadcastRect = function() {
|
|
918
|
+
var rect = this.contentRect_;
|
|
919
|
+
this.broadcastWidth = rect.width;
|
|
920
|
+
this.broadcastHeight = rect.height;
|
|
921
|
+
return rect;
|
|
922
|
+
};
|
|
923
|
+
return ResizeObservation2;
|
|
924
|
+
}();
|
|
925
|
+
var ResizeObserverEntry = function() {
|
|
926
|
+
function ResizeObserverEntry2(target, rectInit) {
|
|
927
|
+
var contentRect = createReadOnlyRect(rectInit);
|
|
928
|
+
defineConfigurable(this, { target, contentRect });
|
|
929
|
+
}
|
|
930
|
+
return ResizeObserverEntry2;
|
|
931
|
+
}();
|
|
932
|
+
var ResizeObserverSPI = function() {
|
|
933
|
+
function ResizeObserverSPI2(callback, controller, callbackCtx) {
|
|
934
|
+
this.activeObservations_ = [];
|
|
935
|
+
this.observations_ = new MapShim();
|
|
936
|
+
if (typeof callback !== "function") {
|
|
937
|
+
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
938
|
+
}
|
|
939
|
+
this.callback_ = callback;
|
|
940
|
+
this.controller_ = controller;
|
|
941
|
+
this.callbackCtx_ = callbackCtx;
|
|
942
|
+
}
|
|
943
|
+
ResizeObserverSPI2.prototype.observe = function(target) {
|
|
944
|
+
if (!arguments.length) {
|
|
945
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
946
|
+
}
|
|
947
|
+
if (typeof Element === "undefined" || !(Element instanceof Object)) {
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
if (!(target instanceof getWindowOf(target).Element)) {
|
|
951
|
+
throw new TypeError('parameter 1 is not of type "Element".');
|
|
952
|
+
}
|
|
953
|
+
var observations = this.observations_;
|
|
954
|
+
if (observations.has(target)) {
|
|
955
|
+
return;
|
|
956
|
+
}
|
|
957
|
+
observations.set(target, new ResizeObservation(target));
|
|
958
|
+
this.controller_.addObserver(this);
|
|
959
|
+
this.controller_.refresh();
|
|
960
|
+
};
|
|
961
|
+
ResizeObserverSPI2.prototype.unobserve = function(target) {
|
|
962
|
+
if (!arguments.length) {
|
|
963
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
964
|
+
}
|
|
965
|
+
if (typeof Element === "undefined" || !(Element instanceof Object)) {
|
|
966
|
+
return;
|
|
967
|
+
}
|
|
968
|
+
if (!(target instanceof getWindowOf(target).Element)) {
|
|
969
|
+
throw new TypeError('parameter 1 is not of type "Element".');
|
|
970
|
+
}
|
|
971
|
+
var observations = this.observations_;
|
|
972
|
+
if (!observations.has(target)) {
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
975
|
+
observations.delete(target);
|
|
976
|
+
if (!observations.size) {
|
|
977
|
+
this.controller_.removeObserver(this);
|
|
978
|
+
}
|
|
979
|
+
};
|
|
980
|
+
ResizeObserverSPI2.prototype.disconnect = function() {
|
|
981
|
+
this.clearActive();
|
|
982
|
+
this.observations_.clear();
|
|
983
|
+
this.controller_.removeObserver(this);
|
|
984
|
+
};
|
|
985
|
+
ResizeObserverSPI2.prototype.gatherActive = function() {
|
|
986
|
+
var _this = this;
|
|
987
|
+
this.clearActive();
|
|
988
|
+
this.observations_.forEach(function(observation) {
|
|
989
|
+
if (observation.isActive()) {
|
|
990
|
+
_this.activeObservations_.push(observation);
|
|
991
|
+
}
|
|
992
|
+
});
|
|
993
|
+
};
|
|
994
|
+
ResizeObserverSPI2.prototype.broadcastActive = function() {
|
|
995
|
+
if (!this.hasActive()) {
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
var ctx = this.callbackCtx_;
|
|
999
|
+
var entries2 = this.activeObservations_.map(function(observation) {
|
|
1000
|
+
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
|
|
1001
|
+
});
|
|
1002
|
+
this.callback_.call(ctx, entries2, ctx);
|
|
1003
|
+
this.clearActive();
|
|
1004
|
+
};
|
|
1005
|
+
ResizeObserverSPI2.prototype.clearActive = function() {
|
|
1006
|
+
this.activeObservations_.splice(0);
|
|
1007
|
+
};
|
|
1008
|
+
ResizeObserverSPI2.prototype.hasActive = function() {
|
|
1009
|
+
return this.activeObservations_.length > 0;
|
|
1010
|
+
};
|
|
1011
|
+
return ResizeObserverSPI2;
|
|
1012
|
+
}();
|
|
1013
|
+
var observers = typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : new MapShim();
|
|
1014
|
+
var ResizeObserver = function() {
|
|
1015
|
+
function ResizeObserver2(callback) {
|
|
1016
|
+
if (!(this instanceof ResizeObserver2)) {
|
|
1017
|
+
throw new TypeError("Cannot call a class as a function.");
|
|
1018
|
+
}
|
|
1019
|
+
if (!arguments.length) {
|
|
1020
|
+
throw new TypeError("1 argument required, but only 0 present.");
|
|
1021
|
+
}
|
|
1022
|
+
var controller = ResizeObserverController.getInstance();
|
|
1023
|
+
var observer = new ResizeObserverSPI(callback, controller, this);
|
|
1024
|
+
observers.set(this, observer);
|
|
1025
|
+
}
|
|
1026
|
+
return ResizeObserver2;
|
|
1027
|
+
}();
|
|
1028
|
+
[
|
|
1029
|
+
"observe",
|
|
1030
|
+
"unobserve",
|
|
1031
|
+
"disconnect"
|
|
1032
|
+
].forEach(function(method) {
|
|
1033
|
+
ResizeObserver.prototype[method] = function() {
|
|
1034
|
+
var _a3;
|
|
1035
|
+
return (_a3 = observers.get(this))[method].apply(_a3, arguments);
|
|
1036
|
+
};
|
|
1037
|
+
});
|
|
1038
|
+
var index$2 = function() {
|
|
1039
|
+
if (typeof global$1.ResizeObserver !== "undefined") {
|
|
1040
|
+
return global$1.ResizeObserver;
|
|
1041
|
+
}
|
|
1042
|
+
return ResizeObserver;
|
|
1043
|
+
}();
|
|
1044
|
+
const isServer = typeof window === "undefined";
|
|
1045
|
+
function resizeHandler(entries2) {
|
|
1046
|
+
for (const entry of entries2) {
|
|
1047
|
+
const listeners = entry.target.__resizeListeners__ || [];
|
|
1048
|
+
if (listeners.length) {
|
|
1049
|
+
listeners.forEach((fn) => {
|
|
1050
|
+
fn();
|
|
1051
|
+
});
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
function addResizeListener(element, fn) {
|
|
1056
|
+
if (isServer)
|
|
1057
|
+
return;
|
|
1058
|
+
if (!element.__resizeListeners__) {
|
|
1059
|
+
element.__resizeListeners__ = [];
|
|
1060
|
+
element.__ro__ = new index$2(resizeHandler);
|
|
1061
|
+
element.__ro__.observe(element);
|
|
1062
|
+
}
|
|
1063
|
+
element.__resizeListeners__.push(fn);
|
|
1064
|
+
}
|
|
1065
|
+
function removeResizeListener(element, fn) {
|
|
1066
|
+
if (!element || !element.__resizeListeners__)
|
|
1067
|
+
return;
|
|
1068
|
+
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
|
|
1069
|
+
if (!element.__resizeListeners__.length) {
|
|
1070
|
+
element.__ro__.disconnect();
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
const componentSetting = {
|
|
1074
|
+
table: {
|
|
1075
|
+
fetchSetting: {
|
|
1076
|
+
pageField: "current",
|
|
1077
|
+
sizeField: "size",
|
|
1078
|
+
listField: "records",
|
|
1079
|
+
totalField: "total"
|
|
1080
|
+
},
|
|
1081
|
+
pageSizeOptions: ["10", "50", "80", "100"],
|
|
1082
|
+
defaultPageSize: 10,
|
|
1083
|
+
defaultSize: "middle",
|
|
1084
|
+
defaultSortFn: (sortInfo) => {
|
|
1085
|
+
const { field, order } = sortInfo;
|
|
1086
|
+
if (field && order) {
|
|
1087
|
+
return {
|
|
1088
|
+
field,
|
|
1089
|
+
order
|
|
1090
|
+
};
|
|
1091
|
+
} else {
|
|
1092
|
+
return {};
|
|
1093
|
+
}
|
|
1094
|
+
},
|
|
1095
|
+
defaultFilterFn: (data) => {
|
|
1096
|
+
return data;
|
|
1097
|
+
}
|
|
1098
|
+
},
|
|
1099
|
+
scrollbar: {
|
|
1100
|
+
native: false
|
|
1101
|
+
},
|
|
1102
|
+
tree: {
|
|
1103
|
+
searchToolbar: false
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
const BAR_MAP = {
|
|
1107
|
+
vertical: {
|
|
1108
|
+
offset: "offsetHeight",
|
|
1109
|
+
scroll: "scrollTop",
|
|
1110
|
+
scrollSize: "scrollHeight",
|
|
1111
|
+
size: "height",
|
|
1112
|
+
key: "vertical",
|
|
1113
|
+
axis: "Y",
|
|
1114
|
+
client: "clientY",
|
|
1115
|
+
direction: "top"
|
|
1116
|
+
},
|
|
1117
|
+
horizontal: {
|
|
1118
|
+
offset: "offsetWidth",
|
|
1119
|
+
scroll: "scrollLeft",
|
|
1120
|
+
scrollSize: "scrollWidth",
|
|
1121
|
+
size: "width",
|
|
1122
|
+
key: "horizontal",
|
|
1123
|
+
axis: "X",
|
|
1124
|
+
client: "clientX",
|
|
1125
|
+
direction: "left"
|
|
1126
|
+
}
|
|
1127
|
+
};
|
|
1128
|
+
function renderThumbStyle({ move: move2, size, bar }) {
|
|
1129
|
+
const style = {};
|
|
1130
|
+
const translate = `translate${bar.axis}(${move2}%)`;
|
|
1131
|
+
style[bar.size] = size;
|
|
1132
|
+
style.transform = translate;
|
|
1133
|
+
style.msTransform = translate;
|
|
1134
|
+
style.webkitTransform = translate;
|
|
1135
|
+
return style;
|
|
1136
|
+
}
|
|
1137
|
+
function extend(to, _from) {
|
|
1138
|
+
return Object.assign(to, _from);
|
|
1139
|
+
}
|
|
1140
|
+
function toObject(arr) {
|
|
1141
|
+
const res = {};
|
|
1142
|
+
for (let i = 0; i < arr.length; i++) {
|
|
1143
|
+
if (arr[i]) {
|
|
1144
|
+
extend(res, arr[i]);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
return res;
|
|
1148
|
+
}
|
|
1149
|
+
function on(element, event, handler) {
|
|
1150
|
+
if (element && event && handler) {
|
|
1151
|
+
element.addEventListener(event, handler, false);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
function off(element, event, handler) {
|
|
1155
|
+
if (element && event && handler) {
|
|
1156
|
+
element.removeEventListener(event, handler, false);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
const Bar = defineComponent({
|
|
1160
|
+
name: "Bar",
|
|
1161
|
+
props: {
|
|
1162
|
+
vertical: Boolean,
|
|
1163
|
+
size: String,
|
|
1164
|
+
move: Number
|
|
1165
|
+
},
|
|
1166
|
+
setup(props2) {
|
|
1167
|
+
const instance = getCurrentInstance();
|
|
1168
|
+
const thumb = ref();
|
|
1169
|
+
const wrap = inject(
|
|
1170
|
+
"scroll-bar-wrap",
|
|
1171
|
+
{}
|
|
1172
|
+
);
|
|
1173
|
+
const bar = computed(() => {
|
|
1174
|
+
return BAR_MAP[props2.vertical ? "vertical" : "horizontal"];
|
|
1175
|
+
});
|
|
1176
|
+
const barStore = ref({});
|
|
1177
|
+
const cursorDown = ref();
|
|
1178
|
+
const clickThumbHandler = (e) => {
|
|
1179
|
+
var _a3;
|
|
1180
|
+
if (e.ctrlKey || e.button === 2) {
|
|
1181
|
+
return;
|
|
1182
|
+
}
|
|
1183
|
+
(_a3 = window.getSelection()) == null ? void 0 : _a3.removeAllRanges();
|
|
1184
|
+
startDrag(e);
|
|
1185
|
+
barStore.value[bar.value.axis] = e.currentTarget[bar.value.offset] - (e[bar.value.client] - e.currentTarget.getBoundingClientRect()[bar.value.direction]);
|
|
1186
|
+
};
|
|
1187
|
+
const clickTrackHandler = (e) => {
|
|
1188
|
+
var _a3;
|
|
1189
|
+
const offset = Math.abs(
|
|
1190
|
+
e.target.getBoundingClientRect()[bar.value.direction] - e[bar.value.client]
|
|
1191
|
+
);
|
|
1192
|
+
const thumbHalf = thumb.value[bar.value.offset] / 2;
|
|
1193
|
+
const thumbPositionPercentage = (offset - thumbHalf) * 100 / ((_a3 = instance == null ? void 0 : instance.vnode.el) == null ? void 0 : _a3[bar.value.offset]);
|
|
1194
|
+
wrap.value[bar.value.scroll] = thumbPositionPercentage * wrap.value[bar.value.scrollSize] / 100;
|
|
1195
|
+
};
|
|
1196
|
+
const startDrag = (e) => {
|
|
1197
|
+
e.stopImmediatePropagation();
|
|
1198
|
+
cursorDown.value = true;
|
|
1199
|
+
on(document, "mousemove", mouseMoveDocumentHandler);
|
|
1200
|
+
on(document, "mouseup", mouseUpDocumentHandler);
|
|
1201
|
+
document.onselectstart = () => false;
|
|
1202
|
+
};
|
|
1203
|
+
const mouseMoveDocumentHandler = (e) => {
|
|
1204
|
+
var _a3, _b;
|
|
1205
|
+
if (cursorDown.value === false)
|
|
1206
|
+
return;
|
|
1207
|
+
const prevPage = barStore.value[bar.value.axis];
|
|
1208
|
+
if (!prevPage)
|
|
1209
|
+
return;
|
|
1210
|
+
const offset = (((_a3 = instance == null ? void 0 : instance.vnode.el) == null ? void 0 : _a3.getBoundingClientRect()[bar.value.direction]) - e[bar.value.client]) * -1;
|
|
1211
|
+
const thumbClickPosition = thumb.value[bar.value.offset] - prevPage;
|
|
1212
|
+
const thumbPositionPercentage = (offset - thumbClickPosition) * 100 / ((_b = instance == null ? void 0 : instance.vnode.el) == null ? void 0 : _b[bar.value.offset]);
|
|
1213
|
+
wrap.value[bar.value.scroll] = thumbPositionPercentage * wrap.value[bar.value.scrollSize] / 100;
|
|
1214
|
+
};
|
|
1215
|
+
function mouseUpDocumentHandler() {
|
|
1216
|
+
cursorDown.value = false;
|
|
1217
|
+
barStore.value[bar.value.axis] = 0;
|
|
1218
|
+
off(document, "mousemove", mouseMoveDocumentHandler);
|
|
1219
|
+
document.onselectstart = null;
|
|
1220
|
+
}
|
|
1221
|
+
onUnmounted(() => {
|
|
1222
|
+
off(document, "mouseup", mouseUpDocumentHandler);
|
|
1223
|
+
});
|
|
1224
|
+
return () => h(
|
|
1225
|
+
"div",
|
|
1226
|
+
{
|
|
1227
|
+
class: ["scrollbar__bar", "is-" + bar.value.key],
|
|
1228
|
+
onMousedown: clickTrackHandler
|
|
1229
|
+
},
|
|
1230
|
+
h("div", {
|
|
1231
|
+
ref: thumb,
|
|
1232
|
+
class: "scrollbar__thumb",
|
|
1233
|
+
onMousedown: clickThumbHandler,
|
|
1234
|
+
style: renderThumbStyle({
|
|
1235
|
+
size: props2.size,
|
|
1236
|
+
move: props2.move,
|
|
1237
|
+
bar: bar.value
|
|
1238
|
+
})
|
|
1239
|
+
})
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
});
|
|
1243
|
+
const { scrollbar } = componentSetting;
|
|
1244
|
+
const _sfc_main$9 = defineComponent({
|
|
1245
|
+
name: "Scrollbar",
|
|
1246
|
+
components: { Bar },
|
|
1247
|
+
props: {
|
|
1248
|
+
native: {
|
|
1249
|
+
type: Boolean,
|
|
1250
|
+
default: (_a2 = scrollbar == null ? void 0 : scrollbar.native) != null ? _a2 : false
|
|
1251
|
+
},
|
|
1252
|
+
wrapStyle: {
|
|
1253
|
+
type: [String, Array],
|
|
1254
|
+
default: ""
|
|
1255
|
+
},
|
|
1256
|
+
wrapClass: {
|
|
1257
|
+
type: [String, Array],
|
|
1258
|
+
default: ""
|
|
1259
|
+
},
|
|
1260
|
+
viewClass: {
|
|
1261
|
+
type: [String, Array],
|
|
1262
|
+
default: ""
|
|
1263
|
+
},
|
|
1264
|
+
viewStyle: {
|
|
1265
|
+
type: [String, Array],
|
|
1266
|
+
default: ""
|
|
1267
|
+
},
|
|
1268
|
+
noresize: Boolean,
|
|
1269
|
+
tag: {
|
|
1270
|
+
type: String,
|
|
1271
|
+
default: "div"
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
setup(props2) {
|
|
1275
|
+
const sizeWidth = ref("0");
|
|
1276
|
+
const sizeHeight = ref("0");
|
|
1277
|
+
const moveX = ref(0);
|
|
1278
|
+
const moveY = ref(0);
|
|
1279
|
+
const wrap = ref();
|
|
1280
|
+
const resize = ref();
|
|
1281
|
+
provide("scroll-bar-wrap", wrap);
|
|
1282
|
+
const style = computed(() => {
|
|
1283
|
+
if (Array.isArray(props2.wrapStyle)) {
|
|
1284
|
+
return toObject(props2.wrapStyle);
|
|
1285
|
+
}
|
|
1286
|
+
return props2.wrapStyle;
|
|
1287
|
+
});
|
|
1288
|
+
const handleScroll = () => {
|
|
1289
|
+
if (!props2.native) {
|
|
1290
|
+
moveY.value = unref(wrap).scrollTop * 100 / unref(wrap).clientHeight;
|
|
1291
|
+
moveX.value = unref(wrap).scrollLeft * 100 / unref(wrap).clientWidth;
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
const update = () => {
|
|
1295
|
+
if (!unref(wrap))
|
|
1296
|
+
return;
|
|
1297
|
+
const heightPercentage = unref(wrap).clientHeight * 100 / unref(wrap).scrollHeight;
|
|
1298
|
+
const widthPercentage = unref(wrap).clientWidth * 100 / unref(wrap).scrollWidth;
|
|
1299
|
+
sizeHeight.value = heightPercentage < 100 ? heightPercentage + "%" : "";
|
|
1300
|
+
sizeWidth.value = widthPercentage < 100 ? widthPercentage + "%" : "";
|
|
1301
|
+
};
|
|
1302
|
+
onMounted(() => {
|
|
1303
|
+
if (props2.native)
|
|
1304
|
+
return;
|
|
1305
|
+
nextTick(update);
|
|
1306
|
+
if (!props2.noresize) {
|
|
1307
|
+
addResizeListener(unref(resize), update);
|
|
1308
|
+
addResizeListener(unref(wrap), update);
|
|
1309
|
+
addEventListener("resize", update);
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
onBeforeUnmount(() => {
|
|
1313
|
+
if (props2.native)
|
|
1314
|
+
return;
|
|
1315
|
+
if (!props2.noresize) {
|
|
1316
|
+
removeResizeListener(unref(resize), update);
|
|
1317
|
+
removeResizeListener(unref(wrap), update);
|
|
1318
|
+
removeEventListener("resize", update);
|
|
1319
|
+
}
|
|
1320
|
+
});
|
|
1321
|
+
return {
|
|
1322
|
+
moveX,
|
|
1323
|
+
moveY,
|
|
1324
|
+
sizeWidth,
|
|
1325
|
+
sizeHeight,
|
|
1326
|
+
style,
|
|
1327
|
+
wrap,
|
|
1328
|
+
resize,
|
|
1329
|
+
update,
|
|
1330
|
+
handleScroll
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
});
|
|
1334
|
+
const Scrollbar_vue_vue_type_style_index_0_lang = "";
|
|
1335
|
+
const _hoisted_1$2 = { class: "scrollbar" };
|
|
1336
|
+
function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1337
|
+
const _component_bar = resolveComponent("bar");
|
|
1338
|
+
return openBlock(), createElementBlock("div", _hoisted_1$2, [
|
|
1339
|
+
createElementVNode("div", {
|
|
1340
|
+
ref: "wrap",
|
|
1341
|
+
class: normalizeClass([
|
|
1342
|
+
_ctx.wrapClass,
|
|
1343
|
+
"scrollbar__wrap",
|
|
1344
|
+
_ctx.native ? "" : "scrollbar__wrap--hidden-default"
|
|
1345
|
+
]),
|
|
1346
|
+
style: normalizeStyle(_ctx.style),
|
|
1347
|
+
onScroll: _cache[0] || (_cache[0] = (...args) => _ctx.handleScroll && _ctx.handleScroll(...args))
|
|
1348
|
+
}, [
|
|
1349
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.tag), {
|
|
1350
|
+
ref: "resize",
|
|
1351
|
+
class: normalizeClass(["scrollbar__view", _ctx.viewClass]),
|
|
1352
|
+
style: normalizeStyle(_ctx.viewStyle)
|
|
1353
|
+
}, {
|
|
1354
|
+
default: withCtx(() => [
|
|
1355
|
+
renderSlot(_ctx.$slots, "default")
|
|
1356
|
+
]),
|
|
1357
|
+
_: 3
|
|
1358
|
+
}, 8, ["class", "style"]))
|
|
1359
|
+
], 38),
|
|
1360
|
+
!_ctx.native ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1361
|
+
createVNode(_component_bar, {
|
|
1362
|
+
move: _ctx.moveX,
|
|
1363
|
+
size: _ctx.sizeWidth
|
|
1364
|
+
}, null, 8, ["move", "size"]),
|
|
1365
|
+
createVNode(_component_bar, {
|
|
1366
|
+
vertical: "",
|
|
1367
|
+
move: _ctx.moveY,
|
|
1368
|
+
size: _ctx.sizeHeight
|
|
1369
|
+
}, null, 8, ["move", "size"])
|
|
1370
|
+
], 64)) : createCommentVNode("", true)
|
|
1371
|
+
]);
|
|
1372
|
+
}
|
|
1373
|
+
const Scrollbar = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["render", _sfc_render$6]]);
|
|
1374
|
+
const easeInOutQuad = (t2, b, c, d) => {
|
|
1375
|
+
t2 /= d / 2;
|
|
1376
|
+
if (t2 < 1) {
|
|
1377
|
+
return c / 2 * t2 * t2 + b;
|
|
1378
|
+
}
|
|
1379
|
+
t2--;
|
|
1380
|
+
return -c / 2 * (t2 * (t2 - 2) - 1) + b;
|
|
1381
|
+
};
|
|
1382
|
+
const move = (el, amount) => {
|
|
1383
|
+
el.scrollTop = amount;
|
|
1384
|
+
};
|
|
1385
|
+
const position = (el) => {
|
|
1386
|
+
return el.scrollTop;
|
|
1387
|
+
};
|
|
1388
|
+
function useScrollTo({
|
|
1389
|
+
el,
|
|
1390
|
+
to,
|
|
1391
|
+
duration = 500,
|
|
1392
|
+
callback
|
|
1393
|
+
}) {
|
|
1394
|
+
const isActiveRef = ref(false);
|
|
1395
|
+
const start = position(el);
|
|
1396
|
+
const change = to - start;
|
|
1397
|
+
const increment = 20;
|
|
1398
|
+
let currentTime = 0;
|
|
1399
|
+
duration = isUnDef(duration) ? 500 : duration;
|
|
1400
|
+
const animateScroll = function() {
|
|
1401
|
+
if (!unref(isActiveRef)) {
|
|
1402
|
+
return;
|
|
1403
|
+
}
|
|
1404
|
+
currentTime += increment;
|
|
1405
|
+
const val = easeInOutQuad(currentTime, start, change, duration);
|
|
1406
|
+
move(el, val);
|
|
1407
|
+
if (currentTime < duration && unref(isActiveRef)) {
|
|
1408
|
+
requestAnimationFrame(animateScroll);
|
|
1409
|
+
} else {
|
|
1410
|
+
if (callback && isFunction$1(callback)) {
|
|
1411
|
+
callback();
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
const run = () => {
|
|
1416
|
+
isActiveRef.value = true;
|
|
1417
|
+
animateScroll();
|
|
1418
|
+
};
|
|
1419
|
+
const stop = () => {
|
|
1420
|
+
isActiveRef.value = false;
|
|
1421
|
+
};
|
|
1422
|
+
return { start: run, stop };
|
|
1423
|
+
}
|
|
1424
|
+
const _sfc_main$8 = defineComponent({
|
|
1425
|
+
name: "ScrollContainer",
|
|
1426
|
+
components: { Scrollbar },
|
|
1427
|
+
setup() {
|
|
1428
|
+
const scrollbarRef = ref(null);
|
|
1429
|
+
function scrollTo(to, duration = 500) {
|
|
1430
|
+
const scrollbar2 = unref(scrollbarRef);
|
|
1431
|
+
if (!scrollbar2) {
|
|
1432
|
+
return;
|
|
1433
|
+
}
|
|
1434
|
+
nextTick(() => {
|
|
1435
|
+
const wrap = unref(scrollbar2.wrap);
|
|
1436
|
+
if (!wrap) {
|
|
1437
|
+
return;
|
|
1438
|
+
}
|
|
1439
|
+
const { start } = useScrollTo({
|
|
1440
|
+
el: wrap,
|
|
1441
|
+
to,
|
|
1442
|
+
duration
|
|
1443
|
+
});
|
|
1444
|
+
start();
|
|
1445
|
+
});
|
|
1446
|
+
}
|
|
1447
|
+
function getScrollWrap() {
|
|
1448
|
+
const scrollbar2 = unref(scrollbarRef);
|
|
1449
|
+
if (!scrollbar2) {
|
|
1450
|
+
return null;
|
|
1451
|
+
}
|
|
1452
|
+
return scrollbar2.wrap;
|
|
1453
|
+
}
|
|
1454
|
+
function scrollBottom() {
|
|
1455
|
+
const scrollbar2 = unref(scrollbarRef);
|
|
1456
|
+
if (!scrollbar2) {
|
|
1457
|
+
return;
|
|
1458
|
+
}
|
|
1459
|
+
nextTick(() => {
|
|
1460
|
+
const wrap = unref(scrollbar2.wrap);
|
|
1461
|
+
if (!wrap) {
|
|
1462
|
+
return;
|
|
1463
|
+
}
|
|
1464
|
+
const scrollHeight = wrap.scrollHeight;
|
|
1465
|
+
const { start } = useScrollTo({
|
|
1466
|
+
el: wrap,
|
|
1467
|
+
to: scrollHeight
|
|
1468
|
+
});
|
|
1469
|
+
start();
|
|
1470
|
+
});
|
|
1471
|
+
}
|
|
1472
|
+
return {
|
|
1473
|
+
scrollbarRef,
|
|
1474
|
+
scrollTo,
|
|
1475
|
+
scrollBottom,
|
|
1476
|
+
getScrollWrap
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
});
|
|
1480
|
+
const ScrollContainer_vue_vue_type_style_index_0_lang = "";
|
|
1481
|
+
function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1482
|
+
const _component_Scrollbar = resolveComponent("Scrollbar");
|
|
1483
|
+
return openBlock(), createBlock(_component_Scrollbar, mergeProps({
|
|
1484
|
+
ref: "scrollbarRef",
|
|
1485
|
+
class: "scroll-container"
|
|
1486
|
+
}, _ctx.$attrs), {
|
|
1487
|
+
default: withCtx(() => [
|
|
1488
|
+
renderSlot(_ctx.$slots, "default")
|
|
1489
|
+
]),
|
|
1490
|
+
_: 3
|
|
1491
|
+
}, 16);
|
|
1492
|
+
}
|
|
1493
|
+
const ScrollContainer = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$5]]);
|
|
1494
|
+
function createContext(context, key2 = Symbol(), options = {}) {
|
|
1495
|
+
const { readonly: readonly$1 = true, createProvider = false, native = false } = options;
|
|
1496
|
+
const state = reactive(context);
|
|
1497
|
+
const provideData = readonly$1 ? readonly(state) : state;
|
|
1498
|
+
!createProvider && provide(key2, native ? context : provideData);
|
|
1499
|
+
return {
|
|
1500
|
+
state
|
|
1501
|
+
};
|
|
1502
|
+
}
|
|
1503
|
+
const key$1 = Symbol();
|
|
1504
|
+
function createModalContext(context) {
|
|
1505
|
+
return createContext(context, key$1);
|
|
1506
|
+
}
|
|
1507
|
+
const props$1 = {
|
|
1508
|
+
loading: { type: Boolean },
|
|
1509
|
+
useWrapper: { type: Boolean, default: true },
|
|
1510
|
+
modalHeaderHeight: { type: Number, default: 57 },
|
|
1511
|
+
modalFooterHeight: { type: Number, default: 74 },
|
|
1512
|
+
minHeight: { type: Number, default: 200 },
|
|
1513
|
+
height: { type: Number },
|
|
1514
|
+
footerOffset: { type: Number, default: 0 },
|
|
1515
|
+
visible: { type: Boolean },
|
|
1516
|
+
fullScreen: { type: Boolean },
|
|
1517
|
+
loadingTip: { type: String }
|
|
1518
|
+
};
|
|
1519
|
+
const _sfc_main$7 = defineComponent({
|
|
1520
|
+
name: "ModalWrapper",
|
|
1521
|
+
components: { ScrollContainer },
|
|
1522
|
+
inheritAttrs: false,
|
|
1523
|
+
props: props$1,
|
|
1524
|
+
emits: ["height-change", "ext-height"],
|
|
1525
|
+
setup(props2, { emit }) {
|
|
1526
|
+
const wrapperRef = ref(null);
|
|
1527
|
+
const spinRef = ref(null);
|
|
1528
|
+
const realHeightRef = ref(0);
|
|
1529
|
+
const minRealHeightRef = ref(0);
|
|
1530
|
+
let realHeight = 0;
|
|
1531
|
+
useWindowSizeFn(setModalHeight.bind(null, false));
|
|
1532
|
+
useMutationObserver(
|
|
1533
|
+
spinRef,
|
|
1534
|
+
() => {
|
|
1535
|
+
setModalHeight();
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
attributes: true,
|
|
1539
|
+
subtree: true
|
|
1540
|
+
}
|
|
1541
|
+
);
|
|
1542
|
+
createModalContext({
|
|
1543
|
+
redoModalHeight: setModalHeight
|
|
1544
|
+
});
|
|
1545
|
+
const spinStyle = computed(() => {
|
|
1546
|
+
return {
|
|
1547
|
+
minHeight: `${props2.minHeight}px`,
|
|
1548
|
+
[props2.fullScreen ? "height" : "maxHeight"]: `${unref(realHeightRef)}px`
|
|
1549
|
+
};
|
|
1550
|
+
});
|
|
1551
|
+
watchEffect(() => {
|
|
1552
|
+
props2.useWrapper && setModalHeight();
|
|
1553
|
+
});
|
|
1554
|
+
watch(
|
|
1555
|
+
() => props2.fullScreen,
|
|
1556
|
+
(v) => {
|
|
1557
|
+
setModalHeight();
|
|
1558
|
+
if (!v) {
|
|
1559
|
+
realHeightRef.value = minRealHeightRef.value;
|
|
1560
|
+
} else {
|
|
1561
|
+
minRealHeightRef.value = realHeightRef.value;
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
);
|
|
1565
|
+
onMounted(() => {
|
|
1566
|
+
const { modalHeaderHeight, modalFooterHeight } = props2;
|
|
1567
|
+
emit("ext-height", modalHeaderHeight + modalFooterHeight);
|
|
1568
|
+
});
|
|
1569
|
+
onUnmounted(() => {
|
|
1570
|
+
});
|
|
1571
|
+
async function scrollTop() {
|
|
1572
|
+
nextTick(() => {
|
|
1573
|
+
var _a3;
|
|
1574
|
+
const wrapperRefDom = unref(wrapperRef);
|
|
1575
|
+
if (!wrapperRefDom)
|
|
1576
|
+
return;
|
|
1577
|
+
(_a3 = wrapperRefDom == null ? void 0 : wrapperRefDom.scrollTo) == null ? void 0 : _a3.call(wrapperRefDom, 0);
|
|
1578
|
+
});
|
|
1579
|
+
}
|
|
1580
|
+
async function setModalHeight() {
|
|
1581
|
+
if (!props2.visible)
|
|
1582
|
+
return;
|
|
1583
|
+
const wrapperRefDom = unref(wrapperRef);
|
|
1584
|
+
if (!wrapperRefDom)
|
|
1585
|
+
return;
|
|
1586
|
+
const bodyDom = wrapperRefDom.$el.parentElement;
|
|
1587
|
+
if (!bodyDom)
|
|
1588
|
+
return;
|
|
1589
|
+
bodyDom.style.padding = "0";
|
|
1590
|
+
await nextTick();
|
|
1591
|
+
try {
|
|
1592
|
+
const modalDom = bodyDom.parentElement && bodyDom.parentElement.parentElement;
|
|
1593
|
+
if (!modalDom)
|
|
1594
|
+
return;
|
|
1595
|
+
const modalRect = getComputedStyle(modalDom).top;
|
|
1596
|
+
const modalTop = Number.parseInt(modalRect);
|
|
1597
|
+
let maxHeight = window.innerHeight - modalTop * 2 + (props2.footerOffset || 0) - props2.modalFooterHeight - props2.modalHeaderHeight;
|
|
1598
|
+
if (modalTop < 40) {
|
|
1599
|
+
maxHeight -= 26;
|
|
1600
|
+
}
|
|
1601
|
+
await nextTick();
|
|
1602
|
+
const spinEl = unref(spinRef);
|
|
1603
|
+
if (!spinEl)
|
|
1604
|
+
return;
|
|
1605
|
+
await nextTick();
|
|
1606
|
+
realHeight = spinEl.scrollHeight;
|
|
1607
|
+
if (props2.fullScreen) {
|
|
1608
|
+
realHeightRef.value = window.innerHeight - props2.modalFooterHeight - props2.modalHeaderHeight - 28;
|
|
1609
|
+
} else {
|
|
1610
|
+
realHeightRef.value = props2.height ? props2.height : realHeight > maxHeight ? maxHeight : realHeight;
|
|
1611
|
+
}
|
|
1612
|
+
emit("height-change", unref(realHeightRef));
|
|
1613
|
+
} catch (error2) {
|
|
1614
|
+
console.log(error2);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
return { wrapperRef, spinRef, spinStyle, scrollTop, setModalHeight };
|
|
1618
|
+
}
|
|
1619
|
+
});
|
|
1620
|
+
const _hoisted_1$1 = ["loading-tip"];
|
|
1621
|
+
function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1622
|
+
const _component_ScrollContainer = resolveComponent("ScrollContainer");
|
|
1623
|
+
return openBlock(), createBlock(_component_ScrollContainer, { ref: "wrapperRef" }, {
|
|
1624
|
+
default: withCtx(() => [
|
|
1625
|
+
createElementVNode("div", {
|
|
1626
|
+
ref: "spinRef",
|
|
1627
|
+
style: normalizeStyle(_ctx.spinStyle),
|
|
1628
|
+
"loading-tip": _ctx.loadingTip
|
|
1629
|
+
}, [
|
|
1630
|
+
renderSlot(_ctx.$slots, "default")
|
|
1631
|
+
], 12, _hoisted_1$1)
|
|
1632
|
+
]),
|
|
1633
|
+
_: 3
|
|
1634
|
+
}, 512);
|
|
1635
|
+
}
|
|
1636
|
+
const ModalWrapper = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["render", _sfc_render$4]]);
|
|
1637
|
+
function bound01(n, max) {
|
|
1638
|
+
if (isOnePointZero(n)) {
|
|
1639
|
+
n = "100%";
|
|
1640
|
+
}
|
|
1641
|
+
var isPercent = isPercentage(n);
|
|
1642
|
+
n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
|
|
1643
|
+
if (isPercent) {
|
|
1644
|
+
n = parseInt(String(n * max), 10) / 100;
|
|
1645
|
+
}
|
|
1646
|
+
if (Math.abs(n - max) < 1e-6) {
|
|
1647
|
+
return 1;
|
|
1648
|
+
}
|
|
1649
|
+
if (max === 360) {
|
|
1650
|
+
n = (n < 0 ? n % max + max : n % max) / parseFloat(String(max));
|
|
1651
|
+
} else {
|
|
1652
|
+
n = n % max / parseFloat(String(max));
|
|
1653
|
+
}
|
|
1654
|
+
return n;
|
|
1655
|
+
}
|
|
1656
|
+
function isOnePointZero(n) {
|
|
1657
|
+
return typeof n === "string" && n.indexOf(".") !== -1 && parseFloat(n) === 1;
|
|
1658
|
+
}
|
|
1659
|
+
function isPercentage(n) {
|
|
1660
|
+
return typeof n === "string" && n.indexOf("%") !== -1;
|
|
1661
|
+
}
|
|
1662
|
+
function boundAlpha(a) {
|
|
1663
|
+
a = parseFloat(a);
|
|
1664
|
+
if (isNaN(a) || a < 0 || a > 1) {
|
|
1665
|
+
a = 1;
|
|
1666
|
+
}
|
|
1667
|
+
return a;
|
|
1668
|
+
}
|
|
1669
|
+
function convertToPercentage(n) {
|
|
1670
|
+
if (n <= 1) {
|
|
1671
|
+
return "".concat(Number(n) * 100, "%");
|
|
1672
|
+
}
|
|
1673
|
+
return n;
|
|
1674
|
+
}
|
|
1675
|
+
function pad2(c) {
|
|
1676
|
+
return c.length === 1 ? "0" + c : String(c);
|
|
1677
|
+
}
|
|
1678
|
+
function rgbToRgb(r, g, b) {
|
|
1679
|
+
return {
|
|
1680
|
+
r: bound01(r, 255) * 255,
|
|
1681
|
+
g: bound01(g, 255) * 255,
|
|
1682
|
+
b: bound01(b, 255) * 255
|
|
1683
|
+
};
|
|
1684
|
+
}
|
|
1685
|
+
function hue2rgb(p, q, t2) {
|
|
1686
|
+
if (t2 < 0) {
|
|
1687
|
+
t2 += 1;
|
|
1688
|
+
}
|
|
1689
|
+
if (t2 > 1) {
|
|
1690
|
+
t2 -= 1;
|
|
1691
|
+
}
|
|
1692
|
+
if (t2 < 1 / 6) {
|
|
1693
|
+
return p + (q - p) * (6 * t2);
|
|
1694
|
+
}
|
|
1695
|
+
if (t2 < 1 / 2) {
|
|
1696
|
+
return q;
|
|
1697
|
+
}
|
|
1698
|
+
if (t2 < 2 / 3) {
|
|
1699
|
+
return p + (q - p) * (2 / 3 - t2) * 6;
|
|
1700
|
+
}
|
|
1701
|
+
return p;
|
|
1702
|
+
}
|
|
1703
|
+
function hslToRgb(h2, s, l) {
|
|
1704
|
+
var r;
|
|
1705
|
+
var g;
|
|
1706
|
+
var b;
|
|
1707
|
+
h2 = bound01(h2, 360);
|
|
1708
|
+
s = bound01(s, 100);
|
|
1709
|
+
l = bound01(l, 100);
|
|
1710
|
+
if (s === 0) {
|
|
1711
|
+
g = l;
|
|
1712
|
+
b = l;
|
|
1713
|
+
r = l;
|
|
1714
|
+
} else {
|
|
1715
|
+
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
1716
|
+
var p = 2 * l - q;
|
|
1717
|
+
r = hue2rgb(p, q, h2 + 1 / 3);
|
|
1718
|
+
g = hue2rgb(p, q, h2);
|
|
1719
|
+
b = hue2rgb(p, q, h2 - 1 / 3);
|
|
1720
|
+
}
|
|
1721
|
+
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
1722
|
+
}
|
|
1723
|
+
function rgbToHsv(r, g, b) {
|
|
1724
|
+
r = bound01(r, 255);
|
|
1725
|
+
g = bound01(g, 255);
|
|
1726
|
+
b = bound01(b, 255);
|
|
1727
|
+
var max = Math.max(r, g, b);
|
|
1728
|
+
var min = Math.min(r, g, b);
|
|
1729
|
+
var h2 = 0;
|
|
1730
|
+
var v = max;
|
|
1731
|
+
var d = max - min;
|
|
1732
|
+
var s = max === 0 ? 0 : d / max;
|
|
1733
|
+
if (max === min) {
|
|
1734
|
+
h2 = 0;
|
|
1735
|
+
} else {
|
|
1736
|
+
switch (max) {
|
|
1737
|
+
case r:
|
|
1738
|
+
h2 = (g - b) / d + (g < b ? 6 : 0);
|
|
1739
|
+
break;
|
|
1740
|
+
case g:
|
|
1741
|
+
h2 = (b - r) / d + 2;
|
|
1742
|
+
break;
|
|
1743
|
+
case b:
|
|
1744
|
+
h2 = (r - g) / d + 4;
|
|
1745
|
+
break;
|
|
1746
|
+
}
|
|
1747
|
+
h2 /= 6;
|
|
1748
|
+
}
|
|
1749
|
+
return { h: h2, s, v };
|
|
1750
|
+
}
|
|
1751
|
+
function hsvToRgb(h2, s, v) {
|
|
1752
|
+
h2 = bound01(h2, 360) * 6;
|
|
1753
|
+
s = bound01(s, 100);
|
|
1754
|
+
v = bound01(v, 100);
|
|
1755
|
+
var i = Math.floor(h2);
|
|
1756
|
+
var f = h2 - i;
|
|
1757
|
+
var p = v * (1 - s);
|
|
1758
|
+
var q = v * (1 - f * s);
|
|
1759
|
+
var t2 = v * (1 - (1 - f) * s);
|
|
1760
|
+
var mod = i % 6;
|
|
1761
|
+
var r = [v, q, p, p, t2, v][mod];
|
|
1762
|
+
var g = [t2, v, v, q, p, p][mod];
|
|
1763
|
+
var b = [p, p, t2, v, v, q][mod];
|
|
1764
|
+
return { r: r * 255, g: g * 255, b: b * 255 };
|
|
1765
|
+
}
|
|
1766
|
+
function rgbToHex(r, g, b, allow3Char) {
|
|
1767
|
+
var hex = [
|
|
1768
|
+
pad2(Math.round(r).toString(16)),
|
|
1769
|
+
pad2(Math.round(g).toString(16)),
|
|
1770
|
+
pad2(Math.round(b).toString(16))
|
|
1771
|
+
];
|
|
1772
|
+
if (allow3Char && hex[0].startsWith(hex[0].charAt(1)) && hex[1].startsWith(hex[1].charAt(1)) && hex[2].startsWith(hex[2].charAt(1))) {
|
|
1773
|
+
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
|
|
1774
|
+
}
|
|
1775
|
+
return hex.join("");
|
|
1776
|
+
}
|
|
1777
|
+
function convertHexToDecimal(h2) {
|
|
1778
|
+
return parseIntFromHex(h2) / 255;
|
|
1779
|
+
}
|
|
1780
|
+
function parseIntFromHex(val) {
|
|
1781
|
+
return parseInt(val, 16);
|
|
1782
|
+
}
|
|
1783
|
+
var names = {
|
|
1784
|
+
aliceblue: "#f0f8ff",
|
|
1785
|
+
antiquewhite: "#faebd7",
|
|
1786
|
+
aqua: "#00ffff",
|
|
1787
|
+
aquamarine: "#7fffd4",
|
|
1788
|
+
azure: "#f0ffff",
|
|
1789
|
+
beige: "#f5f5dc",
|
|
1790
|
+
bisque: "#ffe4c4",
|
|
1791
|
+
black: "#000000",
|
|
1792
|
+
blanchedalmond: "#ffebcd",
|
|
1793
|
+
blue: "#0000ff",
|
|
1794
|
+
blueviolet: "#8a2be2",
|
|
1795
|
+
brown: "#a52a2a",
|
|
1796
|
+
burlywood: "#deb887",
|
|
1797
|
+
cadetblue: "#5f9ea0",
|
|
1798
|
+
chartreuse: "#7fff00",
|
|
1799
|
+
chocolate: "#d2691e",
|
|
1800
|
+
coral: "#ff7f50",
|
|
1801
|
+
cornflowerblue: "#6495ed",
|
|
1802
|
+
cornsilk: "#fff8dc",
|
|
1803
|
+
crimson: "#dc143c",
|
|
1804
|
+
cyan: "#00ffff",
|
|
1805
|
+
darkblue: "#00008b",
|
|
1806
|
+
darkcyan: "#008b8b",
|
|
1807
|
+
darkgoldenrod: "#b8860b",
|
|
1808
|
+
darkgray: "#a9a9a9",
|
|
1809
|
+
darkgreen: "#006400",
|
|
1810
|
+
darkgrey: "#a9a9a9",
|
|
1811
|
+
darkkhaki: "#bdb76b",
|
|
1812
|
+
darkmagenta: "#8b008b",
|
|
1813
|
+
darkolivegreen: "#556b2f",
|
|
1814
|
+
darkorange: "#ff8c00",
|
|
1815
|
+
darkorchid: "#9932cc",
|
|
1816
|
+
darkred: "#8b0000",
|
|
1817
|
+
darksalmon: "#e9967a",
|
|
1818
|
+
darkseagreen: "#8fbc8f",
|
|
1819
|
+
darkslateblue: "#483d8b",
|
|
1820
|
+
darkslategray: "#2f4f4f",
|
|
1821
|
+
darkslategrey: "#2f4f4f",
|
|
1822
|
+
darkturquoise: "#00ced1",
|
|
1823
|
+
darkviolet: "#9400d3",
|
|
1824
|
+
deeppink: "#ff1493",
|
|
1825
|
+
deepskyblue: "#00bfff",
|
|
1826
|
+
dimgray: "#696969",
|
|
1827
|
+
dimgrey: "#696969",
|
|
1828
|
+
dodgerblue: "#1e90ff",
|
|
1829
|
+
firebrick: "#b22222",
|
|
1830
|
+
floralwhite: "#fffaf0",
|
|
1831
|
+
forestgreen: "#228b22",
|
|
1832
|
+
fuchsia: "#ff00ff",
|
|
1833
|
+
gainsboro: "#dcdcdc",
|
|
1834
|
+
ghostwhite: "#f8f8ff",
|
|
1835
|
+
goldenrod: "#daa520",
|
|
1836
|
+
gold: "#ffd700",
|
|
1837
|
+
gray: "#808080",
|
|
1838
|
+
green: "#008000",
|
|
1839
|
+
greenyellow: "#adff2f",
|
|
1840
|
+
grey: "#808080",
|
|
1841
|
+
honeydew: "#f0fff0",
|
|
1842
|
+
hotpink: "#ff69b4",
|
|
1843
|
+
indianred: "#cd5c5c",
|
|
1844
|
+
indigo: "#4b0082",
|
|
1845
|
+
ivory: "#fffff0",
|
|
1846
|
+
khaki: "#f0e68c",
|
|
1847
|
+
lavenderblush: "#fff0f5",
|
|
1848
|
+
lavender: "#e6e6fa",
|
|
1849
|
+
lawngreen: "#7cfc00",
|
|
1850
|
+
lemonchiffon: "#fffacd",
|
|
1851
|
+
lightblue: "#add8e6",
|
|
1852
|
+
lightcoral: "#f08080",
|
|
1853
|
+
lightcyan: "#e0ffff",
|
|
1854
|
+
lightgoldenrodyellow: "#fafad2",
|
|
1855
|
+
lightgray: "#d3d3d3",
|
|
1856
|
+
lightgreen: "#90ee90",
|
|
1857
|
+
lightgrey: "#d3d3d3",
|
|
1858
|
+
lightpink: "#ffb6c1",
|
|
1859
|
+
lightsalmon: "#ffa07a",
|
|
1860
|
+
lightseagreen: "#20b2aa",
|
|
1861
|
+
lightskyblue: "#87cefa",
|
|
1862
|
+
lightslategray: "#778899",
|
|
1863
|
+
lightslategrey: "#778899",
|
|
1864
|
+
lightsteelblue: "#b0c4de",
|
|
1865
|
+
lightyellow: "#ffffe0",
|
|
1866
|
+
lime: "#00ff00",
|
|
1867
|
+
limegreen: "#32cd32",
|
|
1868
|
+
linen: "#faf0e6",
|
|
1869
|
+
magenta: "#ff00ff",
|
|
1870
|
+
maroon: "#800000",
|
|
1871
|
+
mediumaquamarine: "#66cdaa",
|
|
1872
|
+
mediumblue: "#0000cd",
|
|
1873
|
+
mediumorchid: "#ba55d3",
|
|
1874
|
+
mediumpurple: "#9370db",
|
|
1875
|
+
mediumseagreen: "#3cb371",
|
|
1876
|
+
mediumslateblue: "#7b68ee",
|
|
1877
|
+
mediumspringgreen: "#00fa9a",
|
|
1878
|
+
mediumturquoise: "#48d1cc",
|
|
1879
|
+
mediumvioletred: "#c71585",
|
|
1880
|
+
midnightblue: "#191970",
|
|
1881
|
+
mintcream: "#f5fffa",
|
|
1882
|
+
mistyrose: "#ffe4e1",
|
|
1883
|
+
moccasin: "#ffe4b5",
|
|
1884
|
+
navajowhite: "#ffdead",
|
|
1885
|
+
navy: "#000080",
|
|
1886
|
+
oldlace: "#fdf5e6",
|
|
1887
|
+
olive: "#808000",
|
|
1888
|
+
olivedrab: "#6b8e23",
|
|
1889
|
+
orange: "#ffa500",
|
|
1890
|
+
orangered: "#ff4500",
|
|
1891
|
+
orchid: "#da70d6",
|
|
1892
|
+
palegoldenrod: "#eee8aa",
|
|
1893
|
+
palegreen: "#98fb98",
|
|
1894
|
+
paleturquoise: "#afeeee",
|
|
1895
|
+
palevioletred: "#db7093",
|
|
1896
|
+
papayawhip: "#ffefd5",
|
|
1897
|
+
peachpuff: "#ffdab9",
|
|
1898
|
+
peru: "#cd853f",
|
|
1899
|
+
pink: "#ffc0cb",
|
|
1900
|
+
plum: "#dda0dd",
|
|
1901
|
+
powderblue: "#b0e0e6",
|
|
1902
|
+
purple: "#800080",
|
|
1903
|
+
rebeccapurple: "#663399",
|
|
1904
|
+
red: "#ff0000",
|
|
1905
|
+
rosybrown: "#bc8f8f",
|
|
1906
|
+
royalblue: "#4169e1",
|
|
1907
|
+
saddlebrown: "#8b4513",
|
|
1908
|
+
salmon: "#fa8072",
|
|
1909
|
+
sandybrown: "#f4a460",
|
|
1910
|
+
seagreen: "#2e8b57",
|
|
1911
|
+
seashell: "#fff5ee",
|
|
1912
|
+
sienna: "#a0522d",
|
|
1913
|
+
silver: "#c0c0c0",
|
|
1914
|
+
skyblue: "#87ceeb",
|
|
1915
|
+
slateblue: "#6a5acd",
|
|
1916
|
+
slategray: "#708090",
|
|
1917
|
+
slategrey: "#708090",
|
|
1918
|
+
snow: "#fffafa",
|
|
1919
|
+
springgreen: "#00ff7f",
|
|
1920
|
+
steelblue: "#4682b4",
|
|
1921
|
+
tan: "#d2b48c",
|
|
1922
|
+
teal: "#008080",
|
|
1923
|
+
thistle: "#d8bfd8",
|
|
1924
|
+
tomato: "#ff6347",
|
|
1925
|
+
turquoise: "#40e0d0",
|
|
1926
|
+
violet: "#ee82ee",
|
|
1927
|
+
wheat: "#f5deb3",
|
|
1928
|
+
white: "#ffffff",
|
|
1929
|
+
whitesmoke: "#f5f5f5",
|
|
1930
|
+
yellow: "#ffff00",
|
|
1931
|
+
yellowgreen: "#9acd32"
|
|
1932
|
+
};
|
|
1933
|
+
function inputToRGB(color) {
|
|
1934
|
+
var rgb = { r: 0, g: 0, b: 0 };
|
|
1935
|
+
var a = 1;
|
|
1936
|
+
var s = null;
|
|
1937
|
+
var v = null;
|
|
1938
|
+
var l = null;
|
|
1939
|
+
var ok = false;
|
|
1940
|
+
var format = false;
|
|
1941
|
+
if (typeof color === "string") {
|
|
1942
|
+
color = stringInputToObject(color);
|
|
1943
|
+
}
|
|
1944
|
+
if (typeof color === "object") {
|
|
1945
|
+
if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
|
|
1946
|
+
rgb = rgbToRgb(color.r, color.g, color.b);
|
|
1947
|
+
ok = true;
|
|
1948
|
+
format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
|
|
1949
|
+
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
|
|
1950
|
+
s = convertToPercentage(color.s);
|
|
1951
|
+
v = convertToPercentage(color.v);
|
|
1952
|
+
rgb = hsvToRgb(color.h, s, v);
|
|
1953
|
+
ok = true;
|
|
1954
|
+
format = "hsv";
|
|
1955
|
+
} else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
|
|
1956
|
+
s = convertToPercentage(color.s);
|
|
1957
|
+
l = convertToPercentage(color.l);
|
|
1958
|
+
rgb = hslToRgb(color.h, s, l);
|
|
1959
|
+
ok = true;
|
|
1960
|
+
format = "hsl";
|
|
1961
|
+
}
|
|
1962
|
+
if (Object.prototype.hasOwnProperty.call(color, "a")) {
|
|
1963
|
+
a = color.a;
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
a = boundAlpha(a);
|
|
1967
|
+
return {
|
|
1968
|
+
ok,
|
|
1969
|
+
format: color.format || format,
|
|
1970
|
+
r: Math.min(255, Math.max(rgb.r, 0)),
|
|
1971
|
+
g: Math.min(255, Math.max(rgb.g, 0)),
|
|
1972
|
+
b: Math.min(255, Math.max(rgb.b, 0)),
|
|
1973
|
+
a
|
|
1974
|
+
};
|
|
1975
|
+
}
|
|
1976
|
+
var CSS_INTEGER = "[-\\+]?\\d+%?";
|
|
1977
|
+
var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
|
|
1978
|
+
var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
|
|
1979
|
+
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
1980
|
+
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
|
|
1981
|
+
var matchers = {
|
|
1982
|
+
CSS_UNIT: new RegExp(CSS_UNIT),
|
|
1983
|
+
rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
|
|
1984
|
+
rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
|
|
1985
|
+
hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
|
|
1986
|
+
hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
|
|
1987
|
+
hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
|
|
1988
|
+
hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
|
|
1989
|
+
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1990
|
+
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1991
|
+
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1992
|
+
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1993
|
+
};
|
|
1994
|
+
function stringInputToObject(color) {
|
|
1995
|
+
color = color.trim().toLowerCase();
|
|
1996
|
+
if (color.length === 0) {
|
|
1997
|
+
return false;
|
|
1998
|
+
}
|
|
1999
|
+
var named = false;
|
|
2000
|
+
if (names[color]) {
|
|
2001
|
+
color = names[color];
|
|
2002
|
+
named = true;
|
|
2003
|
+
} else if (color === "transparent") {
|
|
2004
|
+
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
2005
|
+
}
|
|
2006
|
+
var match = matchers.rgb.exec(color);
|
|
2007
|
+
if (match) {
|
|
2008
|
+
return { r: match[1], g: match[2], b: match[3] };
|
|
2009
|
+
}
|
|
2010
|
+
match = matchers.rgba.exec(color);
|
|
2011
|
+
if (match) {
|
|
2012
|
+
return { r: match[1], g: match[2], b: match[3], a: match[4] };
|
|
2013
|
+
}
|
|
2014
|
+
match = matchers.hsl.exec(color);
|
|
2015
|
+
if (match) {
|
|
2016
|
+
return { h: match[1], s: match[2], l: match[3] };
|
|
2017
|
+
}
|
|
2018
|
+
match = matchers.hsla.exec(color);
|
|
2019
|
+
if (match) {
|
|
2020
|
+
return { h: match[1], s: match[2], l: match[3], a: match[4] };
|
|
2021
|
+
}
|
|
2022
|
+
match = matchers.hsv.exec(color);
|
|
2023
|
+
if (match) {
|
|
2024
|
+
return { h: match[1], s: match[2], v: match[3] };
|
|
2025
|
+
}
|
|
2026
|
+
match = matchers.hsva.exec(color);
|
|
2027
|
+
if (match) {
|
|
2028
|
+
return { h: match[1], s: match[2], v: match[3], a: match[4] };
|
|
2029
|
+
}
|
|
2030
|
+
match = matchers.hex8.exec(color);
|
|
2031
|
+
if (match) {
|
|
2032
|
+
return {
|
|
2033
|
+
r: parseIntFromHex(match[1]),
|
|
2034
|
+
g: parseIntFromHex(match[2]),
|
|
2035
|
+
b: parseIntFromHex(match[3]),
|
|
2036
|
+
a: convertHexToDecimal(match[4]),
|
|
2037
|
+
format: named ? "name" : "hex8"
|
|
2038
|
+
};
|
|
2039
|
+
}
|
|
2040
|
+
match = matchers.hex6.exec(color);
|
|
2041
|
+
if (match) {
|
|
2042
|
+
return {
|
|
2043
|
+
r: parseIntFromHex(match[1]),
|
|
2044
|
+
g: parseIntFromHex(match[2]),
|
|
2045
|
+
b: parseIntFromHex(match[3]),
|
|
2046
|
+
format: named ? "name" : "hex"
|
|
2047
|
+
};
|
|
2048
|
+
}
|
|
2049
|
+
match = matchers.hex4.exec(color);
|
|
2050
|
+
if (match) {
|
|
2051
|
+
return {
|
|
2052
|
+
r: parseIntFromHex(match[1] + match[1]),
|
|
2053
|
+
g: parseIntFromHex(match[2] + match[2]),
|
|
2054
|
+
b: parseIntFromHex(match[3] + match[3]),
|
|
2055
|
+
a: convertHexToDecimal(match[4] + match[4]),
|
|
2056
|
+
format: named ? "name" : "hex8"
|
|
2057
|
+
};
|
|
2058
|
+
}
|
|
2059
|
+
match = matchers.hex3.exec(color);
|
|
2060
|
+
if (match) {
|
|
2061
|
+
return {
|
|
2062
|
+
r: parseIntFromHex(match[1] + match[1]),
|
|
2063
|
+
g: parseIntFromHex(match[2] + match[2]),
|
|
2064
|
+
b: parseIntFromHex(match[3] + match[3]),
|
|
2065
|
+
format: named ? "name" : "hex"
|
|
2066
|
+
};
|
|
2067
|
+
}
|
|
2068
|
+
return false;
|
|
2069
|
+
}
|
|
2070
|
+
function isValidCSSUnit(color) {
|
|
2071
|
+
return Boolean(matchers.CSS_UNIT.exec(String(color)));
|
|
2072
|
+
}
|
|
2073
|
+
var hueStep = 2;
|
|
2074
|
+
var saturationStep = 0.16;
|
|
2075
|
+
var saturationStep2 = 0.05;
|
|
2076
|
+
var brightnessStep1 = 0.05;
|
|
2077
|
+
var brightnessStep2 = 0.15;
|
|
2078
|
+
var lightColorCount = 5;
|
|
2079
|
+
var darkColorCount = 4;
|
|
2080
|
+
var darkColorMap = [{
|
|
2081
|
+
index: 7,
|
|
2082
|
+
opacity: 0.15
|
|
2083
|
+
}, {
|
|
2084
|
+
index: 6,
|
|
2085
|
+
opacity: 0.25
|
|
2086
|
+
}, {
|
|
2087
|
+
index: 5,
|
|
2088
|
+
opacity: 0.3
|
|
2089
|
+
}, {
|
|
2090
|
+
index: 5,
|
|
2091
|
+
opacity: 0.45
|
|
2092
|
+
}, {
|
|
2093
|
+
index: 5,
|
|
2094
|
+
opacity: 0.65
|
|
2095
|
+
}, {
|
|
2096
|
+
index: 5,
|
|
2097
|
+
opacity: 0.85
|
|
2098
|
+
}, {
|
|
2099
|
+
index: 4,
|
|
2100
|
+
opacity: 0.9
|
|
2101
|
+
}, {
|
|
2102
|
+
index: 3,
|
|
2103
|
+
opacity: 0.95
|
|
2104
|
+
}, {
|
|
2105
|
+
index: 2,
|
|
2106
|
+
opacity: 0.97
|
|
2107
|
+
}, {
|
|
2108
|
+
index: 1,
|
|
2109
|
+
opacity: 0.98
|
|
2110
|
+
}];
|
|
2111
|
+
function toHsv(_ref) {
|
|
2112
|
+
var r = _ref.r, g = _ref.g, b = _ref.b;
|
|
2113
|
+
var hsv = rgbToHsv(r, g, b);
|
|
2114
|
+
return {
|
|
2115
|
+
h: hsv.h * 360,
|
|
2116
|
+
s: hsv.s,
|
|
2117
|
+
v: hsv.v
|
|
2118
|
+
};
|
|
2119
|
+
}
|
|
2120
|
+
function toHex(_ref2) {
|
|
2121
|
+
var r = _ref2.r, g = _ref2.g, b = _ref2.b;
|
|
2122
|
+
return "#".concat(rgbToHex(r, g, b, false));
|
|
2123
|
+
}
|
|
2124
|
+
function mix(rgb1, rgb2, amount) {
|
|
2125
|
+
var p = amount / 100;
|
|
2126
|
+
var rgb = {
|
|
2127
|
+
r: (rgb2.r - rgb1.r) * p + rgb1.r,
|
|
2128
|
+
g: (rgb2.g - rgb1.g) * p + rgb1.g,
|
|
2129
|
+
b: (rgb2.b - rgb1.b) * p + rgb1.b
|
|
2130
|
+
};
|
|
2131
|
+
return rgb;
|
|
2132
|
+
}
|
|
2133
|
+
function getHue(hsv, i, light) {
|
|
2134
|
+
var hue;
|
|
2135
|
+
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
|
|
2136
|
+
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
|
|
2137
|
+
} else {
|
|
2138
|
+
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
|
|
2139
|
+
}
|
|
2140
|
+
if (hue < 0) {
|
|
2141
|
+
hue += 360;
|
|
2142
|
+
} else if (hue >= 360) {
|
|
2143
|
+
hue -= 360;
|
|
2144
|
+
}
|
|
2145
|
+
return hue;
|
|
2146
|
+
}
|
|
2147
|
+
function getSaturation(hsv, i, light) {
|
|
2148
|
+
if (hsv.h === 0 && hsv.s === 0) {
|
|
2149
|
+
return hsv.s;
|
|
2150
|
+
}
|
|
2151
|
+
var saturation;
|
|
2152
|
+
if (light) {
|
|
2153
|
+
saturation = hsv.s - saturationStep * i;
|
|
2154
|
+
} else if (i === darkColorCount) {
|
|
2155
|
+
saturation = hsv.s + saturationStep;
|
|
2156
|
+
} else {
|
|
2157
|
+
saturation = hsv.s + saturationStep2 * i;
|
|
2158
|
+
}
|
|
2159
|
+
if (saturation > 1) {
|
|
2160
|
+
saturation = 1;
|
|
2161
|
+
}
|
|
2162
|
+
if (light && i === lightColorCount && saturation > 0.1) {
|
|
2163
|
+
saturation = 0.1;
|
|
2164
|
+
}
|
|
2165
|
+
if (saturation < 0.06) {
|
|
2166
|
+
saturation = 0.06;
|
|
2167
|
+
}
|
|
2168
|
+
return Number(saturation.toFixed(2));
|
|
2169
|
+
}
|
|
2170
|
+
function getValue$1(hsv, i, light) {
|
|
2171
|
+
var value;
|
|
2172
|
+
if (light) {
|
|
2173
|
+
value = hsv.v + brightnessStep1 * i;
|
|
2174
|
+
} else {
|
|
2175
|
+
value = hsv.v - brightnessStep2 * i;
|
|
2176
|
+
}
|
|
2177
|
+
if (value > 1) {
|
|
2178
|
+
value = 1;
|
|
2179
|
+
}
|
|
2180
|
+
return Number(value.toFixed(2));
|
|
2181
|
+
}
|
|
2182
|
+
function generate$1(color) {
|
|
2183
|
+
var opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2184
|
+
var patterns = [];
|
|
2185
|
+
var pColor = inputToRGB(color);
|
|
2186
|
+
for (var i = lightColorCount; i > 0; i -= 1) {
|
|
2187
|
+
var hsv = toHsv(pColor);
|
|
2188
|
+
var colorString = toHex(inputToRGB({
|
|
2189
|
+
h: getHue(hsv, i, true),
|
|
2190
|
+
s: getSaturation(hsv, i, true),
|
|
2191
|
+
v: getValue$1(hsv, i, true)
|
|
2192
|
+
}));
|
|
2193
|
+
patterns.push(colorString);
|
|
2194
|
+
}
|
|
2195
|
+
patterns.push(toHex(pColor));
|
|
2196
|
+
for (var _i = 1; _i <= darkColorCount; _i += 1) {
|
|
2197
|
+
var _hsv = toHsv(pColor);
|
|
2198
|
+
var _colorString = toHex(inputToRGB({
|
|
2199
|
+
h: getHue(_hsv, _i),
|
|
2200
|
+
s: getSaturation(_hsv, _i),
|
|
2201
|
+
v: getValue$1(_hsv, _i)
|
|
2202
|
+
}));
|
|
2203
|
+
patterns.push(_colorString);
|
|
2204
|
+
}
|
|
2205
|
+
if (opts.theme === "dark") {
|
|
2206
|
+
return darkColorMap.map(function(_ref3) {
|
|
2207
|
+
var index2 = _ref3.index, opacity = _ref3.opacity;
|
|
2208
|
+
var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || "#141414"), inputToRGB(patterns[index2]), opacity * 100));
|
|
2209
|
+
return darkColorString;
|
|
2210
|
+
});
|
|
2211
|
+
}
|
|
2212
|
+
return patterns;
|
|
2213
|
+
}
|
|
2214
|
+
var presetPrimaryColors = {
|
|
2215
|
+
red: "#F5222D",
|
|
2216
|
+
volcano: "#FA541C",
|
|
2217
|
+
orange: "#FA8C16",
|
|
2218
|
+
gold: "#FAAD14",
|
|
2219
|
+
yellow: "#FADB14",
|
|
2220
|
+
lime: "#A0D911",
|
|
2221
|
+
green: "#52C41A",
|
|
2222
|
+
cyan: "#13C2C2",
|
|
2223
|
+
blue: "#1890FF",
|
|
2224
|
+
geekblue: "#2F54EB",
|
|
2225
|
+
purple: "#722ED1",
|
|
2226
|
+
magenta: "#EB2F96",
|
|
2227
|
+
grey: "#666666"
|
|
2228
|
+
};
|
|
2229
|
+
var presetPalettes = {};
|
|
2230
|
+
var presetDarkPalettes = {};
|
|
2231
|
+
Object.keys(presetPrimaryColors).forEach(function(key2) {
|
|
2232
|
+
presetPalettes[key2] = generate$1(presetPrimaryColors[key2]);
|
|
2233
|
+
presetPalettes[key2].primary = presetPalettes[key2][5];
|
|
2234
|
+
presetDarkPalettes[key2] = generate$1(presetPrimaryColors[key2], {
|
|
2235
|
+
theme: "dark",
|
|
2236
|
+
backgroundColor: "#141414"
|
|
2237
|
+
});
|
|
2238
|
+
presetDarkPalettes[key2].primary = presetDarkPalettes[key2][5];
|
|
2239
|
+
});
|
|
2240
|
+
var containers = [];
|
|
2241
|
+
var styleElements = [];
|
|
2242
|
+
var usage = "insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";
|
|
2243
|
+
function createStyleElement() {
|
|
2244
|
+
var styleElement = document.createElement("style");
|
|
2245
|
+
styleElement.setAttribute("type", "text/css");
|
|
2246
|
+
return styleElement;
|
|
2247
|
+
}
|
|
2248
|
+
function insertCss(css, options) {
|
|
2249
|
+
options = options || {};
|
|
2250
|
+
if (css === void 0) {
|
|
2251
|
+
throw new Error(usage);
|
|
2252
|
+
}
|
|
2253
|
+
var position2 = options.prepend === true ? "prepend" : "append";
|
|
2254
|
+
var container = options.container !== void 0 ? options.container : document.querySelector("head");
|
|
2255
|
+
var containerId = containers.indexOf(container);
|
|
2256
|
+
if (containerId === -1) {
|
|
2257
|
+
containerId = containers.push(container) - 1;
|
|
2258
|
+
styleElements[containerId] = {};
|
|
2259
|
+
}
|
|
2260
|
+
var styleElement;
|
|
2261
|
+
if (styleElements[containerId] !== void 0 && styleElements[containerId][position2] !== void 0) {
|
|
2262
|
+
styleElement = styleElements[containerId][position2];
|
|
2263
|
+
} else {
|
|
2264
|
+
styleElement = styleElements[containerId][position2] = createStyleElement();
|
|
2265
|
+
if (position2 === "prepend") {
|
|
2266
|
+
container.insertBefore(styleElement, container.childNodes[0]);
|
|
2267
|
+
} else {
|
|
2268
|
+
container.appendChild(styleElement);
|
|
2269
|
+
}
|
|
2270
|
+
}
|
|
2271
|
+
if (css.charCodeAt(0) === 65279) {
|
|
2272
|
+
css = css.substr(1, css.length);
|
|
2273
|
+
}
|
|
2274
|
+
if (styleElement.styleSheet) {
|
|
2275
|
+
styleElement.styleSheet.cssText += css;
|
|
2276
|
+
} else {
|
|
2277
|
+
styleElement.textContent += css;
|
|
2278
|
+
}
|
|
2279
|
+
return styleElement;
|
|
2280
|
+
}
|
|
2281
|
+
function _objectSpread$6(target) {
|
|
2282
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2283
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
2284
|
+
var ownKeys = Object.keys(source);
|
|
2285
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
2286
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
2287
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
2288
|
+
}));
|
|
2289
|
+
}
|
|
2290
|
+
ownKeys.forEach(function(key2) {
|
|
2291
|
+
_defineProperty$6(target, key2, source[key2]);
|
|
2292
|
+
});
|
|
2293
|
+
}
|
|
2294
|
+
return target;
|
|
2295
|
+
}
|
|
2296
|
+
function _defineProperty$6(obj, key2, value) {
|
|
2297
|
+
if (key2 in obj) {
|
|
2298
|
+
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
2299
|
+
} else {
|
|
2300
|
+
obj[key2] = value;
|
|
2301
|
+
}
|
|
2302
|
+
return obj;
|
|
2303
|
+
}
|
|
2304
|
+
function warn(valid, message) {
|
|
2305
|
+
if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
|
|
2306
|
+
console.error("Warning: ".concat(message));
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
function warning(valid, message) {
|
|
2310
|
+
warn(valid, "[@ant-design/icons-vue] ".concat(message));
|
|
2311
|
+
}
|
|
2312
|
+
function isIconDefinition(target) {
|
|
2313
|
+
return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
|
|
2314
|
+
}
|
|
2315
|
+
function generate(node, key2, rootProps) {
|
|
2316
|
+
if (!rootProps) {
|
|
2317
|
+
return h(node.tag, _objectSpread$6({
|
|
2318
|
+
key: key2
|
|
2319
|
+
}, node.attrs), (node.children || []).map(function(child, index2) {
|
|
2320
|
+
return generate(child, "".concat(key2, "-").concat(node.tag, "-").concat(index2));
|
|
2321
|
+
}));
|
|
2322
|
+
}
|
|
2323
|
+
return h(node.tag, _objectSpread$6({
|
|
2324
|
+
key: key2
|
|
2325
|
+
}, rootProps, node.attrs), (node.children || []).map(function(child, index2) {
|
|
2326
|
+
return generate(child, "".concat(key2, "-").concat(node.tag, "-").concat(index2));
|
|
2327
|
+
}));
|
|
2328
|
+
}
|
|
2329
|
+
function getSecondaryColor(primaryColor) {
|
|
2330
|
+
return generate$1(primaryColor)[0];
|
|
2331
|
+
}
|
|
2332
|
+
function normalizeTwoToneColors(twoToneColor) {
|
|
2333
|
+
if (!twoToneColor) {
|
|
2334
|
+
return [];
|
|
2335
|
+
}
|
|
2336
|
+
return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
|
|
2337
|
+
}
|
|
2338
|
+
var iconStyles = "\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
|
|
2339
|
+
var cssInjectedFlag = false;
|
|
2340
|
+
var useInsertStyles = function useInsertStyles2() {
|
|
2341
|
+
var styleStr = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : iconStyles;
|
|
2342
|
+
nextTick(function() {
|
|
2343
|
+
if (!cssInjectedFlag) {
|
|
2344
|
+
if (typeof window !== "undefined" && window.document && window.document.documentElement) {
|
|
2345
|
+
insertCss(styleStr, {
|
|
2346
|
+
prepend: true
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
cssInjectedFlag = true;
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
};
|
|
2353
|
+
var _excluded$1 = ["icon", "primaryColor", "secondaryColor"];
|
|
2354
|
+
function _objectWithoutProperties$1(source, excluded) {
|
|
2355
|
+
if (source == null)
|
|
2356
|
+
return {};
|
|
2357
|
+
var target = _objectWithoutPropertiesLoose$1(source, excluded);
|
|
2358
|
+
var key2, i;
|
|
2359
|
+
if (Object.getOwnPropertySymbols) {
|
|
2360
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
2361
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
2362
|
+
key2 = sourceSymbolKeys[i];
|
|
2363
|
+
if (excluded.indexOf(key2) >= 0)
|
|
2364
|
+
continue;
|
|
2365
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key2))
|
|
2366
|
+
continue;
|
|
2367
|
+
target[key2] = source[key2];
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
return target;
|
|
2371
|
+
}
|
|
2372
|
+
function _objectWithoutPropertiesLoose$1(source, excluded) {
|
|
2373
|
+
if (source == null)
|
|
2374
|
+
return {};
|
|
2375
|
+
var target = {};
|
|
2376
|
+
var sourceKeys = Object.keys(source);
|
|
2377
|
+
var key2, i;
|
|
2378
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
2379
|
+
key2 = sourceKeys[i];
|
|
2380
|
+
if (excluded.indexOf(key2) >= 0)
|
|
2381
|
+
continue;
|
|
2382
|
+
target[key2] = source[key2];
|
|
2383
|
+
}
|
|
2384
|
+
return target;
|
|
2385
|
+
}
|
|
2386
|
+
function _objectSpread$5(target) {
|
|
2387
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2388
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
2389
|
+
var ownKeys = Object.keys(source);
|
|
2390
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
2391
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
2392
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
2393
|
+
}));
|
|
2394
|
+
}
|
|
2395
|
+
ownKeys.forEach(function(key2) {
|
|
2396
|
+
_defineProperty$5(target, key2, source[key2]);
|
|
2397
|
+
});
|
|
2398
|
+
}
|
|
2399
|
+
return target;
|
|
2400
|
+
}
|
|
2401
|
+
function _defineProperty$5(obj, key2, value) {
|
|
2402
|
+
if (key2 in obj) {
|
|
2403
|
+
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
2404
|
+
} else {
|
|
2405
|
+
obj[key2] = value;
|
|
2406
|
+
}
|
|
2407
|
+
return obj;
|
|
2408
|
+
}
|
|
2409
|
+
var twoToneColorPalette = {
|
|
2410
|
+
primaryColor: "#333",
|
|
2411
|
+
secondaryColor: "#E6E6E6",
|
|
2412
|
+
calculated: false
|
|
2413
|
+
};
|
|
2414
|
+
function setTwoToneColors(_ref) {
|
|
2415
|
+
var primaryColor = _ref.primaryColor, secondaryColor = _ref.secondaryColor;
|
|
2416
|
+
twoToneColorPalette.primaryColor = primaryColor;
|
|
2417
|
+
twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
|
|
2418
|
+
twoToneColorPalette.calculated = !!secondaryColor;
|
|
2419
|
+
}
|
|
2420
|
+
function getTwoToneColors() {
|
|
2421
|
+
return _objectSpread$5({}, twoToneColorPalette);
|
|
2422
|
+
}
|
|
2423
|
+
var IconBase = function IconBase2(props2, context) {
|
|
2424
|
+
var _props$context$attrs = _objectSpread$5({}, props2, context.attrs), icon = _props$context$attrs.icon, primaryColor = _props$context$attrs.primaryColor, secondaryColor = _props$context$attrs.secondaryColor, restProps = _objectWithoutProperties$1(_props$context$attrs, _excluded$1);
|
|
2425
|
+
var colors = twoToneColorPalette;
|
|
2426
|
+
if (primaryColor) {
|
|
2427
|
+
colors = {
|
|
2428
|
+
primaryColor,
|
|
2429
|
+
secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
|
|
2430
|
+
};
|
|
2431
|
+
}
|
|
2432
|
+
useInsertStyles();
|
|
2433
|
+
warning(isIconDefinition(icon), "icon should be icon definiton, but got ".concat(icon));
|
|
2434
|
+
if (!isIconDefinition(icon)) {
|
|
2435
|
+
return null;
|
|
2436
|
+
}
|
|
2437
|
+
var target = icon;
|
|
2438
|
+
if (target && typeof target.icon === "function") {
|
|
2439
|
+
target = _objectSpread$5({}, target, {
|
|
2440
|
+
icon: target.icon(colors.primaryColor, colors.secondaryColor)
|
|
2441
|
+
});
|
|
2442
|
+
}
|
|
2443
|
+
return generate(target.icon, "svg-".concat(target.name), _objectSpread$5({}, restProps, {
|
|
2444
|
+
"data-icon": target.name,
|
|
2445
|
+
width: "1em",
|
|
2446
|
+
height: "1em",
|
|
2447
|
+
fill: "currentColor",
|
|
2448
|
+
"aria-hidden": "true"
|
|
2449
|
+
}));
|
|
2450
|
+
};
|
|
2451
|
+
IconBase.props = {
|
|
2452
|
+
icon: Object,
|
|
2453
|
+
primaryColor: String,
|
|
2454
|
+
secondaryColor: String,
|
|
2455
|
+
focusable: String
|
|
2456
|
+
};
|
|
2457
|
+
IconBase.inheritAttrs = false;
|
|
2458
|
+
IconBase.displayName = "IconBase";
|
|
2459
|
+
IconBase.getTwoToneColors = getTwoToneColors;
|
|
2460
|
+
IconBase.setTwoToneColors = setTwoToneColors;
|
|
2461
|
+
const VueIcon = IconBase;
|
|
2462
|
+
function _slicedToArray$1(arr, i) {
|
|
2463
|
+
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
|
|
2464
|
+
}
|
|
2465
|
+
function _nonIterableRest$1() {
|
|
2466
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2467
|
+
}
|
|
2468
|
+
function _unsupportedIterableToArray$1(o, minLen) {
|
|
2469
|
+
if (!o)
|
|
2470
|
+
return;
|
|
2471
|
+
if (typeof o === "string")
|
|
2472
|
+
return _arrayLikeToArray$1(o, minLen);
|
|
2473
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2474
|
+
if (n === "Object" && o.constructor)
|
|
2475
|
+
n = o.constructor.name;
|
|
2476
|
+
if (n === "Map" || n === "Set")
|
|
2477
|
+
return Array.from(o);
|
|
2478
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
2479
|
+
return _arrayLikeToArray$1(o, minLen);
|
|
2480
|
+
}
|
|
2481
|
+
function _arrayLikeToArray$1(arr, len) {
|
|
2482
|
+
if (len == null || len > arr.length)
|
|
2483
|
+
len = arr.length;
|
|
2484
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2485
|
+
arr2[i] = arr[i];
|
|
2486
|
+
}
|
|
2487
|
+
return arr2;
|
|
2488
|
+
}
|
|
2489
|
+
function _iterableToArrayLimit$1(arr, i) {
|
|
2490
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2491
|
+
if (_i == null)
|
|
2492
|
+
return;
|
|
2493
|
+
var _arr = [];
|
|
2494
|
+
var _n = true;
|
|
2495
|
+
var _d = false;
|
|
2496
|
+
var _s, _e;
|
|
2497
|
+
try {
|
|
2498
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2499
|
+
_arr.push(_s.value);
|
|
2500
|
+
if (i && _arr.length === i)
|
|
2501
|
+
break;
|
|
2502
|
+
}
|
|
2503
|
+
} catch (err) {
|
|
2504
|
+
_d = true;
|
|
2505
|
+
_e = err;
|
|
2506
|
+
} finally {
|
|
2507
|
+
try {
|
|
2508
|
+
if (!_n && _i["return"] != null)
|
|
2509
|
+
_i["return"]();
|
|
2510
|
+
} finally {
|
|
2511
|
+
if (_d)
|
|
2512
|
+
throw _e;
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2515
|
+
return _arr;
|
|
2516
|
+
}
|
|
2517
|
+
function _arrayWithHoles$1(arr) {
|
|
2518
|
+
if (Array.isArray(arr))
|
|
2519
|
+
return arr;
|
|
2520
|
+
}
|
|
2521
|
+
function setTwoToneColor(twoToneColor) {
|
|
2522
|
+
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray$1(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
|
|
2523
|
+
return VueIcon.setTwoToneColors({
|
|
2524
|
+
primaryColor,
|
|
2525
|
+
secondaryColor
|
|
2526
|
+
});
|
|
2527
|
+
}
|
|
2528
|
+
function getTwoToneColor() {
|
|
2529
|
+
var colors = VueIcon.getTwoToneColors();
|
|
2530
|
+
if (!colors.calculated) {
|
|
2531
|
+
return colors.primaryColor;
|
|
2532
|
+
}
|
|
2533
|
+
return [colors.primaryColor, colors.secondaryColor];
|
|
2534
|
+
}
|
|
2535
|
+
var _excluded = ["class", "icon", "spin", "rotate", "tabindex", "twoToneColor", "onClick"];
|
|
2536
|
+
function _slicedToArray(arr, i) {
|
|
2537
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
2538
|
+
}
|
|
2539
|
+
function _nonIterableRest() {
|
|
2540
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2541
|
+
}
|
|
2542
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
2543
|
+
if (!o)
|
|
2544
|
+
return;
|
|
2545
|
+
if (typeof o === "string")
|
|
2546
|
+
return _arrayLikeToArray(o, minLen);
|
|
2547
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2548
|
+
if (n === "Object" && o.constructor)
|
|
2549
|
+
n = o.constructor.name;
|
|
2550
|
+
if (n === "Map" || n === "Set")
|
|
2551
|
+
return Array.from(o);
|
|
2552
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
2553
|
+
return _arrayLikeToArray(o, minLen);
|
|
2554
|
+
}
|
|
2555
|
+
function _arrayLikeToArray(arr, len) {
|
|
2556
|
+
if (len == null || len > arr.length)
|
|
2557
|
+
len = arr.length;
|
|
2558
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
2559
|
+
arr2[i] = arr[i];
|
|
2560
|
+
}
|
|
2561
|
+
return arr2;
|
|
2562
|
+
}
|
|
2563
|
+
function _iterableToArrayLimit(arr, i) {
|
|
2564
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
2565
|
+
if (_i == null)
|
|
2566
|
+
return;
|
|
2567
|
+
var _arr = [];
|
|
2568
|
+
var _n = true;
|
|
2569
|
+
var _d = false;
|
|
2570
|
+
var _s, _e;
|
|
2571
|
+
try {
|
|
2572
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
2573
|
+
_arr.push(_s.value);
|
|
2574
|
+
if (i && _arr.length === i)
|
|
2575
|
+
break;
|
|
2576
|
+
}
|
|
2577
|
+
} catch (err) {
|
|
2578
|
+
_d = true;
|
|
2579
|
+
_e = err;
|
|
2580
|
+
} finally {
|
|
2581
|
+
try {
|
|
2582
|
+
if (!_n && _i["return"] != null)
|
|
2583
|
+
_i["return"]();
|
|
2584
|
+
} finally {
|
|
2585
|
+
if (_d)
|
|
2586
|
+
throw _e;
|
|
2587
|
+
}
|
|
2588
|
+
}
|
|
2589
|
+
return _arr;
|
|
2590
|
+
}
|
|
2591
|
+
function _arrayWithHoles(arr) {
|
|
2592
|
+
if (Array.isArray(arr))
|
|
2593
|
+
return arr;
|
|
2594
|
+
}
|
|
2595
|
+
function _objectSpread$4(target) {
|
|
2596
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2597
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
2598
|
+
var ownKeys = Object.keys(source);
|
|
2599
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
2600
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
2601
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
2602
|
+
}));
|
|
2603
|
+
}
|
|
2604
|
+
ownKeys.forEach(function(key2) {
|
|
2605
|
+
_defineProperty$4(target, key2, source[key2]);
|
|
2606
|
+
});
|
|
2607
|
+
}
|
|
2608
|
+
return target;
|
|
2609
|
+
}
|
|
2610
|
+
function _defineProperty$4(obj, key2, value) {
|
|
2611
|
+
if (key2 in obj) {
|
|
2612
|
+
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
2613
|
+
} else {
|
|
2614
|
+
obj[key2] = value;
|
|
2615
|
+
}
|
|
2616
|
+
return obj;
|
|
2617
|
+
}
|
|
2618
|
+
function _objectWithoutProperties(source, excluded) {
|
|
2619
|
+
if (source == null)
|
|
2620
|
+
return {};
|
|
2621
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
2622
|
+
var key2, i;
|
|
2623
|
+
if (Object.getOwnPropertySymbols) {
|
|
2624
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
2625
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
2626
|
+
key2 = sourceSymbolKeys[i];
|
|
2627
|
+
if (excluded.indexOf(key2) >= 0)
|
|
2628
|
+
continue;
|
|
2629
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key2))
|
|
2630
|
+
continue;
|
|
2631
|
+
target[key2] = source[key2];
|
|
2632
|
+
}
|
|
2633
|
+
}
|
|
2634
|
+
return target;
|
|
2635
|
+
}
|
|
2636
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2637
|
+
if (source == null)
|
|
2638
|
+
return {};
|
|
2639
|
+
var target = {};
|
|
2640
|
+
var sourceKeys = Object.keys(source);
|
|
2641
|
+
var key2, i;
|
|
2642
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
2643
|
+
key2 = sourceKeys[i];
|
|
2644
|
+
if (excluded.indexOf(key2) >= 0)
|
|
2645
|
+
continue;
|
|
2646
|
+
target[key2] = source[key2];
|
|
2647
|
+
}
|
|
2648
|
+
return target;
|
|
2649
|
+
}
|
|
2650
|
+
setTwoToneColor("#1890ff");
|
|
2651
|
+
var Icon = function Icon2(props2, context) {
|
|
2652
|
+
var _classObj;
|
|
2653
|
+
var _props$context$attrs = _objectSpread$4({}, props2, context.attrs), cls = _props$context$attrs["class"], icon = _props$context$attrs.icon, spin = _props$context$attrs.spin, rotate = _props$context$attrs.rotate, tabindex = _props$context$attrs.tabindex, twoToneColor = _props$context$attrs.twoToneColor, onClick = _props$context$attrs.onClick, restProps = _objectWithoutProperties(_props$context$attrs, _excluded);
|
|
2654
|
+
var classObj = (_classObj = {
|
|
2655
|
+
anticon: true
|
|
2656
|
+
}, _defineProperty$4(_classObj, "anticon-".concat(icon.name), Boolean(icon.name)), _defineProperty$4(_classObj, cls, cls), _classObj);
|
|
2657
|
+
var svgClassString = spin === "" || !!spin || icon.name === "loading" ? "anticon-spin" : "";
|
|
2658
|
+
var iconTabIndex = tabindex;
|
|
2659
|
+
if (iconTabIndex === void 0 && onClick) {
|
|
2660
|
+
iconTabIndex = -1;
|
|
2661
|
+
restProps.tabindex = iconTabIndex;
|
|
2662
|
+
}
|
|
2663
|
+
var svgStyle = rotate ? {
|
|
2664
|
+
msTransform: "rotate(".concat(rotate, "deg)"),
|
|
2665
|
+
transform: "rotate(".concat(rotate, "deg)")
|
|
2666
|
+
} : void 0;
|
|
2667
|
+
var _normalizeTwoToneColo = normalizeTwoToneColors(twoToneColor), _normalizeTwoToneColo2 = _slicedToArray(_normalizeTwoToneColo, 2), primaryColor = _normalizeTwoToneColo2[0], secondaryColor = _normalizeTwoToneColo2[1];
|
|
2668
|
+
return createVNode("span", _objectSpread$4({
|
|
2669
|
+
"role": "img",
|
|
2670
|
+
"aria-label": icon.name
|
|
2671
|
+
}, restProps, {
|
|
2672
|
+
"onClick": onClick,
|
|
2673
|
+
"class": classObj
|
|
2674
|
+
}), [createVNode(VueIcon, {
|
|
2675
|
+
"class": svgClassString,
|
|
2676
|
+
"icon": icon,
|
|
2677
|
+
"primaryColor": primaryColor,
|
|
2678
|
+
"secondaryColor": secondaryColor,
|
|
2679
|
+
"style": svgStyle
|
|
2680
|
+
}, null)]);
|
|
2681
|
+
};
|
|
2682
|
+
Icon.props = {
|
|
2683
|
+
spin: Boolean,
|
|
2684
|
+
rotate: Number,
|
|
2685
|
+
icon: Object,
|
|
2686
|
+
twoToneColor: String
|
|
2687
|
+
};
|
|
2688
|
+
Icon.displayName = "AntdIcon";
|
|
2689
|
+
Icon.inheritAttrs = false;
|
|
2690
|
+
Icon.getTwoToneColor = getTwoToneColor;
|
|
2691
|
+
Icon.setTwoToneColor = setTwoToneColor;
|
|
2692
|
+
const AntdIcon = Icon;
|
|
2693
|
+
var CloseOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" } }] }, "name": "close", "theme": "outlined" };
|
|
2694
|
+
const CloseOutlinedSvg = CloseOutlined$2;
|
|
2695
|
+
function _objectSpread$3(target) {
|
|
2696
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2697
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
2698
|
+
var ownKeys = Object.keys(source);
|
|
2699
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
2700
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
2701
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
2702
|
+
}));
|
|
2703
|
+
}
|
|
2704
|
+
ownKeys.forEach(function(key2) {
|
|
2705
|
+
_defineProperty$3(target, key2, source[key2]);
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2708
|
+
return target;
|
|
2709
|
+
}
|
|
2710
|
+
function _defineProperty$3(obj, key2, value) {
|
|
2711
|
+
if (key2 in obj) {
|
|
2712
|
+
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
2713
|
+
} else {
|
|
2714
|
+
obj[key2] = value;
|
|
2715
|
+
}
|
|
2716
|
+
return obj;
|
|
2717
|
+
}
|
|
2718
|
+
var CloseOutlined = function CloseOutlined2(props2, context) {
|
|
2719
|
+
var p = _objectSpread$3({}, props2, context.attrs);
|
|
2720
|
+
return createVNode(AntdIcon, _objectSpread$3({}, p, {
|
|
2721
|
+
"icon": CloseOutlinedSvg
|
|
2722
|
+
}), null);
|
|
2723
|
+
};
|
|
2724
|
+
CloseOutlined.displayName = "CloseOutlined";
|
|
2725
|
+
CloseOutlined.inheritAttrs = false;
|
|
2726
|
+
const CloseOutlined$1 = CloseOutlined;
|
|
2727
|
+
var FullscreenExitOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M391 240.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L200 146.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L280 333.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L401 410c5.1.6 9.5-3.7 8.9-8.9L391 240.9zm10.1 373.2L240.8 633c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L146.3 824a8.03 8.03 0 000 11.3l42.4 42.3c3.1 3.1 8.2 3.1 11.3 0L333.7 744l43.7 43.7A8.01 8.01 0 00391 783l18.9-160.1c.6-5.1-3.7-9.4-8.8-8.8zm221.8-204.2L783.2 391c6.6-.8 9.4-8.9 4.7-13.6L744 333.6 877.7 200c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.3a8.03 8.03 0 00-11.3 0L690.3 279.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L614.1 401c-.6 5.2 3.7 9.5 8.8 8.9zM744 690.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L623 614c-5.1-.6-9.5 3.7-8.9 8.9L633 783.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L824 877.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L744 690.4z" } }] }, "name": "fullscreen-exit", "theme": "outlined" };
|
|
2728
|
+
const FullscreenExitOutlinedSvg = FullscreenExitOutlined$2;
|
|
2729
|
+
function _objectSpread$2(target) {
|
|
2730
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2731
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
2732
|
+
var ownKeys = Object.keys(source);
|
|
2733
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
2734
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
2735
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
2736
|
+
}));
|
|
2737
|
+
}
|
|
2738
|
+
ownKeys.forEach(function(key2) {
|
|
2739
|
+
_defineProperty$2(target, key2, source[key2]);
|
|
2740
|
+
});
|
|
2741
|
+
}
|
|
2742
|
+
return target;
|
|
2743
|
+
}
|
|
2744
|
+
function _defineProperty$2(obj, key2, value) {
|
|
2745
|
+
if (key2 in obj) {
|
|
2746
|
+
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
2747
|
+
} else {
|
|
2748
|
+
obj[key2] = value;
|
|
2749
|
+
}
|
|
2750
|
+
return obj;
|
|
2751
|
+
}
|
|
2752
|
+
var FullscreenExitOutlined = function FullscreenExitOutlined2(props2, context) {
|
|
2753
|
+
var p = _objectSpread$2({}, props2, context.attrs);
|
|
2754
|
+
return createVNode(AntdIcon, _objectSpread$2({}, p, {
|
|
2755
|
+
"icon": FullscreenExitOutlinedSvg
|
|
2756
|
+
}), null);
|
|
2757
|
+
};
|
|
2758
|
+
FullscreenExitOutlined.displayName = "FullscreenExitOutlined";
|
|
2759
|
+
FullscreenExitOutlined.inheritAttrs = false;
|
|
2760
|
+
const FullscreenExitOutlined$1 = FullscreenExitOutlined;
|
|
2761
|
+
var FullscreenOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M290 236.4l43.9-43.9a8.01 8.01 0 00-4.7-13.6L169 160c-5.1-.6-9.5 3.7-8.9 8.9L179 329.1c.8 6.6 8.9 9.4 13.6 4.7l43.7-43.7L370 423.7c3.1 3.1 8.2 3.1 11.3 0l42.4-42.3c3.1-3.1 3.1-8.2 0-11.3L290 236.4zm352.7 187.3c3.1 3.1 8.2 3.1 11.3 0l133.7-133.6 43.7 43.7a8.01 8.01 0 0013.6-4.7L863.9 169c.6-5.1-3.7-9.5-8.9-8.9L694.8 179c-6.6.8-9.4 8.9-4.7 13.6l43.9 43.9L600.3 370a8.03 8.03 0 000 11.3l42.4 42.4zM845 694.9c-.8-6.6-8.9-9.4-13.6-4.7l-43.7 43.7L654 600.3a8.03 8.03 0 00-11.3 0l-42.4 42.3a8.03 8.03 0 000 11.3L734 787.6l-43.9 43.9a8.01 8.01 0 004.7 13.6L855 864c5.1.6 9.5-3.7 8.9-8.9L845 694.9zm-463.7-94.6a8.03 8.03 0 00-11.3 0L236.3 733.9l-43.7-43.7a8.01 8.01 0 00-13.6 4.7L160.1 855c-.6 5.1 3.7 9.5 8.9 8.9L329.2 845c6.6-.8 9.4-8.9 4.7-13.6L290 787.6 423.7 654c3.1-3.1 3.1-8.2 0-11.3l-42.4-42.4z" } }] }, "name": "fullscreen", "theme": "outlined" };
|
|
2762
|
+
const FullscreenOutlinedSvg = FullscreenOutlined$2;
|
|
2763
|
+
function _objectSpread$1(target) {
|
|
2764
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2765
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
2766
|
+
var ownKeys = Object.keys(source);
|
|
2767
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
2768
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
2769
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
2770
|
+
}));
|
|
2771
|
+
}
|
|
2772
|
+
ownKeys.forEach(function(key2) {
|
|
2773
|
+
_defineProperty$1(target, key2, source[key2]);
|
|
2774
|
+
});
|
|
2775
|
+
}
|
|
2776
|
+
return target;
|
|
2777
|
+
}
|
|
2778
|
+
function _defineProperty$1(obj, key2, value) {
|
|
2779
|
+
if (key2 in obj) {
|
|
2780
|
+
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
2781
|
+
} else {
|
|
2782
|
+
obj[key2] = value;
|
|
2783
|
+
}
|
|
2784
|
+
return obj;
|
|
2785
|
+
}
|
|
2786
|
+
var FullscreenOutlined = function FullscreenOutlined2(props2, context) {
|
|
2787
|
+
var p = _objectSpread$1({}, props2, context.attrs);
|
|
2788
|
+
return createVNode(AntdIcon, _objectSpread$1({}, p, {
|
|
2789
|
+
"icon": FullscreenOutlinedSvg
|
|
2790
|
+
}), null);
|
|
2791
|
+
};
|
|
2792
|
+
FullscreenOutlined.displayName = "FullscreenOutlined";
|
|
2793
|
+
FullscreenOutlined.inheritAttrs = false;
|
|
2794
|
+
const FullscreenOutlined$1 = FullscreenOutlined;
|
|
2795
|
+
var InfoCircleOutlined$2 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" };
|
|
2796
|
+
const InfoCircleOutlinedSvg = InfoCircleOutlined$2;
|
|
2797
|
+
function _objectSpread(target) {
|
|
2798
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
2799
|
+
var source = arguments[i] != null ? Object(arguments[i]) : {};
|
|
2800
|
+
var ownKeys = Object.keys(source);
|
|
2801
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
2802
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
2803
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
2804
|
+
}));
|
|
2805
|
+
}
|
|
2806
|
+
ownKeys.forEach(function(key2) {
|
|
2807
|
+
_defineProperty(target, key2, source[key2]);
|
|
2808
|
+
});
|
|
2809
|
+
}
|
|
2810
|
+
return target;
|
|
2811
|
+
}
|
|
2812
|
+
function _defineProperty(obj, key2, value) {
|
|
2813
|
+
if (key2 in obj) {
|
|
2814
|
+
Object.defineProperty(obj, key2, { value, enumerable: true, configurable: true, writable: true });
|
|
2815
|
+
} else {
|
|
2816
|
+
obj[key2] = value;
|
|
2817
|
+
}
|
|
2818
|
+
return obj;
|
|
2819
|
+
}
|
|
2820
|
+
var InfoCircleOutlined = function InfoCircleOutlined2(props2, context) {
|
|
2821
|
+
var p = _objectSpread({}, props2, context.attrs);
|
|
2822
|
+
return createVNode(AntdIcon, _objectSpread({}, p, {
|
|
2823
|
+
"icon": InfoCircleOutlinedSvg
|
|
2824
|
+
}), null);
|
|
2825
|
+
};
|
|
2826
|
+
InfoCircleOutlined.displayName = "InfoCircleOutlined";
|
|
2827
|
+
InfoCircleOutlined.inheritAttrs = false;
|
|
2828
|
+
const InfoCircleOutlined$1 = InfoCircleOutlined;
|
|
2829
|
+
const _sfc_main$6 = defineComponent({
|
|
2830
|
+
name: "ModalClose",
|
|
2831
|
+
components: {
|
|
2832
|
+
Tooltip,
|
|
2833
|
+
FullscreenExitOutlined: FullscreenExitOutlined$1,
|
|
2834
|
+
FullscreenOutlined: FullscreenOutlined$1,
|
|
2835
|
+
CloseOutlined: CloseOutlined$1
|
|
2836
|
+
},
|
|
2837
|
+
props: {
|
|
2838
|
+
canFullscreen: { type: Boolean, default: true },
|
|
2839
|
+
fullScreen: { type: Boolean }
|
|
2840
|
+
},
|
|
2841
|
+
emits: ["cancel", "fullscreen"],
|
|
2842
|
+
setup(props2, { emit }) {
|
|
2843
|
+
const prefixCls = "shy-basic-modal-close";
|
|
2844
|
+
console.log("prefixCls", prefixCls);
|
|
2845
|
+
const { t: t2 } = useI18n();
|
|
2846
|
+
const getClass = computed(() => {
|
|
2847
|
+
return [
|
|
2848
|
+
prefixCls,
|
|
2849
|
+
`${prefixCls}--custom`,
|
|
2850
|
+
{
|
|
2851
|
+
[`${prefixCls}--can-full`]: props2.canFullscreen
|
|
2852
|
+
}
|
|
2853
|
+
];
|
|
2854
|
+
});
|
|
2855
|
+
function handleCancel(e) {
|
|
2856
|
+
emit("cancel", e);
|
|
2857
|
+
}
|
|
2858
|
+
function handleFullScreen(e) {
|
|
2859
|
+
e == null ? void 0 : e.stopPropagation();
|
|
2860
|
+
e == null ? void 0 : e.preventDefault();
|
|
2861
|
+
emit("fullscreen");
|
|
2862
|
+
}
|
|
2863
|
+
return {
|
|
2864
|
+
t: t2,
|
|
2865
|
+
getClass,
|
|
2866
|
+
prefixCls,
|
|
2867
|
+
handleCancel,
|
|
2868
|
+
handleFullScreen
|
|
2869
|
+
};
|
|
2870
|
+
}
|
|
2871
|
+
});
|
|
2872
|
+
const ModalClose_vue_vue_type_style_index_0_lang = "";
|
|
2873
|
+
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2874
|
+
const _component_FullscreenExitOutlined = resolveComponent("FullscreenExitOutlined");
|
|
2875
|
+
const _component_Tooltip = resolveComponent("Tooltip");
|
|
2876
|
+
const _component_FullscreenOutlined = resolveComponent("FullscreenOutlined");
|
|
2877
|
+
const _component_CloseOutlined = resolveComponent("CloseOutlined");
|
|
2878
|
+
return openBlock(), createElementBlock("div", {
|
|
2879
|
+
class: normalizeClass(_ctx.getClass)
|
|
2880
|
+
}, [
|
|
2881
|
+
_ctx.canFullscreen ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2882
|
+
_ctx.fullScreen ? (openBlock(), createBlock(_component_Tooltip, {
|
|
2883
|
+
key: 0,
|
|
2884
|
+
title: _ctx.t("component.modal.restore"),
|
|
2885
|
+
placement: "bottom"
|
|
2886
|
+
}, {
|
|
2887
|
+
default: withCtx(() => [
|
|
2888
|
+
createVNode(_component_FullscreenExitOutlined, {
|
|
2889
|
+
role: "full",
|
|
2890
|
+
onClick: _ctx.handleFullScreen
|
|
2891
|
+
}, null, 8, ["onClick"])
|
|
2892
|
+
]),
|
|
2893
|
+
_: 1
|
|
2894
|
+
}, 8, ["title"])) : (openBlock(), createBlock(_component_Tooltip, {
|
|
2895
|
+
key: 1,
|
|
2896
|
+
title: "\u5168\u5C4F",
|
|
2897
|
+
placement: "bottom"
|
|
2898
|
+
}, {
|
|
2899
|
+
default: withCtx(() => [
|
|
2900
|
+
createVNode(_component_FullscreenOutlined, {
|
|
2901
|
+
role: "close",
|
|
2902
|
+
onClick: _ctx.handleFullScreen
|
|
2903
|
+
}, null, 8, ["onClick"])
|
|
2904
|
+
]),
|
|
2905
|
+
_: 1
|
|
2906
|
+
}))
|
|
2907
|
+
], 64)) : createCommentVNode("", true),
|
|
2908
|
+
createVNode(_component_Tooltip, {
|
|
2909
|
+
title: "\u5173\u95ED",
|
|
2910
|
+
placement: "bottom"
|
|
2911
|
+
}, {
|
|
2912
|
+
default: withCtx(() => [
|
|
2913
|
+
createVNode(_component_CloseOutlined, { onClick: _ctx.handleCancel }, null, 8, ["onClick"])
|
|
2914
|
+
]),
|
|
2915
|
+
_: 1
|
|
2916
|
+
})
|
|
2917
|
+
], 2);
|
|
2918
|
+
}
|
|
2919
|
+
const ModalClose = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$3]]);
|
|
2920
|
+
const _sfc_main$5 = defineComponent({
|
|
2921
|
+
name: "BasicModalFooter",
|
|
2922
|
+
props: basicProps,
|
|
2923
|
+
emits: ["ok", "cancel"],
|
|
2924
|
+
setup(_, { emit }) {
|
|
2925
|
+
function handleOk(e) {
|
|
2926
|
+
emit("ok", e);
|
|
2927
|
+
}
|
|
2928
|
+
function handleCancel(e) {
|
|
2929
|
+
emit("cancel", e);
|
|
2930
|
+
}
|
|
2931
|
+
return { handleOk, handleCancel };
|
|
2932
|
+
}
|
|
2933
|
+
});
|
|
2934
|
+
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
2935
|
+
const _component_a_button = resolveComponent("a-button");
|
|
2936
|
+
return openBlock(), createElementBlock("div", null, [
|
|
2937
|
+
renderSlot(_ctx.$slots, "insertFooter"),
|
|
2938
|
+
_ctx.showCancelBtn ? (openBlock(), createBlock(_component_a_button, mergeProps({ key: 0 }, _ctx.cancelButtonProps, { onClick: _ctx.handleCancel }), {
|
|
2939
|
+
default: withCtx(() => [
|
|
2940
|
+
createTextVNode(toDisplayString(_ctx.cancelText), 1)
|
|
2941
|
+
]),
|
|
2942
|
+
_: 1
|
|
2943
|
+
}, 16, ["onClick"])) : createCommentVNode("", true),
|
|
2944
|
+
renderSlot(_ctx.$slots, "centerFooter"),
|
|
2945
|
+
_ctx.showOkBtn ? (openBlock(), createBlock(_component_a_button, mergeProps({
|
|
2946
|
+
key: 1,
|
|
2947
|
+
type: _ctx.okType,
|
|
2948
|
+
onClick: _ctx.handleOk,
|
|
2949
|
+
loading: _ctx.confirmLoading
|
|
2950
|
+
}, _ctx.okButtonProps), {
|
|
2951
|
+
default: withCtx(() => [
|
|
2952
|
+
createTextVNode(toDisplayString(_ctx.okText), 1)
|
|
2953
|
+
]),
|
|
2954
|
+
_: 1
|
|
2955
|
+
}, 16, ["type", "onClick", "loading"])) : createCommentVNode("", true),
|
|
2956
|
+
renderSlot(_ctx.$slots, "appendFooter")
|
|
2957
|
+
]);
|
|
2958
|
+
}
|
|
2959
|
+
const ModalFooter = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$2]]);
|
|
2960
|
+
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
|
2961
|
+
const freeGlobal$1 = freeGlobal;
|
|
2962
|
+
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
|
2963
|
+
var root = freeGlobal$1 || freeSelf || Function("return this")();
|
|
2964
|
+
const root$1 = root;
|
|
2965
|
+
var Symbol$1 = root$1.Symbol;
|
|
2966
|
+
const Symbol$2 = Symbol$1;
|
|
2967
|
+
var objectProto$f = Object.prototype;
|
|
2968
|
+
var hasOwnProperty$c = objectProto$f.hasOwnProperty;
|
|
2969
|
+
var nativeObjectToString$1 = objectProto$f.toString;
|
|
2970
|
+
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
2971
|
+
function getRawTag(value) {
|
|
2972
|
+
var isOwn = hasOwnProperty$c.call(value, symToStringTag$1), tag = value[symToStringTag$1];
|
|
2973
|
+
try {
|
|
2974
|
+
value[symToStringTag$1] = void 0;
|
|
2975
|
+
var unmasked = true;
|
|
2976
|
+
} catch (e) {
|
|
2977
|
+
}
|
|
2978
|
+
var result = nativeObjectToString$1.call(value);
|
|
2979
|
+
if (unmasked) {
|
|
2980
|
+
if (isOwn) {
|
|
2981
|
+
value[symToStringTag$1] = tag;
|
|
2982
|
+
} else {
|
|
2983
|
+
delete value[symToStringTag$1];
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
return result;
|
|
2987
|
+
}
|
|
2988
|
+
var objectProto$e = Object.prototype;
|
|
2989
|
+
var nativeObjectToString = objectProto$e.toString;
|
|
2990
|
+
function objectToString(value) {
|
|
2991
|
+
return nativeObjectToString.call(value);
|
|
2992
|
+
}
|
|
2993
|
+
var nullTag = "[object Null]", undefinedTag = "[object Undefined]";
|
|
2994
|
+
var symToStringTag = Symbol$2 ? Symbol$2.toStringTag : void 0;
|
|
2995
|
+
function baseGetTag(value) {
|
|
2996
|
+
if (value == null) {
|
|
2997
|
+
return value === void 0 ? undefinedTag : nullTag;
|
|
2998
|
+
}
|
|
2999
|
+
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
|
3000
|
+
}
|
|
3001
|
+
function isObjectLike(value) {
|
|
3002
|
+
return value != null && typeof value == "object";
|
|
3003
|
+
}
|
|
3004
|
+
var symbolTag$3 = "[object Symbol]";
|
|
3005
|
+
function isSymbol(value) {
|
|
3006
|
+
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag$3;
|
|
3007
|
+
}
|
|
3008
|
+
function arrayMap(array, iteratee) {
|
|
3009
|
+
var index2 = -1, length = array == null ? 0 : array.length, result = Array(length);
|
|
3010
|
+
while (++index2 < length) {
|
|
3011
|
+
result[index2] = iteratee(array[index2], index2, array);
|
|
3012
|
+
}
|
|
3013
|
+
return result;
|
|
3014
|
+
}
|
|
3015
|
+
var isArray = Array.isArray;
|
|
3016
|
+
const isArray$1 = isArray;
|
|
3017
|
+
var INFINITY$1 = 1 / 0;
|
|
3018
|
+
var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : void 0, symbolToString = symbolProto$2 ? symbolProto$2.toString : void 0;
|
|
3019
|
+
function baseToString(value) {
|
|
3020
|
+
if (typeof value == "string") {
|
|
3021
|
+
return value;
|
|
3022
|
+
}
|
|
3023
|
+
if (isArray$1(value)) {
|
|
3024
|
+
return arrayMap(value, baseToString) + "";
|
|
3025
|
+
}
|
|
3026
|
+
if (isSymbol(value)) {
|
|
3027
|
+
return symbolToString ? symbolToString.call(value) : "";
|
|
3028
|
+
}
|
|
3029
|
+
var result = value + "";
|
|
3030
|
+
return result == "0" && 1 / value == -INFINITY$1 ? "-0" : result;
|
|
3031
|
+
}
|
|
3032
|
+
function isObject(value) {
|
|
3033
|
+
var type = typeof value;
|
|
3034
|
+
return value != null && (type == "object" || type == "function");
|
|
3035
|
+
}
|
|
3036
|
+
function identity(value) {
|
|
3037
|
+
return value;
|
|
3038
|
+
}
|
|
3039
|
+
var asyncTag = "[object AsyncFunction]", funcTag$2 = "[object Function]", genTag$1 = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
3040
|
+
function isFunction(value) {
|
|
3041
|
+
if (!isObject(value)) {
|
|
3042
|
+
return false;
|
|
3043
|
+
}
|
|
3044
|
+
var tag = baseGetTag(value);
|
|
3045
|
+
return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
|
|
3046
|
+
}
|
|
3047
|
+
var coreJsData = root$1["__core-js_shared__"];
|
|
3048
|
+
const coreJsData$1 = coreJsData;
|
|
3049
|
+
var maskSrcKey = function() {
|
|
3050
|
+
var uid = /[^.]+$/.exec(coreJsData$1 && coreJsData$1.keys && coreJsData$1.keys.IE_PROTO || "");
|
|
3051
|
+
return uid ? "Symbol(src)_1." + uid : "";
|
|
3052
|
+
}();
|
|
3053
|
+
function isMasked(func) {
|
|
3054
|
+
return !!maskSrcKey && maskSrcKey in func;
|
|
3055
|
+
}
|
|
3056
|
+
var funcProto$2 = Function.prototype;
|
|
3057
|
+
var funcToString$2 = funcProto$2.toString;
|
|
3058
|
+
function toSource(func) {
|
|
3059
|
+
if (func != null) {
|
|
3060
|
+
try {
|
|
3061
|
+
return funcToString$2.call(func);
|
|
3062
|
+
} catch (e) {
|
|
3063
|
+
}
|
|
3064
|
+
try {
|
|
3065
|
+
return func + "";
|
|
3066
|
+
} catch (e) {
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
return "";
|
|
3070
|
+
}
|
|
3071
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
3072
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
3073
|
+
var funcProto$1 = Function.prototype, objectProto$d = Object.prototype;
|
|
3074
|
+
var funcToString$1 = funcProto$1.toString;
|
|
3075
|
+
var hasOwnProperty$b = objectProto$d.hasOwnProperty;
|
|
3076
|
+
var reIsNative = RegExp(
|
|
3077
|
+
"^" + funcToString$1.call(hasOwnProperty$b).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
3078
|
+
);
|
|
3079
|
+
function baseIsNative(value) {
|
|
3080
|
+
if (!isObject(value) || isMasked(value)) {
|
|
3081
|
+
return false;
|
|
3082
|
+
}
|
|
3083
|
+
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
3084
|
+
return pattern.test(toSource(value));
|
|
3085
|
+
}
|
|
3086
|
+
function getValue(object, key2) {
|
|
3087
|
+
return object == null ? void 0 : object[key2];
|
|
3088
|
+
}
|
|
3089
|
+
function getNative(object, key2) {
|
|
3090
|
+
var value = getValue(object, key2);
|
|
3091
|
+
return baseIsNative(value) ? value : void 0;
|
|
3092
|
+
}
|
|
3093
|
+
var WeakMap$1 = getNative(root$1, "WeakMap");
|
|
3094
|
+
const WeakMap$2 = WeakMap$1;
|
|
3095
|
+
var objectCreate = Object.create;
|
|
3096
|
+
var baseCreate = function() {
|
|
3097
|
+
function object() {
|
|
3098
|
+
}
|
|
3099
|
+
return function(proto) {
|
|
3100
|
+
if (!isObject(proto)) {
|
|
3101
|
+
return {};
|
|
3102
|
+
}
|
|
3103
|
+
if (objectCreate) {
|
|
3104
|
+
return objectCreate(proto);
|
|
3105
|
+
}
|
|
3106
|
+
object.prototype = proto;
|
|
3107
|
+
var result = new object();
|
|
3108
|
+
object.prototype = void 0;
|
|
3109
|
+
return result;
|
|
3110
|
+
};
|
|
3111
|
+
}();
|
|
3112
|
+
const baseCreate$1 = baseCreate;
|
|
3113
|
+
function apply(func, thisArg, args) {
|
|
3114
|
+
switch (args.length) {
|
|
3115
|
+
case 0:
|
|
3116
|
+
return func.call(thisArg);
|
|
3117
|
+
case 1:
|
|
3118
|
+
return func.call(thisArg, args[0]);
|
|
3119
|
+
case 2:
|
|
3120
|
+
return func.call(thisArg, args[0], args[1]);
|
|
3121
|
+
case 3:
|
|
3122
|
+
return func.call(thisArg, args[0], args[1], args[2]);
|
|
3123
|
+
}
|
|
3124
|
+
return func.apply(thisArg, args);
|
|
3125
|
+
}
|
|
3126
|
+
function copyArray(source, array) {
|
|
3127
|
+
var index2 = -1, length = source.length;
|
|
3128
|
+
array || (array = Array(length));
|
|
3129
|
+
while (++index2 < length) {
|
|
3130
|
+
array[index2] = source[index2];
|
|
3131
|
+
}
|
|
3132
|
+
return array;
|
|
3133
|
+
}
|
|
3134
|
+
var HOT_COUNT = 800, HOT_SPAN = 16;
|
|
3135
|
+
var nativeNow = Date.now;
|
|
3136
|
+
function shortOut(func) {
|
|
3137
|
+
var count = 0, lastCalled = 0;
|
|
3138
|
+
return function() {
|
|
3139
|
+
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
|
|
3140
|
+
lastCalled = stamp;
|
|
3141
|
+
if (remaining > 0) {
|
|
3142
|
+
if (++count >= HOT_COUNT) {
|
|
3143
|
+
return arguments[0];
|
|
3144
|
+
}
|
|
3145
|
+
} else {
|
|
3146
|
+
count = 0;
|
|
3147
|
+
}
|
|
3148
|
+
return func.apply(void 0, arguments);
|
|
3149
|
+
};
|
|
3150
|
+
}
|
|
3151
|
+
function constant(value) {
|
|
3152
|
+
return function() {
|
|
3153
|
+
return value;
|
|
3154
|
+
};
|
|
3155
|
+
}
|
|
3156
|
+
var defineProperty = function() {
|
|
3157
|
+
try {
|
|
3158
|
+
var func = getNative(Object, "defineProperty");
|
|
3159
|
+
func({}, "", {});
|
|
3160
|
+
return func;
|
|
3161
|
+
} catch (e) {
|
|
3162
|
+
}
|
|
3163
|
+
}();
|
|
3164
|
+
const defineProperty$1 = defineProperty;
|
|
3165
|
+
var baseSetToString = !defineProperty$1 ? identity : function(func, string) {
|
|
3166
|
+
return defineProperty$1(func, "toString", {
|
|
3167
|
+
"configurable": true,
|
|
3168
|
+
"enumerable": false,
|
|
3169
|
+
"value": constant(string),
|
|
3170
|
+
"writable": true
|
|
3171
|
+
});
|
|
3172
|
+
};
|
|
3173
|
+
const baseSetToString$1 = baseSetToString;
|
|
3174
|
+
var setToString = shortOut(baseSetToString$1);
|
|
3175
|
+
const setToString$1 = setToString;
|
|
3176
|
+
function arrayEach(array, iteratee) {
|
|
3177
|
+
var index2 = -1, length = array == null ? 0 : array.length;
|
|
3178
|
+
while (++index2 < length) {
|
|
3179
|
+
if (iteratee(array[index2], index2, array) === false) {
|
|
3180
|
+
break;
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
return array;
|
|
3184
|
+
}
|
|
3185
|
+
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
3186
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
3187
|
+
function isIndex(value, length) {
|
|
3188
|
+
var type = typeof value;
|
|
3189
|
+
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
3190
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
3191
|
+
}
|
|
3192
|
+
function baseAssignValue(object, key2, value) {
|
|
3193
|
+
if (key2 == "__proto__" && defineProperty$1) {
|
|
3194
|
+
defineProperty$1(object, key2, {
|
|
3195
|
+
"configurable": true,
|
|
3196
|
+
"enumerable": true,
|
|
3197
|
+
"value": value,
|
|
3198
|
+
"writable": true
|
|
3199
|
+
});
|
|
3200
|
+
} else {
|
|
3201
|
+
object[key2] = value;
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
function eq(value, other) {
|
|
3205
|
+
return value === other || value !== value && other !== other;
|
|
3206
|
+
}
|
|
3207
|
+
var objectProto$c = Object.prototype;
|
|
3208
|
+
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
3209
|
+
function assignValue(object, key2, value) {
|
|
3210
|
+
var objValue = object[key2];
|
|
3211
|
+
if (!(hasOwnProperty$a.call(object, key2) && eq(objValue, value)) || value === void 0 && !(key2 in object)) {
|
|
3212
|
+
baseAssignValue(object, key2, value);
|
|
3213
|
+
}
|
|
3214
|
+
}
|
|
3215
|
+
function copyObject(source, props2, object, customizer) {
|
|
3216
|
+
var isNew = !object;
|
|
3217
|
+
object || (object = {});
|
|
3218
|
+
var index2 = -1, length = props2.length;
|
|
3219
|
+
while (++index2 < length) {
|
|
3220
|
+
var key2 = props2[index2];
|
|
3221
|
+
var newValue = customizer ? customizer(object[key2], source[key2], key2, object, source) : void 0;
|
|
3222
|
+
if (newValue === void 0) {
|
|
3223
|
+
newValue = source[key2];
|
|
3224
|
+
}
|
|
3225
|
+
if (isNew) {
|
|
3226
|
+
baseAssignValue(object, key2, newValue);
|
|
3227
|
+
} else {
|
|
3228
|
+
assignValue(object, key2, newValue);
|
|
3229
|
+
}
|
|
3230
|
+
}
|
|
3231
|
+
return object;
|
|
3232
|
+
}
|
|
3233
|
+
var nativeMax = Math.max;
|
|
3234
|
+
function overRest(func, start, transform) {
|
|
3235
|
+
start = nativeMax(start === void 0 ? func.length - 1 : start, 0);
|
|
3236
|
+
return function() {
|
|
3237
|
+
var args = arguments, index2 = -1, length = nativeMax(args.length - start, 0), array = Array(length);
|
|
3238
|
+
while (++index2 < length) {
|
|
3239
|
+
array[index2] = args[start + index2];
|
|
3240
|
+
}
|
|
3241
|
+
index2 = -1;
|
|
3242
|
+
var otherArgs = Array(start + 1);
|
|
3243
|
+
while (++index2 < start) {
|
|
3244
|
+
otherArgs[index2] = args[index2];
|
|
3245
|
+
}
|
|
3246
|
+
otherArgs[start] = transform(array);
|
|
3247
|
+
return apply(func, this, otherArgs);
|
|
3248
|
+
};
|
|
3249
|
+
}
|
|
3250
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
3251
|
+
function isLength(value) {
|
|
3252
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
3253
|
+
}
|
|
3254
|
+
function isArrayLike(value) {
|
|
3255
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
3256
|
+
}
|
|
3257
|
+
var objectProto$b = Object.prototype;
|
|
3258
|
+
function isPrototype(value) {
|
|
3259
|
+
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$b;
|
|
3260
|
+
return value === proto;
|
|
3261
|
+
}
|
|
3262
|
+
function baseTimes(n, iteratee) {
|
|
3263
|
+
var index2 = -1, result = Array(n);
|
|
3264
|
+
while (++index2 < n) {
|
|
3265
|
+
result[index2] = iteratee(index2);
|
|
3266
|
+
}
|
|
3267
|
+
return result;
|
|
3268
|
+
}
|
|
3269
|
+
var argsTag$3 = "[object Arguments]";
|
|
3270
|
+
function baseIsArguments(value) {
|
|
3271
|
+
return isObjectLike(value) && baseGetTag(value) == argsTag$3;
|
|
3272
|
+
}
|
|
3273
|
+
var objectProto$a = Object.prototype;
|
|
3274
|
+
var hasOwnProperty$9 = objectProto$a.hasOwnProperty;
|
|
3275
|
+
var propertyIsEnumerable$1 = objectProto$a.propertyIsEnumerable;
|
|
3276
|
+
var isArguments = baseIsArguments(function() {
|
|
3277
|
+
return arguments;
|
|
3278
|
+
}()) ? baseIsArguments : function(value) {
|
|
3279
|
+
return isObjectLike(value) && hasOwnProperty$9.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee");
|
|
3280
|
+
};
|
|
3281
|
+
const isArguments$1 = isArguments;
|
|
3282
|
+
function stubFalse() {
|
|
3283
|
+
return false;
|
|
3284
|
+
}
|
|
3285
|
+
var freeExports$2 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
3286
|
+
var freeModule$2 = freeExports$2 && typeof module == "object" && module && !module.nodeType && module;
|
|
3287
|
+
var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
|
|
3288
|
+
var Buffer$1 = moduleExports$2 ? root$1.Buffer : void 0;
|
|
3289
|
+
var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : void 0;
|
|
3290
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
3291
|
+
const isBuffer$1 = isBuffer;
|
|
3292
|
+
var argsTag$2 = "[object Arguments]", arrayTag$2 = "[object Array]", boolTag$3 = "[object Boolean]", dateTag$3 = "[object Date]", errorTag$2 = "[object Error]", funcTag$1 = "[object Function]", mapTag$5 = "[object Map]", numberTag$3 = "[object Number]", objectTag$4 = "[object Object]", regexpTag$3 = "[object RegExp]", setTag$5 = "[object Set]", stringTag$3 = "[object String]", weakMapTag$2 = "[object WeakMap]";
|
|
3293
|
+
var arrayBufferTag$3 = "[object ArrayBuffer]", dataViewTag$4 = "[object DataView]", float32Tag$2 = "[object Float32Array]", float64Tag$2 = "[object Float64Array]", int8Tag$2 = "[object Int8Array]", int16Tag$2 = "[object Int16Array]", int32Tag$2 = "[object Int32Array]", uint8Tag$2 = "[object Uint8Array]", uint8ClampedTag$2 = "[object Uint8ClampedArray]", uint16Tag$2 = "[object Uint16Array]", uint32Tag$2 = "[object Uint32Array]";
|
|
3294
|
+
var typedArrayTags = {};
|
|
3295
|
+
typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] = typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] = typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] = typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] = typedArrayTags[uint32Tag$2] = true;
|
|
3296
|
+
typedArrayTags[argsTag$2] = typedArrayTags[arrayTag$2] = typedArrayTags[arrayBufferTag$3] = typedArrayTags[boolTag$3] = typedArrayTags[dataViewTag$4] = typedArrayTags[dateTag$3] = typedArrayTags[errorTag$2] = typedArrayTags[funcTag$1] = typedArrayTags[mapTag$5] = typedArrayTags[numberTag$3] = typedArrayTags[objectTag$4] = typedArrayTags[regexpTag$3] = typedArrayTags[setTag$5] = typedArrayTags[stringTag$3] = typedArrayTags[weakMapTag$2] = false;
|
|
3297
|
+
function baseIsTypedArray(value) {
|
|
3298
|
+
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
3299
|
+
}
|
|
3300
|
+
function baseUnary(func) {
|
|
3301
|
+
return function(value) {
|
|
3302
|
+
return func(value);
|
|
3303
|
+
};
|
|
3304
|
+
}
|
|
3305
|
+
var freeExports$1 = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
3306
|
+
var freeModule$1 = freeExports$1 && typeof module == "object" && module && !module.nodeType && module;
|
|
3307
|
+
var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
|
|
3308
|
+
var freeProcess = moduleExports$1 && freeGlobal$1.process;
|
|
3309
|
+
var nodeUtil = function() {
|
|
3310
|
+
try {
|
|
3311
|
+
var types = freeModule$1 && freeModule$1.require && freeModule$1.require("util").types;
|
|
3312
|
+
if (types) {
|
|
3313
|
+
return types;
|
|
3314
|
+
}
|
|
3315
|
+
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
3316
|
+
} catch (e) {
|
|
3317
|
+
}
|
|
3318
|
+
}();
|
|
3319
|
+
const nodeUtil$1 = nodeUtil;
|
|
3320
|
+
var nodeIsTypedArray = nodeUtil$1 && nodeUtil$1.isTypedArray;
|
|
3321
|
+
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
3322
|
+
const isTypedArray$1 = isTypedArray;
|
|
3323
|
+
var objectProto$9 = Object.prototype;
|
|
3324
|
+
var hasOwnProperty$8 = objectProto$9.hasOwnProperty;
|
|
3325
|
+
function arrayLikeKeys(value, inherited) {
|
|
3326
|
+
var isArr = isArray$1(value), isArg = !isArr && isArguments$1(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length;
|
|
3327
|
+
for (var key2 in value) {
|
|
3328
|
+
if ((inherited || hasOwnProperty$8.call(value, key2)) && !(skipIndexes && (key2 == "length" || isBuff && (key2 == "offset" || key2 == "parent") || isType && (key2 == "buffer" || key2 == "byteLength" || key2 == "byteOffset") || isIndex(key2, length)))) {
|
|
3329
|
+
result.push(key2);
|
|
3330
|
+
}
|
|
3331
|
+
}
|
|
3332
|
+
return result;
|
|
3333
|
+
}
|
|
3334
|
+
function overArg(func, transform) {
|
|
3335
|
+
return function(arg) {
|
|
3336
|
+
return func(transform(arg));
|
|
3337
|
+
};
|
|
3338
|
+
}
|
|
3339
|
+
var nativeKeys = overArg(Object.keys, Object);
|
|
3340
|
+
const nativeKeys$1 = nativeKeys;
|
|
3341
|
+
var objectProto$8 = Object.prototype;
|
|
3342
|
+
var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
3343
|
+
function baseKeys(object) {
|
|
3344
|
+
if (!isPrototype(object)) {
|
|
3345
|
+
return nativeKeys$1(object);
|
|
3346
|
+
}
|
|
3347
|
+
var result = [];
|
|
3348
|
+
for (var key2 in Object(object)) {
|
|
3349
|
+
if (hasOwnProperty$7.call(object, key2) && key2 != "constructor") {
|
|
3350
|
+
result.push(key2);
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
return result;
|
|
3354
|
+
}
|
|
3355
|
+
function keys(object) {
|
|
3356
|
+
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
3357
|
+
}
|
|
3358
|
+
function nativeKeysIn(object) {
|
|
3359
|
+
var result = [];
|
|
3360
|
+
if (object != null) {
|
|
3361
|
+
for (var key2 in Object(object)) {
|
|
3362
|
+
result.push(key2);
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
return result;
|
|
3366
|
+
}
|
|
3367
|
+
var objectProto$7 = Object.prototype;
|
|
3368
|
+
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
3369
|
+
function baseKeysIn(object) {
|
|
3370
|
+
if (!isObject(object)) {
|
|
3371
|
+
return nativeKeysIn(object);
|
|
3372
|
+
}
|
|
3373
|
+
var isProto = isPrototype(object), result = [];
|
|
3374
|
+
for (var key2 in object) {
|
|
3375
|
+
if (!(key2 == "constructor" && (isProto || !hasOwnProperty$6.call(object, key2)))) {
|
|
3376
|
+
result.push(key2);
|
|
3377
|
+
}
|
|
3378
|
+
}
|
|
3379
|
+
return result;
|
|
3380
|
+
}
|
|
3381
|
+
function keysIn(object) {
|
|
3382
|
+
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
|
|
3383
|
+
}
|
|
3384
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/;
|
|
3385
|
+
function isKey(value, object) {
|
|
3386
|
+
if (isArray$1(value)) {
|
|
3387
|
+
return false;
|
|
3388
|
+
}
|
|
3389
|
+
var type = typeof value;
|
|
3390
|
+
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
|
|
3391
|
+
return true;
|
|
3392
|
+
}
|
|
3393
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);
|
|
3394
|
+
}
|
|
3395
|
+
var nativeCreate = getNative(Object, "create");
|
|
3396
|
+
const nativeCreate$1 = nativeCreate;
|
|
3397
|
+
function hashClear() {
|
|
3398
|
+
this.__data__ = nativeCreate$1 ? nativeCreate$1(null) : {};
|
|
3399
|
+
this.size = 0;
|
|
3400
|
+
}
|
|
3401
|
+
function hashDelete(key2) {
|
|
3402
|
+
var result = this.has(key2) && delete this.__data__[key2];
|
|
3403
|
+
this.size -= result ? 1 : 0;
|
|
3404
|
+
return result;
|
|
3405
|
+
}
|
|
3406
|
+
var HASH_UNDEFINED$2 = "__lodash_hash_undefined__";
|
|
3407
|
+
var objectProto$6 = Object.prototype;
|
|
3408
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
3409
|
+
function hashGet(key2) {
|
|
3410
|
+
var data = this.__data__;
|
|
3411
|
+
if (nativeCreate$1) {
|
|
3412
|
+
var result = data[key2];
|
|
3413
|
+
return result === HASH_UNDEFINED$2 ? void 0 : result;
|
|
3414
|
+
}
|
|
3415
|
+
return hasOwnProperty$5.call(data, key2) ? data[key2] : void 0;
|
|
3416
|
+
}
|
|
3417
|
+
var objectProto$5 = Object.prototype;
|
|
3418
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
3419
|
+
function hashHas(key2) {
|
|
3420
|
+
var data = this.__data__;
|
|
3421
|
+
return nativeCreate$1 ? data[key2] !== void 0 : hasOwnProperty$4.call(data, key2);
|
|
3422
|
+
}
|
|
3423
|
+
var HASH_UNDEFINED$1 = "__lodash_hash_undefined__";
|
|
3424
|
+
function hashSet(key2, value) {
|
|
3425
|
+
var data = this.__data__;
|
|
3426
|
+
this.size += this.has(key2) ? 0 : 1;
|
|
3427
|
+
data[key2] = nativeCreate$1 && value === void 0 ? HASH_UNDEFINED$1 : value;
|
|
3428
|
+
return this;
|
|
3429
|
+
}
|
|
3430
|
+
function Hash(entries2) {
|
|
3431
|
+
var index2 = -1, length = entries2 == null ? 0 : entries2.length;
|
|
3432
|
+
this.clear();
|
|
3433
|
+
while (++index2 < length) {
|
|
3434
|
+
var entry = entries2[index2];
|
|
3435
|
+
this.set(entry[0], entry[1]);
|
|
3436
|
+
}
|
|
3437
|
+
}
|
|
3438
|
+
Hash.prototype.clear = hashClear;
|
|
3439
|
+
Hash.prototype["delete"] = hashDelete;
|
|
3440
|
+
Hash.prototype.get = hashGet;
|
|
3441
|
+
Hash.prototype.has = hashHas;
|
|
3442
|
+
Hash.prototype.set = hashSet;
|
|
3443
|
+
function listCacheClear() {
|
|
3444
|
+
this.__data__ = [];
|
|
3445
|
+
this.size = 0;
|
|
3446
|
+
}
|
|
3447
|
+
function assocIndexOf(array, key2) {
|
|
3448
|
+
var length = array.length;
|
|
3449
|
+
while (length--) {
|
|
3450
|
+
if (eq(array[length][0], key2)) {
|
|
3451
|
+
return length;
|
|
3452
|
+
}
|
|
3453
|
+
}
|
|
3454
|
+
return -1;
|
|
3455
|
+
}
|
|
3456
|
+
var arrayProto = Array.prototype;
|
|
3457
|
+
var splice = arrayProto.splice;
|
|
3458
|
+
function listCacheDelete(key2) {
|
|
3459
|
+
var data = this.__data__, index2 = assocIndexOf(data, key2);
|
|
3460
|
+
if (index2 < 0) {
|
|
3461
|
+
return false;
|
|
3462
|
+
}
|
|
3463
|
+
var lastIndex = data.length - 1;
|
|
3464
|
+
if (index2 == lastIndex) {
|
|
3465
|
+
data.pop();
|
|
3466
|
+
} else {
|
|
3467
|
+
splice.call(data, index2, 1);
|
|
3468
|
+
}
|
|
3469
|
+
--this.size;
|
|
3470
|
+
return true;
|
|
3471
|
+
}
|
|
3472
|
+
function listCacheGet(key2) {
|
|
3473
|
+
var data = this.__data__, index2 = assocIndexOf(data, key2);
|
|
3474
|
+
return index2 < 0 ? void 0 : data[index2][1];
|
|
3475
|
+
}
|
|
3476
|
+
function listCacheHas(key2) {
|
|
3477
|
+
return assocIndexOf(this.__data__, key2) > -1;
|
|
3478
|
+
}
|
|
3479
|
+
function listCacheSet(key2, value) {
|
|
3480
|
+
var data = this.__data__, index2 = assocIndexOf(data, key2);
|
|
3481
|
+
if (index2 < 0) {
|
|
3482
|
+
++this.size;
|
|
3483
|
+
data.push([key2, value]);
|
|
3484
|
+
} else {
|
|
3485
|
+
data[index2][1] = value;
|
|
3486
|
+
}
|
|
3487
|
+
return this;
|
|
3488
|
+
}
|
|
3489
|
+
function ListCache(entries2) {
|
|
3490
|
+
var index2 = -1, length = entries2 == null ? 0 : entries2.length;
|
|
3491
|
+
this.clear();
|
|
3492
|
+
while (++index2 < length) {
|
|
3493
|
+
var entry = entries2[index2];
|
|
3494
|
+
this.set(entry[0], entry[1]);
|
|
3495
|
+
}
|
|
3496
|
+
}
|
|
3497
|
+
ListCache.prototype.clear = listCacheClear;
|
|
3498
|
+
ListCache.prototype["delete"] = listCacheDelete;
|
|
3499
|
+
ListCache.prototype.get = listCacheGet;
|
|
3500
|
+
ListCache.prototype.has = listCacheHas;
|
|
3501
|
+
ListCache.prototype.set = listCacheSet;
|
|
3502
|
+
var Map$1 = getNative(root$1, "Map");
|
|
3503
|
+
const Map$2 = Map$1;
|
|
3504
|
+
function mapCacheClear() {
|
|
3505
|
+
this.size = 0;
|
|
3506
|
+
this.__data__ = {
|
|
3507
|
+
"hash": new Hash(),
|
|
3508
|
+
"map": new (Map$2 || ListCache)(),
|
|
3509
|
+
"string": new Hash()
|
|
3510
|
+
};
|
|
3511
|
+
}
|
|
3512
|
+
function isKeyable(value) {
|
|
3513
|
+
var type = typeof value;
|
|
3514
|
+
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
|
|
3515
|
+
}
|
|
3516
|
+
function getMapData(map, key2) {
|
|
3517
|
+
var data = map.__data__;
|
|
3518
|
+
return isKeyable(key2) ? data[typeof key2 == "string" ? "string" : "hash"] : data.map;
|
|
3519
|
+
}
|
|
3520
|
+
function mapCacheDelete(key2) {
|
|
3521
|
+
var result = getMapData(this, key2)["delete"](key2);
|
|
3522
|
+
this.size -= result ? 1 : 0;
|
|
3523
|
+
return result;
|
|
3524
|
+
}
|
|
3525
|
+
function mapCacheGet(key2) {
|
|
3526
|
+
return getMapData(this, key2).get(key2);
|
|
3527
|
+
}
|
|
3528
|
+
function mapCacheHas(key2) {
|
|
3529
|
+
return getMapData(this, key2).has(key2);
|
|
3530
|
+
}
|
|
3531
|
+
function mapCacheSet(key2, value) {
|
|
3532
|
+
var data = getMapData(this, key2), size = data.size;
|
|
3533
|
+
data.set(key2, value);
|
|
3534
|
+
this.size += data.size == size ? 0 : 1;
|
|
3535
|
+
return this;
|
|
3536
|
+
}
|
|
3537
|
+
function MapCache(entries2) {
|
|
3538
|
+
var index2 = -1, length = entries2 == null ? 0 : entries2.length;
|
|
3539
|
+
this.clear();
|
|
3540
|
+
while (++index2 < length) {
|
|
3541
|
+
var entry = entries2[index2];
|
|
3542
|
+
this.set(entry[0], entry[1]);
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
MapCache.prototype.clear = mapCacheClear;
|
|
3546
|
+
MapCache.prototype["delete"] = mapCacheDelete;
|
|
3547
|
+
MapCache.prototype.get = mapCacheGet;
|
|
3548
|
+
MapCache.prototype.has = mapCacheHas;
|
|
3549
|
+
MapCache.prototype.set = mapCacheSet;
|
|
3550
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
|
3551
|
+
function memoize(func, resolver) {
|
|
3552
|
+
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
|
|
3553
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
|
3554
|
+
}
|
|
3555
|
+
var memoized = function() {
|
|
3556
|
+
var args = arguments, key2 = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
|
|
3557
|
+
if (cache.has(key2)) {
|
|
3558
|
+
return cache.get(key2);
|
|
3559
|
+
}
|
|
3560
|
+
var result = func.apply(this, args);
|
|
3561
|
+
memoized.cache = cache.set(key2, result) || cache;
|
|
3562
|
+
return result;
|
|
3563
|
+
};
|
|
3564
|
+
memoized.cache = new (memoize.Cache || MapCache)();
|
|
3565
|
+
return memoized;
|
|
3566
|
+
}
|
|
3567
|
+
memoize.Cache = MapCache;
|
|
3568
|
+
var MAX_MEMOIZE_SIZE = 500;
|
|
3569
|
+
function memoizeCapped(func) {
|
|
3570
|
+
var result = memoize(func, function(key2) {
|
|
3571
|
+
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
3572
|
+
cache.clear();
|
|
3573
|
+
}
|
|
3574
|
+
return key2;
|
|
3575
|
+
});
|
|
3576
|
+
var cache = result.cache;
|
|
3577
|
+
return result;
|
|
3578
|
+
}
|
|
3579
|
+
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
3580
|
+
var reEscapeChar = /\\(\\)?/g;
|
|
3581
|
+
var stringToPath = memoizeCapped(function(string) {
|
|
3582
|
+
var result = [];
|
|
3583
|
+
if (string.charCodeAt(0) === 46) {
|
|
3584
|
+
result.push("");
|
|
3585
|
+
}
|
|
3586
|
+
string.replace(rePropName, function(match, number, quote, subString) {
|
|
3587
|
+
result.push(quote ? subString.replace(reEscapeChar, "$1") : number || match);
|
|
3588
|
+
});
|
|
3589
|
+
return result;
|
|
3590
|
+
});
|
|
3591
|
+
const stringToPath$1 = stringToPath;
|
|
3592
|
+
function toString$1(value) {
|
|
3593
|
+
return value == null ? "" : baseToString(value);
|
|
3594
|
+
}
|
|
3595
|
+
function castPath(value, object) {
|
|
3596
|
+
if (isArray$1(value)) {
|
|
3597
|
+
return value;
|
|
3598
|
+
}
|
|
3599
|
+
return isKey(value, object) ? [value] : stringToPath$1(toString$1(value));
|
|
3600
|
+
}
|
|
3601
|
+
var INFINITY = 1 / 0;
|
|
3602
|
+
function toKey(value) {
|
|
3603
|
+
if (typeof value == "string" || isSymbol(value)) {
|
|
3604
|
+
return value;
|
|
3605
|
+
}
|
|
3606
|
+
var result = value + "";
|
|
3607
|
+
return result == "0" && 1 / value == -INFINITY ? "-0" : result;
|
|
3608
|
+
}
|
|
3609
|
+
function baseGet(object, path) {
|
|
3610
|
+
path = castPath(path, object);
|
|
3611
|
+
var index2 = 0, length = path.length;
|
|
3612
|
+
while (object != null && index2 < length) {
|
|
3613
|
+
object = object[toKey(path[index2++])];
|
|
3614
|
+
}
|
|
3615
|
+
return index2 && index2 == length ? object : void 0;
|
|
3616
|
+
}
|
|
3617
|
+
function arrayPush(array, values) {
|
|
3618
|
+
var index2 = -1, length = values.length, offset = array.length;
|
|
3619
|
+
while (++index2 < length) {
|
|
3620
|
+
array[offset + index2] = values[index2];
|
|
3621
|
+
}
|
|
3622
|
+
return array;
|
|
3623
|
+
}
|
|
3624
|
+
var spreadableSymbol = Symbol$2 ? Symbol$2.isConcatSpreadable : void 0;
|
|
3625
|
+
function isFlattenable(value) {
|
|
3626
|
+
return isArray$1(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
3627
|
+
}
|
|
3628
|
+
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
3629
|
+
var index2 = -1, length = array.length;
|
|
3630
|
+
predicate || (predicate = isFlattenable);
|
|
3631
|
+
result || (result = []);
|
|
3632
|
+
while (++index2 < length) {
|
|
3633
|
+
var value = array[index2];
|
|
3634
|
+
if (depth > 0 && predicate(value)) {
|
|
3635
|
+
if (depth > 1) {
|
|
3636
|
+
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
3637
|
+
} else {
|
|
3638
|
+
arrayPush(result, value);
|
|
3639
|
+
}
|
|
3640
|
+
} else if (!isStrict) {
|
|
3641
|
+
result[result.length] = value;
|
|
3642
|
+
}
|
|
3643
|
+
}
|
|
3644
|
+
return result;
|
|
3645
|
+
}
|
|
3646
|
+
function flatten(array) {
|
|
3647
|
+
var length = array == null ? 0 : array.length;
|
|
3648
|
+
return length ? baseFlatten(array, 1) : [];
|
|
3649
|
+
}
|
|
3650
|
+
function flatRest(func) {
|
|
3651
|
+
return setToString$1(overRest(func, void 0, flatten), func + "");
|
|
3652
|
+
}
|
|
3653
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
3654
|
+
const getPrototype$1 = getPrototype;
|
|
3655
|
+
var objectTag$3 = "[object Object]";
|
|
3656
|
+
var funcProto = Function.prototype, objectProto$4 = Object.prototype;
|
|
3657
|
+
var funcToString = funcProto.toString;
|
|
3658
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
3659
|
+
var objectCtorString = funcToString.call(Object);
|
|
3660
|
+
function isPlainObject(value) {
|
|
3661
|
+
if (!isObjectLike(value) || baseGetTag(value) != objectTag$3) {
|
|
3662
|
+
return false;
|
|
3663
|
+
}
|
|
3664
|
+
var proto = getPrototype$1(value);
|
|
3665
|
+
if (proto === null) {
|
|
3666
|
+
return true;
|
|
3667
|
+
}
|
|
3668
|
+
var Ctor = hasOwnProperty$3.call(proto, "constructor") && proto.constructor;
|
|
3669
|
+
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;
|
|
3670
|
+
}
|
|
3671
|
+
function baseSlice(array, start, end) {
|
|
3672
|
+
var index2 = -1, length = array.length;
|
|
3673
|
+
if (start < 0) {
|
|
3674
|
+
start = -start > length ? 0 : length + start;
|
|
3675
|
+
}
|
|
3676
|
+
end = end > length ? length : end;
|
|
3677
|
+
if (end < 0) {
|
|
3678
|
+
end += length;
|
|
3679
|
+
}
|
|
3680
|
+
length = start > end ? 0 : end - start >>> 0;
|
|
3681
|
+
start >>>= 0;
|
|
3682
|
+
var result = Array(length);
|
|
3683
|
+
while (++index2 < length) {
|
|
3684
|
+
result[index2] = array[index2 + start];
|
|
3685
|
+
}
|
|
3686
|
+
return result;
|
|
3687
|
+
}
|
|
3688
|
+
function stackClear() {
|
|
3689
|
+
this.__data__ = new ListCache();
|
|
3690
|
+
this.size = 0;
|
|
3691
|
+
}
|
|
3692
|
+
function stackDelete(key2) {
|
|
3693
|
+
var data = this.__data__, result = data["delete"](key2);
|
|
3694
|
+
this.size = data.size;
|
|
3695
|
+
return result;
|
|
3696
|
+
}
|
|
3697
|
+
function stackGet(key2) {
|
|
3698
|
+
return this.__data__.get(key2);
|
|
3699
|
+
}
|
|
3700
|
+
function stackHas(key2) {
|
|
3701
|
+
return this.__data__.has(key2);
|
|
3702
|
+
}
|
|
3703
|
+
var LARGE_ARRAY_SIZE = 200;
|
|
3704
|
+
function stackSet(key2, value) {
|
|
3705
|
+
var data = this.__data__;
|
|
3706
|
+
if (data instanceof ListCache) {
|
|
3707
|
+
var pairs = data.__data__;
|
|
3708
|
+
if (!Map$2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
|
|
3709
|
+
pairs.push([key2, value]);
|
|
3710
|
+
this.size = ++data.size;
|
|
3711
|
+
return this;
|
|
3712
|
+
}
|
|
3713
|
+
data = this.__data__ = new MapCache(pairs);
|
|
3714
|
+
}
|
|
3715
|
+
data.set(key2, value);
|
|
3716
|
+
this.size = data.size;
|
|
3717
|
+
return this;
|
|
3718
|
+
}
|
|
3719
|
+
function Stack(entries2) {
|
|
3720
|
+
var data = this.__data__ = new ListCache(entries2);
|
|
3721
|
+
this.size = data.size;
|
|
3722
|
+
}
|
|
3723
|
+
Stack.prototype.clear = stackClear;
|
|
3724
|
+
Stack.prototype["delete"] = stackDelete;
|
|
3725
|
+
Stack.prototype.get = stackGet;
|
|
3726
|
+
Stack.prototype.has = stackHas;
|
|
3727
|
+
Stack.prototype.set = stackSet;
|
|
3728
|
+
function baseAssign(object, source) {
|
|
3729
|
+
return object && copyObject(source, keys(source), object);
|
|
3730
|
+
}
|
|
3731
|
+
function baseAssignIn(object, source) {
|
|
3732
|
+
return object && copyObject(source, keysIn(source), object);
|
|
3733
|
+
}
|
|
3734
|
+
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
|
|
3735
|
+
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
3736
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
3737
|
+
var Buffer = moduleExports ? root$1.Buffer : void 0, allocUnsafe = Buffer ? Buffer.allocUnsafe : void 0;
|
|
3738
|
+
function cloneBuffer(buffer, isDeep) {
|
|
3739
|
+
if (isDeep) {
|
|
3740
|
+
return buffer.slice();
|
|
3741
|
+
}
|
|
3742
|
+
var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
3743
|
+
buffer.copy(result);
|
|
3744
|
+
return result;
|
|
3745
|
+
}
|
|
3746
|
+
function arrayFilter(array, predicate) {
|
|
3747
|
+
var index2 = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
|
|
3748
|
+
while (++index2 < length) {
|
|
3749
|
+
var value = array[index2];
|
|
3750
|
+
if (predicate(value, index2, array)) {
|
|
3751
|
+
result[resIndex++] = value;
|
|
3752
|
+
}
|
|
3753
|
+
}
|
|
3754
|
+
return result;
|
|
3755
|
+
}
|
|
3756
|
+
function stubArray() {
|
|
3757
|
+
return [];
|
|
3758
|
+
}
|
|
3759
|
+
var objectProto$3 = Object.prototype;
|
|
3760
|
+
var propertyIsEnumerable = objectProto$3.propertyIsEnumerable;
|
|
3761
|
+
var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
|
|
3762
|
+
var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
|
|
3763
|
+
if (object == null) {
|
|
3764
|
+
return [];
|
|
3765
|
+
}
|
|
3766
|
+
object = Object(object);
|
|
3767
|
+
return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
|
|
3768
|
+
return propertyIsEnumerable.call(object, symbol);
|
|
3769
|
+
});
|
|
3770
|
+
};
|
|
3771
|
+
const getSymbols$1 = getSymbols;
|
|
3772
|
+
function copySymbols(source, object) {
|
|
3773
|
+
return copyObject(source, getSymbols$1(source), object);
|
|
3774
|
+
}
|
|
3775
|
+
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
3776
|
+
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
|
|
3777
|
+
var result = [];
|
|
3778
|
+
while (object) {
|
|
3779
|
+
arrayPush(result, getSymbols$1(object));
|
|
3780
|
+
object = getPrototype$1(object);
|
|
3781
|
+
}
|
|
3782
|
+
return result;
|
|
3783
|
+
};
|
|
3784
|
+
const getSymbolsIn$1 = getSymbolsIn;
|
|
3785
|
+
function copySymbolsIn(source, object) {
|
|
3786
|
+
return copyObject(source, getSymbolsIn$1(source), object);
|
|
3787
|
+
}
|
|
3788
|
+
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
3789
|
+
var result = keysFunc(object);
|
|
3790
|
+
return isArray$1(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
3791
|
+
}
|
|
3792
|
+
function getAllKeys(object) {
|
|
3793
|
+
return baseGetAllKeys(object, keys, getSymbols$1);
|
|
3794
|
+
}
|
|
3795
|
+
function getAllKeysIn(object) {
|
|
3796
|
+
return baseGetAllKeys(object, keysIn, getSymbolsIn$1);
|
|
3797
|
+
}
|
|
3798
|
+
var DataView = getNative(root$1, "DataView");
|
|
3799
|
+
const DataView$1 = DataView;
|
|
3800
|
+
var Promise$1 = getNative(root$1, "Promise");
|
|
3801
|
+
const Promise$2 = Promise$1;
|
|
3802
|
+
var Set = getNative(root$1, "Set");
|
|
3803
|
+
const Set$1 = Set;
|
|
3804
|
+
var mapTag$4 = "[object Map]", objectTag$2 = "[object Object]", promiseTag = "[object Promise]", setTag$4 = "[object Set]", weakMapTag$1 = "[object WeakMap]";
|
|
3805
|
+
var dataViewTag$3 = "[object DataView]";
|
|
3806
|
+
var dataViewCtorString = toSource(DataView$1), mapCtorString = toSource(Map$2), promiseCtorString = toSource(Promise$2), setCtorString = toSource(Set$1), weakMapCtorString = toSource(WeakMap$2);
|
|
3807
|
+
var getTag = baseGetTag;
|
|
3808
|
+
if (DataView$1 && getTag(new DataView$1(new ArrayBuffer(1))) != dataViewTag$3 || Map$2 && getTag(new Map$2()) != mapTag$4 || Promise$2 && getTag(Promise$2.resolve()) != promiseTag || Set$1 && getTag(new Set$1()) != setTag$4 || WeakMap$2 && getTag(new WeakMap$2()) != weakMapTag$1) {
|
|
3809
|
+
getTag = function(value) {
|
|
3810
|
+
var result = baseGetTag(value), Ctor = result == objectTag$2 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : "";
|
|
3811
|
+
if (ctorString) {
|
|
3812
|
+
switch (ctorString) {
|
|
3813
|
+
case dataViewCtorString:
|
|
3814
|
+
return dataViewTag$3;
|
|
3815
|
+
case mapCtorString:
|
|
3816
|
+
return mapTag$4;
|
|
3817
|
+
case promiseCtorString:
|
|
3818
|
+
return promiseTag;
|
|
3819
|
+
case setCtorString:
|
|
3820
|
+
return setTag$4;
|
|
3821
|
+
case weakMapCtorString:
|
|
3822
|
+
return weakMapTag$1;
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3825
|
+
return result;
|
|
3826
|
+
};
|
|
3827
|
+
}
|
|
3828
|
+
const getTag$1 = getTag;
|
|
3829
|
+
var objectProto$2 = Object.prototype;
|
|
3830
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
3831
|
+
function initCloneArray(array) {
|
|
3832
|
+
var length = array.length, result = new array.constructor(length);
|
|
3833
|
+
if (length && typeof array[0] == "string" && hasOwnProperty$2.call(array, "index")) {
|
|
3834
|
+
result.index = array.index;
|
|
3835
|
+
result.input = array.input;
|
|
3836
|
+
}
|
|
3837
|
+
return result;
|
|
3838
|
+
}
|
|
3839
|
+
var Uint8Array = root$1.Uint8Array;
|
|
3840
|
+
const Uint8Array$1 = Uint8Array;
|
|
3841
|
+
function cloneArrayBuffer(arrayBuffer) {
|
|
3842
|
+
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
|
3843
|
+
new Uint8Array$1(result).set(new Uint8Array$1(arrayBuffer));
|
|
3844
|
+
return result;
|
|
3845
|
+
}
|
|
3846
|
+
function cloneDataView(dataView, isDeep) {
|
|
3847
|
+
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
|
|
3848
|
+
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
|
|
3849
|
+
}
|
|
3850
|
+
var reFlags = /\w*$/;
|
|
3851
|
+
function cloneRegExp(regexp) {
|
|
3852
|
+
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
|
|
3853
|
+
result.lastIndex = regexp.lastIndex;
|
|
3854
|
+
return result;
|
|
3855
|
+
}
|
|
3856
|
+
var symbolProto$1 = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf$1 = symbolProto$1 ? symbolProto$1.valueOf : void 0;
|
|
3857
|
+
function cloneSymbol(symbol) {
|
|
3858
|
+
return symbolValueOf$1 ? Object(symbolValueOf$1.call(symbol)) : {};
|
|
3859
|
+
}
|
|
3860
|
+
function cloneTypedArray(typedArray, isDeep) {
|
|
3861
|
+
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
3862
|
+
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
3863
|
+
}
|
|
3864
|
+
var boolTag$2 = "[object Boolean]", dateTag$2 = "[object Date]", mapTag$3 = "[object Map]", numberTag$2 = "[object Number]", regexpTag$2 = "[object RegExp]", setTag$3 = "[object Set]", stringTag$2 = "[object String]", symbolTag$2 = "[object Symbol]";
|
|
3865
|
+
var arrayBufferTag$2 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]", float32Tag$1 = "[object Float32Array]", float64Tag$1 = "[object Float64Array]", int8Tag$1 = "[object Int8Array]", int16Tag$1 = "[object Int16Array]", int32Tag$1 = "[object Int32Array]", uint8Tag$1 = "[object Uint8Array]", uint8ClampedTag$1 = "[object Uint8ClampedArray]", uint16Tag$1 = "[object Uint16Array]", uint32Tag$1 = "[object Uint32Array]";
|
|
3866
|
+
function initCloneByTag(object, tag, isDeep) {
|
|
3867
|
+
var Ctor = object.constructor;
|
|
3868
|
+
switch (tag) {
|
|
3869
|
+
case arrayBufferTag$2:
|
|
3870
|
+
return cloneArrayBuffer(object);
|
|
3871
|
+
case boolTag$2:
|
|
3872
|
+
case dateTag$2:
|
|
3873
|
+
return new Ctor(+object);
|
|
3874
|
+
case dataViewTag$2:
|
|
3875
|
+
return cloneDataView(object, isDeep);
|
|
3876
|
+
case float32Tag$1:
|
|
3877
|
+
case float64Tag$1:
|
|
3878
|
+
case int8Tag$1:
|
|
3879
|
+
case int16Tag$1:
|
|
3880
|
+
case int32Tag$1:
|
|
3881
|
+
case uint8Tag$1:
|
|
3882
|
+
case uint8ClampedTag$1:
|
|
3883
|
+
case uint16Tag$1:
|
|
3884
|
+
case uint32Tag$1:
|
|
3885
|
+
return cloneTypedArray(object, isDeep);
|
|
3886
|
+
case mapTag$3:
|
|
3887
|
+
return new Ctor();
|
|
3888
|
+
case numberTag$2:
|
|
3889
|
+
case stringTag$2:
|
|
3890
|
+
return new Ctor(object);
|
|
3891
|
+
case regexpTag$2:
|
|
3892
|
+
return cloneRegExp(object);
|
|
3893
|
+
case setTag$3:
|
|
3894
|
+
return new Ctor();
|
|
3895
|
+
case symbolTag$2:
|
|
3896
|
+
return cloneSymbol(object);
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3899
|
+
function initCloneObject(object) {
|
|
3900
|
+
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate$1(getPrototype$1(object)) : {};
|
|
3901
|
+
}
|
|
3902
|
+
var mapTag$2 = "[object Map]";
|
|
3903
|
+
function baseIsMap(value) {
|
|
3904
|
+
return isObjectLike(value) && getTag$1(value) == mapTag$2;
|
|
3905
|
+
}
|
|
3906
|
+
var nodeIsMap = nodeUtil$1 && nodeUtil$1.isMap;
|
|
3907
|
+
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
|
|
3908
|
+
const isMap$1 = isMap;
|
|
3909
|
+
var setTag$2 = "[object Set]";
|
|
3910
|
+
function baseIsSet(value) {
|
|
3911
|
+
return isObjectLike(value) && getTag$1(value) == setTag$2;
|
|
3912
|
+
}
|
|
3913
|
+
var nodeIsSet = nodeUtil$1 && nodeUtil$1.isSet;
|
|
3914
|
+
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
3915
|
+
const isSet$1 = isSet;
|
|
3916
|
+
var CLONE_DEEP_FLAG$2 = 1, CLONE_FLAT_FLAG$1 = 2, CLONE_SYMBOLS_FLAG$2 = 4;
|
|
3917
|
+
var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag$1 = "[object Map]", numberTag$1 = "[object Number]", objectTag$1 = "[object Object]", regexpTag$1 = "[object RegExp]", setTag$1 = "[object Set]", stringTag$1 = "[object String]", symbolTag$1 = "[object Symbol]", weakMapTag = "[object WeakMap]";
|
|
3918
|
+
var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
|
|
3919
|
+
var cloneableTags = {};
|
|
3920
|
+
cloneableTags[argsTag$1] = cloneableTags[arrayTag$1] = cloneableTags[arrayBufferTag$1] = cloneableTags[dataViewTag$1] = cloneableTags[boolTag$1] = cloneableTags[dateTag$1] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag$1] = cloneableTags[objectTag$1] = cloneableTags[regexpTag$1] = cloneableTags[setTag$1] = cloneableTags[stringTag$1] = cloneableTags[symbolTag$1] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
3921
|
+
cloneableTags[errorTag$1] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
3922
|
+
function baseClone(value, bitmask, customizer, key2, object, stack) {
|
|
3923
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
|
|
3924
|
+
if (customizer) {
|
|
3925
|
+
result = object ? customizer(value, key2, object, stack) : customizer(value);
|
|
3926
|
+
}
|
|
3927
|
+
if (result !== void 0) {
|
|
3928
|
+
return result;
|
|
3929
|
+
}
|
|
3930
|
+
if (!isObject(value)) {
|
|
3931
|
+
return value;
|
|
3932
|
+
}
|
|
3933
|
+
var isArr = isArray$1(value);
|
|
3934
|
+
if (isArr) {
|
|
3935
|
+
result = initCloneArray(value);
|
|
3936
|
+
if (!isDeep) {
|
|
3937
|
+
return copyArray(value, result);
|
|
3938
|
+
}
|
|
3939
|
+
} else {
|
|
3940
|
+
var tag = getTag$1(value), isFunc = tag == funcTag || tag == genTag;
|
|
3941
|
+
if (isBuffer$1(value)) {
|
|
3942
|
+
return cloneBuffer(value, isDeep);
|
|
3943
|
+
}
|
|
3944
|
+
if (tag == objectTag$1 || tag == argsTag$1 || isFunc && !object) {
|
|
3945
|
+
result = isFlat || isFunc ? {} : initCloneObject(value);
|
|
3946
|
+
if (!isDeep) {
|
|
3947
|
+
return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value));
|
|
3948
|
+
}
|
|
3949
|
+
} else {
|
|
3950
|
+
if (!cloneableTags[tag]) {
|
|
3951
|
+
return object ? value : {};
|
|
3952
|
+
}
|
|
3953
|
+
result = initCloneByTag(value, tag, isDeep);
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
stack || (stack = new Stack());
|
|
3957
|
+
var stacked = stack.get(value);
|
|
3958
|
+
if (stacked) {
|
|
3959
|
+
return stacked;
|
|
3960
|
+
}
|
|
3961
|
+
stack.set(value, result);
|
|
3962
|
+
if (isSet$1(value)) {
|
|
3963
|
+
value.forEach(function(subValue) {
|
|
3964
|
+
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
|
3965
|
+
});
|
|
3966
|
+
} else if (isMap$1(value)) {
|
|
3967
|
+
value.forEach(function(subValue, key3) {
|
|
3968
|
+
result.set(key3, baseClone(subValue, bitmask, customizer, key3, value, stack));
|
|
3969
|
+
});
|
|
3970
|
+
}
|
|
3971
|
+
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
|
|
3972
|
+
var props2 = isArr ? void 0 : keysFunc(value);
|
|
3973
|
+
arrayEach(props2 || value, function(subValue, key3) {
|
|
3974
|
+
if (props2) {
|
|
3975
|
+
key3 = subValue;
|
|
3976
|
+
subValue = value[key3];
|
|
3977
|
+
}
|
|
3978
|
+
assignValue(result, key3, baseClone(subValue, bitmask, customizer, key3, value, stack));
|
|
3979
|
+
});
|
|
3980
|
+
return result;
|
|
3981
|
+
}
|
|
3982
|
+
var CLONE_DEEP_FLAG$1 = 1, CLONE_SYMBOLS_FLAG$1 = 4;
|
|
3983
|
+
function cloneDeep(value) {
|
|
3984
|
+
return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
|
|
3985
|
+
}
|
|
3986
|
+
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
3987
|
+
function setCacheAdd(value) {
|
|
3988
|
+
this.__data__.set(value, HASH_UNDEFINED);
|
|
3989
|
+
return this;
|
|
3990
|
+
}
|
|
3991
|
+
function setCacheHas(value) {
|
|
3992
|
+
return this.__data__.has(value);
|
|
3993
|
+
}
|
|
3994
|
+
function SetCache(values) {
|
|
3995
|
+
var index2 = -1, length = values == null ? 0 : values.length;
|
|
3996
|
+
this.__data__ = new MapCache();
|
|
3997
|
+
while (++index2 < length) {
|
|
3998
|
+
this.add(values[index2]);
|
|
3999
|
+
}
|
|
4000
|
+
}
|
|
4001
|
+
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
4002
|
+
SetCache.prototype.has = setCacheHas;
|
|
4003
|
+
function arraySome(array, predicate) {
|
|
4004
|
+
var index2 = -1, length = array == null ? 0 : array.length;
|
|
4005
|
+
while (++index2 < length) {
|
|
4006
|
+
if (predicate(array[index2], index2, array)) {
|
|
4007
|
+
return true;
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
return false;
|
|
4011
|
+
}
|
|
4012
|
+
function cacheHas(cache, key2) {
|
|
4013
|
+
return cache.has(key2);
|
|
4014
|
+
}
|
|
4015
|
+
var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2;
|
|
4016
|
+
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
4017
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length;
|
|
4018
|
+
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
4019
|
+
return false;
|
|
4020
|
+
}
|
|
4021
|
+
var arrStacked = stack.get(array);
|
|
4022
|
+
var othStacked = stack.get(other);
|
|
4023
|
+
if (arrStacked && othStacked) {
|
|
4024
|
+
return arrStacked == other && othStacked == array;
|
|
4025
|
+
}
|
|
4026
|
+
var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0;
|
|
4027
|
+
stack.set(array, other);
|
|
4028
|
+
stack.set(other, array);
|
|
4029
|
+
while (++index2 < arrLength) {
|
|
4030
|
+
var arrValue = array[index2], othValue = other[index2];
|
|
4031
|
+
if (customizer) {
|
|
4032
|
+
var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
|
|
4033
|
+
}
|
|
4034
|
+
if (compared !== void 0) {
|
|
4035
|
+
if (compared) {
|
|
4036
|
+
continue;
|
|
4037
|
+
}
|
|
4038
|
+
result = false;
|
|
4039
|
+
break;
|
|
4040
|
+
}
|
|
4041
|
+
if (seen) {
|
|
4042
|
+
if (!arraySome(other, function(othValue2, othIndex) {
|
|
4043
|
+
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
|
|
4044
|
+
return seen.push(othIndex);
|
|
4045
|
+
}
|
|
4046
|
+
})) {
|
|
4047
|
+
result = false;
|
|
4048
|
+
break;
|
|
4049
|
+
}
|
|
4050
|
+
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
4051
|
+
result = false;
|
|
4052
|
+
break;
|
|
4053
|
+
}
|
|
4054
|
+
}
|
|
4055
|
+
stack["delete"](array);
|
|
4056
|
+
stack["delete"](other);
|
|
4057
|
+
return result;
|
|
4058
|
+
}
|
|
4059
|
+
function mapToArray(map) {
|
|
4060
|
+
var index2 = -1, result = Array(map.size);
|
|
4061
|
+
map.forEach(function(value, key2) {
|
|
4062
|
+
result[++index2] = [key2, value];
|
|
4063
|
+
});
|
|
4064
|
+
return result;
|
|
4065
|
+
}
|
|
4066
|
+
function setToArray(set) {
|
|
4067
|
+
var index2 = -1, result = Array(set.size);
|
|
4068
|
+
set.forEach(function(value) {
|
|
4069
|
+
result[++index2] = value;
|
|
4070
|
+
});
|
|
4071
|
+
return result;
|
|
4072
|
+
}
|
|
4073
|
+
var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
|
|
4074
|
+
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]";
|
|
4075
|
+
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
|
|
4076
|
+
var symbolProto = Symbol$2 ? Symbol$2.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
|
|
4077
|
+
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
4078
|
+
switch (tag) {
|
|
4079
|
+
case dataViewTag:
|
|
4080
|
+
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
|
|
4081
|
+
return false;
|
|
4082
|
+
}
|
|
4083
|
+
object = object.buffer;
|
|
4084
|
+
other = other.buffer;
|
|
4085
|
+
case arrayBufferTag:
|
|
4086
|
+
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array$1(object), new Uint8Array$1(other))) {
|
|
4087
|
+
return false;
|
|
4088
|
+
}
|
|
4089
|
+
return true;
|
|
4090
|
+
case boolTag:
|
|
4091
|
+
case dateTag:
|
|
4092
|
+
case numberTag:
|
|
4093
|
+
return eq(+object, +other);
|
|
4094
|
+
case errorTag:
|
|
4095
|
+
return object.name == other.name && object.message == other.message;
|
|
4096
|
+
case regexpTag:
|
|
4097
|
+
case stringTag:
|
|
4098
|
+
return object == other + "";
|
|
4099
|
+
case mapTag:
|
|
4100
|
+
var convert = mapToArray;
|
|
4101
|
+
case setTag:
|
|
4102
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
|
|
4103
|
+
convert || (convert = setToArray);
|
|
4104
|
+
if (object.size != other.size && !isPartial) {
|
|
4105
|
+
return false;
|
|
4106
|
+
}
|
|
4107
|
+
var stacked = stack.get(object);
|
|
4108
|
+
if (stacked) {
|
|
4109
|
+
return stacked == other;
|
|
4110
|
+
}
|
|
4111
|
+
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
4112
|
+
stack.set(object, other);
|
|
4113
|
+
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
4114
|
+
stack["delete"](object);
|
|
4115
|
+
return result;
|
|
4116
|
+
case symbolTag:
|
|
4117
|
+
if (symbolValueOf) {
|
|
4118
|
+
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
4119
|
+
}
|
|
4120
|
+
}
|
|
4121
|
+
return false;
|
|
4122
|
+
}
|
|
4123
|
+
var COMPARE_PARTIAL_FLAG$1 = 1;
|
|
4124
|
+
var objectProto$1 = Object.prototype;
|
|
4125
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
4126
|
+
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
4127
|
+
var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
|
|
4128
|
+
if (objLength != othLength && !isPartial) {
|
|
4129
|
+
return false;
|
|
4130
|
+
}
|
|
4131
|
+
var index2 = objLength;
|
|
4132
|
+
while (index2--) {
|
|
4133
|
+
var key2 = objProps[index2];
|
|
4134
|
+
if (!(isPartial ? key2 in other : hasOwnProperty$1.call(other, key2))) {
|
|
4135
|
+
return false;
|
|
4136
|
+
}
|
|
4137
|
+
}
|
|
4138
|
+
var objStacked = stack.get(object);
|
|
4139
|
+
var othStacked = stack.get(other);
|
|
4140
|
+
if (objStacked && othStacked) {
|
|
4141
|
+
return objStacked == other && othStacked == object;
|
|
4142
|
+
}
|
|
4143
|
+
var result = true;
|
|
4144
|
+
stack.set(object, other);
|
|
4145
|
+
stack.set(other, object);
|
|
4146
|
+
var skipCtor = isPartial;
|
|
4147
|
+
while (++index2 < objLength) {
|
|
4148
|
+
key2 = objProps[index2];
|
|
4149
|
+
var objValue = object[key2], othValue = other[key2];
|
|
4150
|
+
if (customizer) {
|
|
4151
|
+
var compared = isPartial ? customizer(othValue, objValue, key2, other, object, stack) : customizer(objValue, othValue, key2, object, other, stack);
|
|
4152
|
+
}
|
|
4153
|
+
if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
|
|
4154
|
+
result = false;
|
|
4155
|
+
break;
|
|
4156
|
+
}
|
|
4157
|
+
skipCtor || (skipCtor = key2 == "constructor");
|
|
4158
|
+
}
|
|
4159
|
+
if (result && !skipCtor) {
|
|
4160
|
+
var objCtor = object.constructor, othCtor = other.constructor;
|
|
4161
|
+
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
|
|
4162
|
+
result = false;
|
|
4163
|
+
}
|
|
4164
|
+
}
|
|
4165
|
+
stack["delete"](object);
|
|
4166
|
+
stack["delete"](other);
|
|
4167
|
+
return result;
|
|
4168
|
+
}
|
|
4169
|
+
var COMPARE_PARTIAL_FLAG = 1;
|
|
4170
|
+
var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]";
|
|
4171
|
+
var objectProto = Object.prototype;
|
|
4172
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
4173
|
+
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
4174
|
+
var objIsArr = isArray$1(object), othIsArr = isArray$1(other), objTag = objIsArr ? arrayTag : getTag$1(object), othTag = othIsArr ? arrayTag : getTag$1(other);
|
|
4175
|
+
objTag = objTag == argsTag ? objectTag : objTag;
|
|
4176
|
+
othTag = othTag == argsTag ? objectTag : othTag;
|
|
4177
|
+
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
|
|
4178
|
+
if (isSameTag && isBuffer$1(object)) {
|
|
4179
|
+
if (!isBuffer$1(other)) {
|
|
4180
|
+
return false;
|
|
4181
|
+
}
|
|
4182
|
+
objIsArr = true;
|
|
4183
|
+
objIsObj = false;
|
|
4184
|
+
}
|
|
4185
|
+
if (isSameTag && !objIsObj) {
|
|
4186
|
+
stack || (stack = new Stack());
|
|
4187
|
+
return objIsArr || isTypedArray$1(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
4188
|
+
}
|
|
4189
|
+
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
4190
|
+
var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
|
|
4191
|
+
if (objIsWrapped || othIsWrapped) {
|
|
4192
|
+
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
|
|
4193
|
+
stack || (stack = new Stack());
|
|
4194
|
+
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
4195
|
+
}
|
|
4196
|
+
}
|
|
4197
|
+
if (!isSameTag) {
|
|
4198
|
+
return false;
|
|
4199
|
+
}
|
|
4200
|
+
stack || (stack = new Stack());
|
|
4201
|
+
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
4202
|
+
}
|
|
4203
|
+
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
4204
|
+
if (value === other) {
|
|
4205
|
+
return true;
|
|
4206
|
+
}
|
|
4207
|
+
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
|
|
4208
|
+
return value !== value && other !== other;
|
|
4209
|
+
}
|
|
4210
|
+
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
4211
|
+
}
|
|
4212
|
+
function last(array) {
|
|
4213
|
+
var length = array == null ? 0 : array.length;
|
|
4214
|
+
return length ? array[length - 1] : void 0;
|
|
4215
|
+
}
|
|
4216
|
+
function parent(object, path) {
|
|
4217
|
+
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
4218
|
+
}
|
|
4219
|
+
function isEqual(value, other) {
|
|
4220
|
+
return baseIsEqual(value, other);
|
|
4221
|
+
}
|
|
4222
|
+
function baseUnset(object, path) {
|
|
4223
|
+
path = castPath(path, object);
|
|
4224
|
+
object = parent(object, path);
|
|
4225
|
+
return object == null || delete object[toKey(last(path))];
|
|
4226
|
+
}
|
|
4227
|
+
function customOmitClone(value) {
|
|
4228
|
+
return isPlainObject(value) ? void 0 : value;
|
|
4229
|
+
}
|
|
4230
|
+
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
|
|
4231
|
+
var omit = flatRest(function(object, paths) {
|
|
4232
|
+
var result = {};
|
|
4233
|
+
if (object == null) {
|
|
4234
|
+
return result;
|
|
4235
|
+
}
|
|
4236
|
+
var isDeep = false;
|
|
4237
|
+
paths = arrayMap(paths, function(path) {
|
|
4238
|
+
path = castPath(path, object);
|
|
4239
|
+
isDeep || (isDeep = path.length > 1);
|
|
4240
|
+
return path;
|
|
4241
|
+
});
|
|
4242
|
+
copyObject(object, getAllKeysIn(object), result);
|
|
4243
|
+
if (isDeep) {
|
|
4244
|
+
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
|
|
4245
|
+
}
|
|
4246
|
+
var length = paths.length;
|
|
4247
|
+
while (length--) {
|
|
4248
|
+
baseUnset(result, paths[length]);
|
|
4249
|
+
}
|
|
4250
|
+
return result;
|
|
4251
|
+
});
|
|
4252
|
+
const omit$1 = omit;
|
|
4253
|
+
function deepMerge(src = {}, target = {}) {
|
|
4254
|
+
let key2;
|
|
4255
|
+
const res = cloneDeep(src);
|
|
4256
|
+
for (key2 in target) {
|
|
4257
|
+
res[key2] = isObject$1(res[key2]) ? deepMerge(res[key2], target[key2]) : res[key2] = target[key2];
|
|
4258
|
+
}
|
|
4259
|
+
return res;
|
|
4260
|
+
}
|
|
4261
|
+
function getPopupContainer(node) {
|
|
4262
|
+
var _a3;
|
|
4263
|
+
return (_a3 = node == null ? void 0 : node.parentNode) != null ? _a3 : document.body;
|
|
4264
|
+
}
|
|
4265
|
+
function useContext(key2 = Symbol(), defaultValue) {
|
|
4266
|
+
return inject(key2, defaultValue || {});
|
|
4267
|
+
}
|
|
4268
|
+
const key = Symbol();
|
|
4269
|
+
function useAppProviderContext() {
|
|
4270
|
+
return useContext(key);
|
|
4271
|
+
}
|
|
4272
|
+
function useDesign(scope) {
|
|
4273
|
+
const values = useAppProviderContext();
|
|
4274
|
+
console.log("value", values);
|
|
4275
|
+
return {
|
|
4276
|
+
prefixCls: `${values.prefixCls}-${scope}`,
|
|
4277
|
+
prefixVar: values.prefixCls
|
|
4278
|
+
};
|
|
4279
|
+
}
|
|
4280
|
+
const props = {
|
|
4281
|
+
maxWidth: {
|
|
4282
|
+
type: String,
|
|
4283
|
+
default: "600px"
|
|
4284
|
+
},
|
|
4285
|
+
showIndex: {
|
|
4286
|
+
type: Boolean
|
|
4287
|
+
},
|
|
4288
|
+
color: {
|
|
4289
|
+
type: String,
|
|
4290
|
+
default: "#ffffff"
|
|
4291
|
+
},
|
|
4292
|
+
fontSize: {
|
|
4293
|
+
type: String,
|
|
4294
|
+
default: "14px"
|
|
4295
|
+
},
|
|
4296
|
+
placement: {
|
|
4297
|
+
type: String,
|
|
4298
|
+
default: "right"
|
|
4299
|
+
},
|
|
4300
|
+
text: {
|
|
4301
|
+
type: [Array, String]
|
|
4302
|
+
}
|
|
4303
|
+
};
|
|
4304
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
4305
|
+
name: "BasicHelp",
|
|
4306
|
+
components: {
|
|
4307
|
+
Tooltip
|
|
4308
|
+
},
|
|
4309
|
+
props,
|
|
4310
|
+
setup(props2, {
|
|
4311
|
+
slots
|
|
4312
|
+
}) {
|
|
4313
|
+
const {
|
|
4314
|
+
prefixCls
|
|
4315
|
+
} = useDesign("basic-help");
|
|
4316
|
+
const getTooltipStyle = computed(() => ({
|
|
4317
|
+
color: props2.color,
|
|
4318
|
+
fontSize: props2.fontSize
|
|
4319
|
+
}));
|
|
4320
|
+
const getOverlayStyle = computed(() => ({
|
|
4321
|
+
maxWidth: props2.maxWidth
|
|
4322
|
+
}));
|
|
4323
|
+
function renderTitle() {
|
|
4324
|
+
const textList = props2.text;
|
|
4325
|
+
if (isString(textList)) {
|
|
4326
|
+
return createVNode("p", null, [textList]);
|
|
4327
|
+
}
|
|
4328
|
+
if (isArray$2(textList)) {
|
|
4329
|
+
return textList.map((text, index2) => {
|
|
4330
|
+
return createVNode("p", {
|
|
4331
|
+
"key": text
|
|
4332
|
+
}, [createVNode(Fragment, null, [props2.showIndex ? `${index2 + 1}. ` : "", text])]);
|
|
4333
|
+
});
|
|
4334
|
+
}
|
|
4335
|
+
return null;
|
|
4336
|
+
}
|
|
4337
|
+
return () => {
|
|
4338
|
+
return createVNode(Tooltip, {
|
|
4339
|
+
"overlayClassName": `${prefixCls}__wrap`,
|
|
4340
|
+
"title": createVNode("div", {
|
|
4341
|
+
"style": unref(getTooltipStyle)
|
|
4342
|
+
}, [renderTitle()]),
|
|
4343
|
+
"autoAdjustOverflow": true,
|
|
4344
|
+
"overlayStyle": unref(getOverlayStyle),
|
|
4345
|
+
"placement": props2.placement,
|
|
4346
|
+
"getPopupContainer": () => getPopupContainer()
|
|
4347
|
+
}, {
|
|
4348
|
+
default: () => [createVNode("span", {
|
|
4349
|
+
"class": prefixCls
|
|
4350
|
+
}, [getSlot(slots) || createVNode(InfoCircleOutlined$1, null, null)])]
|
|
4351
|
+
});
|
|
4352
|
+
};
|
|
4353
|
+
}
|
|
4354
|
+
});
|
|
4355
|
+
const BasicHelp_vue_vue_type_style_index_0_lang = "";
|
|
4356
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
4357
|
+
__name: "BasicTitle",
|
|
4358
|
+
props: {
|
|
4359
|
+
helpMessage: {
|
|
4360
|
+
type: [String, Array],
|
|
4361
|
+
default: ""
|
|
4362
|
+
},
|
|
4363
|
+
span: { type: Boolean },
|
|
4364
|
+
normal: { type: Boolean }
|
|
4365
|
+
},
|
|
4366
|
+
setup(__props) {
|
|
4367
|
+
const props2 = __props;
|
|
4368
|
+
const prefixCls = "shy-basic-title";
|
|
4369
|
+
const slots = useSlots();
|
|
4370
|
+
const getClass = computed(() => [
|
|
4371
|
+
prefixCls,
|
|
4372
|
+
{ [`${prefixCls}-show-span`]: props2.span && slots.default },
|
|
4373
|
+
{ [`${prefixCls}-normal`]: props2.normal }
|
|
4374
|
+
]);
|
|
4375
|
+
return (_ctx, _cache) => {
|
|
4376
|
+
return openBlock(), createElementBlock("span", {
|
|
4377
|
+
class: normalizeClass(unref(getClass))
|
|
4378
|
+
}, [
|
|
4379
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
4380
|
+
__props.helpMessage ? (openBlock(), createBlock(_sfc_main$4, {
|
|
4381
|
+
key: 0,
|
|
4382
|
+
class: normalizeClass(`${prefixCls}-help`),
|
|
4383
|
+
text: __props.helpMessage
|
|
4384
|
+
}, null, 8, ["class", "text"])) : createCommentVNode("", true)
|
|
4385
|
+
], 2);
|
|
4386
|
+
};
|
|
4387
|
+
}
|
|
4388
|
+
});
|
|
4389
|
+
const BasicTitle_vue_vue_type_style_index_0_scoped_f417d66d_lang = "";
|
|
4390
|
+
const BasicTitle = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-f417d66d"]]);
|
|
4391
|
+
const _sfc_main$2 = defineComponent({
|
|
4392
|
+
name: "BasicModalHeader",
|
|
4393
|
+
components: { BasicTitle },
|
|
4394
|
+
props: {
|
|
4395
|
+
helpMessage: {
|
|
4396
|
+
type: [String, Array]
|
|
4397
|
+
},
|
|
4398
|
+
title: { type: String }
|
|
4399
|
+
},
|
|
4400
|
+
emits: ["dblclick"]
|
|
4401
|
+
});
|
|
4402
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4403
|
+
const _component_BasicTitle = resolveComponent("BasicTitle");
|
|
4404
|
+
return openBlock(), createBlock(_component_BasicTitle, { helpMessage: _ctx.helpMessage }, {
|
|
4405
|
+
default: withCtx(() => [
|
|
4406
|
+
createTextVNode(toDisplayString(_ctx.title), 1)
|
|
4407
|
+
]),
|
|
4408
|
+
_: 1
|
|
4409
|
+
}, 8, ["helpMessage"]);
|
|
4410
|
+
}
|
|
4411
|
+
const ModalHeader = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$1]]);
|
|
4412
|
+
function useFullScreen(context) {
|
|
4413
|
+
const fullScreenRef = ref(false);
|
|
4414
|
+
const getWrapClassName = computed(() => {
|
|
4415
|
+
const clsName = unref(context.wrapClassName) || "";
|
|
4416
|
+
return unref(fullScreenRef) ? `fullscreen-modal ${clsName} ` : unref(clsName);
|
|
4417
|
+
});
|
|
4418
|
+
function handleFullScreen(e) {
|
|
4419
|
+
e && e.stopPropagation();
|
|
4420
|
+
fullScreenRef.value = !unref(fullScreenRef);
|
|
4421
|
+
}
|
|
4422
|
+
return { getWrapClassName, handleFullScreen, fullScreenRef };
|
|
4423
|
+
}
|
|
4424
|
+
const _sfc_main$1 = defineComponent({
|
|
4425
|
+
name: "BasicModal",
|
|
4426
|
+
components: { Modal, ModalWrapper, ModalClose, ModalFooter, ModalHeader },
|
|
4427
|
+
inheritAttrs: false,
|
|
4428
|
+
props: basicProps,
|
|
4429
|
+
emits: [
|
|
4430
|
+
"visible-change",
|
|
4431
|
+
"height-change",
|
|
4432
|
+
"cancel",
|
|
4433
|
+
"ok",
|
|
4434
|
+
"register",
|
|
4435
|
+
"update:visible"
|
|
4436
|
+
],
|
|
4437
|
+
setup(props2, { emit, attrs }) {
|
|
4438
|
+
console.log("props", props2);
|
|
4439
|
+
const visibleRef = ref(false);
|
|
4440
|
+
const propsRef = ref(null);
|
|
4441
|
+
const modalWrapperRef = ref(null);
|
|
4442
|
+
const prefixCls = "shy-basic-modal";
|
|
4443
|
+
console.log("previxCls", prefixCls);
|
|
4444
|
+
const extHeightRef = ref(0);
|
|
4445
|
+
const modalMethods = {
|
|
4446
|
+
setModalProps,
|
|
4447
|
+
emitVisible: void 0,
|
|
4448
|
+
redoModalHeight: () => {
|
|
4449
|
+
nextTick(() => {
|
|
4450
|
+
if (unref(modalWrapperRef)) {
|
|
4451
|
+
unref(modalWrapperRef).setModalHeight();
|
|
4452
|
+
}
|
|
4453
|
+
});
|
|
4454
|
+
}
|
|
4455
|
+
};
|
|
4456
|
+
const instance = getCurrentInstance();
|
|
4457
|
+
if (instance) {
|
|
4458
|
+
emit("register", modalMethods, instance.uid);
|
|
4459
|
+
}
|
|
4460
|
+
const getMergeProps = computed(() => {
|
|
4461
|
+
return {
|
|
4462
|
+
...props2,
|
|
4463
|
+
...unref(propsRef)
|
|
4464
|
+
};
|
|
4465
|
+
});
|
|
4466
|
+
const { handleFullScreen, getWrapClassName, fullScreenRef } = useFullScreen(
|
|
4467
|
+
{
|
|
4468
|
+
modalWrapperRef,
|
|
4469
|
+
extHeightRef,
|
|
4470
|
+
wrapClassName: toRef(getMergeProps.value, "wrapClassName")
|
|
4471
|
+
}
|
|
4472
|
+
);
|
|
4473
|
+
const getProps = computed(() => {
|
|
4474
|
+
const opt = {
|
|
4475
|
+
...unref(getMergeProps),
|
|
4476
|
+
visible: unref(visibleRef),
|
|
4477
|
+
okButtonProps: void 0,
|
|
4478
|
+
cancelButtonProps: void 0,
|
|
4479
|
+
title: void 0
|
|
4480
|
+
};
|
|
4481
|
+
return {
|
|
4482
|
+
...opt,
|
|
4483
|
+
wrapClassName: unref(getWrapClassName)
|
|
4484
|
+
};
|
|
4485
|
+
});
|
|
4486
|
+
const getBindValue = computed(() => {
|
|
4487
|
+
const attr = {
|
|
4488
|
+
...attrs,
|
|
4489
|
+
...unref(getMergeProps),
|
|
4490
|
+
visible: unref(visibleRef),
|
|
4491
|
+
wrapClassName: unref(getWrapClassName)
|
|
4492
|
+
};
|
|
4493
|
+
console.log("attr", attr);
|
|
4494
|
+
if (unref(fullScreenRef)) {
|
|
4495
|
+
return omit$1(attr, ["height", "title"]);
|
|
4496
|
+
}
|
|
4497
|
+
return omit$1(attr, "title");
|
|
4498
|
+
});
|
|
4499
|
+
const getWrapperHeight = computed(() => {
|
|
4500
|
+
if (unref(fullScreenRef))
|
|
4501
|
+
return void 0;
|
|
4502
|
+
return unref(getProps).height;
|
|
4503
|
+
});
|
|
4504
|
+
watchEffect(() => {
|
|
4505
|
+
visibleRef.value = !!props2.visible;
|
|
4506
|
+
fullScreenRef.value = !!props2.defaultFullscreen;
|
|
4507
|
+
});
|
|
4508
|
+
watch(
|
|
4509
|
+
() => unref(visibleRef),
|
|
4510
|
+
(v) => {
|
|
4511
|
+
var _a3;
|
|
4512
|
+
emit("visible-change", v);
|
|
4513
|
+
emit("update:visible", v);
|
|
4514
|
+
instance && ((_a3 = modalMethods.emitVisible) == null ? void 0 : _a3.call(modalMethods, v, instance.uid));
|
|
4515
|
+
nextTick(() => {
|
|
4516
|
+
if (props2.scrollTop && v && unref(modalWrapperRef)) {
|
|
4517
|
+
unref(modalWrapperRef).scrollTop();
|
|
4518
|
+
}
|
|
4519
|
+
});
|
|
4520
|
+
},
|
|
4521
|
+
{
|
|
4522
|
+
immediate: false
|
|
4523
|
+
}
|
|
4524
|
+
);
|
|
4525
|
+
async function handleCancel(e) {
|
|
4526
|
+
var _a3, _b;
|
|
4527
|
+
e == null ? void 0 : e.stopPropagation();
|
|
4528
|
+
if ((_b = (_a3 = e.target) == null ? void 0 : _a3.classList) == null ? void 0 : _b.contains(
|
|
4529
|
+
prefixCls + "-close--custom"
|
|
4530
|
+
))
|
|
4531
|
+
return;
|
|
4532
|
+
if (props2.closeFunc && isFunction$1(props2.closeFunc)) {
|
|
4533
|
+
const isClose = await props2.closeFunc();
|
|
4534
|
+
visibleRef.value = !isClose;
|
|
4535
|
+
return;
|
|
4536
|
+
}
|
|
4537
|
+
visibleRef.value = false;
|
|
4538
|
+
emit("cancel", e);
|
|
4539
|
+
}
|
|
4540
|
+
function setModalProps(props22) {
|
|
4541
|
+
propsRef.value = deepMerge(unref(propsRef) || {}, props22);
|
|
4542
|
+
if (Reflect.has(props22, "visible")) {
|
|
4543
|
+
visibleRef.value = !!props22.visible;
|
|
4544
|
+
}
|
|
4545
|
+
if (Reflect.has(props22, "defaultFullscreen")) {
|
|
4546
|
+
fullScreenRef.value = !!props22.defaultFullscreen;
|
|
4547
|
+
}
|
|
4548
|
+
}
|
|
4549
|
+
function handleOk(e) {
|
|
4550
|
+
emit("ok", e);
|
|
4551
|
+
}
|
|
4552
|
+
function handleHeightChange(height) {
|
|
4553
|
+
emit("height-change", height);
|
|
4554
|
+
}
|
|
4555
|
+
function handleExtHeight(height) {
|
|
4556
|
+
extHeightRef.value = height;
|
|
4557
|
+
}
|
|
4558
|
+
function handleTitleDbClick(e) {
|
|
4559
|
+
if (!props2.canFullscreen)
|
|
4560
|
+
return;
|
|
4561
|
+
e.stopPropagation();
|
|
4562
|
+
handleFullScreen(e);
|
|
4563
|
+
}
|
|
4564
|
+
return {
|
|
4565
|
+
handleCancel,
|
|
4566
|
+
getBindValue,
|
|
4567
|
+
getProps,
|
|
4568
|
+
handleFullScreen,
|
|
4569
|
+
fullScreenRef,
|
|
4570
|
+
getMergeProps,
|
|
4571
|
+
handleOk,
|
|
4572
|
+
visibleRef,
|
|
4573
|
+
omit: omit$1,
|
|
4574
|
+
modalWrapperRef,
|
|
4575
|
+
handleExtHeight,
|
|
4576
|
+
handleHeightChange,
|
|
4577
|
+
handleTitleDbClick,
|
|
4578
|
+
getWrapperHeight
|
|
4579
|
+
};
|
|
4580
|
+
}
|
|
4581
|
+
});
|
|
4582
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4583
|
+
const _component_ModalClose = resolveComponent("ModalClose");
|
|
4584
|
+
const _component_ModalHeader = resolveComponent("ModalHeader");
|
|
4585
|
+
const _component_ModalFooter = resolveComponent("ModalFooter");
|
|
4586
|
+
const _component_ModalWrapper = resolveComponent("ModalWrapper");
|
|
4587
|
+
const _component_Modal = resolveComponent("Modal");
|
|
4588
|
+
return openBlock(), createBlock(_component_Modal, mergeProps({ class: "modal-wrapper" }, _ctx.getBindValue, { onCancel: _ctx.handleCancel }), createSlots({
|
|
4589
|
+
default: withCtx(() => [
|
|
4590
|
+
createVNode(_component_ModalWrapper, mergeProps(
|
|
4591
|
+
{
|
|
4592
|
+
useWrapper: _ctx.getProps.useWrapper,
|
|
4593
|
+
footerOffset: _ctx.wrapperFooterOffset,
|
|
4594
|
+
fullScreen: _ctx.fullScreenRef,
|
|
4595
|
+
ref: "modalWrapperRef",
|
|
4596
|
+
loading: _ctx.getProps.loading,
|
|
4597
|
+
"loading-tip": _ctx.getProps.loadingTip,
|
|
4598
|
+
minHeight: _ctx.getProps.minHeight,
|
|
4599
|
+
height: _ctx.getWrapperHeight,
|
|
4600
|
+
visible: _ctx.visibleRef,
|
|
4601
|
+
modalFooterHeight: _ctx.footer !== void 0 && !_ctx.footer ? 0 : void 0
|
|
4602
|
+
},
|
|
4603
|
+
_ctx.omit(_ctx.getProps.wrapperProps, "visible", "height", "modalFooterHeight"),
|
|
4604
|
+
{
|
|
4605
|
+
onExtHeight: _ctx.handleExtHeight,
|
|
4606
|
+
onHeightChange: _ctx.handleHeightChange
|
|
4607
|
+
}
|
|
4608
|
+
), {
|
|
4609
|
+
default: withCtx(() => [
|
|
4610
|
+
renderSlot(_ctx.$slots, "default")
|
|
4611
|
+
]),
|
|
4612
|
+
_: 3
|
|
4613
|
+
}, 16, ["useWrapper", "footerOffset", "fullScreen", "loading", "loading-tip", "minHeight", "height", "visible", "modalFooterHeight", "onExtHeight", "onHeightChange"])
|
|
4614
|
+
]),
|
|
4615
|
+
_: 2
|
|
4616
|
+
}, [
|
|
4617
|
+
!_ctx.$slots.closeIcon ? {
|
|
4618
|
+
name: "closeIcon",
|
|
4619
|
+
fn: withCtx(() => [
|
|
4620
|
+
createVNode(_component_ModalClose, {
|
|
4621
|
+
canFullscreen: _ctx.getProps.canFullscreen,
|
|
4622
|
+
fullScreen: _ctx.fullScreenRef,
|
|
4623
|
+
onCancel: _ctx.handleCancel,
|
|
4624
|
+
onFullscreen: _ctx.handleFullScreen
|
|
4625
|
+
}, null, 8, ["canFullscreen", "fullScreen", "onCancel", "onFullscreen"])
|
|
4626
|
+
]),
|
|
4627
|
+
key: "0"
|
|
4628
|
+
} : void 0,
|
|
4629
|
+
!_ctx.$slots.title ? {
|
|
4630
|
+
name: "title",
|
|
4631
|
+
fn: withCtx(() => [
|
|
4632
|
+
createVNode(_component_ModalHeader, {
|
|
4633
|
+
helpMessage: _ctx.getProps.helpMessage,
|
|
4634
|
+
title: _ctx.getMergeProps.title,
|
|
4635
|
+
onDblclick: _ctx.handleTitleDbClick
|
|
4636
|
+
}, null, 8, ["helpMessage", "title", "onDblclick"])
|
|
4637
|
+
]),
|
|
4638
|
+
key: "1"
|
|
4639
|
+
} : void 0,
|
|
4640
|
+
!_ctx.$slots.footer ? {
|
|
4641
|
+
name: "footer",
|
|
4642
|
+
fn: withCtx(() => [
|
|
4643
|
+
createVNode(_component_ModalFooter, mergeProps(_ctx.getBindValue, {
|
|
4644
|
+
onOk: _ctx.handleOk,
|
|
4645
|
+
onCancel: _ctx.handleCancel
|
|
4646
|
+
}), createSlots({ _: 2 }, [
|
|
4647
|
+
renderList(Object.keys(_ctx.$slots), (item) => {
|
|
4648
|
+
return {
|
|
4649
|
+
name: item,
|
|
4650
|
+
fn: withCtx((data) => [
|
|
4651
|
+
renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))
|
|
4652
|
+
])
|
|
4653
|
+
};
|
|
4654
|
+
})
|
|
4655
|
+
]), 1040, ["onOk", "onCancel"])
|
|
4656
|
+
]),
|
|
4657
|
+
key: "2"
|
|
4658
|
+
} : void 0,
|
|
4659
|
+
renderList(Object.keys(_ctx.omit(_ctx.$slots, "default")), (item) => {
|
|
4660
|
+
return {
|
|
4661
|
+
name: item,
|
|
4662
|
+
fn: withCtx((data) => [
|
|
4663
|
+
renderSlot(_ctx.$slots, item, normalizeProps(guardReactiveProps(data || {})))
|
|
4664
|
+
])
|
|
4665
|
+
};
|
|
4666
|
+
})
|
|
4667
|
+
]), 1040, ["onCancel"]);
|
|
4668
|
+
}
|
|
4669
|
+
const BasicModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render]]);
|
|
4670
|
+
function isProdMode() {
|
|
4671
|
+
return true;
|
|
4672
|
+
}
|
|
4673
|
+
const projectName = { "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true }.VITE_GLOB_APP_TITLE;
|
|
4674
|
+
function error(message) {
|
|
4675
|
+
throw new Error(`[${projectName} error]:${message}`);
|
|
4676
|
+
}
|
|
4677
|
+
const dataTransfer = reactive({});
|
|
4678
|
+
const visibleData = reactive({});
|
|
4679
|
+
function useModal() {
|
|
4680
|
+
const modal = ref(null);
|
|
4681
|
+
const loaded = ref(false);
|
|
4682
|
+
const uid = ref("");
|
|
4683
|
+
function register(modalMethod, uuid) {
|
|
4684
|
+
if (!getCurrentInstance()) {
|
|
4685
|
+
throw new Error(
|
|
4686
|
+
"useModal() can only be used inside setup() or functional components!"
|
|
4687
|
+
);
|
|
4688
|
+
}
|
|
4689
|
+
uid.value = uuid;
|
|
4690
|
+
onUnmounted(() => {
|
|
4691
|
+
modal.value = null;
|
|
4692
|
+
loaded.value = false;
|
|
4693
|
+
dataTransfer[unref(uid)] = null;
|
|
4694
|
+
});
|
|
4695
|
+
if (unref(loaded) && isProdMode() && modalMethod === unref(modal))
|
|
4696
|
+
return;
|
|
4697
|
+
modal.value = modalMethod;
|
|
4698
|
+
loaded.value = true;
|
|
4699
|
+
modalMethod.emitVisible = (visible, uid2) => {
|
|
4700
|
+
visibleData[uid2] = visible;
|
|
4701
|
+
};
|
|
4702
|
+
}
|
|
4703
|
+
const getInstance = () => {
|
|
4704
|
+
const instance = unref(modal);
|
|
4705
|
+
if (!instance) {
|
|
4706
|
+
error("useModal instance is undefined!");
|
|
4707
|
+
}
|
|
4708
|
+
return instance;
|
|
4709
|
+
};
|
|
4710
|
+
const methods = {
|
|
4711
|
+
setModalProps: (props2) => {
|
|
4712
|
+
var _a3;
|
|
4713
|
+
(_a3 = getInstance()) == null ? void 0 : _a3.setModalProps(props2);
|
|
4714
|
+
},
|
|
4715
|
+
getVisible: computed(() => {
|
|
4716
|
+
return visibleData[~~unref(uid)];
|
|
4717
|
+
}),
|
|
4718
|
+
redoModalHeight: () => {
|
|
4719
|
+
var _a3, _b;
|
|
4720
|
+
(_b = (_a3 = getInstance()) == null ? void 0 : _a3.redoModalHeight) == null ? void 0 : _b.call(_a3);
|
|
4721
|
+
},
|
|
4722
|
+
openModal: (visible = true, data, openOnSet = true) => {
|
|
4723
|
+
var _a3;
|
|
4724
|
+
(_a3 = getInstance()) == null ? void 0 : _a3.setModalProps({
|
|
4725
|
+
visible
|
|
4726
|
+
});
|
|
4727
|
+
if (!data)
|
|
4728
|
+
return;
|
|
4729
|
+
const id = unref(uid);
|
|
4730
|
+
if (openOnSet) {
|
|
4731
|
+
dataTransfer[id] = null;
|
|
4732
|
+
dataTransfer[id] = toRaw(data);
|
|
4733
|
+
return;
|
|
4734
|
+
}
|
|
4735
|
+
const equal = isEqual(toRaw(dataTransfer[id]), toRaw(data));
|
|
4736
|
+
if (!equal) {
|
|
4737
|
+
dataTransfer[id] = toRaw(data);
|
|
4738
|
+
}
|
|
4739
|
+
},
|
|
4740
|
+
closeModal: () => {
|
|
4741
|
+
var _a3;
|
|
4742
|
+
(_a3 = getInstance()) == null ? void 0 : _a3.setModalProps({ visible: false });
|
|
4743
|
+
}
|
|
4744
|
+
};
|
|
4745
|
+
return [register, methods];
|
|
4746
|
+
}
|
|
72
4747
|
const _hoisted_1 = { class: "user-select" };
|
|
73
4748
|
const _hoisted_2 = { class: "tags-selected" };
|
|
74
4749
|
const _hoisted_3 = { class: "user-body" };
|
|
@@ -79,11 +4754,12 @@ const _hoisted_6 = {
|
|
|
79
4754
|
class: "tree-select"
|
|
80
4755
|
};
|
|
81
4756
|
const _hoisted_7 = { class: "tree-item" };
|
|
82
|
-
const _hoisted_8 = {
|
|
4757
|
+
const _hoisted_8 = { class: "tree-item" };
|
|
4758
|
+
const _hoisted_9 = {
|
|
83
4759
|
key: 1,
|
|
84
4760
|
class: "all-user"
|
|
85
4761
|
};
|
|
86
|
-
const
|
|
4762
|
+
const _hoisted_10 = {
|
|
87
4763
|
key: 2,
|
|
88
4764
|
class: "all-organization"
|
|
89
4765
|
};
|
|
@@ -107,10 +4783,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
107
4783
|
},
|
|
108
4784
|
emits: ["confirm", "cancel"],
|
|
109
4785
|
setup(__props, { expose, emit }) {
|
|
110
|
-
const
|
|
4786
|
+
const props2 = __props;
|
|
111
4787
|
const activeKey = ref("1");
|
|
112
4788
|
watch(
|
|
113
|
-
() =>
|
|
4789
|
+
() => props2.type,
|
|
114
4790
|
(value) => {
|
|
115
4791
|
if (value === "all" || value === "user") {
|
|
116
4792
|
activeKey.value = "1";
|
|
@@ -135,11 +4811,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
135
4811
|
};
|
|
136
4812
|
const loadKv = async () => {
|
|
137
4813
|
try {
|
|
138
|
-
const res = await
|
|
4814
|
+
const res = await props2.deptFun();
|
|
139
4815
|
organization.value = format(res);
|
|
140
|
-
const res2 = await
|
|
4816
|
+
const res2 = await props2.userFun();
|
|
141
4817
|
userList.value = res2;
|
|
142
4818
|
allUserList.value = res2;
|
|
4819
|
+
res2.forEach((user) => {
|
|
4820
|
+
checkMap[user.id] = false;
|
|
4821
|
+
});
|
|
143
4822
|
} catch (err) {
|
|
144
4823
|
console.log("err", err);
|
|
145
4824
|
}
|
|
@@ -173,12 +4852,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
173
4852
|
}
|
|
174
4853
|
};
|
|
175
4854
|
const selectedKeys = ref([]);
|
|
176
|
-
|
|
4855
|
+
ref([]);
|
|
177
4856
|
const userList = ref([]);
|
|
178
4857
|
const organization = ref([]);
|
|
4858
|
+
const checkMap = reactive({});
|
|
179
4859
|
const loadUser = async (deptId = void 0, realName = void 0) => {
|
|
180
4860
|
try {
|
|
181
|
-
const res = await
|
|
4861
|
+
const res = await props2.userFun(deptId, realName);
|
|
182
4862
|
userList.value = res;
|
|
183
4863
|
} catch (err) {
|
|
184
4864
|
console.log("err", err);
|
|
@@ -196,20 +4876,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
196
4876
|
}
|
|
197
4877
|
};
|
|
198
4878
|
const allUserList = ref([]);
|
|
199
|
-
|
|
4879
|
+
ref([]);
|
|
200
4880
|
const organizationChecked = ref([]);
|
|
201
4881
|
const tagList = ref([]);
|
|
202
4882
|
const closeEvent = (id, type) => {
|
|
203
4883
|
if (type === 1) {
|
|
204
|
-
|
|
205
|
-
return item === id;
|
|
206
|
-
});
|
|
207
|
-
userSelected.value.splice(index2, 1);
|
|
4884
|
+
checkMap[id] = false;
|
|
208
4885
|
} else if (type === 2) {
|
|
209
|
-
|
|
210
|
-
return item === id;
|
|
211
|
-
});
|
|
212
|
-
userSelected.value.splice(index2, 1);
|
|
4886
|
+
console.log("2\u6807\u8BB0");
|
|
213
4887
|
} else if (type === 3) {
|
|
214
4888
|
const index2 = organizationChecked.value.findIndex((item) => {
|
|
215
4889
|
return item === id;
|
|
@@ -219,13 +4893,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
219
4893
|
};
|
|
220
4894
|
watchEffect(() => {
|
|
221
4895
|
tagList.value = [];
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
4896
|
+
Object.keys(checkMap).forEach((key2) => {
|
|
4897
|
+
if (checkMap[key2]) {
|
|
4898
|
+
tagList.value.push({
|
|
4899
|
+
id: key2,
|
|
4900
|
+
color: "#108ee9",
|
|
4901
|
+
type: 1,
|
|
4902
|
+
name: titleMap.value[key2]
|
|
4903
|
+
});
|
|
4904
|
+
}
|
|
229
4905
|
});
|
|
230
4906
|
organizationChecked.value.forEach((item) => {
|
|
231
4907
|
tagList.value.push({
|
|
@@ -236,13 +4912,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
236
4912
|
});
|
|
237
4913
|
});
|
|
238
4914
|
});
|
|
239
|
-
const
|
|
4915
|
+
const [registerModal, { openModal }] = useModal();
|
|
4916
|
+
ref();
|
|
240
4917
|
const open = () => {
|
|
241
|
-
|
|
4918
|
+
openModal(true, {});
|
|
242
4919
|
};
|
|
243
|
-
const confirmEvent = (
|
|
4920
|
+
const confirmEvent = () => {
|
|
244
4921
|
emit("confirm", tagList.value);
|
|
245
|
-
|
|
4922
|
+
cancelEvent();
|
|
246
4923
|
};
|
|
247
4924
|
const cancelEvent = () => {
|
|
248
4925
|
resetFields();
|
|
@@ -250,19 +4927,21 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
250
4927
|
};
|
|
251
4928
|
const resetFields = () => {
|
|
252
4929
|
nextTick(() => {
|
|
253
|
-
userSelected.value = [];
|
|
254
|
-
allUserSelected.value = [];
|
|
255
4930
|
organizationChecked.value = [];
|
|
4931
|
+
Object.keys(checkMap).forEach((key2) => {
|
|
4932
|
+
checkMap[key2] = false;
|
|
4933
|
+
});
|
|
256
4934
|
});
|
|
257
4935
|
};
|
|
258
4936
|
expose({ open });
|
|
259
4937
|
return (_ctx, _cache) => {
|
|
260
|
-
return openBlock(), createBlock(
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
width: "50vw",
|
|
4938
|
+
return openBlock(), createBlock(unref(BasicModal), {
|
|
4939
|
+
onRegister: unref(registerModal),
|
|
4940
|
+
width: 600,
|
|
264
4941
|
title: "\u4EFB\u52A1\u9009\u62E9\u5668",
|
|
265
|
-
|
|
4942
|
+
"ok-text": "\u786E\u8BA4",
|
|
4943
|
+
"cancel-text": "\u53D6\u6D88",
|
|
4944
|
+
onOk: confirmEvent,
|
|
266
4945
|
onCancel: cancelEvent
|
|
267
4946
|
}, {
|
|
268
4947
|
default: withCtx(() => [
|
|
@@ -291,15 +4970,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
291
4970
|
onChange: activeChangeEvent
|
|
292
4971
|
}, {
|
|
293
4972
|
default: withCtx(() => [
|
|
294
|
-
|
|
4973
|
+
props2.type === "user" || props2.type === "all" ? (openBlock(), createBlock(unref(TabPane), {
|
|
295
4974
|
key: "1",
|
|
296
4975
|
tab: "\u7EC4\u7EC7\u67B6\u6784"
|
|
297
4976
|
})) : createCommentVNode("", true),
|
|
298
|
-
|
|
4977
|
+
props2.type === "user" || props2.type === "all" ? (openBlock(), createBlock(unref(TabPane), {
|
|
299
4978
|
key: "2",
|
|
300
4979
|
tab: "\u6210\u5458"
|
|
301
4980
|
})) : createCommentVNode("", true),
|
|
302
|
-
|
|
4981
|
+
props2.type === "org" || props2.type === "all" ? (openBlock(), createBlock(unref(TabPane), {
|
|
303
4982
|
key: "3",
|
|
304
4983
|
tab: "\u7EC4\u7EC7"
|
|
305
4984
|
})) : createCommentVNode("", true)
|
|
@@ -326,54 +5005,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
326
5005
|
onSelect: selectChangeEvent
|
|
327
5006
|
}, null, 8, ["tree-data", "selectedKeys"])
|
|
328
5007
|
]),
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}, [
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
key: index2,
|
|
358
|
-
class: "tree-row"
|
|
359
|
-
}, [
|
|
360
|
-
createElementVNode("div", null, toDisplayString(item.name), 1),
|
|
361
|
-
createVNode(unref(Checkbox), {
|
|
362
|
-
value: item.id
|
|
363
|
-
}, null, 8, ["value"])
|
|
364
|
-
]);
|
|
365
|
-
}), 128))
|
|
366
|
-
]),
|
|
367
|
-
_: 1
|
|
368
|
-
}, 8, ["value"])
|
|
369
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
5008
|
+
createElementVNode("div", _hoisted_8, [
|
|
5009
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(userList.value, (item, index2) => {
|
|
5010
|
+
return openBlock(), createElementBlock("div", {
|
|
5011
|
+
key: index2,
|
|
5012
|
+
class: "tree-row"
|
|
5013
|
+
}, [
|
|
5014
|
+
createElementVNode("div", null, toDisplayString(item.name), 1),
|
|
5015
|
+
createVNode(unref(Checkbox), {
|
|
5016
|
+
checked: checkMap[item.id],
|
|
5017
|
+
"onUpdate:checked": ($event) => checkMap[item.id] = $event
|
|
5018
|
+
}, null, 8, ["checked", "onUpdate:checked"])
|
|
5019
|
+
]);
|
|
5020
|
+
}), 128))
|
|
5021
|
+
])
|
|
5022
|
+
])) : activeKey.value === "2" ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
5023
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(userList.value, (item, index2) => {
|
|
5024
|
+
return openBlock(), createElementBlock("div", {
|
|
5025
|
+
key: index2,
|
|
5026
|
+
class: "tree-row"
|
|
5027
|
+
}, [
|
|
5028
|
+
createElementVNode("div", null, toDisplayString(item.name), 1),
|
|
5029
|
+
createVNode(unref(Checkbox), {
|
|
5030
|
+
checked: checkMap[item.id],
|
|
5031
|
+
"onUpdate:checked": ($event) => checkMap[item.id] = $event
|
|
5032
|
+
}, null, 8, ["checked", "onUpdate:checked"])
|
|
5033
|
+
]);
|
|
5034
|
+
}), 128))
|
|
5035
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_10, [
|
|
370
5036
|
createVNode(unref(Tree), {
|
|
371
5037
|
selectable: false,
|
|
372
5038
|
autoExpandParent: true,
|
|
373
5039
|
checkable: "",
|
|
374
5040
|
"tree-data": organization.value,
|
|
375
5041
|
checkedKeys: organizationChecked.value,
|
|
376
|
-
"onUpdate:checkedKeys": _cache[
|
|
5042
|
+
"onUpdate:checkedKeys": _cache[3] || (_cache[3] = ($event) => organizationChecked.value = $event)
|
|
377
5043
|
}, null, 8, ["tree-data", "checkedKeys"])
|
|
378
5044
|
]))
|
|
379
5045
|
])
|
|
@@ -381,21 +5047,26 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
381
5047
|
])
|
|
382
5048
|
]),
|
|
383
5049
|
_: 1
|
|
384
|
-
},
|
|
5050
|
+
}, 8, ["onRegister"]);
|
|
385
5051
|
};
|
|
386
5052
|
}
|
|
387
5053
|
});
|
|
388
|
-
const
|
|
389
|
-
const UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
5054
|
+
const IndexView_vue_vue_type_style_index_0_scoped_729122e8_lang = "";
|
|
5055
|
+
const UserSelect = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-729122e8"]]);
|
|
390
5056
|
const antd_min = "";
|
|
5057
|
+
const index$1 = "";
|
|
5058
|
+
console.log("BasicModal", BasicModal);
|
|
391
5059
|
const index = {
|
|
392
5060
|
install(app) {
|
|
393
5061
|
app.component("s-dialog", ShyDialog);
|
|
394
5062
|
app.component("user-select", UserSelect);
|
|
5063
|
+
app.component("basic-modal", BasicModal);
|
|
395
5064
|
}
|
|
396
5065
|
};
|
|
397
5066
|
export {
|
|
5067
|
+
BasicModal,
|
|
398
5068
|
ShyDialog,
|
|
399
5069
|
UserSelect,
|
|
400
|
-
index as default
|
|
5070
|
+
index as default,
|
|
5071
|
+
useModal
|
|
401
5072
|
};
|