@whitesev/pops 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/index.amd.js +4651 -0
  2. package/dist/index.amd.js.map +1 -0
  3. package/dist/index.cjs.js +4649 -0
  4. package/dist/index.cjs.js.map +1 -0
  5. package/dist/index.esm.js +4647 -0
  6. package/dist/index.esm.js.map +1 -0
  7. package/dist/index.iife.js +4652 -0
  8. package/dist/index.iife.js.map +1 -0
  9. package/dist/index.system.js +4654 -0
  10. package/dist/index.system.js.map +1 -0
  11. package/dist/index.umd.js +4655 -0
  12. package/dist/index.umd.js.map +1 -0
  13. package/dist/types/index.d.ts +2 -0
  14. package/dist/types/src/Config.d.ts +1 -0
  15. package/dist/types/src/Core.d.ts +18 -0
  16. package/dist/types/src/Pops.d.ts +171 -0
  17. package/dist/types/src/components/alert/index.d.ts +4 -0
  18. package/dist/types/src/components/confirm/index.d.ts +4 -0
  19. package/dist/types/src/components/drawer/index.d.ts +2 -0
  20. package/dist/types/src/components/folder/index.d.ts +2 -0
  21. package/dist/types/src/components/iframe/index.d.ts +2 -0
  22. package/dist/types/src/components/loading/index.d.ts +2 -0
  23. package/dist/types/src/components/panel/index.d.ts +2 -0
  24. package/dist/types/src/components/prompt/index.d.ts +2 -0
  25. package/dist/types/src/components/rightClickMenu/index.d.ts +2 -0
  26. package/dist/types/src/components/tooltip/index.d.ts +2 -0
  27. package/dist/types/src/handler/PopsElementHandler.d.ts +54 -0
  28. package/dist/types/src/handler/PopsHandler.d.ts +210 -0
  29. package/dist/types/src/utils/AnyTouch.d.ts +17 -0
  30. package/dist/types/src/utils/PopsDOMUtils.d.ts +278 -0
  31. package/dist/types/src/utils/PopsDOMUtilsEvent.d.ts +332 -0
  32. package/dist/types/src/utils/PopsMathUtils.d.ts +25 -0
  33. package/dist/types/src/utils/PopsUIUtils.d.ts +85 -0
  34. package/dist/types/src/utils/PopsUtils.d.ts +123 -0
  35. package/package.json +42 -0
  36. package/src/types/PopsDOMUtilsEventType.d.ts +248 -0
  37. package/src/types/animation.d.ts +19 -0
  38. package/src/types/button.d.ts +216 -0
  39. package/src/types/components.d.ts +197 -0
  40. package/src/types/event.d.ts +60 -0
  41. package/src/types/global.d.ts +11 -0
  42. package/src/types/icon.d.ts +30 -0
  43. package/src/types/layer.d.ts +20 -0
  44. package/src/types/main.d.ts +89 -0
  45. package/src/types/mask.d.ts +35 -0
  46. package/src/types/position.d.ts +60 -0
@@ -0,0 +1,4651 @@
1
+ define((function () { 'use strict';
2
+
3
+ const PopsCoreDefaultEnv = {
4
+ document: document,
5
+ window: window,
6
+ globalThis: globalThis,
7
+ self: self,
8
+ };
9
+ const PopsCoreEnv = {
10
+ document: document,
11
+ window: window,
12
+ globalThis: globalThis,
13
+ self: self,
14
+ };
15
+ const PopsCore = {
16
+ init(option) {
17
+ if (!option) {
18
+ option = Object.assign({}, PopsCoreDefaultEnv);
19
+ }
20
+ Object.assign(PopsCoreEnv, option);
21
+ },
22
+ get document() {
23
+ return PopsCoreEnv.document;
24
+ },
25
+ get window() {
26
+ return PopsCoreEnv.window;
27
+ },
28
+ get globalThis() {
29
+ return PopsCoreEnv.globalThis;
30
+ },
31
+ get self() {
32
+ return PopsCoreEnv.self;
33
+ },
34
+ };
35
+ const OriginPrototype$1 = {
36
+ Object: {
37
+ defineProperty: Object.defineProperty,
38
+ },
39
+ };
40
+
41
+ const SymbolEvents = Symbol("events_" + (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1));
42
+
43
+ // @ts-nocheck
44
+
45
+ const AnyTouch = function () {
46
+ return (function (global, factory) {
47
+ return factory();
48
+ })(globalThis || window, function () {
49
+
50
+ /*! *****************************************************************************
51
+ Copyright (c) Microsoft Corporation.
52
+
53
+ Permission to use, copy, modify, and/or distribute this software for any
54
+ purpose with or without fee is hereby granted.
55
+
56
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
57
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
58
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
59
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
60
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
61
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
62
+ PERFORMANCE OF THIS SOFTWARE.
63
+ ***************************************************************************** */
64
+ /* global Reflect, Promise */
65
+
66
+ var extendStatics = function (d, b) {
67
+ extendStatics =
68
+ Object.setPrototypeOf ||
69
+ ({ __proto__: [] } instanceof Array &&
70
+ function (d, b) {
71
+ d.__proto__ = b;
72
+ }) ||
73
+ function (d, b) {
74
+ for (var p in b) if (Object.hasOwnProperty.call(b, p)) d[p] = b[p];
75
+ };
76
+ return extendStatics(d, b);
77
+ };
78
+
79
+ function __extends(d, b) {
80
+ if (typeof b !== "function" && b !== null)
81
+ throw new TypeError(
82
+ "Class extends value " + String(b) + " is not a constructor or null"
83
+ );
84
+ extendStatics(d, b);
85
+ function __() {
86
+ this.constructor = d;
87
+ }
88
+ d.prototype =
89
+ b === null
90
+ ? Object.create(b)
91
+ : ((__.prototype = b.prototype), new __());
92
+ }
93
+
94
+ var __assign = function () {
95
+ __assign =
96
+ Object.assign ||
97
+ function __assign(t) {
98
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
99
+ s = arguments[i];
100
+ for (var p in s) if (Object.hasOwnProperty.call(s, p)) t[p] = s[p];
101
+ }
102
+ return t;
103
+ };
104
+
105
+ return __assign.apply(this, arguments);
106
+ };
107
+
108
+ function __values(o) {
109
+ var s = typeof Symbol === "function" && Symbol.iterator,
110
+ m = s && o[s],
111
+ i = 0;
112
+ if (m) return m.call(o);
113
+ if (o && typeof o.length === "number")
114
+ return {
115
+ next: function () {
116
+ if (o && i >= o.length) o = void 0;
117
+ return { value: o && o[i++], done: !o };
118
+ },
119
+ };
120
+ throw new TypeError(
121
+ s ? "Object is not iterable." : "Symbol.iterator is not defined."
122
+ );
123
+ }
124
+
125
+ var AnyEvent = (function () {
126
+ function AnyEvent() {
127
+ this.__map = {};
128
+ }
129
+
130
+ AnyEvent.prototype.beforeEach = function (interceptor) {
131
+ this.__interceptor = interceptor;
132
+ };
133
+
134
+ AnyEvent.prototype.on = function (typeOrTypes, listener) {
135
+ var e_1, _a;
136
+ var types = Array.isArray(typeOrTypes) ? typeOrTypes : [typeOrTypes];
137
+ try {
138
+ for (
139
+ var types_1 = __values(types), types_1_1 = types_1.next();
140
+ !types_1_1.done;
141
+ types_1_1 = types_1.next()
142
+ ) {
143
+ var type = types_1_1.value;
144
+
145
+ this.__map[type] = this.__map[type] || [];
146
+
147
+ var listeners = this.__map[type];
148
+ if (listeners) {
149
+ listeners.push(listener);
150
+ }
151
+ }
152
+ } catch (e_1_1) {
153
+ e_1 = { error: e_1_1 };
154
+ } finally {
155
+ try {
156
+ if (types_1_1 && !types_1_1.done && (_a = types_1.return))
157
+ _a.call(types_1);
158
+ } finally {
159
+ if (e_1) throw e_1.error;
160
+ }
161
+ }
162
+ return this;
163
+ };
164
+
165
+ AnyEvent.prototype.emit = function (type, payload, callback) {
166
+ var _this = this;
167
+ if (void 0 !== this.__interceptor) {
168
+ this.__interceptor(type, function () {
169
+ _this.__emit(type, payload);
170
+ callback && callback();
171
+ });
172
+ } else {
173
+ this.__emit(type, payload);
174
+ callback && callback();
175
+ }
176
+ };
177
+
178
+ AnyEvent.prototype.__emit = function (type, event) {
179
+ var e_2, _a;
180
+
181
+ var listeners = this.__map[type];
182
+ if (
183
+ Array.isArray(listeners) &&
184
+ (listeners === null || listeners === void 0
185
+ ? void 0
186
+ : listeners.length)
187
+ ) {
188
+ try {
189
+ for (
190
+ var listeners_1 = __values(listeners),
191
+ listeners_1_1 = listeners_1.next();
192
+ !listeners_1_1.done;
193
+ listeners_1_1 = listeners_1.next()
194
+ ) {
195
+ var listener = listeners_1_1.value;
196
+ listener(event, type);
197
+ }
198
+ } catch (e_2_1) {
199
+ e_2 = { error: e_2_1 };
200
+ } finally {
201
+ try {
202
+ if (
203
+ listeners_1_1 &&
204
+ !listeners_1_1.done &&
205
+ (_a = listeners_1.return)
206
+ )
207
+ _a.call(listeners_1);
208
+ } finally {
209
+ if (e_2) throw e_2.error;
210
+ }
211
+ }
212
+ }
213
+ this.event = event;
214
+ };
215
+
216
+ AnyEvent.prototype.off = function (type, listener) {
217
+ var listeners = this.__map[type];
218
+ if (void 0 !== listeners) {
219
+ if (void 0 === listener) {
220
+ delete this.__map[type];
221
+ } else {
222
+ var index = listeners.findIndex(function (cb) {
223
+ return cb === listener;
224
+ });
225
+ listeners.splice(index, 1);
226
+ }
227
+ }
228
+ };
229
+ AnyEvent.prototype.destroy = function () {
230
+ this.__map = {};
231
+ };
232
+ return AnyEvent;
233
+ })();
234
+
235
+ var TOUCH_START = "touchstart";
236
+ var TOUCH_MOVE = "touchmove";
237
+ var TOUCH_END = "touchend";
238
+ var TOUCH_CANCEL = "touchcancel";
239
+ var MOUSE_UP = "mouseup";
240
+ var MOUSE_MOVE = "mousemove";
241
+ var MOUSE_DOWN = "mousedown";
242
+ var TYPE_START$1 = "start";
243
+ var TYPE_MOVE$1 = "move";
244
+ var TYPE_END$1 = "end";
245
+
246
+ function isFunction(input) {
247
+ return "[object Function]" === Object.prototype.toString.call(input);
248
+ }
249
+
250
+ var CLIENT_X = "clientX";
251
+ var CLIENT_Y = "clientY";
252
+ var COMPUTE_INTERVAL = 16;
253
+ var TYPE_START = "start";
254
+ var TYPE_MOVE = "move";
255
+ var TYPE_CANCEL = "cancel";
256
+ var TYPE_END = "end";
257
+ var DIRECTION_LEFT = "left";
258
+ var DIRECTION_RIGHT = "right";
259
+ var DIRECTION_UP = "up";
260
+ var DIRECTION_DOWN = "down";
261
+
262
+ var _a;
263
+ var STATUS_CODE_AND_NAME_MAP =
264
+ ((_a = {}),
265
+ (_a[4] = TYPE_START),
266
+ (_a[5] = TYPE_MOVE),
267
+ (_a[1] = TYPE_END),
268
+ (_a[3] = TYPE_CANCEL),
269
+ _a);
270
+
271
+ function getStatusName(code) {
272
+ return STATUS_CODE_AND_NAME_MAP[code];
273
+ }
274
+
275
+ function flow(isVaild, lastStatus, phase) {
276
+ var _a, _b, _c, _d, _e, _f, _g;
277
+ var STATE_MAP = {
278
+ 1:
279
+ ((_a = {}),
280
+ (_a[0] = ((_b = {}), (_b[TYPE_MOVE] = 4), _b)),
281
+ (_a[4] =
282
+ ((_c = {}),
283
+ (_c[TYPE_MOVE] = 5),
284
+ (_c[TYPE_END] = 1),
285
+ (_c[TYPE_CANCEL] = 3),
286
+ _c)),
287
+ (_a[5] =
288
+ ((_d = {}),
289
+ (_d[TYPE_MOVE] = 5),
290
+ (_d[TYPE_END] = 1),
291
+ (_d[TYPE_CANCEL] = 3),
292
+ _d)),
293
+ _a),
294
+ 0:
295
+ ((_e = {}),
296
+ (_e[4] =
297
+ ((_f = {}),
298
+ (_f[TYPE_MOVE] = 2),
299
+ (_f[TYPE_END] = 1),
300
+ (_f[TYPE_CANCEL] = 3),
301
+ _f)),
302
+ (_e[5] =
303
+ ((_g = {}),
304
+ (_g[TYPE_START] = 2),
305
+ (_g[TYPE_MOVE] = 2),
306
+ (_g[TYPE_END] = 1),
307
+ (_g[TYPE_CANCEL] = 3),
308
+ _g)),
309
+ _e),
310
+ };
311
+
312
+ var map = STATE_MAP[Number(isVaild)][lastStatus];
313
+ return (void 0 !== map && map[phase]) || 0;
314
+ }
315
+
316
+ function resetState(context) {
317
+ if ([1, 3, 2].includes(context.state)) {
318
+ context.state = 0;
319
+ }
320
+ }
321
+
322
+ function isMoveOrEndOrCancel(state) {
323
+ return [5, 1, 3].includes(state);
324
+ }
325
+
326
+ function isDisabled(context) {
327
+ if (context.disabled) {
328
+ context.state = 0;
329
+ return true;
330
+ }
331
+ }
332
+
333
+ function createPluginContext(defaultOptions, options) {
334
+ return __assign(__assign(__assign({}, defaultOptions), options), {
335
+ state: 0,
336
+ disabled: false,
337
+ });
338
+ }
339
+
340
+ function round2(n) {
341
+ return Math.round(n * 100) / 100;
342
+ }
343
+
344
+ function inputCreator() {
345
+ var id = 0;
346
+ var prevInput;
347
+
348
+ var activeInput;
349
+
350
+ var startInput;
351
+
352
+ var startMultiInput;
353
+
354
+ return function (basicsInput) {
355
+ prevInput = activeInput;
356
+ if (void 0 !== basicsInput) {
357
+ id = Number.MAX_SAFE_INTEGER > id ? ++id : 1;
358
+ var pureInput = extendInput(basicsInput, id);
359
+ activeInput = pureInput;
360
+ var isStart = pureInput.isStart,
361
+ pointLength = pureInput.pointLength;
362
+ if (isStart) {
363
+ startInput = pureInput;
364
+ prevInput = void 0;
365
+ if (1 < pointLength) {
366
+ startMultiInput = pureInput;
367
+ } else {
368
+ startMultiInput = void 0;
369
+ }
370
+ }
371
+ return __assign(__assign({}, pureInput), {
372
+ prevInput: prevInput,
373
+
374
+ startMultiInput: startMultiInput,
375
+
376
+ startInput: startInput,
377
+ });
378
+ }
379
+ };
380
+ }
381
+
382
+ function getCenter(points) {
383
+ var length = points.length;
384
+ if (0 < length) {
385
+ if (1 === length) {
386
+ var _a = points[0],
387
+ clientX = _a.clientX,
388
+ clientY = _a.clientY;
389
+ return { x: Math.round(clientX), y: Math.round(clientY) };
390
+ }
391
+ var countPoint = points.reduce(
392
+ function (countPoint, point) {
393
+ countPoint.x += point[CLIENT_X];
394
+ countPoint.y += point[CLIENT_Y];
395
+ return countPoint;
396
+ },
397
+ { x: 0, y: 0 }
398
+ );
399
+ return {
400
+ x: Math.round(countPoint.x / length),
401
+ y: Math.round(countPoint.y / length),
402
+ };
403
+ }
404
+ }
405
+
406
+ function extendInput(basicsInput, id) {
407
+ var phase = basicsInput.phase,
408
+ points = basicsInput.points,
409
+ changedPoints = basicsInput.changedPoints,
410
+ nativeEvent = basicsInput.nativeEvent;
411
+ var pointLength = points.length;
412
+ var isStart = TYPE_START === phase;
413
+ var isEnd =
414
+ (TYPE_END === phase && 0 === pointLength) || TYPE_CANCEL === phase;
415
+ var timestamp = Date.now();
416
+ var _a = getCenter(points) || getCenter(changedPoints),
417
+ x = _a.x,
418
+ y = _a.y;
419
+ var currentTarget = nativeEvent.currentTarget;
420
+ return Object.assign(basicsInput, {
421
+ id: id,
422
+ x: x,
423
+ y: y,
424
+ timestamp: timestamp,
425
+ isStart: isStart,
426
+ isEnd: isEnd,
427
+ pointLength: pointLength,
428
+ currentTarget: currentTarget,
429
+
430
+ getOffset: function (el) {
431
+ if (el === void 0) {
432
+ el = currentTarget;
433
+ }
434
+ var rect = el.getBoundingClientRect();
435
+ return {
436
+ x: x - Math.round(rect.left),
437
+ y: y - Math.round(rect.top),
438
+ };
439
+ },
440
+ });
441
+ }
442
+
443
+ function mouse() {
444
+ var prevPoints;
445
+ var isPressed = false;
446
+
447
+ var _target = null;
448
+ var createInput = inputCreator();
449
+
450
+ return function (event) {
451
+ var clientX = event.clientX,
452
+ clientY = event.clientY,
453
+ type = event.type,
454
+ button = event.button,
455
+ target = event.target;
456
+ var points = [{ clientX: clientX, clientY: clientY, target: target }];
457
+ var phase;
458
+ if (MOUSE_DOWN === type && 0 === button) {
459
+ _target = target;
460
+ isPressed = true;
461
+ phase = TYPE_START$1;
462
+ } else if (isPressed) {
463
+ if (MOUSE_MOVE === type) {
464
+ phase = TYPE_MOVE$1;
465
+ } else if (MOUSE_UP === type) {
466
+ points = [];
467
+ phase = TYPE_END$1;
468
+ isPressed = false;
469
+ }
470
+ } else {
471
+ return;
472
+ }
473
+
474
+ var changedPoints = prevPoints || [
475
+ { clientX: clientX, clientY: clientY, target: target },
476
+ ];
477
+ prevPoints = [{ clientX: clientX, clientY: clientY, target: target }];
478
+ if (void 0 !== phase) {
479
+ return createInput({
480
+ phase: phase,
481
+ changedPoints: changedPoints,
482
+ points: points,
483
+
484
+ target: _target,
485
+
486
+ targets: [_target],
487
+ nativeEvent: event,
488
+ });
489
+ }
490
+ };
491
+ }
492
+
493
+ function touch(el) {
494
+ var createInput = inputCreator();
495
+
496
+ return function (event) {
497
+ var targets = [];
498
+
499
+ var points = [];
500
+ Array.from(event.touches).forEach(function (_a) {
501
+ var clientX = _a.clientX,
502
+ clientY = _a.clientY,
503
+ target = _a.target;
504
+ if (el === null || el === void 0 ? void 0 : el.contains(target)) {
505
+ targets.push(target);
506
+ points.push({
507
+ clientX: clientX,
508
+ clientY: clientY,
509
+ target: target,
510
+ });
511
+ }
512
+ });
513
+ var changedPoints = Array.from(event.changedTouches).map(function (_a) {
514
+ var clientX = _a.clientX,
515
+ clientY = _a.clientY,
516
+ target = _a.target;
517
+ return { clientX: clientX, clientY: clientY, target: target };
518
+ });
519
+ return createInput({
520
+ phase: event.type.replace("touch", ""),
521
+ changedPoints: changedPoints,
522
+
523
+ points: points,
524
+ nativeEvent: event,
525
+ target: event.target,
526
+
527
+ targets: targets,
528
+ });
529
+ };
530
+ }
531
+
532
+ function dispatchDomEvent(typeName, el, payload, eventInit) {
533
+ var data = {};
534
+ for (var key in payload) {
535
+ if (!["target", "currentTarget", "type"].includes(key)) {
536
+ data[key] = payload[key];
537
+ }
538
+ }
539
+
540
+ var event;
541
+ if (document.createEvent) {
542
+ event = document.createEvent("HTMLEvents");
543
+ event.initEvent(
544
+ typeName,
545
+ eventInit === null || eventInit === void 0
546
+ ? void 0
547
+ : eventInit.bubbles,
548
+ eventInit === null || eventInit === void 0
549
+ ? void 0
550
+ : eventInit.cancelable
551
+ );
552
+ } else {
553
+ event = new Event(typeName, eventInit);
554
+ }
555
+ Object.assign(event, data, {
556
+ match: function () {
557
+ return (
558
+ payload.targets &&
559
+ 0 < payload.targets.length &&
560
+ payload.targets.every(function (target) {
561
+ return event.currentTarget.contains(target);
562
+ })
563
+ );
564
+ },
565
+ });
566
+ return el.dispatchEvent(event);
567
+ }
568
+
569
+ function canPreventDefault(event, options) {
570
+ var preventDefault = options.preventDefault;
571
+ if (isFunction(preventDefault)) {
572
+ return preventDefault(event);
573
+ } else {
574
+ return !!preventDefault;
575
+ }
576
+ }
577
+
578
+ var ELEMENT_TYPES = [
579
+ TOUCH_START,
580
+ TOUCH_MOVE,
581
+ TOUCH_END,
582
+ TOUCH_CANCEL,
583
+ MOUSE_DOWN,
584
+ ];
585
+ var WINDOW_TYPES = [MOUSE_MOVE, MOUSE_UP];
586
+
587
+ function bindElement(el, catchEvent, options) {
588
+ ELEMENT_TYPES.forEach(function (type) {
589
+ el.addEventListener(type, catchEvent, options);
590
+ });
591
+ WINDOW_TYPES.forEach(function (type) {
592
+ window.addEventListener(type, catchEvent, options);
593
+ });
594
+ return function () {
595
+ ELEMENT_TYPES.forEach(function (types) {
596
+ el.removeEventListener(types, catchEvent);
597
+ });
598
+ WINDOW_TYPES.forEach(function (type) {
599
+ window.removeEventListener(type, catchEvent);
600
+ });
601
+ };
602
+ }
603
+
604
+ var TYPE_COMPUTED = "computed";
605
+ var DEFAULT_OPTIONS$6 = {
606
+ domEvents: { bubbles: true, cancelable: true },
607
+
608
+ preventDefault: function (event) {
609
+ if (event.target && "tagName" in event.target) {
610
+ var tagName = event.target.tagName;
611
+ return !/^(?:INPUT|TEXTAREA|BUTTON|SELECT)$/.test(tagName);
612
+ }
613
+ return false;
614
+ },
615
+ };
616
+ var TYPE_UNBIND = "u";
617
+ var TYPE_INPUT = "input";
618
+ var TYPE_AT_AFTER = "at:after";
619
+ var default_1$1 = (function (_super) {
620
+ __extends(default_1, _super);
621
+
622
+ function default_1(el, options) {
623
+ var _a;
624
+
625
+ var _this = _super.call(this) || this;
626
+
627
+ _this.v = "2.1.3";
628
+
629
+ _this.__computeFunctionList = [];
630
+
631
+ _this.__computeFunctionCreatorList = [];
632
+
633
+ _this.__pluginContexts = [];
634
+ _this.__isIgnoreMouse = false;
635
+
636
+ _this.el = el;
637
+ _this.c = {};
638
+ _this.__options = __assign(__assign({}, DEFAULT_OPTIONS$6), options);
639
+
640
+ var createInputFromTouch = touch(_this.el);
641
+ var createInputFromMouse = mouse();
642
+
643
+ _this.__inputCreatorMap =
644
+ ((_a = {}),
645
+ (_a[TOUCH_START] = createInputFromTouch),
646
+ (_a[TOUCH_MOVE] = createInputFromTouch),
647
+ (_a[TOUCH_END] = createInputFromTouch),
648
+ (_a[TOUCH_CANCEL] = createInputFromTouch),
649
+ (_a[MOUSE_DOWN] = createInputFromMouse),
650
+ (_a[MOUSE_MOVE] = createInputFromMouse),
651
+ (_a[MOUSE_UP] = createInputFromMouse),
652
+ _a);
653
+
654
+ _this.on(TYPE_AT_AFTER, function (payload) {
655
+ var target = payload.target,
656
+ __type = payload.__type;
657
+ var domEvents = _this.__options.domEvents;
658
+
659
+ if (!!domEvents && void 0 !== _this.el && !!target) {
660
+ dispatchDomEvent(__type, target, payload, domEvents);
661
+ dispatchDomEvent(TYPE_AT_AFTER, target, payload, domEvents);
662
+ }
663
+ });
664
+ if (void 0 !== el) {
665
+ el.style.webkitTapHighlightColor = "rgba(0,0,0,0)";
666
+ var supportsPassive_1 = false;
667
+ try {
668
+ var opts = {};
669
+ OriginPrototype.Object.defineProperty(opts, "passive", {
670
+ get: function () {
671
+ supportsPassive_1 = true;
672
+ },
673
+ });
674
+ window.addEventListener(
675
+ "_",
676
+ function () {
677
+ return void 0;
678
+ },
679
+ opts
680
+ );
681
+ } catch (_b) {}
682
+
683
+ _this.on(
684
+ TYPE_UNBIND,
685
+ bindElement(
686
+ el,
687
+ _this.catchEvent.bind(_this),
688
+ false === _this.__options.preventDefault && supportsPassive_1
689
+ ? { passive: true }
690
+ : { passive: false }
691
+ )
692
+ );
693
+ }
694
+ return _this;
695
+ }
696
+
697
+ default_1.prototype.use = function (plugin, pluginOptions) {
698
+ this.__pluginContexts.push(plugin(this, pluginOptions));
699
+ };
700
+
701
+ default_1.prototype.catchEvent = function (event) {
702
+ var input = this.__inputCreatorMap[event.type](event);
703
+ if (void 0 !== input) {
704
+ var stopPropagation = function () {
705
+ return event.stopPropagation();
706
+ };
707
+ var stopImmediatePropagation = function () {
708
+ return event.stopImmediatePropagation();
709
+ };
710
+ var preventDefault = function () {
711
+ return event.preventDefault();
712
+ };
713
+ if (canPreventDefault(event, this.__options)) {
714
+ preventDefault();
715
+ } else {
716
+ if ("touchstart" === event.type) {
717
+ this.__isIgnoreMouse = true;
718
+ } else if ("touchmove" === event.type) {
719
+ this.__isIgnoreMouse = false;
720
+ }
721
+ if (this.__isIgnoreMouse && event.type.startsWith("mouse")) {
722
+ if ("mouseup" === event.type) {
723
+ this.__isIgnoreMouse = false;
724
+ }
725
+ return;
726
+ }
727
+ }
728
+
729
+ this.emit(TYPE_INPUT, input);
730
+ this.emit2("at:".concat(input.phase), input, {});
731
+ var computed_1 = {};
732
+
733
+ this.__computeFunctionList.forEach(function (compute) {
734
+ var result = compute(input, computed_1);
735
+ if (void 0 !== result) {
736
+ for (var key in result) {
737
+ computed_1[key] = result[key];
738
+ }
739
+ }
740
+ });
741
+
742
+ this.emit(
743
+ TYPE_COMPUTED,
744
+ __assign(__assign(__assign({}, input), computed_1), {
745
+ stopPropagation: stopPropagation,
746
+ stopImmediatePropagation: stopImmediatePropagation,
747
+ preventDefault: preventDefault,
748
+ })
749
+ );
750
+ }
751
+ };
752
+ default_1.prototype.compute = function (
753
+ computeFunctionCreatorList,
754
+
755
+ callback
756
+ ) {
757
+ var e_1, _a;
758
+ try {
759
+ for (
760
+ var computeFunctionCreatorList_1 = __values(
761
+ computeFunctionCreatorList
762
+ ),
763
+ computeFunctionCreatorList_1_1 =
764
+ computeFunctionCreatorList_1.next();
765
+ !computeFunctionCreatorList_1_1.done;
766
+ computeFunctionCreatorList_1_1 = computeFunctionCreatorList_1.next()
767
+ ) {
768
+ var computeFunctionCreator = computeFunctionCreatorList_1_1.value;
769
+ if (
770
+ !this.__computeFunctionCreatorList.includes(
771
+ computeFunctionCreator
772
+ )
773
+ ) {
774
+ this.__computeFunctionCreatorList.push(computeFunctionCreator);
775
+
776
+ this.__computeFunctionList.push(computeFunctionCreator());
777
+ }
778
+ }
779
+ } catch (e_1_1) {
780
+ e_1 = { error: e_1_1 };
781
+ } finally {
782
+ try {
783
+ if (
784
+ computeFunctionCreatorList_1_1 &&
785
+ !computeFunctionCreatorList_1_1.done &&
786
+ (_a = computeFunctionCreatorList_1.return)
787
+ )
788
+ _a.call(computeFunctionCreatorList_1);
789
+ } finally {
790
+ if (e_1) throw e_1.error;
791
+ }
792
+ }
793
+
794
+ this.on(TYPE_COMPUTED, callback);
795
+ };
796
+
797
+ default_1.prototype.beforeEach = function (interceptor) {
798
+ var _this = this;
799
+
800
+ _super.prototype.beforeEach.call(this, function (type, next) {
801
+ var _a;
802
+ if ((_a = _this.c) === null || _a === void 0 ? void 0 : _a.name) {
803
+ interceptor(type, next);
804
+ } else {
805
+ next();
806
+ }
807
+ });
808
+ };
809
+
810
+ default_1.prototype.get = function (name) {
811
+ return this.__pluginContexts.find(function (pluginContext) {
812
+ return name === pluginContext.name;
813
+ });
814
+ };
815
+
816
+ default_1.prototype.set = function (newOptions) {
817
+ this.__options = __assign(__assign({}, this.__options), newOptions);
818
+ };
819
+
820
+ default_1.prototype.emit2 = function (type, payload, pluginContext) {
821
+ var _this = this;
822
+ this.c = pluginContext;
823
+
824
+ this.emit(
825
+ type,
826
+ __assign(__assign({}, payload), { type: type }),
827
+ function () {
828
+ _this.emit(
829
+ TYPE_AT_AFTER,
830
+ __assign(__assign({}, payload), { name: type, __type: type })
831
+ );
832
+ }
833
+ );
834
+ };
835
+ default_1.prototype.destroy = function () {
836
+ this.emit(TYPE_UNBIND);
837
+ _super.prototype.destroy.call(this);
838
+ };
839
+ return default_1;
840
+ })(AnyEvent);
841
+
842
+ var getVLength = function (v) {
843
+ return Math.sqrt(v.x * v.x + v.y * v.y);
844
+ };
845
+
846
+ var getDotProduct = function (v1, v2) {
847
+ return v1.x * v2.x + v1.y * v2.y;
848
+ };
849
+
850
+ var getRadian = function (v1, v2) {
851
+ var mr = getVLength(v1) * getVLength(v2);
852
+ if (mr === 0) return 0;
853
+ var r = getDotProduct(v1, v2) / mr;
854
+ if (r > 1) r = 1;
855
+ return Math.acos(r);
856
+ };
857
+
858
+ var getCross = function (v1, v2) {
859
+ return v1.x * v2.y - v2.x * v1.y;
860
+ };
861
+
862
+ var radianToAngle = function (radian) {
863
+ return (radian / Math.PI) * 180;
864
+ };
865
+
866
+ var getAngle = function (v1, v2) {
867
+ var angle = getRadian(v1, v2);
868
+ if (getCross(v1, v2) > 0) {
869
+ angle *= -1;
870
+ }
871
+ return radianToAngle(angle);
872
+ };
873
+
874
+ var getDirection = function (x, y) {
875
+ if (0 === x && 0 === y) {
876
+ return;
877
+ }
878
+ if (Math.abs(x) >= Math.abs(y)) {
879
+ return 0 < x ? DIRECTION_RIGHT : DIRECTION_LEFT;
880
+ } else {
881
+ return 0 < y ? DIRECTION_DOWN : DIRECTION_UP;
882
+ }
883
+ };
884
+
885
+ function ComputeAngle() {
886
+ var angle = 0;
887
+ var deltaAngle = 0;
888
+
889
+ return function (input, computed) {
890
+ var prevVecotr = computed.prevVecotr,
891
+ startVecotr = computed.startVecotr,
892
+ activeVecotr = computed.activeVecotr;
893
+ if (activeVecotr) {
894
+ deltaAngle = Math.round(getAngle(activeVecotr, prevVecotr));
895
+ angle = Math.round(getAngle(activeVecotr, startVecotr));
896
+ }
897
+ return { angle: angle, deltaAngle: deltaAngle };
898
+ };
899
+ }
900
+
901
+ function ComputeDeltaXY() {
902
+ return function (input) {
903
+ var prevInput = input.prevInput;
904
+ var deltaX = 0;
905
+ var deltaY = 0;
906
+ var deltaXYAngle = 0;
907
+ if (void 0 !== prevInput) {
908
+ deltaX = input.x - prevInput.x;
909
+ deltaY = input.y - prevInput.y;
910
+ if (0 !== deltaX || 0 !== deltaY) {
911
+ var deltaXY = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));
912
+ deltaXYAngle = Math.round(
913
+ radianToAngle(Math.acos(Math.abs(deltaX) / deltaXY))
914
+ );
915
+ }
916
+ }
917
+ return {
918
+ deltaX: deltaX,
919
+ deltaY: deltaY,
920
+ deltaXYAngle: deltaXYAngle,
921
+ };
922
+ };
923
+ }
924
+
925
+ function ComputeDistance() {
926
+ var displacementX = 0;
927
+ var displacementY = 0;
928
+ var distanceX = 0;
929
+ var distanceY = 0;
930
+ var distance = 0;
931
+
932
+ var overallDirection;
933
+
934
+ return function (input) {
935
+ var phase = input.phase,
936
+ startInput = input.startInput;
937
+ if (TYPE_START === phase) {
938
+ displacementX = 0;
939
+ displacementY = 0;
940
+ distanceX = 0;
941
+ distanceY = 0;
942
+ distance = 0;
943
+ } else if (TYPE_MOVE === phase) {
944
+ displacementX = Math.round(
945
+ input.points[0][CLIENT_X] - startInput.points[0][CLIENT_X]
946
+ );
947
+ displacementY = Math.round(
948
+ input.points[0][CLIENT_Y] - startInput.points[0][CLIENT_Y]
949
+ );
950
+ distanceX = Math.abs(displacementX);
951
+ distanceY = Math.abs(displacementY);
952
+ distance = Math.round(getVLength({ x: distanceX, y: distanceY }));
953
+ overallDirection = getDirection(displacementX, displacementY);
954
+ }
955
+ return {
956
+ displacementX: displacementX,
957
+ displacementY: displacementY,
958
+ distanceX: distanceX,
959
+ distanceY: distanceY,
960
+ distance: distance,
961
+
962
+ overallDirection: overallDirection,
963
+ };
964
+ };
965
+ }
966
+
967
+ function ComputeScale() {
968
+ var scale = 1;
969
+
970
+ return function (input, computed) {
971
+ var deltaScale = 1;
972
+ var prevVecotr = computed.prevVecotr,
973
+ startVecotr = computed.startVecotr,
974
+ activeVecotr = computed.activeVecotr;
975
+ if (activeVecotr) {
976
+ deltaScale = round2(
977
+ getVLength(activeVecotr) / getVLength(prevVecotr)
978
+ );
979
+ scale = round2(getVLength(activeVecotr) / getVLength(startVecotr));
980
+ }
981
+ return { scale: scale, deltaScale: deltaScale };
982
+ };
983
+ }
984
+
985
+ function ComputeVAndDir() {
986
+ var velocityX = 0;
987
+ var velocityY = 0;
988
+ var speedX = 0;
989
+ var speedY = 0;
990
+
991
+ var direction;
992
+
993
+ var lastValidInput;
994
+
995
+ return function (input) {
996
+ if (void 0 !== input) {
997
+ lastValidInput = lastValidInput || input.startInput;
998
+ var deltaTime = input.timestamp - lastValidInput.timestamp;
999
+ if (COMPUTE_INTERVAL < deltaTime) {
1000
+ var deltaX = input.x - lastValidInput.x;
1001
+ var deltaY = input.y - lastValidInput.y;
1002
+ speedX = Math.round((deltaX / deltaTime) * 100) / 100;
1003
+ speedY = Math.round((deltaY / deltaTime) * 100) / 100;
1004
+ velocityX = Math.abs(speedX);
1005
+ velocityY = Math.abs(speedY);
1006
+ direction = getDirection(deltaX, deltaY);
1007
+ lastValidInput = input;
1008
+ }
1009
+ }
1010
+ return {
1011
+ velocityX: velocityX,
1012
+ velocityY: velocityY,
1013
+ speedX: speedX,
1014
+ speedY: speedY,
1015
+
1016
+ direction: direction,
1017
+ };
1018
+ };
1019
+ }
1020
+
1021
+ function ComputeMaxLength() {
1022
+ var maxPointLength = 0;
1023
+
1024
+ return function (input) {
1025
+ var phase = input.phase;
1026
+ if (TYPE_START === phase) {
1027
+ maxPointLength = input.pointLength;
1028
+ }
1029
+ return { maxPointLength: maxPointLength };
1030
+ };
1031
+ }
1032
+
1033
+ function computeVector(input) {
1034
+ return {
1035
+ x: input.points[1][CLIENT_X] - input.points[0][CLIENT_X],
1036
+ y: input.points[1][CLIENT_Y] - input.points[0][CLIENT_Y],
1037
+ };
1038
+ }
1039
+ function ComputeVectorForMutli() {
1040
+ var startVecotr;
1041
+
1042
+ var prevVecotr;
1043
+ var activeVecotr;
1044
+
1045
+ return function (input) {
1046
+ var prevInput = input.prevInput,
1047
+ startMultiInput = input.startMultiInput;
1048
+ if (
1049
+ void 0 !== startMultiInput &&
1050
+ void 0 !== prevInput &&
1051
+ input.id !== startMultiInput.id &&
1052
+ 1 < prevInput.pointLength &&
1053
+ 1 < input.pointLength
1054
+ ) {
1055
+ startVecotr = computeVector(startMultiInput);
1056
+ prevVecotr = computeVector(prevInput);
1057
+ activeVecotr = computeVector(input);
1058
+ } else {
1059
+ activeVecotr = void 0;
1060
+ }
1061
+ return {
1062
+ startVecotr: startVecotr,
1063
+
1064
+ prevVecotr: prevVecotr,
1065
+ activeVecotr: activeVecotr,
1066
+ };
1067
+ };
1068
+ }
1069
+
1070
+ var DEFAULT_OPTIONS$5 = {
1071
+ name: "tap",
1072
+ pointLength: 1,
1073
+ tapTimes: 1,
1074
+ waitNextTapTime: 300,
1075
+ maxDistance: 2,
1076
+ maxDistanceFromPrevTap: 9,
1077
+ maxPressTime: 250,
1078
+ };
1079
+
1080
+ function tap(at, options) {
1081
+ var context = createPluginContext(DEFAULT_OPTIONS$5, options);
1082
+ var tapCount = 0;
1083
+
1084
+ var prevTapPoint;
1085
+
1086
+ var prevTapTime;
1087
+
1088
+ var countDownToFailTimer;
1089
+ function reset() {
1090
+ tapCount = 0;
1091
+ prevTapPoint = void 0;
1092
+ prevTapTime = void 0;
1093
+ }
1094
+ function countDownToFail() {
1095
+ countDownToFailTimer = setTimeout(function () {
1096
+ context.state = 2;
1097
+ reset();
1098
+ }, context.waitNextTapTime);
1099
+ }
1100
+
1101
+ function isValidDistanceFromPrevTap(center, options) {
1102
+ if (void 0 !== prevTapPoint) {
1103
+ var distanceFromPreviousTap = getVLength({
1104
+ x: center.x - prevTapPoint.x,
1105
+
1106
+ y: center.y - prevTapPoint.y,
1107
+ });
1108
+ prevTapPoint = center;
1109
+ return options.maxDistanceFromPrevTap >= distanceFromPreviousTap;
1110
+ } else {
1111
+ prevTapPoint = center;
1112
+ return true;
1113
+ }
1114
+ }
1115
+
1116
+ function isValidInterval(waitNextTapTime) {
1117
+ var now = performance.now();
1118
+
1119
+ if (void 0 === prevTapTime) {
1120
+ prevTapTime = now;
1121
+ return true;
1122
+ } else {
1123
+ var interval = now - prevTapTime;
1124
+ prevTapTime = now;
1125
+ return interval < waitNextTapTime;
1126
+ }
1127
+ }
1128
+
1129
+ at.compute([ComputeDistance, ComputeMaxLength], function (computed) {
1130
+ if (isDisabled(context)) return;
1131
+ var phase = computed.phase,
1132
+ x = computed.x,
1133
+ y = computed.y;
1134
+ if (TYPE_END !== phase) return;
1135
+ context.state = 0;
1136
+ if (test()) {
1137
+ clearTimeout(countDownToFailTimer);
1138
+ if (
1139
+ isValidDistanceFromPrevTap({ x: x, y: y }, context) &&
1140
+ isValidInterval(context.waitNextTapTime)
1141
+ ) {
1142
+ tapCount++;
1143
+ } else {
1144
+ tapCount = 1;
1145
+ }
1146
+ if (0 === tapCount % context.tapTimes) {
1147
+ context.state = 1;
1148
+ at.emit2(context.name, computed, context);
1149
+ reset();
1150
+ } else {
1151
+ countDownToFail();
1152
+ }
1153
+ } else {
1154
+ reset();
1155
+ context.state = 2;
1156
+ }
1157
+ function test() {
1158
+ var startInput = computed.startInput,
1159
+ pointLength = computed.pointLength,
1160
+ timestamp = computed.timestamp;
1161
+ var deltaTime = timestamp - startInput.timestamp;
1162
+ var distance = computed.distance,
1163
+ maxPointLength = computed.maxPointLength;
1164
+ return (
1165
+ maxPointLength === context.pointLength &&
1166
+ 0 === pointLength &&
1167
+ context.maxDistance >= distance &&
1168
+ context.maxPressTime > deltaTime
1169
+ );
1170
+ }
1171
+ });
1172
+ return context;
1173
+ }
1174
+
1175
+ var DEFAULT_OPTIONS$4 = { name: "pan", threshold: 10, pointLength: 1 };
1176
+
1177
+ function pan(at, options) {
1178
+ var context = createPluginContext(DEFAULT_OPTIONS$4, options);
1179
+ at.compute(
1180
+ [ComputeVAndDir, ComputeDistance, ComputeDeltaXY],
1181
+
1182
+ function (computed) {
1183
+ resetState(context);
1184
+ if (isDisabled(context)) return;
1185
+ var isValid = test();
1186
+ context.state = flow(isValid, context.state, computed.phase);
1187
+ if (isValid || isMoveOrEndOrCancel(context.state)) {
1188
+ var name_1 = context.name;
1189
+ at.emit2(name_1, computed, context);
1190
+ at.emit2(name_1 + getStatusName(context.state), computed, context);
1191
+ if (
1192
+ ![TYPE_END, TYPE_CANCEL].includes(computed.phase) &&
1193
+ computed.direction
1194
+ ) {
1195
+ at.emit2(name_1 + computed.direction, computed, context);
1196
+ }
1197
+ }
1198
+ function test() {
1199
+ var pointLength = computed.pointLength,
1200
+ distance = computed.distance;
1201
+ return (
1202
+ context.pointLength === pointLength &&
1203
+ context.threshold <= distance
1204
+ );
1205
+ }
1206
+ }
1207
+ );
1208
+ return context;
1209
+ }
1210
+
1211
+ var DEFAULT_OPTIONS$3 = {
1212
+ name: "swipe",
1213
+ threshold: 10,
1214
+ velocity: 0.3,
1215
+ pointLength: 1,
1216
+ };
1217
+
1218
+ function swipe(at, options) {
1219
+ var context = createPluginContext(DEFAULT_OPTIONS$3, options);
1220
+ at.compute(
1221
+ [ComputeDistance, ComputeVAndDir, ComputeMaxLength],
1222
+
1223
+ function (computed) {
1224
+ context.state = 0;
1225
+ if (context.disabled) return;
1226
+ if (test()) {
1227
+ var name_1 = context.name;
1228
+ context.state = 1;
1229
+ at.emit2(name_1, computed, context);
1230
+ at.emit2(name_1 + computed.direction, computed, context);
1231
+ }
1232
+ function test() {
1233
+ if (TYPE_END !== computed.phase) return false;
1234
+ var velocityX = computed.velocityX,
1235
+ velocityY = computed.velocityY,
1236
+ distance = computed.distance,
1237
+ maxPointLength = computed.maxPointLength;
1238
+ return (
1239
+ maxPointLength === context.pointLength &&
1240
+ 0 === computed.points.length &&
1241
+ context.threshold < distance &&
1242
+ context.velocity < Math.max(velocityX, velocityY)
1243
+ );
1244
+ }
1245
+ }
1246
+ );
1247
+ return context;
1248
+ }
1249
+
1250
+ var DEFAULT_OPTIONS$2 = {
1251
+ name: "press",
1252
+ pointLength: 1,
1253
+ maxDistance: 9,
1254
+ minPressTime: 251,
1255
+ };
1256
+
1257
+ function press(at, options) {
1258
+ var context = createPluginContext(DEFAULT_OPTIONS$2, options);
1259
+ var timeoutId = 0;
1260
+
1261
+ at.compute([ComputeDistance], function (computed) {
1262
+ if (isDisabled(context)) return;
1263
+ var phase = computed.phase,
1264
+ startInput = computed.startInput,
1265
+ pointLength = computed.pointLength;
1266
+ if (TYPE_START === phase && context.pointLength === pointLength) {
1267
+ resetState(context);
1268
+ clearTimeout(timeoutId);
1269
+ timeoutId = setTimeout(function () {
1270
+ context.state = 1;
1271
+ at.emit2(context.name, computed, context);
1272
+ }, context.minPressTime);
1273
+ } else if (TYPE_END === phase && 1 === context.state) {
1274
+ at.emit2(
1275
+ "".concat(context.name).concat(DIRECTION_UP),
1276
+ computed,
1277
+ context
1278
+ );
1279
+ } else if (1 !== context.state) {
1280
+ var deltaTime = computed.timestamp - startInput.timestamp;
1281
+ if (
1282
+ !test() ||
1283
+ (context.minPressTime > deltaTime &&
1284
+ [TYPE_END, TYPE_CANCEL].includes(phase))
1285
+ ) {
1286
+ clearTimeout(timeoutId);
1287
+ context.state = 2;
1288
+ }
1289
+ }
1290
+ function test() {
1291
+ var distance = computed.distance;
1292
+ return distance && context.maxDistance > distance;
1293
+ }
1294
+ });
1295
+ return context;
1296
+ }
1297
+
1298
+ var DEFAULT_OPTIONS$1 = {
1299
+ name: "pinch",
1300
+ threshold: 0,
1301
+ pointLength: 2,
1302
+ };
1303
+
1304
+ function pinch(at, options) {
1305
+ var context = createPluginContext(DEFAULT_OPTIONS$1, options);
1306
+ at.compute(
1307
+ [ComputeVectorForMutli, ComputeScale],
1308
+
1309
+ function (computed) {
1310
+ resetState(context);
1311
+ if (isDisabled(context)) return;
1312
+ var isValid = test();
1313
+ context.state = flow(isValid, context.state, computed.phase);
1314
+ var name = context.name;
1315
+ if (isValid || isMoveOrEndOrCancel(context.state)) {
1316
+ at.emit2(name, computed, context);
1317
+ var deltaScale = computed.deltaScale;
1318
+ if (1 !== deltaScale) {
1319
+ at.emit2(
1320
+ name + (1 < deltaScale ? "in" : "out"),
1321
+ computed,
1322
+ context
1323
+ );
1324
+ }
1325
+ }
1326
+ var stateName = getStatusName(context.state);
1327
+ if (stateName) {
1328
+ at.emit2(name + stateName, computed, context);
1329
+ }
1330
+ function test() {
1331
+ var pointLength = computed.pointLength,
1332
+ scale = computed.scale;
1333
+ computed.deltaScale;
1334
+ computed.phase;
1335
+ return (
1336
+ context.pointLength === pointLength &&
1337
+ context.threshold < Math.abs(scale - 1)
1338
+ );
1339
+ }
1340
+ }
1341
+ );
1342
+ return context;
1343
+ }
1344
+
1345
+ var DEFAULT_OPTIONS = {
1346
+ name: "rotate",
1347
+ threshold: 0,
1348
+ pointLength: 2,
1349
+ };
1350
+
1351
+ function rotate(at, options) {
1352
+ var context = createPluginContext(DEFAULT_OPTIONS, options);
1353
+ at.compute(
1354
+ [ComputeVectorForMutli, ComputeAngle],
1355
+
1356
+ function (computed) {
1357
+ if (isDisabled(context)) return;
1358
+ resetState(context);
1359
+ var isValid = test();
1360
+ context.state = flow(isValid, context.state, computed.phase);
1361
+ var name = context.name;
1362
+ if (isValid || isMoveOrEndOrCancel(context.state)) {
1363
+ at.emit2(name, computed, context);
1364
+ }
1365
+ var stateName = getStatusName(context.state);
1366
+ if (stateName) {
1367
+ at.emit2(name + stateName, computed, context);
1368
+ }
1369
+ function test() {
1370
+ var pointLength = computed.pointLength,
1371
+ angle = computed.angle;
1372
+ return (
1373
+ context.pointLength === pointLength &&
1374
+ context.threshold < Math.abs(angle)
1375
+ );
1376
+ }
1377
+ }
1378
+ );
1379
+ return context;
1380
+ }
1381
+
1382
+ function doubletap(at) {
1383
+ at.use(tap, { name: "doubletap", tapTimes: 2 });
1384
+ var doubleTapContext = at.get("doubletap");
1385
+
1386
+ var timeID;
1387
+
1388
+ at.beforeEach(function (type, next) {
1389
+ if ("tap" === type) {
1390
+ clearTimeout(timeID);
1391
+ timeID = setTimeout(function () {
1392
+ if ([0, 2].includes(doubleTapContext.state)) {
1393
+ next();
1394
+ }
1395
+ }, 300);
1396
+ } else {
1397
+ next();
1398
+ }
1399
+ });
1400
+ return doubleTapContext;
1401
+ }
1402
+
1403
+ var default_1 = (function (_super) {
1404
+ __extends(default_1, _super);
1405
+
1406
+ function default_1(el, options) {
1407
+ var _this = _super.call(this, el, options) || this;
1408
+ _this.use(tap);
1409
+ _this.use(pan);
1410
+ _this.use(swipe);
1411
+ _this.use(press);
1412
+ _this.use(pinch);
1413
+ _this.use(rotate);
1414
+ return _this;
1415
+ }
1416
+ default_1.STATE_POSSIBLE = 0;
1417
+ default_1.STATE_START = 4;
1418
+ default_1.STATE_MOVE = 5;
1419
+ default_1.STATE_END = 1;
1420
+ default_1.STATE_CANCELLED = 3;
1421
+ default_1.STATE_FAILED = 2;
1422
+ default_1.STATE_RECOGNIZED = 1;
1423
+ default_1.tap = tap;
1424
+ default_1.pan = pan;
1425
+ default_1.swipe = swipe;
1426
+ default_1.press = press;
1427
+ default_1.rotate = rotate;
1428
+ default_1.pinch = pinch;
1429
+ default_1.doubletap = doubletap;
1430
+ return default_1;
1431
+ })(default_1$1);
1432
+
1433
+ return default_1;
1434
+ });
1435
+ };
1436
+
1437
+ class PopsUtils {
1438
+ /**
1439
+ * 判断是否是window,例如window、self、globalThis
1440
+ * @param target
1441
+ */
1442
+ isWin(target) {
1443
+ if (typeof target !== "object") {
1444
+ return false;
1445
+ }
1446
+ if (target instanceof Node) {
1447
+ return false;
1448
+ }
1449
+ if (target === globalThis) {
1450
+ return true;
1451
+ }
1452
+ if (target === window) {
1453
+ return true;
1454
+ }
1455
+ if (target === self) {
1456
+ return true;
1457
+ }
1458
+ if (target === PopsCore.globalThis) {
1459
+ return true;
1460
+ }
1461
+ if (target === PopsCore.window) {
1462
+ return true;
1463
+ }
1464
+ if (target === PopsCore.self) {
1465
+ return true;
1466
+ }
1467
+ if (typeof unsafeWindow !== "undefined" &&
1468
+ target === unsafeWindow) {
1469
+ return true;
1470
+ }
1471
+ if (target?.Math?.toString() !== "[object Math]") {
1472
+ return false;
1473
+ }
1474
+ return true;
1475
+ }
1476
+ isDOM(target) {
1477
+ return target instanceof Node;
1478
+ }
1479
+ /**
1480
+ * 删除对象上的属性
1481
+ * @param target
1482
+ * @param propName
1483
+ */
1484
+ delete(target, propName) {
1485
+ if (typeof Reflect === "object" && Reflect.deleteProperty) {
1486
+ Reflect.deleteProperty(target, propName);
1487
+ }
1488
+ else {
1489
+ delete target[propName];
1490
+ }
1491
+ }
1492
+ assign(target = {}, source = {}, isAdd = false) {
1493
+ let UtilsContext = this;
1494
+ if (Array.isArray(source)) {
1495
+ let canTraverse = source.filter((item) => {
1496
+ return typeof item === "object";
1497
+ });
1498
+ if (!canTraverse.length) {
1499
+ return source;
1500
+ }
1501
+ }
1502
+ if (isAdd) {
1503
+ for (const sourceKeyName in source) {
1504
+ const targetKeyName = sourceKeyName;
1505
+ let targetValue = target[targetKeyName];
1506
+ let sourceValue = source[sourceKeyName];
1507
+ if (sourceKeyName in target &&
1508
+ typeof sourceValue === "object" &&
1509
+ !UtilsContext.isDOM(sourceValue)) {
1510
+ /* 源端的值是object类型,且不是元素节点 */
1511
+ target[sourceKeyName] = UtilsContext.assign(targetValue, sourceValue, isAdd);
1512
+ continue;
1513
+ }
1514
+ target[sourceKeyName] = sourceValue;
1515
+ }
1516
+ }
1517
+ else {
1518
+ for (const targetKeyName in target) {
1519
+ if (targetKeyName in source) {
1520
+ let targetValue = target[targetKeyName];
1521
+ let sourceValue = source[targetKeyName];
1522
+ if (typeof sourceValue === "object" &&
1523
+ !UtilsContext.isDOM(sourceValue) &&
1524
+ Object.keys(sourceValue).length) {
1525
+ /* 源端的值是object类型,且不是元素节点 */
1526
+ target[targetKeyName] = UtilsContext.assign(targetValue, sourceValue, isAdd);
1527
+ continue;
1528
+ }
1529
+ /* 直接赋值 */
1530
+ target[targetKeyName] = sourceValue;
1531
+ }
1532
+ }
1533
+ }
1534
+ return target;
1535
+ }
1536
+ /**
1537
+ * 生成uuid
1538
+ */
1539
+ getRandomGUID() {
1540
+ if (typeof PopsCore.globalThis?.crypto?.randomUUID === "function") {
1541
+ return PopsCore.globalThis.crypto.randomUUID();
1542
+ }
1543
+ else {
1544
+ return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (charStr) {
1545
+ var randomValue = (Math.random() * 16) | 0, randomCharValue = charStr === "x" ? randomValue : (randomValue & 0x3) | 0x8;
1546
+ return randomCharValue.toString(16);
1547
+ });
1548
+ }
1549
+ }
1550
+ /**
1551
+ * 字符串转HTMLElement
1552
+ * @param elementString
1553
+ * @returns
1554
+ */
1555
+ parseTextToDOM(elementString) {
1556
+ /* 去除前后的换行和空格 */
1557
+ elementString = elementString
1558
+ .replace(/^[\n|\s]*/g, "")
1559
+ .replace(/[\n|\s]*$/g, "");
1560
+ let targetElement = popsDOMUtils.createElement("div", {
1561
+ innerHTML: elementString,
1562
+ });
1563
+ return targetElement.firstChild;
1564
+ }
1565
+ contains(target, context = PopsCore
1566
+ .document.body || PopsCore.document.documentElement) {
1567
+ if (typeof target[Symbol.iterator] === "function") {
1568
+ // 可遍历的数组
1569
+ let flag = true;
1570
+ for (const targetNode of target) {
1571
+ if (!context.contains(targetNode)) {
1572
+ flag = false;
1573
+ break;
1574
+ }
1575
+ }
1576
+ return flag;
1577
+ }
1578
+ else {
1579
+ return context.contains(target);
1580
+ }
1581
+ }
1582
+ formatTime(text = new Date(), formatType = "yyyy-MM-dd HH:mm:ss") {
1583
+ let time = text == null ? new Date() : new Date(text);
1584
+ /**
1585
+ * 校验时间补0
1586
+ * @param timeNum
1587
+ * @returns
1588
+ */
1589
+ function checkTime(timeNum) {
1590
+ if (timeNum < 10)
1591
+ return "0" + timeNum;
1592
+ return timeNum;
1593
+ }
1594
+ /**
1595
+ * 时间制修改 24小时制转12小时制
1596
+ * @param hourNum 小时
1597
+ * @returns
1598
+ */
1599
+ function timeSystemChange(hourNum) {
1600
+ return hourNum > 12 ? hourNum - 12 : hourNum;
1601
+ }
1602
+ let timeRegexp = {
1603
+ yyyy: time.getFullYear(),
1604
+ /* 年 */
1605
+ MM: checkTime(time.getMonth() + 1),
1606
+ /* 月 */
1607
+ dd: checkTime(time.getDate()),
1608
+ /* 日 */
1609
+ HH: checkTime(time.getHours()),
1610
+ /* 时 (24小时制) */
1611
+ hh: checkTime(timeSystemChange(time.getHours())),
1612
+ /* 时 (12小时制) */
1613
+ mm: checkTime(time.getMinutes()),
1614
+ /* 分 */
1615
+ ss: checkTime(time.getSeconds()),
1616
+ /* 秒 */
1617
+ };
1618
+ Object.keys(timeRegexp).forEach(function (key) {
1619
+ let replaecRegexp = new RegExp(key, "g");
1620
+ formatType = formatType.replace(replaecRegexp, timeRegexp[key]);
1621
+ });
1622
+ return formatType;
1623
+ }
1624
+ formatByteToSize(byteSize, addType = true) {
1625
+ byteSize = parseInt(byteSize.toString());
1626
+ if (isNaN(byteSize)) {
1627
+ throw new Error("Utils.formatByteToSize 参数 byteSize 格式不正确");
1628
+ }
1629
+ let result = 0;
1630
+ let resultType = "KB";
1631
+ let sizeData = {};
1632
+ sizeData.B = 1;
1633
+ sizeData.KB = 1024;
1634
+ sizeData.MB = sizeData.KB * sizeData.KB;
1635
+ sizeData.GB = sizeData.MB * sizeData.KB;
1636
+ sizeData.TB = sizeData.GB * sizeData.KB;
1637
+ sizeData.PB = sizeData.TB * sizeData.KB;
1638
+ sizeData.EB = sizeData.PB * sizeData.KB;
1639
+ sizeData.ZB = sizeData.EB * sizeData.KB;
1640
+ sizeData.YB = sizeData.ZB * sizeData.KB;
1641
+ sizeData.BB = sizeData.YB * sizeData.KB;
1642
+ sizeData.NB = sizeData.BB * sizeData.KB;
1643
+ sizeData.DB = sizeData.NB * sizeData.KB;
1644
+ for (let key in sizeData) {
1645
+ result = byteSize / sizeData[key];
1646
+ resultType = key;
1647
+ if (sizeData.KB >= result) {
1648
+ break;
1649
+ }
1650
+ }
1651
+ result = result.toFixed(2);
1652
+ result = addType
1653
+ ? result + resultType.toString()
1654
+ : parseFloat(result.toString());
1655
+ return result;
1656
+ }
1657
+ AnyTouch = AnyTouch;
1658
+ }
1659
+ const popsUtils = new PopsUtils();
1660
+
1661
+ class PopsDOMUtilsEvent {
1662
+ on(element, eventType, selector, callback, option) {
1663
+ /**
1664
+ * 获取option配置
1665
+ * @param args
1666
+ * @param startIndex
1667
+ * @param option
1668
+ */
1669
+ function getOption(args, startIndex, option) {
1670
+ if (typeof args[startIndex] === "boolean") {
1671
+ option.capture = args[startIndex];
1672
+ if (typeof args[startIndex + 1] === "boolean") {
1673
+ option.once = args[startIndex + 1];
1674
+ }
1675
+ if (typeof args[startIndex + 2] === "boolean") {
1676
+ option.passive = args[startIndex + 2];
1677
+ }
1678
+ }
1679
+ else if (typeof args[startIndex] === "object" &&
1680
+ ("capture" in args[startIndex] ||
1681
+ "once" in args[startIndex] ||
1682
+ "passive" in args[startIndex])) {
1683
+ option.capture = args[startIndex].capture;
1684
+ option.once = args[startIndex].once;
1685
+ option.passive = args[startIndex].passive;
1686
+ }
1687
+ return option;
1688
+ }
1689
+ let DOMUtilsContext = this;
1690
+ let args = arguments;
1691
+ if (typeof element === "string") {
1692
+ element = PopsCore.document.querySelectorAll(element);
1693
+ }
1694
+ if (element == null) {
1695
+ return;
1696
+ }
1697
+ let elementList = [];
1698
+ if (element instanceof NodeList || Array.isArray(element)) {
1699
+ element = element;
1700
+ elementList = [...element];
1701
+ }
1702
+ else {
1703
+ elementList.push(element);
1704
+ }
1705
+ let eventTypeList = [];
1706
+ if (Array.isArray(eventType)) {
1707
+ eventTypeList = eventTypeList.concat(eventType);
1708
+ }
1709
+ else if (typeof eventType === "string") {
1710
+ eventTypeList = eventTypeList.concat(eventType.split(" "));
1711
+ }
1712
+ let _selector_ = selector;
1713
+ let _callback_ = callback;
1714
+ let _option_ = {
1715
+ capture: false,
1716
+ once: false,
1717
+ passive: false,
1718
+ };
1719
+ if (typeof selector === "function") {
1720
+ /* 这是为没有selector的情况 */
1721
+ _selector_ = void 0;
1722
+ _callback_ = selector;
1723
+ _option_ = getOption(args, 3, _option_);
1724
+ }
1725
+ else {
1726
+ /* 这是存在selector的情况 */
1727
+ _option_ = getOption(args, 4, _option_);
1728
+ }
1729
+ /**
1730
+ * 如果是once,那么删除该监听和元素上的事件和监听
1731
+ */
1732
+ function checkOptionOnceToRemoveEventListener() {
1733
+ if (_option_.once) {
1734
+ DOMUtilsContext.off(element, eventType, selector, callback, option);
1735
+ }
1736
+ }
1737
+ elementList.forEach((elementItem) => {
1738
+ function ownCallBack(event) {
1739
+ let target = event.target;
1740
+ if (_selector_) {
1741
+ /* 存在自定义子元素选择器 */
1742
+ let totalParent = popsUtils.isWin(elementItem)
1743
+ ? PopsCore.document.documentElement
1744
+ : elementItem;
1745
+ if (target.matches(_selector_)) {
1746
+ /* 当前目标可以被selector所匹配到 */
1747
+ _callback_.call(target, event);
1748
+ checkOptionOnceToRemoveEventListener();
1749
+ }
1750
+ else if (target.closest(_selector_) &&
1751
+ totalParent.contains(target.closest(_selector_))) {
1752
+ /* 在上层与主元素之间寻找可以被selector所匹配到的 */
1753
+ let closestElement = target.closest(_selector_);
1754
+ /* event的target值不能直接修改 */
1755
+ OriginPrototype$1.Object.defineProperty(event, "target", {
1756
+ get() {
1757
+ return closestElement;
1758
+ },
1759
+ });
1760
+ _callback_.call(closestElement, event);
1761
+ checkOptionOnceToRemoveEventListener();
1762
+ }
1763
+ }
1764
+ else {
1765
+ _callback_.call(elementItem, event);
1766
+ checkOptionOnceToRemoveEventListener();
1767
+ }
1768
+ }
1769
+ /* 遍历事件名设置元素事件 */
1770
+ eventTypeList.forEach((eventName) => {
1771
+ elementItem.addEventListener(eventName, ownCallBack, _option_);
1772
+ if (_callback_ && _callback_.delegate) {
1773
+ elementItem.setAttribute("data-delegate", _selector_);
1774
+ }
1775
+ /* 获取对象上的事件 */
1776
+ let elementEvents = elementItem[SymbolEvents] || {};
1777
+ /* 初始化对象上的xx事件 */
1778
+ elementEvents[eventName] = elementEvents[eventName] || [];
1779
+ elementEvents[eventName].push({
1780
+ selector: _selector_,
1781
+ option: _option_,
1782
+ callback: ownCallBack,
1783
+ originCallBack: _callback_,
1784
+ });
1785
+ /* 覆盖事件 */
1786
+ elementItem[SymbolEvents] = elementEvents;
1787
+ });
1788
+ });
1789
+ }
1790
+ off(element, eventType, selector, callback, option, filter) {
1791
+ /**
1792
+ * 获取option配置
1793
+ * @param args1
1794
+ * @param startIndex
1795
+ * @param option
1796
+ */
1797
+ function getOption(args1, startIndex, option) {
1798
+ if (typeof args1[startIndex] === "boolean") {
1799
+ option.capture = args1[startIndex];
1800
+ }
1801
+ else if (typeof args1[startIndex] === "object" &&
1802
+ "capture" in args1[startIndex]) {
1803
+ option.capture = args1[startIndex].capture;
1804
+ }
1805
+ return option;
1806
+ }
1807
+ let args = arguments;
1808
+ if (typeof element === "string") {
1809
+ element = PopsCore.document.querySelectorAll(element);
1810
+ }
1811
+ if (element == null) {
1812
+ return;
1813
+ }
1814
+ let elementList = [];
1815
+ if (element instanceof NodeList || Array.isArray(element)) {
1816
+ element = element;
1817
+ elementList = [...element];
1818
+ }
1819
+ else {
1820
+ elementList.push(element);
1821
+ }
1822
+ let eventTypeList = [];
1823
+ if (Array.isArray(eventType)) {
1824
+ eventTypeList = eventTypeList.concat(eventType);
1825
+ }
1826
+ else if (typeof eventType === "string") {
1827
+ eventTypeList = eventTypeList.concat(eventType.split(" "));
1828
+ }
1829
+ /**
1830
+ * 子元素选择器
1831
+ */
1832
+ let _selector_ = selector;
1833
+ /**
1834
+ * 事件的回调函数
1835
+ */
1836
+ let _callback_ = callback;
1837
+ /**
1838
+ * 事件的配置
1839
+ */
1840
+ let _option_ = {
1841
+ capture: false,
1842
+ };
1843
+ if (typeof selector === "function") {
1844
+ /* 这是为没有selector的情况 */
1845
+ _selector_ = void 0;
1846
+ _callback_ = selector;
1847
+ _option_ = getOption(args, 3, _option_);
1848
+ }
1849
+ else {
1850
+ _option_ = getOption(args, 4, _option_);
1851
+ }
1852
+ elementList.forEach((elementItem) => {
1853
+ /* 获取对象上的事件 */
1854
+ let elementEvents = elementItem[SymbolEvents] || {};
1855
+ eventTypeList.forEach((eventName) => {
1856
+ let handlers = elementEvents[eventName] || [];
1857
+ if (typeof filter === "function") {
1858
+ handlers = handlers.filter(filter);
1859
+ }
1860
+ for (let index = 0; index < handlers.length; index++) {
1861
+ let handler = handlers[index];
1862
+ let flag = false;
1863
+ if (!_selector_ || handler.selector === _selector_) {
1864
+ /* selector不为空,进行selector判断 */
1865
+ flag = true;
1866
+ }
1867
+ if (!_callback_ ||
1868
+ handler.callback === _callback_ ||
1869
+ handler.originCallBack === _callback_) {
1870
+ /* callback不为空,进行callback判断 */
1871
+ flag = true;
1872
+ }
1873
+ if (flag) {
1874
+ elementItem.removeEventListener(eventName, handler.callback, _option_);
1875
+ handlers.splice(index--, 1);
1876
+ }
1877
+ }
1878
+ if (handlers.length === 0) {
1879
+ /* 如果没有任意的handler,那么删除该属性 */
1880
+ popsUtils.delete(elementEvents, eventType);
1881
+ }
1882
+ });
1883
+ elementItem[SymbolEvents] = elementEvents;
1884
+ });
1885
+ }
1886
+ /**
1887
+ * 取消绑定所有的事件
1888
+ * @param element 需要取消绑定的元素|元素数组
1889
+ * @param eventType (可选)需要取消监听的事件
1890
+ */
1891
+ offAll(element, eventType) {
1892
+ if (typeof element === "string") {
1893
+ element = PopsCore.document.querySelectorAll(element);
1894
+ }
1895
+ if (element == null) {
1896
+ return;
1897
+ }
1898
+ let elementList = [];
1899
+ if (element instanceof NodeList || Array.isArray(element)) {
1900
+ elementList = [...element];
1901
+ }
1902
+ else {
1903
+ elementList.push(element);
1904
+ }
1905
+ let eventTypeList = [];
1906
+ if (Array.isArray(eventType)) {
1907
+ eventTypeList = eventTypeList.concat(eventType);
1908
+ }
1909
+ else if (typeof eventType === "string") {
1910
+ eventTypeList = eventTypeList.concat(eventType.split(" "));
1911
+ }
1912
+ elementList.forEach((elementItem) => {
1913
+ Object.getOwnPropertySymbols(elementItem).forEach((__symbolEvents) => {
1914
+ if (!__symbolEvents.toString().startsWith("Symbol(events_")) {
1915
+ return;
1916
+ }
1917
+ let elementEvents = elementItem[__symbolEvents] || {};
1918
+ let iterEventNameList = eventTypeList.length
1919
+ ? eventTypeList
1920
+ : Object.keys(elementEvents);
1921
+ iterEventNameList.forEach((eventName) => {
1922
+ let handlers = elementEvents[eventName];
1923
+ if (!handlers) {
1924
+ return;
1925
+ }
1926
+ for (const handler of handlers) {
1927
+ elementItem.removeEventListener(eventName, handler.callback, {
1928
+ capture: handler["option"]["capture"],
1929
+ });
1930
+ }
1931
+ popsUtils.delete(elementItem[__symbolEvents], eventName);
1932
+ });
1933
+ });
1934
+ });
1935
+ }
1936
+ /**
1937
+ * 等待文档加载完成后执行指定的函数
1938
+ * @param callback 需要执行的函数
1939
+ * @example
1940
+ * DOMUtils.ready(function(){
1941
+ * console.log("文档加载完毕")
1942
+ * })
1943
+ */
1944
+ ready(callback) {
1945
+ if (typeof callback !== "function") {
1946
+ return;
1947
+ }
1948
+ /**
1949
+ * 检测文档是否加载完毕
1950
+ */
1951
+ function checkDOMReadyState() {
1952
+ try {
1953
+ if (document.readyState === "complete" ||
1954
+ (document.readyState !== "loading" &&
1955
+ !document.documentElement.doScroll)) {
1956
+ return true;
1957
+ }
1958
+ else {
1959
+ return false;
1960
+ }
1961
+ }
1962
+ catch (error) {
1963
+ return false;
1964
+ }
1965
+ }
1966
+ /**
1967
+ * 成功加载完毕后触发的回调函数
1968
+ */
1969
+ function completed() {
1970
+ removeDomReadyListener();
1971
+ callback();
1972
+ }
1973
+ let targetList = [
1974
+ {
1975
+ target: PopsCore.document,
1976
+ eventType: "DOMContentLoaded",
1977
+ callback: completed,
1978
+ },
1979
+ {
1980
+ target: PopsCore.window,
1981
+ eventType: "load",
1982
+ callback: completed,
1983
+ },
1984
+ ];
1985
+ /**
1986
+ * 添加监听
1987
+ */
1988
+ function addDomReadyListener() {
1989
+ for (let index = 0; index < targetList.length; index++) {
1990
+ let item = targetList[index];
1991
+ item.target.addEventListener(item.eventType, item.callback);
1992
+ }
1993
+ }
1994
+ /**
1995
+ * 移除监听
1996
+ */
1997
+ function removeDomReadyListener() {
1998
+ for (let index = 0; index < targetList.length; index++) {
1999
+ let item = targetList[index];
2000
+ item.target.removeEventListener(item.eventType, item.callback);
2001
+ }
2002
+ }
2003
+ if (checkDOMReadyState()) {
2004
+ /* 检查document状态 */
2005
+ setTimeout(callback);
2006
+ }
2007
+ else {
2008
+ /* 添加监听 */
2009
+ addDomReadyListener();
2010
+ }
2011
+ }
2012
+ /**
2013
+ * 主动触发事件
2014
+ * @param element 需要触发的元素|元素数组|window
2015
+ * @param eventType 需要触发的事件
2016
+ * @param details 赋予触发的Event的额外属性,如果是Event类型,那么将自动代替默认new的Event对象
2017
+ * @param useDispatchToTriggerEvent 是否使用dispatchEvent来触发事件,默认true
2018
+ * @example
2019
+ * // 触发元素a.xx的click事件
2020
+ * DOMUtils.trigger(document.querySelector("a.xx"),"click")
2021
+ * DOMUtils.trigger("a.xx","click")
2022
+ * // 触发元素a.xx的click、tap、hover事件
2023
+ * DOMUtils.trigger(document.querySelector("a.xx"),"click tap hover")
2024
+ * DOMUtils.trigger("a.xx",["click","tap","hover"])
2025
+ */
2026
+ trigger(element, eventType, details, useDispatchToTriggerEvent = true) {
2027
+ if (typeof element === "string") {
2028
+ element = PopsCore.document.querySelector(element);
2029
+ }
2030
+ if (element == null) {
2031
+ return;
2032
+ }
2033
+ let elementList = [];
2034
+ if (element instanceof NodeList || Array.isArray(element)) {
2035
+ element = element;
2036
+ elementList = [...element];
2037
+ }
2038
+ else {
2039
+ elementList = [element];
2040
+ }
2041
+ let eventTypeList = [];
2042
+ if (Array.isArray(eventType)) {
2043
+ eventTypeList = eventType;
2044
+ }
2045
+ else if (typeof eventType === "string") {
2046
+ eventTypeList = eventType.split(" ");
2047
+ }
2048
+ elementList.forEach((elementItem) => {
2049
+ /* 获取对象上的事件 */
2050
+ let events = elementItem[SymbolEvents] || {};
2051
+ eventTypeList.forEach((_eventType_) => {
2052
+ let event = null;
2053
+ if (details && details instanceof Event) {
2054
+ event = details;
2055
+ }
2056
+ else {
2057
+ event = new Event(_eventType_);
2058
+ if (details) {
2059
+ Object.keys(details).forEach((keyName) => {
2060
+ event[keyName] = details[keyName];
2061
+ });
2062
+ }
2063
+ }
2064
+ if (useDispatchToTriggerEvent == false && _eventType_ in events) {
2065
+ events[_eventType_].forEach((eventsItem) => {
2066
+ eventsItem.callback(event);
2067
+ });
2068
+ }
2069
+ else {
2070
+ elementItem.dispatchEvent(event);
2071
+ }
2072
+ });
2073
+ });
2074
+ }
2075
+ /**
2076
+ * 绑定或触发元素的click事件
2077
+ * @param element 目标元素
2078
+ * @param handler (可选)事件处理函数
2079
+ * @param details (可选)赋予触发的Event的额外属性
2080
+ * @param useDispatchToTriggerEvent (可选)是否使用dispatchEvent来触发事件,默认true
2081
+ * @example
2082
+ * // 触发元素a.xx的click事件
2083
+ * DOMUtils.click(document.querySelector("a.xx"))
2084
+ * DOMUtils.click("a.xx")
2085
+ * DOMUtils.click("a.xx",function(){
2086
+ * console.log("触发click事件成功")
2087
+ * })
2088
+ * */
2089
+ click(element, handler, details, useDispatchToTriggerEvent) {
2090
+ let DOMUtilsContext = this;
2091
+ if (typeof element === "string") {
2092
+ element = PopsCore.document.querySelector(element);
2093
+ }
2094
+ if (element == null) {
2095
+ return;
2096
+ }
2097
+ if (handler == null) {
2098
+ DOMUtilsContext.trigger(element, "click", details, useDispatchToTriggerEvent);
2099
+ }
2100
+ else {
2101
+ DOMUtilsContext.on(element, "click", null, handler);
2102
+ }
2103
+ }
2104
+ /**
2105
+ * 绑定或触发元素的blur事件
2106
+ * @param element 目标元素
2107
+ * @param handler (可选)事件处理函数
2108
+ * @param details (可选)赋予触发的Event的额外属性
2109
+ * @param useDispatchToTriggerEvent (可选)是否使用dispatchEvent来触发事件,默认true
2110
+ * @example
2111
+ * // 触发元素a.xx的blur事件
2112
+ * DOMUtils.blur(document.querySelector("a.xx"))
2113
+ * DOMUtils.blur("a.xx")
2114
+ * DOMUtils.blur("a.xx",function(){
2115
+ * console.log("触发blur事件成功")
2116
+ * })
2117
+ * */
2118
+ blur(element, handler, details, useDispatchToTriggerEvent) {
2119
+ let DOMUtilsContext = this;
2120
+ if (typeof element === "string") {
2121
+ element = PopsCore.document.querySelector(element);
2122
+ }
2123
+ if (element == null) {
2124
+ return;
2125
+ }
2126
+ if (handler === null) {
2127
+ DOMUtilsContext.trigger(element, "blur", details, useDispatchToTriggerEvent);
2128
+ }
2129
+ else {
2130
+ DOMUtilsContext.on(element, "blur", null, handler);
2131
+ }
2132
+ }
2133
+ /**
2134
+ * 绑定或触发元素的focus事件
2135
+ * @param element 目标元素
2136
+ * @param handler (可选)事件处理函数
2137
+ * @param details (可选)赋予触发的Event的额外属性
2138
+ * @param useDispatchToTriggerEvent (可选)是否使用dispatchEvent来触发事件,默认true
2139
+ * @example
2140
+ * // 触发元素a.xx的focus事件
2141
+ * DOMUtils.focus(document.querySelector("a.xx"))
2142
+ * DOMUtils.focus("a.xx")
2143
+ * DOMUtils.focus("a.xx",function(){
2144
+ * console.log("触发focus事件成功")
2145
+ * })
2146
+ * */
2147
+ focus(element, handler, details, useDispatchToTriggerEvent) {
2148
+ let DOMUtilsContext = this;
2149
+ if (typeof element === "string") {
2150
+ element = PopsCore.document.querySelector(element);
2151
+ }
2152
+ if (element == null) {
2153
+ return;
2154
+ }
2155
+ if (handler == null) {
2156
+ DOMUtilsContext.trigger(element, "focus", details, useDispatchToTriggerEvent);
2157
+ }
2158
+ else {
2159
+ DOMUtilsContext.on(element, "focus", null, handler);
2160
+ }
2161
+ }
2162
+ /**
2163
+ * 当鼠标移入或移出元素时触发事件
2164
+ * @param element 当前元素
2165
+ * @param handler 事件处理函数
2166
+ * @param option 配置
2167
+ * @example
2168
+ * // 监听a.xx元素的移入或移出
2169
+ * DOMUtils.hover(document.querySelector("a.xx"),()=>{
2170
+ * console.log("移入/移除");
2171
+ * })
2172
+ * DOMUtils.hover("a.xx",()=>{
2173
+ * console.log("移入/移除");
2174
+ * })
2175
+ */
2176
+ hover(element, handler, option) {
2177
+ let DOMUtilsContext = this;
2178
+ if (typeof element === "string") {
2179
+ element = PopsCore.document.querySelector(element);
2180
+ }
2181
+ if (element == null) {
2182
+ return;
2183
+ }
2184
+ DOMUtilsContext.on(element, "mouseenter", null, handler, option);
2185
+ DOMUtilsContext.on(element, "mouseleave", null, handler, option);
2186
+ }
2187
+ /**
2188
+ * 当按键松开时触发事件
2189
+ * keydown - > keypress - > keyup
2190
+ * @param target 当前元素
2191
+ * @param handler 事件处理函数
2192
+ * @param option 配置
2193
+ * @example
2194
+ * // 监听a.xx元素的按键松开
2195
+ * DOMUtils.keyup(document.querySelector("a.xx"),()=>{
2196
+ * console.log("按键松开");
2197
+ * })
2198
+ * DOMUtils.keyup("a.xx",()=>{
2199
+ * console.log("按键松开");
2200
+ * })
2201
+ */
2202
+ keyup(target, handler, option) {
2203
+ let DOMUtilsContext = this;
2204
+ if (target == null) {
2205
+ return;
2206
+ }
2207
+ if (typeof target === "string") {
2208
+ target = PopsCore.document.querySelector(target);
2209
+ }
2210
+ DOMUtilsContext.on(target, "keyup", null, handler, option);
2211
+ }
2212
+ /**
2213
+ * 当按键按下时触发事件
2214
+ * keydown - > keypress - > keyup
2215
+ * @param target 目标
2216
+ * @param handler 事件处理函数
2217
+ * @param option 配置
2218
+ * @example
2219
+ * // 监听a.xx元素的按键按下
2220
+ * DOMUtils.keydown(document.querySelector("a.xx"),()=>{
2221
+ * console.log("按键按下");
2222
+ * })
2223
+ * DOMUtils.keydown("a.xx",()=>{
2224
+ * console.log("按键按下");
2225
+ * })
2226
+ */
2227
+ keydown(target, handler, option) {
2228
+ let DOMUtilsContext = this;
2229
+ if (target == null) {
2230
+ return;
2231
+ }
2232
+ if (typeof target === "string") {
2233
+ target = PopsCore.document.querySelector(target);
2234
+ }
2235
+ DOMUtilsContext.on(target, "keydown", null, handler, option);
2236
+ }
2237
+ /**
2238
+ * 当按键按下时触发事件
2239
+ * keydown - > keypress - > keyup
2240
+ * @param target 目标
2241
+ * @param handler 事件处理函数
2242
+ * @param option 配置
2243
+ * @example
2244
+ * // 监听a.xx元素的按键按下
2245
+ * DOMUtils.keypress(document.querySelector("a.xx"),()=>{
2246
+ * console.log("按键按下");
2247
+ * })
2248
+ * DOMUtils.keypress("a.xx",()=>{
2249
+ * console.log("按键按下");
2250
+ * })
2251
+ */
2252
+ keypress(target, handler, option) {
2253
+ let DOMUtilsContext = this;
2254
+ if (target == null) {
2255
+ return;
2256
+ }
2257
+ if (typeof target === "string") {
2258
+ target = PopsCore.document.querySelector(target);
2259
+ }
2260
+ DOMUtilsContext.on(target, "keypress", null, handler, option);
2261
+ }
2262
+ preventEvent(element, eventNameList = [], capture) {
2263
+ function stopEvent(event) {
2264
+ /* 阻止事件的默认行为发生。例如,当点击一个链接时,浏览器会默认打开链接的URL */
2265
+ event?.preventDefault();
2266
+ /* 停止事件的传播,阻止它继续向更上层的元素冒泡,事件将不会再传播给其他的元素 */
2267
+ event?.stopPropagation();
2268
+ /* 阻止事件传播,并且还能阻止元素上的其他事件处理程序被触发 */
2269
+ event?.stopImmediatePropagation();
2270
+ return false;
2271
+ }
2272
+ if (arguments.length === 1) {
2273
+ /* 直接阻止事件 */
2274
+ return stopEvent(arguments[0]);
2275
+ }
2276
+ else {
2277
+ /* 添加对应的事件来阻止触发 */
2278
+ if (typeof eventNameList === "string") {
2279
+ eventNameList = [eventNameList];
2280
+ }
2281
+ eventNameList.forEach((eventName) => {
2282
+ element.addEventListener(eventName, stopEvent, {
2283
+ capture: Boolean(capture),
2284
+ });
2285
+ });
2286
+ }
2287
+ }
2288
+ }
2289
+
2290
+ class PopsDOMUtils extends PopsDOMUtilsEvent {
2291
+ /** 获取 animationend 在各个浏览器的兼容名 */
2292
+ getAnimationEndNameList() {
2293
+ return [
2294
+ "webkitAnimationEnd",
2295
+ "mozAnimationEnd",
2296
+ "MSAnimationEnd",
2297
+ "oanimationend",
2298
+ "animationend",
2299
+ ];
2300
+ }
2301
+ /** 获取 transitionend 在各个浏览器的兼容名 */
2302
+ getTransitionEndNameList() {
2303
+ return [
2304
+ "webkitTransitionEnd",
2305
+ "mozTransitionEnd",
2306
+ "MSTransitionEnd",
2307
+ "otransitionend",
2308
+ "transitionend",
2309
+ ];
2310
+ }
2311
+ /**
2312
+ * 实现jQuery中的$().offset();
2313
+ * @param {HTMLElement} element
2314
+ * @returns
2315
+ */
2316
+ offset(element) {
2317
+ let rect = element.getBoundingClientRect();
2318
+ let win = element.ownerDocument.defaultView;
2319
+ let resultRect = new DOMRect(parseFloat((rect.left + (win?.pageXOffset || 0)).toString()), parseFloat((rect.top + (win?.pageYOffset || 0)).toString()), rect.width, rect.height);
2320
+ return resultRect;
2321
+ }
2322
+ width(element, isShow = false) {
2323
+ let DOMUtilsContext = this;
2324
+ if (typeof element === "string") {
2325
+ element = PopsCore.document.querySelector(element);
2326
+ }
2327
+ if (element == null) {
2328
+ return;
2329
+ }
2330
+ if (popsUtils.isWin(element)) {
2331
+ return PopsCore.window.document.documentElement.clientWidth;
2332
+ }
2333
+ if (element.nodeType === 9) {
2334
+ /* Document文档节点 */
2335
+ element = element;
2336
+ return Math.max(element.body.scrollWidth, element.documentElement.scrollWidth, element.body.offsetWidth, element.documentElement.offsetWidth, element.documentElement.clientWidth);
2337
+ }
2338
+ if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
2339
+ /* 已显示 */
2340
+ /* 不从style中获取对应的宽度,因为可能使用了class定义了width !important */
2341
+ element = element;
2342
+ /* 如果element.style.width为空 则从css里面获取是否定义了width信息如果定义了 则读取css里面定义的宽度width */
2343
+ if (parseFloat(popsDOMUtils.getStyleValue(element, "width").toString()) > 0) {
2344
+ return parseFloat(popsDOMUtils.getStyleValue(element, "width").toString());
2345
+ }
2346
+ /* 如果从css里获取到的值不是大于0 可能是auto 则通过offsetWidth来进行计算 */
2347
+ if (element.offsetWidth > 0) {
2348
+ let borderLeftWidth = popsDOMUtils.getStyleValue(element, "borderLeftWidth");
2349
+ let borderRightWidth = popsDOMUtils.getStyleValue(element, "borderRightWidth");
2350
+ let paddingLeft = popsDOMUtils.getStyleValue(element, "paddingLeft");
2351
+ let paddingRight = popsDOMUtils.getStyleValue(element, "paddingRight");
2352
+ let backHeight = parseFloat(element.offsetWidth.toString()) -
2353
+ parseFloat(borderLeftWidth.toString()) -
2354
+ parseFloat(borderRightWidth.toString()) -
2355
+ parseFloat(paddingLeft.toString()) -
2356
+ parseFloat(paddingRight.toString());
2357
+ return parseFloat(backHeight.toString());
2358
+ }
2359
+ return 0;
2360
+ }
2361
+ else {
2362
+ /* 未显示 */
2363
+ element = element;
2364
+ let { recovery } = popsDOMUtils.showElement(element);
2365
+ let width = DOMUtilsContext.width(element, true);
2366
+ recovery();
2367
+ return width;
2368
+ }
2369
+ }
2370
+ height(element, isShow = false) {
2371
+ let DOMUtilsContext = this;
2372
+ if (popsUtils.isWin(element)) {
2373
+ return PopsCore.window.document.documentElement.clientHeight;
2374
+ }
2375
+ if (typeof element === "string") {
2376
+ element = PopsCore.document.querySelector(element);
2377
+ }
2378
+ if (element == null) {
2379
+ return;
2380
+ }
2381
+ if (element.nodeType === 9) {
2382
+ element = element;
2383
+ /* Document文档节点 */
2384
+ return Math.max(element.body.scrollHeight, element.documentElement.scrollHeight, element.body.offsetHeight, element.documentElement.offsetHeight, element.documentElement.clientHeight);
2385
+ }
2386
+ if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
2387
+ element = element;
2388
+ /* 已显示 */
2389
+ /* 从style中获取对应的高度,因为可能使用了class定义了width !important */
2390
+ /* 如果element.style.height为空 则从css里面获取是否定义了height信息如果定义了 则读取css里面定义的高度height */
2391
+ if (parseFloat(popsDOMUtils.getStyleValue(element, "height").toString()) > 0) {
2392
+ return parseFloat(popsDOMUtils.getStyleValue(element, "height").toString());
2393
+ }
2394
+ /* 如果从css里获取到的值不是大于0 可能是auto 则通过offsetHeight来进行计算 */
2395
+ if (element.offsetHeight > 0) {
2396
+ let borderTopWidth = popsDOMUtils.getStyleValue(element, "borderTopWidth");
2397
+ let borderBottomWidth = popsDOMUtils.getStyleValue(element, "borderBottomWidth");
2398
+ let paddingTop = popsDOMUtils.getStyleValue(element, "paddingTop");
2399
+ let paddingBottom = popsDOMUtils.getStyleValue(element, "paddingBottom");
2400
+ let backHeight = parseFloat(element.offsetHeight.toString()) -
2401
+ parseFloat(borderTopWidth.toString()) -
2402
+ parseFloat(borderBottomWidth.toString()) -
2403
+ parseFloat(paddingTop.toString()) -
2404
+ parseFloat(paddingBottom.toString());
2405
+ return parseFloat(backHeight.toString());
2406
+ }
2407
+ return 0;
2408
+ }
2409
+ else {
2410
+ /* 未显示 */
2411
+ element = element;
2412
+ let { recovery } = popsDOMUtils.showElement(element);
2413
+ let height = DOMUtilsContext.height(element, true);
2414
+ recovery();
2415
+ return height;
2416
+ }
2417
+ }
2418
+ outerWidth(element, isShow = false) {
2419
+ let DOMUtilsContext = this;
2420
+ if (popsUtils.isWin(element)) {
2421
+ return PopsCore.window.innerWidth;
2422
+ }
2423
+ if (typeof element === "string") {
2424
+ element = PopsCore.document.querySelector(element);
2425
+ }
2426
+ if (element == null) {
2427
+ return;
2428
+ }
2429
+ element = element;
2430
+ if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
2431
+ let style = getComputedStyle(element, null);
2432
+ let marginLeft = popsDOMUtils.getStyleValue(style, "marginLeft");
2433
+ let marginRight = popsDOMUtils.getStyleValue(style, "marginRight");
2434
+ return element.offsetWidth + marginLeft + marginRight;
2435
+ }
2436
+ else {
2437
+ let { recovery } = popsDOMUtils.showElement(element);
2438
+ let outerWidth = DOMUtilsContext.outerWidth(element, true);
2439
+ recovery();
2440
+ return outerWidth;
2441
+ }
2442
+ }
2443
+ outerHeight(element, isShow = false) {
2444
+ let DOMUtilsContext = this;
2445
+ if (popsUtils.isWin(element)) {
2446
+ return PopsCore.window.innerHeight;
2447
+ }
2448
+ if (typeof element === "string") {
2449
+ element = PopsCore.document.querySelector(element);
2450
+ }
2451
+ if (element == null) {
2452
+ // @ts-ignore
2453
+ return;
2454
+ }
2455
+ element = element;
2456
+ if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
2457
+ let style = getComputedStyle(element, null);
2458
+ let marginTop = popsDOMUtils.getStyleValue(style, "marginTop");
2459
+ let marginBottom = popsDOMUtils.getStyleValue(style, "marginBottom");
2460
+ return element.offsetHeight + marginTop + marginBottom;
2461
+ }
2462
+ else {
2463
+ let { recovery } = popsDOMUtils.showElement(element);
2464
+ let outerHeight = DOMUtilsContext.outerHeight(element, true);
2465
+ recovery();
2466
+ return outerHeight;
2467
+ }
2468
+ }
2469
+ /**
2470
+ * 添加className
2471
+ * @param element 目标元素
2472
+ * @param className className属性
2473
+ */
2474
+ addClassName(element, className) {
2475
+ if (typeof className !== "string") {
2476
+ return;
2477
+ }
2478
+ if (className.trim() === "") {
2479
+ return;
2480
+ }
2481
+ element.classList.add(className);
2482
+ }
2483
+ /**
2484
+ * 删除className
2485
+ * @param element 目标元素
2486
+ * @param className className属性
2487
+ */
2488
+ removeClassName(element, className) {
2489
+ if (typeof className !== "string") {
2490
+ return;
2491
+ }
2492
+ if (className.trim() === "") {
2493
+ return;
2494
+ }
2495
+ element.classList.remove(className);
2496
+ }
2497
+ /**
2498
+ * 判断元素是否包含某个className
2499
+ * @param element 目标元素
2500
+ * @param className className属性
2501
+ */
2502
+ containsClassName(element, className) {
2503
+ if (typeof className !== "string") {
2504
+ return false;
2505
+ }
2506
+ if (className.trim() === "") {
2507
+ return false;
2508
+ }
2509
+ return element.classList.contains(className);
2510
+ }
2511
+ css(element, property, value) {
2512
+ /**
2513
+ * 把纯数字没有px的加上
2514
+ */
2515
+ function handlePixe(propertyName, propertyValue) {
2516
+ let allowAddPixe = [
2517
+ "width",
2518
+ "height",
2519
+ "top",
2520
+ "left",
2521
+ "right",
2522
+ "bottom",
2523
+ "font-size",
2524
+ ];
2525
+ if (typeof propertyValue === "number") {
2526
+ propertyValue = propertyValue.toString();
2527
+ }
2528
+ if (typeof propertyValue === "string" &&
2529
+ allowAddPixe.includes(propertyName) &&
2530
+ propertyValue.match(/[0-9]$/gi)) {
2531
+ propertyValue = propertyValue + "px";
2532
+ }
2533
+ return propertyValue;
2534
+ }
2535
+ if (typeof element === "string") {
2536
+ element = PopsCore.document.querySelector(element);
2537
+ }
2538
+ if (element == null) {
2539
+ return;
2540
+ }
2541
+ if (typeof property === "string") {
2542
+ if (value == null) {
2543
+ return getComputedStyle(element).getPropertyValue(property);
2544
+ }
2545
+ else {
2546
+ if (value === "string" && value.includes("!important")) {
2547
+ element.style.setProperty(property, value, "important");
2548
+ }
2549
+ else {
2550
+ value = handlePixe(property, value);
2551
+ element.style.setProperty(property, value);
2552
+ }
2553
+ }
2554
+ }
2555
+ else if (typeof property === "object") {
2556
+ for (let prop in property) {
2557
+ if (typeof property[prop] === "string" &&
2558
+ property[prop].includes("!important")) {
2559
+ element.style.setProperty(prop, property[prop], "important");
2560
+ }
2561
+ else {
2562
+ property[prop] = handlePixe(prop, property[prop]);
2563
+ element.style.setProperty(prop, property[prop]);
2564
+ }
2565
+ }
2566
+ }
2567
+ }
2568
+ /**
2569
+ * 创建元素
2570
+ * @param tagName 标签名
2571
+ * @param property 属性
2572
+ * @param attributes 元素上的自定义属性
2573
+ * @example
2574
+ * // 创建一个DIV元素,且属性class为xxx
2575
+ * DOMUtils.createElement("div",undefined,{ class:"xxx" });
2576
+ * > <div class="xxx"></div>
2577
+ * @example
2578
+ * // 创建一个DIV元素
2579
+ * DOMUtils.createElement("div");
2580
+ * > <div></div>
2581
+ * @example
2582
+ * // 创建一个DIV元素
2583
+ * DOMUtils.createElement("div","测试");
2584
+ * > <div>测试</div>
2585
+ */
2586
+ createElement(
2587
+ /** 元素名 */
2588
+ tagName,
2589
+ /** 属性 */
2590
+ property,
2591
+ /** 自定义属性 */
2592
+ attributes) {
2593
+ let tempElement = PopsCore.document.createElement(tagName);
2594
+ if (typeof property === "string") {
2595
+ tempElement.innerHTML = property;
2596
+ return tempElement;
2597
+ }
2598
+ if (property == null) {
2599
+ property = {};
2600
+ }
2601
+ if (attributes == null) {
2602
+ attributes = {};
2603
+ }
2604
+ Object.keys(property).forEach((key) => {
2605
+ let value = property[key];
2606
+ tempElement[key] = value;
2607
+ });
2608
+ Object.keys(attributes).forEach((key) => {
2609
+ let value = attributes[key];
2610
+ if (typeof value === "object") {
2611
+ /* object转字符串 */
2612
+ value = JSON.stringify(value);
2613
+ }
2614
+ else if (typeof value === "function") {
2615
+ /* function转字符串 */
2616
+ value = value.toString();
2617
+ }
2618
+ tempElement.setAttribute(key, value);
2619
+ });
2620
+ return tempElement;
2621
+ }
2622
+ /**
2623
+ * 获取文字的位置信息
2624
+ * @param input 输入框
2625
+ * @param selectionStart 起始位置
2626
+ * @param selectionEnd 结束位置
2627
+ * @param debug 是否是调试模式
2628
+ * + true 不删除临时节点元素
2629
+ * + false 删除临时节点元素
2630
+ */
2631
+ getTextBoundingRect(input, selectionStart, selectionEnd, debug) {
2632
+ // Basic parameter validation
2633
+ if (!input || !("value" in input))
2634
+ return input;
2635
+ if (typeof selectionStart == "string")
2636
+ selectionStart = parseFloat(selectionStart);
2637
+ if (typeof selectionStart != "number" || isNaN(selectionStart)) {
2638
+ selectionStart = 0;
2639
+ }
2640
+ if (selectionStart < 0)
2641
+ selectionStart = 0;
2642
+ else
2643
+ selectionStart = Math.min(input.value.length, selectionStart);
2644
+ if (typeof selectionEnd == "string")
2645
+ selectionEnd = parseFloat(selectionEnd);
2646
+ if (typeof selectionEnd != "number" ||
2647
+ isNaN(selectionEnd) ||
2648
+ selectionEnd < selectionStart) {
2649
+ selectionEnd = selectionStart;
2650
+ }
2651
+ if (selectionEnd < 0)
2652
+ selectionEnd = 0;
2653
+ else
2654
+ selectionEnd = Math.min(input.value.length, selectionEnd);
2655
+ // If available (thus IE), use the createTextRange method
2656
+ if (typeof input.createTextRange == "function") {
2657
+ var range = input.createTextRange();
2658
+ range.collapse(true);
2659
+ range.moveStart("character", selectionStart);
2660
+ range.moveEnd("character", selectionEnd - selectionStart);
2661
+ return range.getBoundingClientRect();
2662
+ }
2663
+ // createTextRange is not supported, create a fake text range
2664
+ var offset = getInputOffset(), topPos = offset.top, leftPos = offset.left, width = getInputCSS("width", true), height = getInputCSS("height", true);
2665
+ // Styles to simulate a node in an input field
2666
+ var cssDefaultStyles = "white-space:pre;padding:0;margin:0;", listOfModifiers = [
2667
+ "direction",
2668
+ "font-family",
2669
+ "font-size",
2670
+ "font-size-adjust",
2671
+ "font-variant",
2672
+ "font-weight",
2673
+ "font-style",
2674
+ "letter-spacing",
2675
+ "line-height",
2676
+ "text-align",
2677
+ "text-indent",
2678
+ "text-transform",
2679
+ "word-wrap",
2680
+ "word-spacing",
2681
+ ];
2682
+ // @ts-ignore
2683
+ topPos += getInputCSS("padding-top", true);
2684
+ // @ts-ignore
2685
+ topPos += getInputCSS("border-top-width", true);
2686
+ // @ts-ignore
2687
+ leftPos += getInputCSS("padding-left", true);
2688
+ // @ts-ignore
2689
+ leftPos += getInputCSS("border-left-width", true);
2690
+ leftPos += 1; //Seems to be necessary
2691
+ for (var i = 0; i < listOfModifiers.length; i++) {
2692
+ var property = listOfModifiers[i];
2693
+ // @ts-ignore
2694
+ cssDefaultStyles += property + ":" + getInputCSS(property) + ";";
2695
+ }
2696
+ // End of CSS variable checks
2697
+ // 不能为空,不然获取不到高度
2698
+ var text = input.value || "G", textLen = text.length, fakeClone = document.createElement("div");
2699
+ if (selectionStart > 0)
2700
+ appendPart(0, selectionStart);
2701
+ var fakeRange = appendPart(selectionStart, selectionEnd);
2702
+ if (textLen > selectionEnd)
2703
+ appendPart(selectionEnd, textLen);
2704
+ // Styles to inherit the font styles of the element
2705
+ fakeClone.style.cssText = cssDefaultStyles;
2706
+ // Styles to position the text node at the desired position
2707
+ fakeClone.style.position = "absolute";
2708
+ fakeClone.style.top = topPos + "px";
2709
+ fakeClone.style.left = leftPos + "px";
2710
+ fakeClone.style.width = width + "px";
2711
+ fakeClone.style.height = height + "px";
2712
+ PopsCore.document.body.appendChild(fakeClone);
2713
+ var returnValue = fakeRange.getBoundingClientRect(); //Get rect
2714
+ if (!debug)
2715
+ fakeClone.parentNode.removeChild(fakeClone); //Remove temp
2716
+ return returnValue;
2717
+ // Local functions for readability of the previous code
2718
+ /**
2719
+ *
2720
+ * @param start
2721
+ * @param end
2722
+ */
2723
+ function appendPart(start, end) {
2724
+ var span = document.createElement("span");
2725
+ span.style.cssText = cssDefaultStyles; //Force styles to prevent unexpected results
2726
+ span.textContent = text.substring(start, end);
2727
+ fakeClone.appendChild(span);
2728
+ return span;
2729
+ }
2730
+ // Computing offset position
2731
+ function getInputOffset() {
2732
+ var body = document.body, win = document.defaultView, docElem = document.documentElement, box = document.createElement("div");
2733
+ box.style.paddingLeft = box.style.width = "1px";
2734
+ body.appendChild(box);
2735
+ var isBoxModel = box.offsetWidth == 2;
2736
+ body.removeChild(box);
2737
+ // @ts-ignore
2738
+ box = input.getBoundingClientRect();
2739
+ var clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, scrollTop =
2740
+ // @ts-ignore
2741
+ win.pageYOffset ||
2742
+ (isBoxModel && docElem.scrollTop) ||
2743
+ body.scrollTop, scrollLeft =
2744
+ // @ts-ignore
2745
+ win.pageXOffset ||
2746
+ (isBoxModel && docElem.scrollLeft) ||
2747
+ body.scrollLeft;
2748
+ return {
2749
+ // @ts-ignore
2750
+ top: box.top + scrollTop - clientTop,
2751
+ // @ts-ignore
2752
+ left: box.left + scrollLeft - clientLeft,
2753
+ };
2754
+ }
2755
+ /**
2756
+ *
2757
+ * @param prop
2758
+ * @param isnumber
2759
+ * @returns
2760
+ */
2761
+ function getInputCSS(prop, isnumber) {
2762
+ var val = PopsCore.document
2763
+ .defaultView.getComputedStyle(input, null)
2764
+ .getPropertyValue(prop);
2765
+ // @ts-ignore
2766
+ return isnumber ? parseFloat(val) : val;
2767
+ }
2768
+ }
2769
+ /**
2770
+ * 使用className来隐藏元素
2771
+ * @param ele
2772
+ * @param isImportant 是否使用!important
2773
+ */
2774
+ cssHide(ele, isImportant = false) {
2775
+ if (ele == null) {
2776
+ return;
2777
+ }
2778
+ if (isImportant) {
2779
+ ele.classList.add("pops-hide-important");
2780
+ }
2781
+ else {
2782
+ ele.classList.add("pops-hide");
2783
+ }
2784
+ }
2785
+ /**
2786
+ * cssHide的反向使用
2787
+ * @param ele
2788
+ */
2789
+ cssShow(ele) {
2790
+ if (ele == null) {
2791
+ return;
2792
+ }
2793
+ ele.classList.remove("pops-hide-important");
2794
+ ele.classList.remove("pops-hide");
2795
+ }
2796
+ parseHTML(html, useParser = false, isComplete = false) {
2797
+ function parseHTMLByDOMParser() {
2798
+ let parser = new DOMParser();
2799
+ if (isComplete) {
2800
+ return parser.parseFromString(html, "text/html");
2801
+ }
2802
+ else {
2803
+ return parser.parseFromString(html, "text/html").body.firstChild;
2804
+ }
2805
+ }
2806
+ function parseHTMLByCreateDom() {
2807
+ let tempDIV = PopsCore.document.createElement("div");
2808
+ tempDIV.innerHTML = html;
2809
+ if (isComplete) {
2810
+ return tempDIV;
2811
+ }
2812
+ else {
2813
+ return tempDIV.firstChild;
2814
+ }
2815
+ }
2816
+ if (useParser) {
2817
+ return parseHTMLByDOMParser();
2818
+ }
2819
+ else {
2820
+ return parseHTMLByCreateDom();
2821
+ }
2822
+ }
2823
+ /**
2824
+ * 函数在元素内部末尾添加子元素或HTML字符串
2825
+ * @param element 目标元素
2826
+ * @param content 子元素或HTML字符串
2827
+ * @example
2828
+ * // 元素a.xx的内部末尾添加一个元素
2829
+ * DOMUtils.append(document.querySelector("a.xx"),document.querySelector("b.xx"))
2830
+ * DOMUtils.append("a.xx","'<b class="xx"></b>")
2831
+ * */
2832
+ append(element, content) {
2833
+ if (typeof element === "string") {
2834
+ element = PopsCore.document.querySelector(element);
2835
+ }
2836
+ if (element == null) {
2837
+ return;
2838
+ }
2839
+ function elementAppendChild(ele, text) {
2840
+ if (typeof content === "string") {
2841
+ ele.insertAdjacentHTML("beforeend", text);
2842
+ }
2843
+ else {
2844
+ ele.appendChild(text);
2845
+ }
2846
+ }
2847
+ if (Array.isArray(content) || content instanceof NodeList) {
2848
+ /* 数组 */
2849
+ let fragment = PopsCore.document.createDocumentFragment();
2850
+ content.forEach((ele) => {
2851
+ if (typeof ele === "string") {
2852
+ ele = this.parseHTML(ele, true, false);
2853
+ }
2854
+ fragment.appendChild(ele);
2855
+ });
2856
+ element.appendChild(fragment);
2857
+ }
2858
+ else {
2859
+ elementAppendChild(element, content);
2860
+ }
2861
+ }
2862
+ /**
2863
+ * 把元素标签添加到head内
2864
+ */
2865
+ appendHead($ele) {
2866
+ if (PopsCore.document.head) {
2867
+ PopsCore.document.head.appendChild($ele);
2868
+ }
2869
+ else {
2870
+ PopsCore.document.documentElement.appendChild($ele);
2871
+ }
2872
+ }
2873
+ /**
2874
+ * 把元素添加进body内
2875
+ * @param $ele
2876
+ */
2877
+ appendBody($ele) {
2878
+ if (PopsCore.document.body) {
2879
+ PopsCore.document.body.appendChild($ele);
2880
+ }
2881
+ else {
2882
+ PopsCore.document.documentElement.appendChild($ele);
2883
+ }
2884
+ }
2885
+ /**
2886
+ * 判断元素是否已显示或已连接
2887
+ * @param element
2888
+ */
2889
+ isShow(element) {
2890
+ return Boolean(element.getClientRects().length);
2891
+ }
2892
+ /**
2893
+ * 用于显示元素并获取它的高度宽度等其它属性
2894
+ * @param element
2895
+ */
2896
+ showElement(element) {
2897
+ let dupNode = element.cloneNode(true);
2898
+ dupNode.setAttribute("style", "visibility: hidden !important;display:block !important;");
2899
+ PopsCore.document.documentElement.appendChild(dupNode);
2900
+ return {
2901
+ /**
2902
+ * 恢复修改的style
2903
+ */
2904
+ recovery() {
2905
+ dupNode.remove();
2906
+ },
2907
+ };
2908
+ }
2909
+ /**
2910
+ * 获取元素上的Float格式的属性px
2911
+ * @param element
2912
+ * @param styleName style名
2913
+ */
2914
+ getStyleValue(element, styleName) {
2915
+ let view = null;
2916
+ let styles = null;
2917
+ if (element instanceof CSSStyleDeclaration) {
2918
+ /* 直接就获取了style属性 */
2919
+ styles = element;
2920
+ }
2921
+ else {
2922
+ view = element.ownerDocument.defaultView;
2923
+ if (!view || !view.opener) {
2924
+ view = window;
2925
+ }
2926
+ styles = view.getComputedStyle(element);
2927
+ }
2928
+ let value = parseFloat(styles[styleName]);
2929
+ if (isNaN(value)) {
2930
+ return 0;
2931
+ }
2932
+ else {
2933
+ return value;
2934
+ }
2935
+ }
2936
+ }
2937
+ const popsDOMUtils = new PopsDOMUtils();
2938
+
2939
+ const PopsUIUtils = {
2940
+ /**
2941
+ * 获取所有弹窗中的最大的z-index
2942
+ * @param defaultValue
2943
+ */
2944
+ getPopsMaxZIndex(defaultValue) {
2945
+ let maxZIndex = 0;
2946
+ let maxZIndexElement = null;
2947
+ Object.keys(pops.config.layer).forEach((layerName) => {
2948
+ let layerList = pops.config.layer[layerName];
2949
+ layerList.forEach((layer) => {
2950
+ let itemZIndex = parseInt(getComputedStyle(layer.animElement).zIndex);
2951
+ maxZIndexElement =
2952
+ itemZIndex > maxZIndex ? layer.animElement : maxZIndexElement;
2953
+ maxZIndex = itemZIndex > maxZIndex ? itemZIndex : maxZIndex;
2954
+ });
2955
+ });
2956
+ maxZIndex = maxZIndex === 0 ? defaultValue : maxZIndex;
2957
+ return { zIndex: maxZIndex, animElement: maxZIndexElement };
2958
+ },
2959
+ /**
2960
+ * 获取CSS Rule
2961
+ * @param sheet
2962
+ * @returns
2963
+ */
2964
+ getKeyFrames(sheet) {
2965
+ let result = {};
2966
+ Object.keys(sheet.cssRules).forEach((key) => {
2967
+ if (sheet.cssRules[key].type === 7 &&
2968
+ sheet.cssRules[key].name.startsWith("pops-anim-")) {
2969
+ result[sheet.cssRules[key].name] = sheet.cssRules[key];
2970
+ }
2971
+ });
2972
+ return result;
2973
+ },
2974
+ /**
2975
+ * 删除配置中对应的对象
2976
+ * @param moreLayerConfigList 配置实例列表
2977
+ * @param guid 唯一标识
2978
+ * @param removeAll 是否全部删除
2979
+ */
2980
+ configRemove(moreLayerConfigList, guid, removeAll = false) {
2981
+ /** @param item */
2982
+ function removeItem(item) {
2983
+ item?.animElement?.remove();
2984
+ item?.popsElement?.remove();
2985
+ item?.maskElement?.remove();
2986
+ item?.$shadowContainer?.remove();
2987
+ }
2988
+ // [ layer[], layer[],...]
2989
+ moreLayerConfigList.forEach((layerConfigList) => {
2990
+ // layer[]
2991
+ layerConfigList.forEach((layerConfigItem, index) => {
2992
+ if (removeAll || layerConfigItem["guid"] === guid) {
2993
+ if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.getAttribute("anim"))) {
2994
+ layerConfigItem.animElement.style.width = "100%";
2995
+ layerConfigItem.animElement.style.height = "100%";
2996
+ layerConfigItem.animElement.style["animation-name"] =
2997
+ layerConfigItem.animElement.getAttribute("anim") + "-reverse";
2998
+ if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
2999
+ popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), function () {
3000
+ removeItem(layerConfigItem);
3001
+ }, {
3002
+ capture: true,
3003
+ });
3004
+ }
3005
+ else {
3006
+ removeItem(layerConfigItem);
3007
+ }
3008
+ }
3009
+ else {
3010
+ removeItem(layerConfigItem);
3011
+ }
3012
+ layerConfigList.splice(index, 1);
3013
+ }
3014
+ });
3015
+ });
3016
+ return moreLayerConfigList;
3017
+ },
3018
+ /**
3019
+ * 隐藏
3020
+ * @param popsType
3021
+ * @param layerConfigList
3022
+ * @param guid
3023
+ * @param config
3024
+ * @param animElement
3025
+ * @param maskElement
3026
+ */
3027
+ hide(popsType, layerConfigList, guid, config, animElement, maskElement) {
3028
+ let popsElement = animElement.querySelector(".pops[type-value]");
3029
+ if (popsType === "drawer") {
3030
+ let drawerConfig = config;
3031
+ setTimeout(() => {
3032
+ maskElement.style.setProperty("display", "none");
3033
+ if (["top", "bottom"].includes(drawerConfig.direction)) {
3034
+ popsElement.style.setProperty("height", "0");
3035
+ }
3036
+ else if (["left", "right"].includes(drawerConfig.direction)) {
3037
+ popsElement.style.setProperty("width", "0");
3038
+ }
3039
+ else {
3040
+ console.error("未知direction:", drawerConfig.direction);
3041
+ }
3042
+ }, drawerConfig.closeDelay);
3043
+ }
3044
+ else {
3045
+ layerConfigList.forEach((layerConfigItem) => {
3046
+ if (layerConfigItem.guid === guid) {
3047
+ /* 存在动画 */
3048
+ layerConfigItem.animElement.style.width = "100%";
3049
+ layerConfigItem.animElement.style.height = "100%";
3050
+ layerConfigItem.animElement.style["animation-name"] =
3051
+ layerConfigItem.animElement.getAttribute("anim") + "-reverse";
3052
+ if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
3053
+ function animationendCallBack() {
3054
+ layerConfigItem.animElement.style.display = "none";
3055
+ if (layerConfigItem.maskElement) {
3056
+ layerConfigItem.maskElement.style.display = "none";
3057
+ }
3058
+ popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
3059
+ capture: true,
3060
+ });
3061
+ }
3062
+ popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
3063
+ capture: true,
3064
+ });
3065
+ }
3066
+ else {
3067
+ layerConfigItem.animElement.style.display = "none";
3068
+ if (layerConfigItem.maskElement) {
3069
+ layerConfigItem.maskElement.style.display = "none";
3070
+ }
3071
+ }
3072
+ return;
3073
+ }
3074
+ });
3075
+ }
3076
+ },
3077
+ /**
3078
+ * 显示
3079
+ * @param popsType
3080
+ * @param layerConfigList
3081
+ * @param guid
3082
+ * @param config
3083
+ * @param animElement
3084
+ * @param maskElement
3085
+ */
3086
+ show(popsType, layerConfigList, guid, config, animElement, maskElement) {
3087
+ let popsElement = animElement.querySelector(".pops[type-value]");
3088
+ if (popsType === "drawer") {
3089
+ let drawerConfig = config;
3090
+ setTimeout(() => {
3091
+ maskElement.style.setProperty("display", "");
3092
+ let direction = drawerConfig.direction;
3093
+ let size = drawerConfig.size.toString();
3094
+ if (["top", "bottom"].includes(direction)) {
3095
+ popsElement.style.setProperty("height", size);
3096
+ }
3097
+ else if (["left", "right"].includes(direction)) {
3098
+ popsElement.style.setProperty("width", size);
3099
+ }
3100
+ else {
3101
+ console.error("未知direction:", direction);
3102
+ }
3103
+ }, drawerConfig.openDelay);
3104
+ }
3105
+ else {
3106
+ layerConfigList.forEach((layerConfigItem) => {
3107
+ if (layerConfigItem.guid === guid) {
3108
+ layerConfigItem.animElement.style.width = "";
3109
+ layerConfigItem.animElement.style.height = "";
3110
+ layerConfigItem.animElement.style["animation-name"] =
3111
+ layerConfigItem
3112
+ .animElement.getAttribute("anim")
3113
+ .replace("-reverse", "");
3114
+ if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
3115
+ layerConfigItem.animElement.style.display = "";
3116
+ if (layerConfigItem.maskElement) {
3117
+ layerConfigItem.maskElement.style.display = "";
3118
+ }
3119
+ function animationendCallBack() {
3120
+ popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
3121
+ capture: true,
3122
+ });
3123
+ }
3124
+ popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
3125
+ capture: true,
3126
+ });
3127
+ }
3128
+ else {
3129
+ layerConfigItem.animElement.style.display = "";
3130
+ if (layerConfigItem.maskElement) {
3131
+ layerConfigItem.maskElement.style.display = "";
3132
+ }
3133
+ }
3134
+ }
3135
+ return;
3136
+ });
3137
+ }
3138
+ },
3139
+ /**
3140
+ * 关闭
3141
+ * @param popsType
3142
+ * @param layerConfigList
3143
+ * @param guid
3144
+ * @param config
3145
+ * @param animElement
3146
+ */
3147
+ close(popsType, layerConfigList, guid, config, animElement) {
3148
+ let popsElement = animElement.querySelector(".pops[type-value]");
3149
+ let drawerConfig = config;
3150
+ /**
3151
+ * 动画结束事件
3152
+ */
3153
+ function transitionendEvent() {
3154
+ function closeCallBack(event) {
3155
+ if (event.propertyName !== "transform") {
3156
+ return;
3157
+ }
3158
+ popsDOMUtils.off(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, closeCallBack);
3159
+ PopsUIUtils.configRemove([layerConfigList], guid);
3160
+ }
3161
+ /* 监听过渡结束 */
3162
+ popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
3163
+ let popsTransForm = getComputedStyle(popsElement).transform;
3164
+ if (popsTransForm !== "none") {
3165
+ popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
3166
+ return;
3167
+ }
3168
+ if (["top"].includes(drawerConfig.direction)) {
3169
+ popsElement.style.setProperty("transform", "translateY(-100%)");
3170
+ }
3171
+ else if (["bottom"].includes(drawerConfig.direction)) {
3172
+ popsElement.style.setProperty("transform", "translateY(100%)");
3173
+ }
3174
+ else if (["left"].includes(drawerConfig.direction)) {
3175
+ popsElement.style.setProperty("transform", "translateX(-100%)");
3176
+ }
3177
+ else if (["right"].includes(drawerConfig.direction)) {
3178
+ popsElement.style.setProperty("transform", "translateX(100%)");
3179
+ }
3180
+ else {
3181
+ console.error("未知direction:", drawerConfig.direction);
3182
+ }
3183
+ }
3184
+ if (popsType === "drawer") {
3185
+ setTimeout(() => {
3186
+ transitionendEvent();
3187
+ }, drawerConfig.closeDelay);
3188
+ }
3189
+ else {
3190
+ PopsUIUtils.configRemove([layerConfigList], guid);
3191
+ }
3192
+ },
3193
+ /**
3194
+ * 拖拽元素
3195
+ * 说明:
3196
+ * + 元素的position为absolute或者fixed
3197
+ * + 会为元素的
3198
+ * @param moveElement 需要拖拽的元素
3199
+ * @param options 配置
3200
+ */
3201
+ drag(moveElement, options) {
3202
+ options = Object.assign({
3203
+ limit: true,
3204
+ extraDistance: 3,
3205
+ container: PopsCore.globalThis,
3206
+ }, options);
3207
+ let isMove = false;
3208
+ /* 点击元素,left偏移 */
3209
+ let clickElementLeftOffset = 0;
3210
+ /* 点击元素,top偏移 */
3211
+ let clickElementTopOffset = 0;
3212
+ let AnyTouch = popsUtils.AnyTouch();
3213
+ let anyTouchElement = new AnyTouch(options.dragElement, {
3214
+ preventEvent(event) {
3215
+ if (typeof options.preventEvent === "function") {
3216
+ return options.preventEvent(event);
3217
+ }
3218
+ else {
3219
+ return false;
3220
+ }
3221
+ },
3222
+ });
3223
+ popsDOMUtils.css(options.dragElement, {
3224
+ cursor: "move",
3225
+ });
3226
+ /**
3227
+ * 获取移动元素的transform偏移
3228
+ */
3229
+ function getTransform(element) {
3230
+ let transform_left = 0;
3231
+ let transform_top = 0;
3232
+ let elementTransform = PopsCore.globalThis.getComputedStyle(element).transform;
3233
+ if (elementTransform !== "none" &&
3234
+ elementTransform != null &&
3235
+ elementTransform !== "") {
3236
+ let elementTransformSplit = elementTransform
3237
+ .match(/\((.+)\)/)?.[1]
3238
+ .split(",");
3239
+ transform_left = Math.abs(parseInt(elementTransformSplit[4]));
3240
+ transform_top = Math.abs(parseInt(elementTransformSplit[5]));
3241
+ }
3242
+ return {
3243
+ transformLeft: transform_left,
3244
+ transformTop: transform_top,
3245
+ };
3246
+ }
3247
+ /**
3248
+ * 修改移动的元素的style
3249
+ */
3250
+ function changeMoveElementStyle(element) {
3251
+ let old_transitionDuration = element.style.transitionDuration;
3252
+ if (globalThis.getComputedStyle(element).transitionDuration !== "0s") {
3253
+ element.style.transitionDuration = "0s";
3254
+ }
3255
+ return () => {
3256
+ element.style.transitionDuration = old_transitionDuration;
3257
+ };
3258
+ }
3259
+ /**
3260
+ * 获取容器的高度、宽度,一般是window为容器
3261
+ */
3262
+ function getContainerWidthOrHeight(container) {
3263
+ container = container ?? globalThis;
3264
+ return {
3265
+ width: popsDOMUtils.width(container),
3266
+ height: popsDOMUtils.height(container),
3267
+ };
3268
+ }
3269
+ /**
3270
+ * 获取容器的最小left、top偏移
3271
+ */
3272
+ function getContainerTopOrLeft(container) {
3273
+ container = container ?? globalThis;
3274
+ if (popsUtils.isWin(container)) {
3275
+ return {
3276
+ left: 0,
3277
+ top: 0,
3278
+ };
3279
+ }
3280
+ else {
3281
+ let rect = container.getBoundingClientRect();
3282
+ return {
3283
+ left: rect.left,
3284
+ top: rect.top,
3285
+ };
3286
+ }
3287
+ }
3288
+ let transformInfo = getTransform(moveElement);
3289
+ let transformLeft = transformInfo.transformLeft;
3290
+ let transformTop = transformInfo.transformTop;
3291
+ let resumeMoveElementStyle = null;
3292
+ anyTouchElement.on("pan", function (event) {
3293
+ if (!isMove) {
3294
+ isMove = true;
3295
+ let rect = options.dragElement.getBoundingClientRect();
3296
+ clickElementLeftOffset = event.x - rect.left;
3297
+ clickElementTopOffset = event.y - rect.top;
3298
+ transformInfo = getTransform(moveElement);
3299
+ transformLeft = transformInfo.transformLeft;
3300
+ transformTop = transformInfo.transformTop;
3301
+ //if (event.nativeEvent.offsetX) {
3302
+ // clickElementLeftOffset = parseInt(event.nativeEvent.offsetX);
3303
+ //} else {
3304
+ // clickElementLeftOffset = parseInt(event.getOffset().x);
3305
+ //}
3306
+ //if (event.nativeEvent.offsetY) {
3307
+ // clickElementTopOffset = parseInt(event.nativeEvent.offsetY);
3308
+ //} else {
3309
+ // clickElementTopOffset = parseInt(event.getOffset().y);
3310
+ //}
3311
+ resumeMoveElementStyle = changeMoveElementStyle(moveElement);
3312
+ }
3313
+ /** 当前移动的left偏移 */
3314
+ let currentMoveLeftOffset = event.x - clickElementLeftOffset + transformLeft;
3315
+ /** 当前移动的top偏移 */
3316
+ let currentMoveTopOffset = event.y - clickElementTopOffset + transformTop;
3317
+ /* 拖拽移动 */
3318
+ if (event.phase === "move") {
3319
+ if (options.limit) {
3320
+ /* 限制在容器内移动 */
3321
+ /* left偏移最大值 */
3322
+ let maxLeftOffset = getContainerWidthOrHeight(options.container).width -
3323
+ popsDOMUtils.width(moveElement) +
3324
+ transformLeft;
3325
+ let { left: minLeftOffset, top: minTopOffset } = getContainerTopOrLeft(options.container);
3326
+ /* top偏移的最大值 */
3327
+ let maxTopOffset = getContainerWidthOrHeight(options.container).height -
3328
+ popsDOMUtils.height(moveElement) +
3329
+ transformTop;
3330
+ if (currentMoveLeftOffset > maxLeftOffset) {
3331
+ /* 不允许超过容器的最大宽度 */
3332
+ currentMoveLeftOffset = maxLeftOffset;
3333
+ }
3334
+ if (currentMoveTopOffset > maxTopOffset) {
3335
+ /* 不允许超过容器的最大高度 */
3336
+ currentMoveTopOffset = maxTopOffset;
3337
+ }
3338
+ if (currentMoveLeftOffset - options.extraDistance * 2 <
3339
+ minLeftOffset + transformLeft) {
3340
+ /* 不允许left偏移小于容器最小值 */
3341
+ currentMoveLeftOffset = minLeftOffset + transformLeft;
3342
+ /* 最左边 +额外距离 */
3343
+ currentMoveLeftOffset += options.extraDistance;
3344
+ }
3345
+ else {
3346
+ /* 最右边 -额外距离 */
3347
+ currentMoveLeftOffset -= options.extraDistance;
3348
+ }
3349
+ if (currentMoveTopOffset - options.extraDistance * 2 <
3350
+ minTopOffset + transformTop) {
3351
+ /* 不允许top偏移小于容器最小值 */
3352
+ currentMoveTopOffset = minTopOffset + transformTop;
3353
+ /* 最上面 +额外距离 */
3354
+ currentMoveTopOffset += options.extraDistance;
3355
+ }
3356
+ else {
3357
+ /* 最下面 -额外距离 */
3358
+ currentMoveTopOffset -= options.extraDistance;
3359
+ }
3360
+ }
3361
+ if (typeof options.moveCallBack === "function") {
3362
+ options.moveCallBack(moveElement, currentMoveLeftOffset, currentMoveTopOffset);
3363
+ }
3364
+ popsDOMUtils.css(moveElement, {
3365
+ left: currentMoveLeftOffset + "px",
3366
+ top: currentMoveTopOffset + "px",
3367
+ });
3368
+ }
3369
+ /* 停止拖拽 */
3370
+ if (event.phase === "end") {
3371
+ isMove = false;
3372
+ if (typeof resumeMoveElementStyle === "function") {
3373
+ resumeMoveElementStyle();
3374
+ resumeMoveElementStyle = null;
3375
+ }
3376
+ if (typeof options.endCallBack === "function") {
3377
+ options.endCallBack(moveElement, currentMoveLeftOffset, currentMoveTopOffset);
3378
+ }
3379
+ }
3380
+ });
3381
+ /* 因为会覆盖上面的点击事件,主动触发一下 */
3382
+ anyTouchElement.on(["click", "tap"], function (event) {
3383
+ event.changedPoints.forEach((item) => {
3384
+ popsDOMUtils.trigger(item.target, "click", void 0, true);
3385
+ });
3386
+ });
3387
+ },
3388
+ /**
3389
+ * 排序数组
3390
+ * @param getBeforeValueFun
3391
+ * @param getAfterValueFun
3392
+ * @param sortByDesc 排序是否降序,默认降序
3393
+ */
3394
+ sortElementListByProperty(getBeforeValueFun, getAfterValueFun, sortByDesc = true) {
3395
+ if (typeof sortByDesc !== "boolean") {
3396
+ throw "参数 sortByDesc 必须为boolean类型";
3397
+ }
3398
+ if (getBeforeValueFun == null || getAfterValueFun == null) {
3399
+ throw "获取前面的值或后面的值的方法不能为空";
3400
+ }
3401
+ return function (after_obj, before_obj) {
3402
+ var beforeValue = getBeforeValueFun(before_obj); /* 前 */
3403
+ var afterValue = getAfterValueFun(after_obj); /* 后 */
3404
+ if (sortByDesc) {
3405
+ if (afterValue > beforeValue) {
3406
+ return -1;
3407
+ }
3408
+ else if (afterValue < beforeValue) {
3409
+ return 1;
3410
+ }
3411
+ else {
3412
+ return 0;
3413
+ }
3414
+ }
3415
+ else {
3416
+ if (afterValue < beforeValue) {
3417
+ return -1;
3418
+ }
3419
+ else if (afterValue > beforeValue) {
3420
+ return 1;
3421
+ }
3422
+ else {
3423
+ return 0;
3424
+ }
3425
+ }
3426
+ };
3427
+ },
3428
+ };
3429
+
3430
+ var indexCSS = "@charset \"utf-8\";\r\n* {\r\n\t-webkit-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\t-webkit-tap-highlight-color: transparent;\r\n\t/* 代替::-webkit-scrollbar */\r\n\tscrollbar-width: thin;\r\n}\r\n.pops {\r\n\t--pops-bg-opacity: 1;\r\n\t--pops-bd-opacity: 1;\r\n\t--pops-font-size: 16px;\r\n}\r\n.pops-mask {\r\n\t--pops-mask-bg-opacity: 0.4;\r\n}\r\n.pops {\r\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\tborder-radius: 4px;\r\n\tborder: 1px solid rgb(235, 238, 245, var(--pops-bd-opacity));\r\n\tfont-size: var(--pops-font-size);\r\n\tbox-shadow: 0 0 12px rgba(0, 0, 0, 0.12);\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\ttransition: all 0.35s;\r\n}\r\n.pops-anim {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n.pops-anim[anim=\"\"] {\r\n\ttop: unset;\r\n\tright: unset;\r\n\tbottom: unset;\r\n\tleft: unset;\r\n\twidth: unset;\r\n\theight: unset;\r\n\ttransition: none;\r\n}\r\n/* 底部图标动画和样式 */\r\n.pops i.pops-bottom-icon[is-loading=\"true\"] {\r\n\tanimation: rotating 2s linear infinite;\r\n}\r\n.pops i.pops-bottom-icon {\r\n\theight: 1em;\r\n\twidth: 1em;\r\n\tline-height: 1em;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n}\r\n\r\n/* 遮罩层样式 */\r\n.pops-mask {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tborder: 0;\r\n\tborder-radius: 0;\r\n\tbackground-color: rgba(0, 0, 0, var(--pops-mask-bg-opacity));\r\n\tbox-shadow: none;\r\n\ttransition: none;\r\n}\r\n\r\n.pops-header-controls button.pops-header-control[type][data-header] {\r\n\tfloat: right;\r\n\tmargin: 0 0;\r\n\toutline: 0;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: #888;\r\n\tcursor: pointer;\r\n}\r\n.pops-header-controls button.pops-header-control[type=\"max\"],\r\n.pops-header-controls button.pops-header-control[type=\"mise\"],\r\n.pops-header-controls button.pops-header-control[type=\"min\"] {\r\n\tposition: relative;\r\n\tfloat: right;\r\n\tmargin: 0 2px;\r\n\toutline: 0 !important;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: rgb(136, 136, 136);\r\n\tcursor: pointer;\r\n\ttransition: all 0.3s ease-in-out;\r\n}\r\nbutton.pops-header-control i {\r\n\tcolor: rgb(144, 147, 153);\r\n\tfont-size: inherit;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n}\r\nbutton.pops-header-control svg {\r\n\theight: 1.25em;\r\n\twidth: 1.25em;\r\n}\r\nbutton.pops-header-control {\r\n\tright: 15px;\r\n\tpadding: 0;\r\n\tborder: none;\r\n\toutline: 0;\r\n\tbackground: 0 0;\r\n\tcursor: pointer;\r\n\tposition: unset;\r\n\tline-height: 1.15;\r\n}\r\nbutton.pops-header-control i:hover {\r\n\tcolor: rgb(64, 158, 255);\r\n}\r\n.pops-header-controls[data-margin] button.pops-header-control {\r\n\tmargin: 0 6px;\r\n}\r\n.pops[type-value] .pops-header-controls {\r\n\tdisplay: flex;\r\n}\r\n";
3431
+
3432
+ var ninePalaceGridPositionCSS = ".pops[position=\"top_left\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n}\r\n.pops[position=\"top\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 50%;\r\n\ttransform: translateX(-50%);\r\n}\r\n.pops[position=\"top_right\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n}\r\n.pops[position=\"center_left\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tleft: 0;\r\n\ttransform: translateY(-50%);\r\n}\r\n.pops[position=\"center\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tleft: 50%;\r\n\ttransform: translate(-50%, -50%);\r\n}\r\n.pops[position=\"center_right\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tright: 0;\r\n\ttransform: translateY(-50%);\r\n}\r\n.pops[position=\"bottom_left\"] {\r\n\tposition: fixed;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n}\r\n.pops[position=\"bottom\"] {\r\n\tposition: fixed;\r\n\tbottom: 0;\r\n\tleft: 50%;\r\n\ttransform: translate(-50%, 0);\r\n}\r\n.pops[position=\"bottom_right\"] {\r\n\tposition: fixed;\r\n\tright: 0;\r\n\tbottom: 0;\r\n}\r\n";
3433
+
3434
+ var scrollbarCSS = "/* firefox上暂不支持::-webkit-scrollbar */\r\n.pops ::-webkit-scrollbar {\r\n\twidth: 6px;\r\n\theight: 0;\r\n}\r\n\r\n.pops ::-webkit-scrollbar-track {\r\n\twidth: 0;\r\n}\r\n.pops ::-webkit-scrollbar-thumb:hover {\r\n\tbackground: rgb(178, 178, 178, var(--pops-bg-opacity));\r\n}\r\n.pops ::-webkit-scrollbar-thumb {\r\n\tmin-height: 28px;\r\n\tborder-radius: 2em;\r\n\tbackground: rgb(204, 204, 204, var(--pops-bg-opacity));\r\n\tbackground-clip: padding-box;\r\n}\r\n";
3435
+
3436
+ var buttonCSS = ".pops {\r\n\t--button-font-size: 14px;\r\n\t--button-height: 32px;\r\n\t--button-color: rgb(51, 51, 51);\r\n\t--button-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));\r\n\t--button-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));\r\n\t--button-margin-top: 0px;\r\n\t--button-margin-bottom: 0px;\r\n\t--button-margin-left: 5px;\r\n\t--button-margin-right: 5px;\r\n\t--button-padding-top: 6px;\r\n\t--button-padding-bottom: 6px;\r\n\t--button-padding-left: 12px;\r\n\t--button-padding-right: 12px;\r\n\t--button-radius: 4px;\r\n\r\n\t--container-title-height: 55px;\r\n\t--container-bottom-btn-height: 55px;\r\n}\r\n.pops[data-bottom-btn=\"false\"] {\r\n\t--container-bottom-btn-height: 0px;\r\n}\r\n.pops button {\r\n\twhite-space: nowrap;\r\n\tfloat: right;\r\n\tdisplay: inline-block;\r\n\tmargin: var(--button-margin-top) var(--button-margin-right)\r\n\t\tvar(--button-margin-bottom) var(--button-margin-left);\r\n\tpadding: var(--button-padding-top) var(--button-padding-right)\r\n\t\tvar(--button-padding-bottom) var(--button-padding-left);\r\n\toutline: 0;\r\n}\r\n.pops button[data-has-icon=\"false\"] .pops-bottom-icon {\r\n\tdisplay: none;\r\n}\r\n.pops button {\r\n\tborder-radius: var(--button-radius);\r\n\tbox-shadow: none;\r\n\tfont-weight: 400;\r\n\tfont-size: var(--button-font-size);\r\n\tcursor: pointer;\r\n\ttransition: all 0.3s ease-in-out;\r\n}\r\n.pops button {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\theight: var(--button-height);\r\n\tline-height: 1;\r\n\tbox-sizing: border-box;\r\n\tuser-select: none;\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tborder: 1px solid var(--button-bd-color);\r\n}\r\n.pops button {\r\n\tcolor: var(--button-color);\r\n\tborder-color: var(--button-bd-color);\r\n\tbackground-color: var(--button-bg-color);\r\n}\r\n.pops button:active {\r\n\tcolor: var(--button-color);\r\n\tborder-color: var(--button-bd-color);\r\n\tbackground-color: var(--button-bg-color);\r\n\toutline: 0;\r\n}\r\n.pops button:hover {\r\n\tcolor: var(--button-color);\r\n\tborder-color: var(--button-bd-color);\r\n\tbackground-color: var(--button-bg-color);\r\n}\r\n.pops button:focus-visible {\r\n\tcolor: var(--button-color);\r\n\tborder-color: var(--button-bd-color);\r\n\tbackground-color: var(--button-bg-color);\r\n}\r\n.pops button:disabled {\r\n\tcursor: not-allowed;\r\n\tcolor: var(--button-color);\r\n\tborder-color: var(--button-bd-color);\r\n\tbackground-color: var(--button-bg-color);\r\n}\r\n.pops button.pops-button-large {\r\n\t--button-height: 32px;\r\n\t--button-padding-top: 12px;\r\n\t--button-padding-bottom: 12px;\r\n\t--button-padding-left: 19px;\r\n\t--button-padding-right: 19px;\r\n\t--button-font-size: 14px;\r\n\t--button-border-radius: 4px;\r\n}\r\n\r\n.pops button.pops-button-small {\r\n\t--button-height: 24px;\r\n\t--button-padding-top: 5px;\r\n\t--button-padding-bottom: 5px;\r\n\t--button-padding-left: 11px;\r\n\t--button-padding-right: 11px;\r\n\t--button-font-size: 12px;\r\n\t--button-border-radius: 4px;\r\n}\r\n.pops-panel-button-no-icon .pops-panel-button_inner i {\r\n\tdisplay: none;\r\n}\r\n.pops-panel-button-right-icon {\r\n}\r\n.pops-panel-button-right-icon .pops-panel-button_inner {\r\n\tflex-direction: row-reverse;\r\n}\r\n.pops-panel-button-right-icon .pops-panel-button_inner i {\r\n}\r\n.pops-panel-button .pops-panel-button_inner i:has(svg),\r\n.pops-panel-button-right-icon .pops-panel-button-text {\r\n\tmargin-right: 6px;\r\n}\r\n\r\n.pops button[type=\"default\"] {\r\n\t--button-color: #333333;\r\n\t--button-bd-color: #dcdfe6;\r\n\t--button-bg-color: #ffffff;\r\n}\r\n.pops button[type=\"default\"]:active {\r\n\t--button-color: #409eff;\r\n\t--button-bd-color: #409eff;\r\n\t--button-bg-color: #ecf5ff;\r\n}\r\n.pops button[type=\"default\"]:hover {\r\n\t--button-color: #409eff;\r\n\t--button-bd-color: #c6e2ff;\r\n\t--button-bg-color: #ecf5ff;\r\n}\r\n.pops button[type=\"default\"]:focus-visible {\r\n\toutline: 2px solid #a0cfff;\r\n\toutline-offset: 1px;\r\n}\r\n.pops button[type=\"default\"]:disabled {\r\n\t--button-color: #a8abb2;\r\n\t--button-bd-color: #fff;\r\n\t--button-bg-color: #e4e7ed;\r\n}\r\n\r\n.pops button[type=\"primary\"] {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #409eff;\r\n\t--button-bg-color: #409eff;\r\n}\r\n.pops button[type=\"primary\"]:active {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #337ecc;\r\n\t--button-bg-color: #337ecc;\r\n}\r\n.pops button[type=\"primary\"]:hover {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #79bbff;\r\n\t--button-bg-color: #79bbff;\r\n}\r\n.pops button[type=\"primary\"]:focus-visible {\r\n\toutline: 2px solid #a0cfff;\r\n\toutline-offset: 1px;\r\n}\r\n.pops button[type=\"primary\"]:disabled {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #a0cfff;\r\n\t--button-bg-color: #a0cfff;\r\n}\r\n\r\n.pops button[type=\"success\"] {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #4cae4c;\r\n\t--button-bg-color: #5cb85c;\r\n}\r\n.pops button[type=\"success\"]:active {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #529b2e;\r\n\t--button-bg-color: #529b2e;\r\n}\r\n.pops button[type=\"success\"]:hover {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #95d475;\r\n\t--button-bg-color: #95d475;\r\n}\r\n.pops button[type=\"success\"]:focus-visible {\r\n\toutline: 2px solid #b3e19d;\r\n\toutline-offset: 1px;\r\n}\r\n.pops button[type=\"success\"]:disabled {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #b3e19d;\r\n\t--button-bg-color: #b3e19d;\r\n}\r\n\r\n.pops button[type=\"info\"] {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #909399;\r\n\t--button-bg-color: #909399;\r\n}\r\n.pops button[type=\"info\"]:active {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #73767a;\r\n\t--button-bg-color: #73767a;\r\n}\r\n.pops button[type=\"info\"]:hover {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #b1b3b8;\r\n\t--button-bg-color: #b1b3b8;\r\n}\r\n.pops button[type=\"info\"]:focus-visible {\r\n\toutline: 2px solid #c8c9cc;\r\n\toutline-offset: 1px;\r\n}\r\n.pops button[type=\"info\"]:disabled {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #c8c9cc;\r\n\t--button-bg-color: #c8c9cc;\r\n}\r\n\r\n.pops button[type=\"warning\"] {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #e6a23c;\r\n\t--button-bg-color: #e6a23c;\r\n}\r\n.pops button[type=\"warning\"]:active {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #b88230;\r\n\t--button-bg-color: #b88230;\r\n}\r\n.pops button[type=\"warning\"]:hover {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #eebe77;\r\n\t--button-bg-color: #eebe77;\r\n}\r\n.pops button[type=\"warning\"]:focus-visible {\r\n\toutline: 2px solid #f3d19e;\r\n\toutline-offset: 1px;\r\n}\r\n.pops button[type=\"warning\"]:disabled {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #f3d19e;\r\n\t--button-bg-color: #f3d19e;\r\n}\r\n\r\n.pops button[type=\"danger\"] {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #f56c6c;\r\n\t--button-bg-color: #f56c6c;\r\n}\r\n.pops button[type=\"danger\"]:active {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #c45656;\r\n\t--button-bg-color: #c45656;\r\n}\r\n.pops button[type=\"danger\"]:hover {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #f89898;\r\n\t--button-bg-color: #f89898;\r\n}\r\n.pops button[type=\"danger\"]:focus-visible {\r\n\toutline: 2px solid #fab6b6;\r\n\toutline-offset: 1px;\r\n}\r\n.pops button[type=\"danger\"]:disabled {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #fab6b6;\r\n\t--button-bg-color: #fab6b6;\r\n}\r\n\r\n.pops button[type=\"xiaomi-primary\"] {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #ff5c00;\r\n\t--button-bg-color: #ff5c00;\r\n}\r\n.pops button[type=\"xiaomi-primary\"]:active {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #da4f00;\r\n\t--button-bg-color: #da4f00;\r\n}\r\n.pops button[type=\"xiaomi-primary\"]:hover {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #ff7e29;\r\n\t--button-bg-color: #ff7e29;\r\n}\r\n.pops button[type=\"xiaomi-primary\"]:focus-visible {\r\n\toutline: 2px solid #fab6b6;\r\n\toutline-offset: 1px;\r\n}\r\n.pops button[type=\"xiaomi-primary\"]:disabled {\r\n\t--button-color: #ffffff;\r\n\t--button-bd-color: #fad5b6;\r\n\t--button-bg-color: #fad5b6;\r\n}\r\n";
3437
+
3438
+ var commonCSS = ".pops-flex-items-center {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n.pops-flex-y-center {\r\n\tdisplay: flex;\r\n\tjustify-content: space-between;\r\n}\r\n.pops-flex-x-center {\r\n\tdisplay: flex;\r\n\talign-content: center;\r\n}\r\n.pops-hide {\r\n\tdisplay: none;\r\n}\r\n.pops-hide-important {\r\n\tdisplay: none !important;\r\n}\r\n.pops-no-border {\r\n\tborder: 0;\r\n}\r\n.pops-no-border-important {\r\n\tborder: 0;\r\n}\r\n";
3439
+
3440
+ var animCSS = "@keyframes rotating {\r\n\t0% {\r\n\t\ttransform: rotate(0);\r\n\t}\r\n\tto {\r\n\t\ttransform: rotate(360deg);\r\n\t}\r\n}\r\n@keyframes iframeLoadingChange_85 {\r\n\t0% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\r\n\t}\r\n\t20% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #ead0d0, rgb(123 185 246));\r\n\t}\r\n\t40% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #f4b7b7, rgb(112 178 244));\r\n\t}\r\n\t60% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #ec9393, rgb(80 163 246));\r\n\t}\r\n\t80% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #e87f7f, rgb(25 139 253));\r\n\t}\r\n\t100% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #ee2c2c, rgb(0 124 247));\r\n\t}\r\n\tfrom {\r\n\t\twidth: 75%;\r\n\t}\r\n\tto {\r\n\t\twidth: 100%;\r\n\t}\r\n}\r\n@keyframes iframeLoadingChange {\r\n\t0% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\r\n\t}\r\n\t20% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #ead0d0, rgb(123 185 246));\r\n\t}\r\n\t40% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #f4b7b7, rgb(112 178 244));\r\n\t}\r\n\t60% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #ec9393, rgb(80 163 246));\r\n\t}\r\n\t80% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #e87f7f, rgb(25 139 253));\r\n\t}\r\n\t100% {\r\n\t\tbackground: linear-gradient(to right, #4995dd, #ee2c2c, rgb(0 124 247));\r\n\t}\r\n\tfrom {\r\n\t\twidth: 0;\r\n\t}\r\n\tto {\r\n\t\twidth: 75%;\r\n\t}\r\n}\r\n@keyframes pops-anim-wait-rotate {\r\n\tform {\r\n\t\ttransform: rotate(0);\r\n\t}\r\n\tto {\r\n\t\ttransform: rotate(360deg);\r\n\t}\r\n}\r\n@keyframes pops-anim-spread {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: scaleX(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: scaleX(1);\r\n\t}\r\n}\r\n@keyframes pops-anim-shake {\r\n\t0%,\r\n\t100% {\r\n\t\ttransform: translateX(0);\r\n\t}\r\n\t10%,\r\n\t30%,\r\n\t50%,\r\n\t70%,\r\n\t90% {\r\n\t\ttransform: translateX(-10px);\r\n\t}\r\n\t20%,\r\n\t40%,\r\n\t60%,\r\n\t80% {\r\n\t\ttransform: translateX(10px);\r\n\t}\r\n}\r\n@keyframes pops-anim-rolling-left {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateX(-100%) rotate(-120deg);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0) rotate(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-rolling-right {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateX(100%) rotate(120deg);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0) rotate(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-top {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateY(-200%);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateY(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-bottom {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateY(200%);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateY(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-left {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateX(-200%);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-right {\r\n\t0% {\r\n\t\ttransform: translateX(200%);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-fadein {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t}\r\n}\r\n@keyframes pops-anim-fadein-zoom {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: scale(0.5);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: scale(1);\r\n\t}\r\n}\r\n@keyframes pops-anim-fadein-alert {\r\n\t0% {\r\n\t\ttransform: scale(0.5);\r\n\t}\r\n\t45% {\r\n\t\ttransform: scale(1.05);\r\n\t}\r\n\t80% {\r\n\t\ttransform: scale(0.95);\r\n\t}\r\n\t100% {\r\n\t\ttransform: scale(1);\r\n\t}\r\n}\r\n@keyframes pops-anim-don {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t2.08333% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.75266,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.76342,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t4.16667% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.81071,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.84545,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t6.25% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.86808,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.9286,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t8.33333% {\r\n\t\ttransform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t10.4167% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.96482,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1.05202,\r\n\t\t\t0,\r\n\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.75% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99983,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.99991,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t95.8333% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99982,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.99985,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t97.9167% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99983,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.99984,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n}\r\n@keyframes pops-anim-roll {\r\n\t0% {\r\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 90deg);\r\n\t}\r\n\t100% {\r\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 0deg);\r\n\t}\r\n}\r\n@keyframes pops-anim-sandra {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: scale3d(1.1, 1.1, 1);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: scale3d(1, 1, 1);\r\n\t}\r\n}\r\n@keyframes pops-anim-gather {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: scale(5, 0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: scale(1, 1);\r\n\t}\r\n}\r\n@keyframes pops-anim-spread-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: scaleX(1);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: scaleX(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-shake-reverse {\r\n\t0%,\r\n\t100% {\r\n\t\ttransform: translateX(10px);\r\n\t}\r\n\t10%,\r\n\t30%,\r\n\t50%,\r\n\t70%,\r\n\t90% {\r\n\t\ttransform: translateX(-10px);\r\n\t}\r\n\t20%,\r\n\t40%,\r\n\t60%,\r\n\t80% {\r\n\t\ttransform: translateX(0);\r\n\t}\r\n}\r\n@keyframes pops-anim-rolling-left-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0) rotate(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateX(-100%) rotate(-120deg);\r\n\t}\r\n}\r\n@keyframes pops-anim-rolling-right-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0) rotate(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateX(100%) rotate(120deg);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-top-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateY(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateY(-200%);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-bottom-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateY(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateY(200%);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-left-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateX(-200%);\r\n\t}\r\n}\r\n@keyframes pops-anim-slide-right-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0);\r\n\t}\r\n\t100% {\r\n\t\ttransform: translateX(200%);\r\n\t}\r\n}\r\n@keyframes pops-anim-fadein-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t}\r\n}\r\n@keyframes pops-anim-fadein-zoom-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: scale(1);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: scale(0.5);\r\n\t}\r\n}\r\n@keyframes pops-anim-fadein-alert-reverse {\r\n\t0% {\r\n\t\ttransform: scale(1);\r\n\t}\r\n\t45% {\r\n\t\ttransform: scale(0.95);\r\n\t}\r\n\t80% {\r\n\t\ttransform: scale(1.05);\r\n\t}\r\n\t100% {\r\n\t\ttransform: scale(0.5);\r\n\t}\r\n}\r\n@keyframes pops-anim-don-reverse {\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t97.9167% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.75266,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.76342,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t95.8333% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.81071,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.84545,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t93.75% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.86808,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.9286,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t91.6667% {\r\n\t\ttransform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t89.5833% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.96482,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1.05202,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t87.5% {\r\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t85.4167% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t1.02563,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1.09149,\r\n\t\t\t0,\r\n\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n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t64.5833% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t1.00526,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.98122,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t62.5% {\r\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t60.4167% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99617,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.99433,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t58.3333% {\r\n\t\ttransform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t56.25% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99237,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1.00413,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t54.1667% {\r\n\t\ttransform: matrix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0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t14.5833% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t1.00012,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1.00042,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t12.5% {\r\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t10.4167% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99991,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1.00013,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t8.33333% {\r\n\t\ttransform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\r\n\t}\r\n\t6.25% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99983,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.99991,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t4.16667% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99982,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.99985,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t2.08333% {\r\n\t\ttransform: matrix3d(\r\n\t\t\t0.99983,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0.99984,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: matrix3d(\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t1,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0,\r\n\t\t\t0type=close,\r\n\t\t\t1\r\n\t\t);\r\n\t}\r\n}\r\n@keyframes pops-anim-roll-reverse {\r\n\t0% {\r\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 0deg);\r\n\t}\r\n\t100% {\r\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 90deg);\r\n\t}\r\n}\r\n@keyframes pops-anim-sandra-reverse {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: scale3d(1, 1, 1);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: scale3d(1.1, 1.1, 1);\r\n\t}\r\n}\r\n@keyframes pops-anim-gather-reverse {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: scale(5, 0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: scale(5, 0);\r\n\t}\r\n}\r\n\r\n@-webkit-keyframes pops-motion-fadeInTop {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateY(-30px);\r\n\t\ttransform: translateY(-30px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeInTop {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateY(-30px);\r\n\t\t-ms-transform: translateY(-30px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateX(0);\r\n\t\t-ms-transform: translateX(0);\r\n\t}\r\n}\r\n@-webkit-keyframes pops-motion-fadeOutTop {\r\n\t0% {\r\n\t\topacity: 10;\r\n\t\t-webkit-transform: translateY(0);\r\n\t\ttransform: translateY(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateY(-30px);\r\n\t\ttransform: translateY(-30px);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeOutTop {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\ttransform: translateY(0);\r\n\t\t-ms-transform: translateY(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\ttransform: translateY(-30px);\r\n\t\t-ms-transform: translateY(-30px);\r\n\t}\r\n}\r\n@-webkit-keyframes pops-motion-fadeInBottom {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateY(20px);\r\n\t\ttransform: translateY(20px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateY(0);\r\n\t\ttransform: translateY(0);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeInBottom {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateY(20px);\r\n\t\ttransform: translateY(20px);\r\n\t\t-ms-transform: translateY(20px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateY(0);\r\n\t\ttransform: translateY(0);\r\n\t\t-ms-transform: translateY(0);\r\n\t}\r\n}\r\n@-webkit-keyframes pops-motion-fadeOutBottom {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateY(0);\r\n\t\ttransform: translateY(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateY(20px);\r\n\t\ttransform: translateY(20px);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeOutBottom {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateY(0);\r\n\t\ttransform: translateY(0);\r\n\t\t-ms-transform: translateY(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateY(20px);\r\n\t\ttransform: translateY(20px);\r\n\t\t-ms-transform: translateY(20px);\r\n\t}\r\n}\r\n@-webkit-keyframes pops-motion-fadeInLeft {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(-20px);\r\n\t\ttransform: translateX(-20px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeInLeft {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(-30px);\r\n\t\ttransform: translateX(-30px);\r\n\t\t-ms-transform: translateX(-30px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t\t-ms-transform: translateX(0);\r\n\t}\r\n}\r\n@-webkit-keyframes pops-motion-fadeOutLeft {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(-30px);\r\n\t\ttransform: translateX(-30px);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeOutLeft {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t\t-ms-transform: translateX(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(-20px);\r\n\t\ttransform: translateX(-20px);\r\n\t\t-ms-transform: translateX(-20px);\r\n\t}\r\n}\r\n@-webkit-keyframes pops-motion-fadeInRight {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(20px);\r\n\t\ttransform: translateX(20px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeInRight {\r\n\t0% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(20px);\r\n\t\ttransform: translateX(20px);\r\n\t\t-ms-transform: translateX(20px);\r\n\t}\r\n\t100% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t\t-ms-transform: translateX(0);\r\n\t}\r\n}\r\n@-webkit-keyframes pops-motion-fadeOutRight {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(20px);\r\n\t\ttransform: translateX(20px);\r\n\t}\r\n}\r\n@keyframes pops-motion-fadeOutRight {\r\n\t0% {\r\n\t\topacity: 1;\r\n\t\t-webkit-transform: translateX(0);\r\n\t\ttransform: translateX(0);\r\n\t\t-ms-transform: translateX(0);\r\n\t}\r\n\t100% {\r\n\t\topacity: 0;\r\n\t\t-webkit-transform: translateX(20px);\r\n\t\ttransform: translateX(20px);\r\n\t\t-ms-transform: translateX(20px);\r\n\t}\r\n}\r\n\r\n/* 动画 */\r\n.pops-anim[anim=\"pops-anim-spread\"] {\r\n\tanimation: pops-anim-spread 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-shake\"] {\r\n\tanimation: pops-anim-shake 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-rolling-left\"] {\r\n\tanimation: pops-anim-rolling-left 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-rolling-right\"] {\r\n\tanimation: pops-anim-rolling-right 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-top\"] {\r\n\tanimation: pops-anim-slide-top 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-bottom\"] {\r\n\tanimation: pops-anim-slide-bottom 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-left\"] {\r\n\tanimation: pops-anim-slide-left 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-right\"] {\r\n\tanimation: pops-anim-slide-right 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-fadein\"] {\r\n\tanimation: pops-anim-fadein 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-fadein-zoom\"] {\r\n\tanimation: pops-anim-fadein-zoom 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-fadein-alert\"] {\r\n\tanimation: pops-anim-fadein-alert 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-don\"] {\r\n\tanimation: pops-anim-don 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-roll\"] {\r\n\tanimation: pops-anim-roll 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-sandra\"] {\r\n\tanimation: pops-anim-sandra 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-gather\"] {\r\n\tanimation: pops-anim-gather 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-spread-reverse\"] {\r\n\tanimation: pops-anim-spread-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-shake-reverse\"] {\r\n\tanimation: pops-anim-shake-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-rolling-left-reverse\"] {\r\n\tanimation: pops-anim-rolling-left-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-rolling-right-reverse\"] {\r\n\tanimation: pops-anim-rolling-right-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-top-reverse\"] {\r\n\tanimation: pops-anim-slide-top-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-bottom-reverse\"] {\r\n\tanimation: pops-anim-slide-bottom-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-left-reverse\"] {\r\n\tanimation: pops-anim-slide-left-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-slide-right-reverse\"] {\r\n\tanimation: pops-anim-slide-right-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-fadein-reverse\"] {\r\n\tanimation: pops-anim-fadein-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-fadein-zoom-reverse\"] {\r\n\tanimation: pops-anim-fadein-zoom-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-fadein-alert-reverse\"] {\r\n\tanimation: pops-anim-fadein-alert-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-don-reverse\"] {\r\n\tanimation: pops-anim-don-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-roll-reverse\"] {\r\n\tanimation: pops-anim-roll-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-sandra-reverse\"] {\r\n\tanimation: pops-anim-sandra-reverse 0.3s;\r\n}\r\n.pops-anim[anim=\"pops-anim-gather-reverse\"] {\r\n\tanimation: pops-anim-gather-reverse 0.3s;\r\n}\r\n";
3441
+
3442
+ var alertCSS = ".pops[type-value] .pops-alert-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n}\r\n.pops[type-value=\"alert\"] .pops-alert-title {\r\n\twidth: 100%;\r\n\theight: var(--container-title-height);\r\n\tborder-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));\r\n}\r\n.pops[type-value=\"alert\"] .pops-alert-title p[pops] {\r\n\twidth: 100%;\r\n\toverflow: hidden;\r\n\tcolor: rgb(51, 51, 51);\r\n\ttext-indent: 15px;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n\tfont-weight: 500;\r\n\tline-height: var(--container-title-height);\r\n}\r\n.pops[type-value=\"alert\"] .pops-alert-content p[pops] {\r\n\tpadding: 5px 10px;\r\n\tcolor: rgb(51, 51, 51);\r\n\ttext-indent: 15px;\r\n}\r\n.pops[type-value=\"alert\"] .pops-alert-content {\r\n\twidth: 100%;\r\n\theight: calc(\r\n\t\t100% - var(--container-title-height) - var(--container-bottom-btn-height)\r\n\t);\r\n\toverflow: auto;\r\n\tword-break: break-word;\r\n}\r\n.pops[type-value=\"alert\"] .pops-alert-btn {\r\n\tposition: absolute;\r\n\tbottom: 0;\r\n\tdisplay: flex;\r\n\tpadding: 10px 10px 10px 10px;\r\n\twidth: 100%;\r\n\theight: var(--container-bottom-btn-height);\r\n\tborder-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));\r\n\ttext-align: right;\r\n\tline-height: var(--container-bottom-btn-height);\r\n\talign-items: center;\r\n}\r\n";
3443
+
3444
+ var confirmCSS = ".pops[type-value] .pops-confirm-title {\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n\tjustify-content: space-between;\r\n}\r\n.pops[type-value=\"confirm\"] .pops-confirm-title {\r\n\twidth: 100%;\r\n\theight: var(--container-title-height);\r\n\tborder-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));\r\n}\r\n.pops[type-value=\"confirm\"] .pops-confirm-title p[pops] {\r\n\twidth: 100%;\r\n\toverflow: hidden;\r\n\tcolor: rgb(51, 51, 51);\r\n\ttext-indent: 15px;\r\n\ttext-overflow: ellipsis;\r\n\twhite-space: nowrap;\r\n\tfont-weight: 500;\r\n\tline-height: var(--container-title-height);\r\n}\r\n.pops[type-value=\"confirm\"] .pops-confirm-content p[pops] {\r\n\tpadding: 5px 10px;\r\n\tcolor: rgb(51, 51, 51);\r\n\ttext-indent: 15px;\r\n}\r\n.pops[type-value=\"confirm\"] .pops-confirm-content {\r\n\twidth: 100%;\r\n\theight: calc(\r\n\t\t100% - var(--container-title-height) - var(--container-bottom-btn-height)\r\n\t);\r\n\toverflow: auto;\r\n\tword-break: break-word;\r\n}\r\n.pops[type-value=\"confirm\"] .pops-confirm-btn {\r\n\tposition: absolute;\r\n\tbottom: 0;\r\n\tdisplay: flex;\r\n\tpadding: 10px 10px 10px 10px;\r\n\twidth: 100%;\r\n\theight: var(--container-bottom-btn-height);\r\n\tborder-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));\r\n\ttext-align: right;\r\n\tline-height: var(--container-bottom-btn-height);\r\n\talign-items: center;\r\n}\r\n";
3445
+
3446
+ var SVG_min = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\"></path>\r\n</svg>\r\n";
3447
+
3448
+ var SVG_mise = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M885.333333 85.333333H330.410667a53.333333 53.333333 0 0 0-53.333334 53.333334v106.666666H138.666667A53.333333 53.333333 0 0 0 85.333333 298.666667v586.666666a53.333333 53.333333 0 0 0 53.333334 53.333334H725.333333a53.333333 53.333333 0 0 0 53.333334-53.333334V746.154667h106.666666c29.44 0 53.333333-23.893333 53.333334-53.333334V138.666667A53.333333 53.333333 0 0 0 885.333333 85.333333zM725.333333 692.821333v192.512H138.666667V298.666667H725.333333v394.154666z m157.866667 0H778.666667V298.666667a53.333333 53.333333 0 0 0-53.333334-53.333334H330.410667v-106.666666h554.922666l-2.133333 554.154666z\"></path>\r\n</svg>\r\n";
3449
+
3450
+ var SVG_max = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64v.064zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64l-192 .192zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64v-.064z\"></path>\r\n</svg>\r\n";
3451
+
3452
+ var SVG_close = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z\"></path>\r\n</svg>\r\n";
3453
+
3454
+ var SVG_edit = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640V512z\"></path>\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z\"></path>\r\n</svg>\r\n";
3455
+
3456
+ var SVG_share = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"m679.872 348.8-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z\"></path>\r\n</svg>\r\n";
3457
+
3458
+ var SVG_delete = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z\"></path>\r\n</svg>\r\n";
3459
+
3460
+ var SVG_search = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704z\"></path>\r\n</svg>\r\n";
3461
+
3462
+ var SVG_upload = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z\"></path>\r\n</svg>\r\n";
3463
+
3464
+ var SVG_loading = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z\"></path>\r\n</svg>\r\n";
3465
+
3466
+ var SVG_next = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z\"></path>\r\n</svg>\r\n";
3467
+
3468
+ var SVG_prev = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z\"></path>\r\n</svg>\r\n";
3469
+
3470
+ var SVG_eleme = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M300.032 188.8c174.72-113.28 408-63.36 522.24 109.44 5.76 10.56 11.52 20.16 17.28 30.72v.96a22.4 22.4 0 0 1-7.68 26.88l-352.32 228.48c-9.6 6.72-22.08 3.84-28.8-5.76l-18.24-27.84a54.336 54.336 0 0 1 16.32-74.88l225.6-146.88c9.6-6.72 12.48-19.2 5.76-28.8-.96-1.92-1.92-3.84-3.84-4.8a267.84 267.84 0 0 0-315.84-17.28c-123.84 81.6-159.36 247.68-78.72 371.52a268.096 268.096 0 0 0 370.56 78.72 54.336 54.336 0 0 1 74.88 16.32l17.28 26.88c5.76 9.6 3.84 21.12-4.8 27.84-8.64 7.68-18.24 14.4-28.8 21.12a377.92 377.92 0 0 1-522.24-110.4c-113.28-174.72-63.36-408 111.36-522.24zm526.08 305.28a22.336 22.336 0 0 1 28.8 5.76l23.04 35.52a63.232 63.232 0 0 1-18.24 87.36l-35.52 23.04c-9.6 6.72-22.08 3.84-28.8-5.76l-46.08-71.04c-6.72-9.6-3.84-22.08 5.76-28.8l71.04-46.08z\"></path>\r\n</svg>\r\n";
3471
+
3472
+ var SVG_elemePlus = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\td=\"M839.7 734.7c0 33.3-17.9 41-17.9 41S519.7 949.8 499.2 960c-10.2 5.1-20.5 5.1-30.7 0 0 0-314.9-184.3-325.1-192-5.1-5.1-10.2-12.8-12.8-20.5V368.6c0-17.9 20.5-28.2 20.5-28.2L466 158.6c12.8-5.1 25.6-5.1 38.4 0 0 0 279 161.3 309.8 179.2 17.9 7.7 28.2 25.6 25.6 46.1-.1-5-.1 317.5-.1 350.8zM714.2 371.2c-64-35.8-217.6-125.4-217.6-125.4-7.7-5.1-20.5-5.1-30.7 0L217.6 389.1s-17.9 10.2-17.9 23v297c0 5.1 5.1 12.8 7.7 17.9 7.7 5.1 256 148.5 256 148.5 7.7 5.1 17.9 5.1 25.6 0 15.4-7.7 250.9-145.9 250.9-145.9s12.8-5.1 12.8-30.7v-74.2l-276.5 169v-64c0-17.9 7.7-30.7 20.5-46.1L745 535c5.1-7.7 10.2-20.5 10.2-30.7v-66.6l-279 169v-69.1c0-15.4 5.1-30.7 17.9-38.4l220.1-128zM919 135.7c0-5.1-5.1-7.7-7.7-7.7h-58.9V66.6c0-5.1-5.1-5.1-10.2-5.1l-30.7 5.1c-5.1 0-5.1 2.6-5.1 5.1V128h-56.3c-5.1 0-5.1 5.1-7.7 5.1v38.4h69.1v64c0 5.1 5.1 5.1 10.2 5.1l30.7-5.1c5.1 0 5.1-2.6 5.1-5.1v-56.3h64l-2.5-38.4z\"\r\n\t\tfill=\"currentColor\"></path>\r\n</svg>\r\n";
3473
+
3474
+ var SVG_chromeFilled = "<svg\r\n\txmlns=\"http://www.w3.org/2000/svg\"\r\n\tviewBox=\"0 0 1024 1024\"\r\n\txml:space=\"preserve\">\r\n\t<path\r\n\t\td=\"M938.67 512.01c0-44.59-6.82-87.6-19.54-128H682.67a212.372 212.372 0 0 1 42.67 128c.06 38.71-10.45 76.7-30.42 109.87l-182.91 316.8c235.65-.01 426.66-191.02 426.66-426.67z\"\r\n\t\tfill=\"currentColor\"></path>\r\n\t<path\r\n\t\td=\"M576.79 401.63a127.92 127.92 0 0 0-63.56-17.6c-22.36-.22-44.39 5.43-63.89 16.38s-35.79 26.82-47.25 46.02a128.005 128.005 0 0 0-2.16 127.44l1.24 2.13a127.906 127.906 0 0 0 46.36 46.61 127.907 127.907 0 0 0 63.38 17.44c22.29.2 44.24-5.43 63.68-16.33a127.94 127.94 0 0 0 47.16-45.79v-.01l1.11-1.92a127.984 127.984 0 0 0 .29-127.46 127.957 127.957 0 0 0-46.36-46.91z\"\r\n\t\tfill=\"currentColor\"></path>\r\n\t<path\r\n\t\td=\"M394.45 333.96A213.336 213.336 0 0 1 512 298.67h369.58A426.503 426.503 0 0 0 512 85.34a425.598 425.598 0 0 0-171.74 35.98 425.644 425.644 0 0 0-142.62 102.22l118.14 204.63a213.397 213.397 0 0 1 78.67-94.21zM512.01 938.68H512zM414.76 701.95a213.284 213.284 0 0 1-89.54-86.81L142.48 298.6c-36.35 62.81-57.13 135.68-57.13 213.42 0 203.81 142.93 374.22 333.95 416.55h.04l118.19-204.71a213.315 213.315 0 0 1-122.77-21.91z\"\r\n\t\tfill=\"currentColor\"></path>\r\n</svg>\r\n";
3475
+
3476
+ var SVG_cpu = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64H320zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128z\"></path>\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32zm160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32zm-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32zm160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32zm160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32zm-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32zM64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32zm0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32zm0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32zm896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32zm0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32zm0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32z\"></path>\r\n</svg>\r\n";
3477
+
3478
+ var SVG_videoPlay = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768zm-48-247.616L668.608 512 464 375.616v272.768zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z\"></path>\r\n</svg>\r\n";
3479
+
3480
+ var SVG_videoPause = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768zm-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32zm192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32z\"></path>\r\n</svg>\r\n";
3481
+
3482
+ var SVG_headset = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M896 529.152V512a384 384 0 1 0-768 0v17.152A128 128 0 0 1 320 640v128a128 128 0 1 1-256 0V512a448 448 0 1 1 896 0v256a128 128 0 1 1-256 0V640a128 128 0 0 1 192-110.848zM896 640a64 64 0 0 0-128 0v128a64 64 0 0 0 128 0V640zm-768 0v128a64 64 0 0 0 128 0V640a64 64 0 1 0-128 0z\"></path>\r\n</svg>\r\n";
3483
+
3484
+ var SVG_monitor = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M544 768v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768H192A128 128 0 0 1 64 640V256a128 128 0 0 1 128-128h640a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H544zM192 192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H192z\"></path>\r\n</svg>\r\n";
3485
+
3486
+ var SVG_documentCopy = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M128 320v576h576V320H128zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32zM960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32zM256 672h320v64H256v-64zm0-192h320v64H256v-64z\"></path>\r\n</svg>\r\n";
3487
+
3488
+ var SVG_picture = "<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M160 160v704h704V160H160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32z\"></path>\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64zM185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952L185.408 876.992z\"></path>\r\n</svg>\r\n";
3489
+
3490
+ var SVG_circleClose = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z\"></path>\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896\"></path>\r\n</svg>\r\n";
3491
+
3492
+ var SVG_view = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160\"></path>\r\n</svg>\r\n";
3493
+
3494
+ var SVG_hide = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z\"></path>\r\n\t<path\r\n\t\tfill=\"currentColor\"\r\n\t\td=\"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z\"></path>\r\n</svg>\r\n";
3495
+
3496
+ var SVG_keyboard = "<svg viewBox=\"0 0 1123 1024\" xmlns=\"http://www.w3.org/2000/svg\">\r\n\t<path\r\n\t\td=\"M1014.122186 1024H109.753483A109.753483 109.753483 0 0 1 0 914.246517V392.917471a109.753483 109.753483 0 0 1 109.753483-109.753484h904.368703a109.753483 109.753483 0 0 1 109.753484 109.753484v521.329046a109.753483 109.753483 0 0 1-109.753484 109.753483zM109.753483 370.966774a21.950697 21.950697 0 0 0-21.950696 21.950697v521.329046a21.950697 21.950697 0 0 0 21.950696 21.950696h904.368703a21.950697 21.950697 0 0 0 21.950697-21.950696V392.917471a21.950697 21.950697 0 0 0-21.950697-21.950697z\"></path>\r\n\t<path\r\n\t\td=\"M687.056806 891.198285H307.309753a43.901393 43.901393 0 0 1 0-87.802787h379.747053a43.901393 43.901393 0 0 1 0 87.802787zM175.605573 803.395498a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394zM432.428725 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM561.937835 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM690.349411 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM818.760986 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM947.172562 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM175.605573 546.572347a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394zM304.017149 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM432.428725 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM561.937835 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM690.349411 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM818.760986 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM818.760986 803.395498a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM175.605573 678.276527a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394zM304.017149 678.276527a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM432.428725 678.276527a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM561.937835 678.276527a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM948.270096 803.395498a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394z\"></path>\r\n\t<path\r\n\t\td=\"M881.320472 766.079314H689.251876a43.901393 43.901393 0 0 1 0-87.802787h192.068596a21.950697 21.950697 0 0 0 21.950696-21.950696v-65.85209a43.901393 43.901393 0 0 1 87.802787 0v65.85209a109.753483 109.753483 0 0 1-109.753483 109.753483zM305.114684 502.670954H175.605573a43.901393 43.901393 0 0 1 0-87.802787h129.509111a43.901393 43.901393 0 0 1 0 87.802787zM563.03537 365.4791a43.901393 43.901393 0 0 1-43.901394-43.901394v-105.363344A109.753483 109.753483 0 0 1 628.88746 106.460879h61.461951a21.950697 21.950697 0 0 0 21.950696-21.950697V43.901393a43.901393 43.901393 0 0 1 87.802787 0v40.608789a109.753483 109.753483 0 0 1-109.753483 109.753484h-61.461951a21.950697 21.950697 0 0 0-21.950697 21.950696v105.363344a43.901393 43.901393 0 0 1-43.901393 43.901394z\"></path>\r\n</svg>\r\n";
3497
+
3498
+ var SVG_arrowRight = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n\t<path\r\n\t\td=\"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z\"></path>\r\n</svg>\r\n";
3499
+
3500
+ var SVG_arrowLeft = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n\t<path\r\n\t\td=\"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z\"></path>\r\n</svg>\r\n";
3501
+
3502
+ const PopsElementHandler = {
3503
+ /**
3504
+ * 获取遮罩层HTML
3505
+ * @param guid
3506
+ * @param zIndex z-index
3507
+ * @param style
3508
+ */
3509
+ getMaskHTML(guid, zIndex = 101, style = "") {
3510
+ zIndex = zIndex - 100;
3511
+ return `<div class="pops-mask" data-guid="${guid}" style="z-index:${zIndex};${style}"></div>`;
3512
+ },
3513
+ /**
3514
+ * 获取动画层HTML
3515
+ * @param guid
3516
+ * @param type
3517
+ * @param config
3518
+ * @param html
3519
+ * @param bottomBtnHTML
3520
+ */
3521
+ getAnimHTML(guid, type, config, html = "", bottomBtnHTML = "") {
3522
+ let __config = config;
3523
+ let popsAnimStyle = "";
3524
+ let popsStyle = "";
3525
+ let popsPosition = __config.position || "";
3526
+ if (config.zIndex != null) {
3527
+ popsAnimStyle += `z-index: ${config.zIndex};`;
3528
+ popsStyle += `z-index: ${config.zIndex};`;
3529
+ }
3530
+ if (__config.width != null) {
3531
+ popsStyle += `width: ${__config.width};`;
3532
+ }
3533
+ if (__config.height != null) {
3534
+ popsStyle += `height: ${__config.height};`;
3535
+ }
3536
+ let hasBottomBtn = bottomBtnHTML.trim() === "" ? false : true;
3537
+ return `<div
3538
+ class="pops-anim"
3539
+ anim="${__config.animation || ""}"
3540
+ style="${popsAnimStyle};"
3541
+ data-guid="${guid}">
3542
+ ${config.style != null
3543
+ ? `<style tyle="text/css">${config.style}</style>`
3544
+ : ""}
3545
+ <div
3546
+ class="pops ${config.class || ""}"
3547
+ data-bottom-btn="${hasBottomBtn}"
3548
+ type-value="${type}"
3549
+ style="${popsStyle}"
3550
+ position="${popsPosition}"
3551
+ data-guid="${guid}">
3552
+ ${html}
3553
+ </div>
3554
+ </div>`;
3555
+ },
3556
+ /**
3557
+ * 获取顶部按钮层HTML
3558
+ * @param type
3559
+ * @param config
3560
+ */
3561
+ getHeaderBtnHTML(type, config) {
3562
+ if (!config.btn) {
3563
+ return "";
3564
+ }
3565
+ if (type !== "iframe" && !config.btn?.close?.enable) {
3566
+ return "";
3567
+ }
3568
+ let resultHTML = "";
3569
+ // let btnStyle = "";
3570
+ let closeHTML = "";
3571
+ let __config_iframe = config;
3572
+ if (type === "iframe" && __config_iframe.topRightButton?.trim() !== "") {
3573
+ /* iframe的 */
3574
+ let topRightButtonHTML = "";
3575
+ __config_iframe.topRightButton.split("|").forEach((item) => {
3576
+ item = item.toLowerCase();
3577
+ topRightButtonHTML += `
3578
+ <button class="pops-header-control" type="${item}">
3579
+ <i class="pops-icon">${pops.config.iconSVG[item]}</i>
3580
+ </button>`;
3581
+ });
3582
+ resultHTML = `
3583
+ <div class="pops-header-controls" data-margin>
3584
+ ${topRightButtonHTML}
3585
+ </div>`;
3586
+ }
3587
+ else {
3588
+ if (config.btn?.close?.enable) {
3589
+ closeHTML = `
3590
+ <div class="pops-header-controls">
3591
+ <button class="pops-header-control" type="close" data-header>
3592
+ <i class="pops-icon">${pops.config.iconSVG["close"]}</i>
3593
+ </button>
3594
+ </div>`;
3595
+ }
3596
+ resultHTML = closeHTML;
3597
+ }
3598
+ return resultHTML;
3599
+ },
3600
+ /**
3601
+ * 获取底部按钮层HTML
3602
+ * @param type
3603
+ * @param config
3604
+ */
3605
+ getBottomBtnHTML(type, config) {
3606
+ if (!config.btn) {
3607
+ // 未设置btn参数
3608
+ return "";
3609
+ }
3610
+ let __config_confirm = config;
3611
+ if (!(config.btn?.ok?.enable ||
3612
+ __config_confirm.btn?.cancel?.enable ||
3613
+ __config_confirm.btn?.other?.enable)) {
3614
+ // 确定、取消、其它按钮都未启用直接返回
3615
+ return "";
3616
+ }
3617
+ let btnStyle = "";
3618
+ let resultHTML = "";
3619
+ let okHTML = "";
3620
+ let cancelHTML = "";
3621
+ let ohterHTML = "";
3622
+ if (config.btn.position) {
3623
+ btnStyle += `justify-content: ${config.btn.position};`;
3624
+ }
3625
+ if (__config_confirm.btn.reverse) {
3626
+ btnStyle += "flex-direction: row-reverse;";
3627
+ }
3628
+ if (config.btn?.ok?.enable) {
3629
+ /* 处理确定按钮的尺寸问题 */
3630
+ let okButtonSizeClassName = "";
3631
+ if (config.btn.ok.size === "large") {
3632
+ okButtonSizeClassName = "pops-button-" + config.btn.ok.size;
3633
+ }
3634
+ else if (config.btn.ok.size === "small") {
3635
+ okButtonSizeClassName = "pops-button-" + config.btn.ok.size;
3636
+ }
3637
+ let okIconHTML = "";
3638
+ let okIcon = __config_confirm.btn.ok.icon;
3639
+ if (okIcon !== "") {
3640
+ // 判断图标是否是svg库内的
3641
+ let iconHTML = "";
3642
+ if (okIcon in pops.config.iconSVG) {
3643
+ iconHTML = pops.config.iconSVG[okIcon];
3644
+ }
3645
+ else {
3646
+ iconHTML = okIcon;
3647
+ }
3648
+ iconHTML = iconHTML || "";
3649
+ okIconHTML = `
3650
+ <i class="pops-bottom-icon" is-loading="${config.btn.ok.iconIsLoading}">
3651
+ ${iconHTML}
3652
+ </i>`;
3653
+ }
3654
+ okHTML = `
3655
+ <button
3656
+ class="pops-${type}-btn-ok ${okButtonSizeClassName}"
3657
+ type="${__config_confirm.btn.ok?.type}"
3658
+ data-has-icon="${(__config_confirm.btn.ok.icon || "") !== ""}"
3659
+ data-rightIcon="${__config_confirm.btn.ok?.rightIcon}"
3660
+ >
3661
+ ${okIconHTML}
3662
+ <span>${config.btn.ok.text}</span>
3663
+ </button>`;
3664
+ }
3665
+ if (__config_confirm.btn?.cancel?.enable) {
3666
+ /* 处理取消按钮的尺寸问题 */
3667
+ let cancelButtonSizeClassName = "";
3668
+ if (__config_confirm.btn.cancel.size === "large") {
3669
+ cancelButtonSizeClassName =
3670
+ "pops-button-" + __config_confirm.btn.cancel.size;
3671
+ }
3672
+ else if (__config_confirm.btn.cancel.size === "small") {
3673
+ cancelButtonSizeClassName =
3674
+ "pops-button-" + __config_confirm.btn.cancel.size;
3675
+ }
3676
+ let cancelIconHTML = "";
3677
+ let cancelIcon = __config_confirm.btn.cancel.icon;
3678
+ if (cancelIcon !== "") {
3679
+ let iconHTML = "";
3680
+ // 判断图标是否是svg库内的
3681
+ if (cancelIcon in pops.config.iconSVG) {
3682
+ iconHTML = pops.config.iconSVG[cancelIcon];
3683
+ }
3684
+ else {
3685
+ iconHTML = cancelIcon;
3686
+ }
3687
+ iconHTML = iconHTML || "";
3688
+ cancelIconHTML = `
3689
+ <i class="pops-bottom-icon" is-loading="${__config_confirm.btn.cancel.iconIsLoading}">
3690
+ ${iconHTML}
3691
+ </i>`;
3692
+ }
3693
+ cancelHTML = `
3694
+ <button
3695
+ class="pops-${type}-btn-cancel ${cancelButtonSizeClassName}"
3696
+ type="${__config_confirm.btn.cancel.type}"
3697
+ data-has-icon="${(__config_confirm.btn.cancel.icon || "") !== ""}"
3698
+ data-rightIcon="${__config_confirm.btn.cancel.rightIcon}"
3699
+ >
3700
+ ${cancelIconHTML}
3701
+ <span>${__config_confirm.btn.cancel.text}</span>
3702
+ </button>`;
3703
+ }
3704
+ if (__config_confirm.btn?.other?.enable) {
3705
+ /* 处理其它按钮的尺寸问题 */
3706
+ let otherButtonSizeClassName = "";
3707
+ if (__config_confirm.btn.other.size === "large") {
3708
+ otherButtonSizeClassName =
3709
+ "pops-button-" + __config_confirm.btn.other.size;
3710
+ }
3711
+ else if (__config_confirm.btn.other.size === "small") {
3712
+ otherButtonSizeClassName =
3713
+ "pops-button-" + __config_confirm.btn.other.size;
3714
+ }
3715
+ let otherIconHTML = "";
3716
+ let otherIcon = __config_confirm.btn.other.icon;
3717
+ if (otherIcon !== "") {
3718
+ let iconHTML = "";
3719
+ // 判断图标是否是svg库内的
3720
+ if (otherIcon in pops.config.iconSVG) {
3721
+ iconHTML = pops.config.iconSVG[otherIcon];
3722
+ }
3723
+ iconHTML = iconHTML || "";
3724
+ otherIconHTML = `
3725
+ <i class="pops-bottom-icon" is-loading="${__config_confirm.btn.other.iconIsLoading}">
3726
+ ${iconHTML}
3727
+ </i>`;
3728
+ }
3729
+ ohterHTML = `
3730
+ <button
3731
+ class="pops-${type}-btn-other ${otherButtonSizeClassName}"
3732
+ type="${__config_confirm.btn.other.type}"
3733
+ data-has-icon="${(__config_confirm.btn.other.icon || "") !== ""}"
3734
+ data-rightIcon="${__config_confirm.btn.other.rightIcon}"
3735
+ >
3736
+ ${otherIconHTML}
3737
+ <span>${__config_confirm.btn.other.text}</span>
3738
+ </button>`;
3739
+ }
3740
+ if (__config_confirm.btn.merge) {
3741
+ let flexStyle = "display: flex;";
3742
+ if (__config_confirm.btn.mergeReverse) {
3743
+ flexStyle += "flex-direction: row-reverse;";
3744
+ }
3745
+ else {
3746
+ flexStyle += "flex-direction: row;";
3747
+ }
3748
+ resultHTML = `
3749
+ <div class="pops-${type}-btn" style="${btnStyle}">
3750
+ ${ohterHTML}
3751
+ <div
3752
+ class="pops-${type}-btn-merge"
3753
+ style="${flexStyle}">
3754
+ ${okHTML}
3755
+ ${cancelHTML}
3756
+ </div>
3757
+ </div>
3758
+ `;
3759
+ }
3760
+ else {
3761
+ resultHTML = `
3762
+ <div class="pops-${type}-btn" style="${btnStyle}">
3763
+ ${okHTML}
3764
+ ${cancelHTML}
3765
+ ${ohterHTML}
3766
+ </div>
3767
+ `;
3768
+ }
3769
+ return resultHTML;
3770
+ },
3771
+ /**
3772
+ * 获取标题style
3773
+ * @param type
3774
+ * @param config
3775
+ */
3776
+ getHeaderStyle(type, config) {
3777
+ return {
3778
+ headerStyle: config?.title?.html ? config?.title?.style || "" : "",
3779
+ headerPStyle: config?.title?.html ? "" : config?.title?.style || "",
3780
+ };
3781
+ },
3782
+ /**
3783
+ * 获取内容style
3784
+ * @param type
3785
+ * @param config
3786
+ */
3787
+ getContentStyle(type, config) {
3788
+ return {
3789
+ contentStyle: config?.content?.html
3790
+ ? config?.content?.style || ""
3791
+ : "",
3792
+ contentPStyle: config?.content?.html
3793
+ ? ""
3794
+ : config?.content?.style || "",
3795
+ };
3796
+ },
3797
+ /**
3798
+ * 将html转换成元素
3799
+ * @param html
3800
+ */
3801
+ parseElement(html) {
3802
+ return popsUtils.parseTextToDOM(html);
3803
+ },
3804
+ };
3805
+
3806
+ const PopsHandler = {
3807
+ /**
3808
+ * 创建shadow
3809
+ */
3810
+ handlerShadow() {
3811
+ let $shadowContainer = document.createElement("div");
3812
+ $shadowContainer.className = "pops-shadow-container";
3813
+ let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
3814
+ return {
3815
+ $shadowContainer,
3816
+ $shadowRoot,
3817
+ };
3818
+ },
3819
+ /**
3820
+ * 处理初始化
3821
+ * @param $shadowRoot 所在的shadowRoot
3822
+ * @param cssText 添加进ShadowRoot的CSS
3823
+ */
3824
+ handleInit($shadowRoot, cssText) {
3825
+ pops.init();
3826
+ if (!arguments.length) {
3827
+ return;
3828
+ }
3829
+ if (Array.isArray(cssText)) {
3830
+ for (let index = 0; index < cssText.length; index++) {
3831
+ this.handleInit($shadowRoot, cssText[index]);
3832
+ }
3833
+ }
3834
+ else {
3835
+ let $css = popsDOMUtils.createElement("style", {
3836
+ innerHTML: cssText,
3837
+ }, {
3838
+ "data-type": "PopsHandler.handleInit",
3839
+ });
3840
+ $shadowRoot.appendChild($css);
3841
+ }
3842
+ },
3843
+ /**
3844
+ * 处理遮罩层
3845
+ * @param details 传递的配置
3846
+ */
3847
+ handleMask(details = {}) {
3848
+ let result = {
3849
+ maskElement: popsUtils.parseTextToDOM(details.maskHTML),
3850
+ };
3851
+ let isMaskClick = false;
3852
+ /**
3853
+ * 点击其它区域的事件
3854
+ * @param event
3855
+ */
3856
+ function clickEvent(event) {
3857
+ popsDOMUtils.preventEvent(event);
3858
+ // 获取该类型实例存储列表
3859
+ let targetLayer = pops.config.layer[details.type];
3860
+ function originalRun() {
3861
+ if (details.config.mask.clickEvent.toClose) {
3862
+ /* 关闭 */
3863
+ PopsUIUtils.close(details.type, targetLayer, details.guid, details.config, details.animElement);
3864
+ }
3865
+ else if (details.config.mask.clickEvent.toHide) {
3866
+ /* 隐藏 */
3867
+ PopsUIUtils.hide(details.type, targetLayer, details.guid, details.config, details.animElement, result.maskElement);
3868
+ }
3869
+ }
3870
+ if (typeof details.config.mask.clickCallBack === "function") {
3871
+ details.config.mask.clickCallBack(originalRun, details.config);
3872
+ }
3873
+ else {
3874
+ originalRun();
3875
+ }
3876
+ return false;
3877
+ }
3878
+ function isAnimElement(element) {
3879
+ return Boolean(element?.localName?.toLowerCase() === "div" &&
3880
+ element.className &&
3881
+ element.className === "pops-anim" &&
3882
+ element.hasAttribute("anim"));
3883
+ }
3884
+ if (details.config.mask.clickEvent.toClose ||
3885
+ details.config.mask.clickEvent.toHide) {
3886
+ /* 判断按下的元素是否是pops-anim */
3887
+ popsDOMUtils.on(details.animElement, ["touchstart", "mousedown"], void 0, (event) => {
3888
+ isMaskClick = isAnimElement(event.composedPath()[0]);
3889
+ });
3890
+ /* 如果有动画层,在动画层上监听点击事件 */
3891
+ popsDOMUtils.on(details.animElement, "click", void 0, (event) => {
3892
+ if (isAnimElement(event.composedPath()[0]) &&
3893
+ isMaskClick) {
3894
+ return clickEvent(event);
3895
+ }
3896
+ });
3897
+ /* 在遮罩层监听点击事件 */
3898
+ /* 如果有动画层,那么该点击事件触发不了 */
3899
+ popsDOMUtils.on(result.maskElement, "click", void 0, (event) => {
3900
+ isMaskClick = true;
3901
+ clickEvent(event);
3902
+ });
3903
+ }
3904
+ return result;
3905
+ },
3906
+ /**
3907
+ * 处理获取元素
3908
+ * @param {HTMLDivElement} animElement
3909
+ * @param type
3910
+ */
3911
+ handleQueryElement(animElement, type) {
3912
+ return {
3913
+ /**
3914
+ * 主元素
3915
+ */
3916
+ popsElement: animElement.querySelector(".pops[type-value"),
3917
+ /**
3918
+ * 确认按钮
3919
+ */
3920
+ btnOkElement: animElement.querySelector(`.pops-${type}-btn-ok`),
3921
+ /**
3922
+ * 取消按钮
3923
+ */
3924
+ btnCancelElement: animElement.querySelector(`.pops-${type}-btn-cancel`),
3925
+ /**
3926
+ * 其它按钮
3927
+ */
3928
+ btnOtherElement: animElement.querySelector(`.pops-${type}-btn-other`),
3929
+ /**
3930
+ * 标题元素
3931
+ */
3932
+ titleElement: animElement.querySelector(`.pops-${type}-title`),
3933
+ /**
3934
+ * 输入框元素
3935
+ */
3936
+ inputElement: animElement.querySelector(`.pops-${type}-content textarea[pops]`)
3937
+ ? animElement.querySelector(`.pops-${type}-content textarea[pops]`)
3938
+ : animElement.querySelector(`.pops-${type}-content input[pops]`),
3939
+ /**
3940
+ * 顶部按钮控制层元素
3941
+ */
3942
+ headerControlsElement: animElement.querySelector(".pops-header-controls"),
3943
+ /**
3944
+ * iframe元素
3945
+ */
3946
+ iframeElement: animElement.querySelector("iframe[pops]"),
3947
+ /**
3948
+ * 加载中元素
3949
+ */
3950
+ loadingElement: animElement.querySelector(".pops-loading"),
3951
+ /**
3952
+ * 内容元素
3953
+ */
3954
+ contentElement: animElement.querySelector(`.pops-${type}-content`),
3955
+ /**
3956
+ * 内容侧边栏容器元素
3957
+ */
3958
+ contentAsideElement: animElement.querySelector(`.pops-${type}-content aside.pops-${type}-aside`),
3959
+ /**
3960
+ * 内容主要区域容器元素
3961
+ */
3962
+ contentSectionContainerElement: animElement.querySelector(`.pops-${type}-content section.pops-${type}-container`),
3963
+ /**
3964
+ * 内容加载中元素
3965
+ */
3966
+ contentLoadingElement: animElement.querySelector(`.pops-${type}-content-global-loading`),
3967
+ /**
3968
+ * 顶部缩小按钮
3969
+ */
3970
+ headerMinBtnElement: animElement.querySelector(".pops-header-control[type='min']"),
3971
+ /**
3972
+ * 顶部放大按钮
3973
+ */
3974
+ headerMaxBtnElement: animElement.querySelector(".pops-header-control[type='max']"),
3975
+ /**
3976
+ * 顶部恢复原样按钮
3977
+ */
3978
+ headerMiseBtnElement: animElement.querySelector(".pops-header-control[type='mise']"),
3979
+ /**
3980
+ * 顶部关闭按钮
3981
+ */
3982
+ headerCloseBtnElement: animElement.querySelector(".pops-header-control[type='close']"),
3983
+ /**
3984
+ * 文件夹列表元素
3985
+ */
3986
+ folderListElement: animElement.querySelector(".pops-folder-list"),
3987
+ /**
3988
+ * 文件夹列表顶部元素
3989
+ */
3990
+ folderListHeaderElement: animElement.querySelector(".pops-folder-list .pops-folder-list-table__header-div"),
3991
+ /**
3992
+ * 文件夹列表行元素
3993
+ */
3994
+ folderListHeaderRowElement: animElement.querySelector(".pops-folder-list .pops-folder-list-table__header-div .pops-folder-list-table__header-row"),
3995
+ /**
3996
+ * 文件夹列表tbody元素
3997
+ */
3998
+ folderListBodyElement: animElement.querySelector(".pops-folder-list .pops-folder-list-table__body-div tbody"),
3999
+ /**
4000
+ * 文件夹列表primary元素
4001
+ */
4002
+ folderFileListBreadcrumbPrimaryElement: animElement.querySelector(".pops-folder-list .pops-folder-file-list-breadcrumb-primary"),
4003
+ /**
4004
+ * 文件夹排序按钮-文件名
4005
+ */
4006
+ folderListSortFileNameElement: animElement.querySelector('.pops-folder-list-table__sort[data-sort="fileName"]'),
4007
+ /**
4008
+ * 文件夹排序按钮-修改时间
4009
+ */
4010
+ folderListSortLatestTimeElement: animElement.querySelector('.pops-folder-list-table__sort[data-sort="latestTime"]'),
4011
+ /**
4012
+ * 文件夹排序按钮-文件大小
4013
+ */
4014
+ folderListSortFileSizeElement: animElement.querySelector('.pops-folder-list-table__sort[data-sort="fileSize"]'),
4015
+ };
4016
+ },
4017
+ /**
4018
+ * 获取事件配置
4019
+ * @param guid
4020
+ * @param $shadowContainer
4021
+ * @param $shadowRoot
4022
+ * @param mode 当前弹窗类型
4023
+ * @param animElement 动画层
4024
+ * @param popsElement 主元素
4025
+ * @param maskElement 遮罩层
4026
+ * @param config 当前配置
4027
+ */
4028
+ handleEventDetails(guid, $shadowContainer, $shadowRoot, mode, animElement, popsElement, maskElement, config) {
4029
+ return {
4030
+ $shadowContainer: $shadowContainer,
4031
+ $shadowRoot: $shadowRoot,
4032
+ element: animElement,
4033
+ animElement: animElement,
4034
+ popsElement: popsElement,
4035
+ maskElement: maskElement,
4036
+ mode: mode,
4037
+ guid: guid,
4038
+ close() {
4039
+ PopsUIUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
4040
+ },
4041
+ hide() {
4042
+ PopsUIUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
4043
+ },
4044
+ show() {
4045
+ PopsUIUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
4046
+ },
4047
+ };
4048
+ },
4049
+ /**
4050
+ * 处理返回的配置,针对popsHandler.handleEventDetails
4051
+ */
4052
+ handleResultDetails(details) {
4053
+ let resultDetails = Object.assign({}, details);
4054
+ popsUtils.delete(resultDetails, "type");
4055
+ popsUtils.delete(resultDetails, "function");
4056
+ return resultDetails;
4057
+ },
4058
+ /**
4059
+ * 处理点击事件
4060
+ * @param type 当前按钮类型
4061
+ * @param $btn 按钮元素
4062
+ * @param eventDetails 事件配置,由popsHandler.handleEventDetails创建的
4063
+ * @param callback 点击回调
4064
+ */
4065
+ handleClickEvent(type, $btn, eventDetails, callback) {
4066
+ popsDOMUtils.on($btn, "click", (event) => {
4067
+ let extraParam = {
4068
+ type: type,
4069
+ };
4070
+ callback(Object.assign(eventDetails, extraParam), event);
4071
+ }, {
4072
+ capture: true,
4073
+ });
4074
+ },
4075
+ /**
4076
+ * 全局监听键盘事件
4077
+ * @param keyName 键名|键值
4078
+ * @param otherKeyList 组合按键,数组类型,包含ctrl、shift、alt和meta(win键或mac的cmd键)
4079
+ * @param callback 回调函数
4080
+ */
4081
+ handleKeyboardEvent(keyName, otherKeyList = [], callback) {
4082
+ let keyboardEvent = function (event) {
4083
+ let _keyName = event.code || event.key;
4084
+ let _keyValue = event.charCode || event.keyCode || event.which;
4085
+ if (otherKeyList.includes("ctrl") && !event.ctrlKey) {
4086
+ return;
4087
+ }
4088
+ if (otherKeyList.includes("alt") && !event.altKey) {
4089
+ return;
4090
+ }
4091
+ if (otherKeyList.includes("meta") && !event.metaKey) {
4092
+ return;
4093
+ }
4094
+ if (otherKeyList.includes("shift") && !event.shiftKey) {
4095
+ return;
4096
+ }
4097
+ if (typeof keyName === "string" && keyName === _keyName) {
4098
+ callback && callback(event);
4099
+ }
4100
+ else if (typeof keyName === "number" && keyName === _keyValue) {
4101
+ callback && callback(event);
4102
+ }
4103
+ };
4104
+ popsDOMUtils.on(PopsCore.globalThis, "keydown", keyboardEvent, {
4105
+ capture: true,
4106
+ });
4107
+ return {
4108
+ removeKeyboardEvent() {
4109
+ popsDOMUtils.off(globalThis, "keydown", keyboardEvent, {
4110
+ capture: true,
4111
+ });
4112
+ },
4113
+ };
4114
+ },
4115
+ /**
4116
+ * 处理prompt的点击事件
4117
+ * @param inputElement 输入框
4118
+ * @param $btn 按钮元素
4119
+ * @param type 触发事件类型
4120
+ * @param event 事件配置,由popsHandler.handleEventDetails创建的
4121
+ * @param callback 点击回调
4122
+ */
4123
+ handlePromptClickEvent(inputElement, $btn, type, event, callback) {
4124
+ popsDOMUtils.on($btn, "click", () => {
4125
+ // 额外参数
4126
+ let extraParam = {
4127
+ type: type,
4128
+ text: inputElement.value,
4129
+ };
4130
+ callback(Object.assign(event, extraParam));
4131
+ }, {
4132
+ capture: true,
4133
+ });
4134
+ },
4135
+ /**
4136
+ * 处理config.only
4137
+ * @param type 当前弹窗类型
4138
+ * @param config 配置
4139
+ */
4140
+ handleOnly(type, config) {
4141
+ if (config.only) {
4142
+ if (type === "loading" ||
4143
+ type === "tooltip" ||
4144
+ type === "rightClickMenu") {
4145
+ PopsUIUtils.configRemove([pops.config.layer[type]], "", true);
4146
+ }
4147
+ else {
4148
+ PopsUIUtils.configRemove([
4149
+ pops.config.layer.alert,
4150
+ pops.config.layer.confirm,
4151
+ pops.config.layer.prompt,
4152
+ pops.config.layer.iframe,
4153
+ pops.config.layer.drawer,
4154
+ pops.config.layer.folder,
4155
+ pops.config.layer.panel,
4156
+ ], "", true);
4157
+ }
4158
+ }
4159
+ else {
4160
+ config.zIndex =
4161
+ PopsUIUtils.getPopsMaxZIndex(config.zIndex)["zIndex"] * 2;
4162
+ }
4163
+ return config;
4164
+ },
4165
+ /**
4166
+ * 处理把已创建的元素保存到内部环境中
4167
+ * @param type 当前弹窗类型
4168
+ * @param value
4169
+ */
4170
+ handlePush(type, value) {
4171
+ pops.config.layer[type].push(value);
4172
+ },
4173
+ };
4174
+
4175
+ class PopsAlert {
4176
+ constructor(details) {
4177
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
4178
+ PopsHandler.handleInit($shadowRoot, [
4179
+ pops.config.cssText.index,
4180
+ pops.config.cssText.ninePalaceGridPosition,
4181
+ pops.config.cssText.scrollbar,
4182
+ pops.config.cssText.button,
4183
+ pops.config.cssText.anim,
4184
+ pops.config.cssText.common,
4185
+ pops.config.cssText.alertCSS,
4186
+ ]);
4187
+ let config = {
4188
+ title: {
4189
+ text: "默认标题",
4190
+ position: "left",
4191
+ html: false,
4192
+ style: "",
4193
+ },
4194
+ content: {
4195
+ text: "默认内容",
4196
+ html: false,
4197
+ style: "",
4198
+ },
4199
+ btn: {
4200
+ position: "flex-end",
4201
+ ok: {
4202
+ size: void 0,
4203
+ enable: true,
4204
+ icon: void 0,
4205
+ rightIcon: false,
4206
+ iconIsLoading: false,
4207
+ text: "确定",
4208
+ type: "primary",
4209
+ callback: function (event) {
4210
+ event.close();
4211
+ },
4212
+ },
4213
+ close: {
4214
+ enable: true,
4215
+ callback: function (event) {
4216
+ event.close();
4217
+ },
4218
+ },
4219
+ },
4220
+ class: "",
4221
+ only: false,
4222
+ width: "350px",
4223
+ height: "200px",
4224
+ position: "center",
4225
+ animation: "pops-anim-fadein-zoom",
4226
+ zIndex: 10000,
4227
+ mask: {
4228
+ enable: false,
4229
+ clickEvent: {
4230
+ toClose: false,
4231
+ toHide: false,
4232
+ },
4233
+ clickCallBack: void 0,
4234
+ },
4235
+ drag: false,
4236
+ dragLimit: true,
4237
+ dragExtraDistance: 3,
4238
+ dragMoveCallBack() { },
4239
+ dragEndCallBack() { },
4240
+ forbiddenScroll: false,
4241
+ style: null,
4242
+ beforeAppendToPageCallBack() { },
4243
+ };
4244
+ config = popsUtils.assign(config, details);
4245
+ let guid = popsUtils.getRandomGUID();
4246
+ // 设置当前类型
4247
+ const PopsType = "alert";
4248
+ config = PopsHandler.handleOnly(PopsType, config);
4249
+ let maskHTML = PopsElementHandler.getMaskHTML(guid, config.zIndex);
4250
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4251
+ let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
4252
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4253
+ let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
4254
+ let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config, `
4255
+ <div
4256
+ class="pops-alert-title"
4257
+ style="text-align: ${config.title.position};
4258
+ ${headerStyle}">
4259
+ ${config.title.html
4260
+ ? config.title.text
4261
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
4262
+ ${headerBtnHTML}
4263
+ </div>
4264
+ <div class="pops-alert-content" style="${contentStyle}">
4265
+ ${config.content.html
4266
+ ? config.content.text
4267
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
4268
+ </div>
4269
+ ${bottomBtnHTML}`, bottomBtnHTML);
4270
+ /**
4271
+ * 弹窗的主元素,包括动画层
4272
+ */
4273
+ let $anim = PopsElementHandler.parseElement(animHTML);
4274
+ let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, btnOkElement, titleElement: $title, } = PopsHandler.handleQueryElement($anim, PopsType);
4275
+ /** 遮罩层元素 */
4276
+ let $mask = null;
4277
+ /** 已创建的元素列表 */
4278
+ let elementList = [$anim];
4279
+ /* 遮罩层元素 */
4280
+ if (config.mask.enable) {
4281
+ let _handleMask_ = PopsHandler.handleMask({
4282
+ type: PopsType,
4283
+ guid: guid,
4284
+ config: config,
4285
+ animElement: $anim,
4286
+ maskHTML: maskHTML,
4287
+ });
4288
+ $mask = _handleMask_.maskElement;
4289
+ elementList.push($mask);
4290
+ }
4291
+ /* 处理返回的配置 */
4292
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
4293
+ /* 为顶部右边的关闭按钮添加点击事件 */
4294
+ PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
4295
+ /* 为底部ok按钮添加点击事件 */
4296
+ PopsHandler.handleClickEvent("ok", btnOkElement, eventDetails, config.btn.ok.callback);
4297
+ /* 创建到页面中 */
4298
+ popsDOMUtils.append($shadowRoot, elementList);
4299
+ if (typeof config.beforeAppendToPageCallBack === "function") {
4300
+ config.beforeAppendToPageCallBack($shadowRoot, $shadowContainer);
4301
+ }
4302
+ popsDOMUtils.appendBody($shadowContainer);
4303
+ if ($mask != null) {
4304
+ // 添加遮罩层
4305
+ $anim.after($mask);
4306
+ }
4307
+ /* 保存 */
4308
+ PopsHandler.handlePush(PopsType, {
4309
+ guid: guid,
4310
+ animElement: $anim,
4311
+ popsElement: $pops,
4312
+ maskElement: $mask,
4313
+ $shadowContainer: $shadowContainer,
4314
+ $shadowRoot: $shadowRoot,
4315
+ });
4316
+ /* 拖拽 */
4317
+ if (config.drag) {
4318
+ PopsUIUtils.drag($pops, {
4319
+ dragElement: $title,
4320
+ limit: config.dragLimit,
4321
+ extraDistance: config.dragExtraDistance,
4322
+ moveCallBack: config.dragMoveCallBack,
4323
+ endCallBack: config.dragEndCallBack,
4324
+ });
4325
+ }
4326
+ return PopsHandler.handleResultDetails(eventDetails);
4327
+ }
4328
+ }
4329
+
4330
+ class PopsConfirm {
4331
+ constructor(details) {
4332
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow();
4333
+ PopsHandler.handleInit($shadowRoot, [
4334
+ pops.config.cssText.index,
4335
+ pops.config.cssText.ninePalaceGridPosition,
4336
+ pops.config.cssText.scrollbar,
4337
+ pops.config.cssText.button,
4338
+ pops.config.cssText.anim,
4339
+ pops.config.cssText.common,
4340
+ pops.config.cssText.confirmCSS,
4341
+ ]);
4342
+ let config = {
4343
+ title: {
4344
+ text: "默认标题",
4345
+ position: "left",
4346
+ html: false,
4347
+ style: "",
4348
+ },
4349
+ content: {
4350
+ text: "默认内容",
4351
+ html: false,
4352
+ style: "",
4353
+ },
4354
+ btn: {
4355
+ merge: false,
4356
+ mergeReverse: false,
4357
+ reverse: false,
4358
+ position: "flex-end",
4359
+ ok: {
4360
+ enable: true,
4361
+ size: void 0,
4362
+ icon: void 0,
4363
+ rightIcon: false,
4364
+ iconIsLoading: false,
4365
+ text: "确定",
4366
+ type: "primary",
4367
+ callback(event) {
4368
+ event.close();
4369
+ },
4370
+ },
4371
+ cancel: {
4372
+ enable: true,
4373
+ size: void 0,
4374
+ icon: void 0,
4375
+ rightIcon: false,
4376
+ iconIsLoading: false,
4377
+ text: "关闭",
4378
+ type: "default",
4379
+ callback(event) {
4380
+ event.close();
4381
+ },
4382
+ },
4383
+ other: {
4384
+ enable: false,
4385
+ size: void 0,
4386
+ icon: void 0,
4387
+ rightIcon: false,
4388
+ iconIsLoading: false,
4389
+ text: "其它按钮",
4390
+ type: "default",
4391
+ callback(event) {
4392
+ event.close();
4393
+ },
4394
+ },
4395
+ close: {
4396
+ enable: true,
4397
+ callback(event) {
4398
+ event.close();
4399
+ },
4400
+ },
4401
+ },
4402
+ class: "",
4403
+ only: false,
4404
+ width: "350px",
4405
+ height: "200px",
4406
+ position: "center",
4407
+ animation: "pops-anim-fadein-zoom",
4408
+ zIndex: 10000,
4409
+ mask: {
4410
+ enable: false,
4411
+ clickEvent: {
4412
+ toClose: false,
4413
+ toHide: false,
4414
+ },
4415
+ clickCallBack: void 0,
4416
+ },
4417
+ drag: false,
4418
+ dragLimit: true,
4419
+ dragExtraDistance: 3,
4420
+ dragMoveCallBack() { },
4421
+ dragEndCallBack() { },
4422
+ forbiddenScroll: false,
4423
+ style: null,
4424
+ beforeAppendToPageCallBack() { },
4425
+ };
4426
+ config = popsUtils.assign(config, details);
4427
+ let guid = popsUtils.getRandomGUID();
4428
+ // 设置当前类型
4429
+ const PopsType = "confirm";
4430
+ config = PopsHandler.handleOnly(PopsType, config);
4431
+ let maskHTML = PopsElementHandler.getMaskHTML(guid, config.zIndex);
4432
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4433
+ let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
4434
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4435
+ let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
4436
+ let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config, `
4437
+ <div class="pops-confirm-title" style="text-align: ${config.title.position};${headerStyle}">
4438
+ ${config.title.html
4439
+ ? config.title.text
4440
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
4441
+ ${headerBtnHTML}
4442
+ </div>
4443
+ <div class="pops-confirm-content" style="${contentStyle}">
4444
+ ${config.content.html
4445
+ ? config.content.text
4446
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
4447
+
4448
+ </div>
4449
+ ${bottomBtnHTML}
4450
+ `, bottomBtnHTML);
4451
+ /**
4452
+ * 弹窗的主元素,包括动画层
4453
+ */
4454
+ let $anim = PopsElementHandler.parseElement(animHTML);
4455
+ let { popsElement: $pops, titleElement: $title, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, } = PopsHandler.handleQueryElement($anim, PopsType);
4456
+ /**
4457
+ * 遮罩层元素
4458
+ */
4459
+ let $mask = null;
4460
+ /**
4461
+ * 已创建的元素列表
4462
+ */
4463
+ let elementList = [$anim];
4464
+ if (config.mask.enable) {
4465
+ // 启用遮罩层
4466
+ let _handleMask_ = PopsHandler.handleMask({
4467
+ type: PopsType,
4468
+ guid: guid,
4469
+ config: config,
4470
+ animElement: $anim,
4471
+ maskHTML: maskHTML,
4472
+ });
4473
+ $mask = _handleMask_.maskElement;
4474
+ elementList.push($mask);
4475
+ }
4476
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
4477
+ PopsHandler.handleClickEvent("close", $btnClose, eventDetails, config.btn.close.callback);
4478
+ PopsHandler.handleClickEvent("ok", $btnOk, eventDetails, config.btn.ok.callback);
4479
+ PopsHandler.handleClickEvent("cancel", $btnCancel, eventDetails, config.btn.cancel.callback);
4480
+ PopsHandler.handleClickEvent("other", $btnOther, eventDetails, config.btn.other.callback);
4481
+ /* 创建到页面中 */
4482
+ popsDOMUtils.append($shadowRoot, elementList);
4483
+ if (typeof config.beforeAppendToPageCallBack === "function") {
4484
+ config.beforeAppendToPageCallBack($shadowRoot, $shadowContainer);
4485
+ }
4486
+ popsDOMUtils.appendBody($shadowContainer);
4487
+ if ($mask != null) {
4488
+ $anim.after($mask);
4489
+ }
4490
+ PopsHandler.handlePush(PopsType, {
4491
+ guid: guid,
4492
+ animElement: $anim,
4493
+ popsElement: $pops,
4494
+ maskElement: $mask,
4495
+ $shadowContainer: $shadowContainer,
4496
+ $shadowRoot: $shadowRoot,
4497
+ });
4498
+ /* 拖拽 */
4499
+ if (config.drag) {
4500
+ PopsUIUtils.drag($pops, {
4501
+ dragElement: $title,
4502
+ limit: config.dragLimit,
4503
+ extraDistance: config.dragExtraDistance,
4504
+ moveCallBack: config.dragMoveCallBack,
4505
+ endCallBack: config.dragEndCallBack,
4506
+ });
4507
+ }
4508
+ return PopsHandler.handleResultDetails(eventDetails);
4509
+ }
4510
+ }
4511
+
4512
+ class Pops {
4513
+ /** 配置 */
4514
+ config = {
4515
+ /** 版本号 */
4516
+ version: "2024.7.8",
4517
+ cssText: {
4518
+ /** 主CSS */
4519
+ index: indexCSS,
4520
+ /** 九宫格位置CSS */
4521
+ ninePalaceGridPosition: ninePalaceGridPositionCSS,
4522
+ /** 滚动条CSS */
4523
+ scrollbar: scrollbarCSS,
4524
+ /** 按钮CSS */
4525
+ button: buttonCSS,
4526
+ /** 通用的CSS */
4527
+ common: commonCSS,
4528
+ /** 动画 */
4529
+ anim: animCSS,
4530
+ /** pops.alert */
4531
+ alertCSS: alertCSS,
4532
+ /** pops.cponfirm */
4533
+ confirmCSS: confirmCSS,
4534
+ },
4535
+ /** icon图标的svg代码 */
4536
+ iconSVG: {
4537
+ min: SVG_min,
4538
+ mise: SVG_mise,
4539
+ max: SVG_max,
4540
+ close: SVG_close,
4541
+ edit: SVG_edit,
4542
+ share: SVG_share,
4543
+ delete: SVG_delete,
4544
+ search: SVG_search,
4545
+ upload: SVG_upload,
4546
+ loading: SVG_loading,
4547
+ next: SVG_next,
4548
+ prev: SVG_prev,
4549
+ eleme: SVG_eleme,
4550
+ elemePlus: SVG_elemePlus,
4551
+ chromeFilled: SVG_chromeFilled,
4552
+ cpu: SVG_cpu,
4553
+ videoPlay: SVG_videoPlay,
4554
+ videoPause: SVG_videoPause,
4555
+ headset: SVG_headset,
4556
+ monitor: SVG_monitor,
4557
+ documentCopy: SVG_documentCopy,
4558
+ picture: SVG_picture,
4559
+ circleClose: SVG_circleClose,
4560
+ view: SVG_view,
4561
+ hide: SVG_hide,
4562
+ keyboard: SVG_keyboard,
4563
+ arrowRight: SVG_arrowRight,
4564
+ arrowLeft: SVG_arrowLeft,
4565
+ },
4566
+ /** 当前已配置的动画@keyframes名字映射(初始化时生成) */
4567
+ animation: {},
4568
+ /** 是否初始化 */
4569
+ isInit: false,
4570
+ /** 存储已创建的元素 */
4571
+ layer: {
4572
+ alert: [],
4573
+ confirm: [],
4574
+ prompt: [],
4575
+ loading: [],
4576
+ iframe: [],
4577
+ tooltip: [],
4578
+ drawer: [],
4579
+ folder: [],
4580
+ panel: [],
4581
+ },
4582
+ /** 禁止滚动 */
4583
+ forbiddenScroll: {
4584
+ event(event) {
4585
+ return popsDOMUtils.preventEvent(event);
4586
+ },
4587
+ },
4588
+ /** pops使用的工具类 */
4589
+ Utils: popsUtils,
4590
+ /** pops使用的DOM工具类 */
4591
+ DOMUtils: popsDOMUtils,
4592
+ };
4593
+ constructor() { }
4594
+ init() {
4595
+ if (!this.config.isInit) {
4596
+ /* 处理获取当前所有的动画名 */
4597
+ this.config.isInit = true;
4598
+ let animationStyle = document.createElement("style");
4599
+ animationStyle.innerHTML = this.config.cssText.anim;
4600
+ popsDOMUtils.appendHead(animationStyle);
4601
+ this.config.animation = null;
4602
+ this.config.animation = PopsUIUtils.getKeyFrames(animationStyle.sheet);
4603
+ setTimeout(() => {
4604
+ animationStyle.remove();
4605
+ }, 50);
4606
+ }
4607
+ }
4608
+ /**
4609
+ * 释放原有的pops控制权
4610
+ * @example
4611
+ * let pops = window.pops.noConflict()
4612
+ */
4613
+ noConflict() {
4614
+ if (typeof PopsCore.globalThis.pops === "object") {
4615
+ popsUtils.delete(PopsCore.globalThis, "pops");
4616
+ }
4617
+ if (typeof unsafeWindow === "object" &&
4618
+ unsafeWindow != null &&
4619
+ typeof unsafeWindow.pops === "object") {
4620
+ popsUtils.delete(unsafeWindow, "pops");
4621
+ }
4622
+ return new Pops();
4623
+ }
4624
+ /**
4625
+ * 通过navigator.userAgent判断是否是手机访问
4626
+ * @param userAgent
4627
+ */
4628
+ isPhone(userAgent = PopsCore.globalThis.navigator.userAgent) {
4629
+ return Boolean(/(iPhone|iPad|iPod|iOS|Android)/i.test(userAgent));
4630
+ }
4631
+ /**
4632
+ * 普通信息框
4633
+ * @param details 配置
4634
+ */
4635
+ alert = (details) => {
4636
+ return new PopsAlert(details);
4637
+ };
4638
+ /**
4639
+ * 询问框
4640
+ * @param details 配置
4641
+ */
4642
+ confirm = (details) => {
4643
+ return new PopsConfirm(details);
4644
+ };
4645
+ }
4646
+ const pops = new Pops();
4647
+
4648
+ return pops;
4649
+
4650
+ }));
4651
+ //# sourceMappingURL=index.amd.js.map