x-ui-design 0.5.54 → 0.5.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +233 -1513
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +356 -1636
- package/dist/index.js.map +1 -1
- package/lib/components/Select/Select.tsx +3 -7
- package/package.json +1 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import require$$1 from 'react/jsx-runtime';
|
|
2
|
-
import React
|
|
2
|
+
import React, { useRef, useState, Children, isValidElement, Fragment, Suspense, useContext, useMemo, useEffect, createContext, useImperativeHandle, useCallback, useLayoutEffect } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import ReactDOMServer from 'react-dom/server';
|
|
5
5
|
|
|
6
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
|
-
|
|
8
6
|
function getDefaultExportFromCjs (x) {
|
|
9
7
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10
8
|
}
|
|
@@ -43,7 +41,7 @@ function requireLoadableContext_sharedRuntime() {
|
|
|
43
41
|
}
|
|
44
42
|
});
|
|
45
43
|
const _interop_require_default = _interop_require_default$1;
|
|
46
|
-
const _react = /*#__PURE__*/_interop_require_default._(React
|
|
44
|
+
const _react = /*#__PURE__*/_interop_require_default._(React);
|
|
47
45
|
const LoadableContext = _react.default.createContext(null);
|
|
48
46
|
if (process.env.NODE_ENV !== 'production') {
|
|
49
47
|
LoadableContext.displayName = 'LoadableContext';
|
|
@@ -68,7 +66,7 @@ function requireLoadable_sharedRuntime() {
|
|
|
68
66
|
}
|
|
69
67
|
});
|
|
70
68
|
const _interop_require_default = _interop_require_default$1;
|
|
71
|
-
const _react = /*#__PURE__*/_interop_require_default._(React
|
|
69
|
+
const _react = /*#__PURE__*/_interop_require_default._(React);
|
|
72
70
|
const _loadablecontextsharedruntime = requireLoadableContext_sharedRuntime();
|
|
73
71
|
function resolve(obj) {
|
|
74
72
|
return obj && obj.default ? obj.default : obj;
|
|
@@ -447,13 +445,13 @@ function styleInject(css, ref) {
|
|
|
447
445
|
var css_248z$m = ":root{--xui-color-hover:#f5f5f5;--xui-color-disabled:#e6e6e6;--xui-primary-color:#1677ff;--xui-primary-color-light:#40a9ff;--xui-text-color:rgba(0,0,0,.88);--xui-text-color-light:rgba(0,0,0,.5);--xui-error-color:#ff4d4f;--xui-error-color-light:#ff6668;--xui-success-color:#52c41a;--xui-background-color:#fff;--xui-font-size-xs:12px;--xui-font-size-sm:14px;--xui-font-size-md:14px;--xui-font-size-lg:16px;--xui-border-radius-sm:4px;--xui-border-radius-md:4px;--xui-border-radius-lg:6px;--xui-border-color:#d9d9d9;--xui-select-primary-color:var(--xui-primary-color);--xui-select-background-color:var(--xui-background-color)}html{font-family:sans-serif}.globalEllipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}";
|
|
448
446
|
styleInject(css_248z$m);
|
|
449
447
|
|
|
450
|
-
const ClearIcon = () => /*#__PURE__*/React
|
|
448
|
+
const ClearIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
451
449
|
width: "10",
|
|
452
450
|
height: "10",
|
|
453
451
|
viewBox: "0 0 14 14",
|
|
454
452
|
fill: "none",
|
|
455
453
|
xmlns: "http://www.w3.org/2000/svg"
|
|
456
|
-
}, /*#__PURE__*/React
|
|
454
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
457
455
|
d: "M1 1L13 13M13 1L1 13",
|
|
458
456
|
stroke: "currentColor",
|
|
459
457
|
strokeWidth: "2",
|
|
@@ -461,13 +459,13 @@ const ClearIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
461
459
|
}));
|
|
462
460
|
const ArrowIcon = ({
|
|
463
461
|
isOpen
|
|
464
|
-
}) => /*#__PURE__*/React
|
|
462
|
+
}) => /*#__PURE__*/React.createElement("svg", {
|
|
465
463
|
width: "24",
|
|
466
464
|
height: "24",
|
|
467
465
|
viewBox: "0 0 24 24",
|
|
468
466
|
fill: "none",
|
|
469
467
|
xmlns: "http://www.w3.org/2000/svg"
|
|
470
|
-
}, /*#__PURE__*/React
|
|
468
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
471
469
|
d: "M7 10L12 15L17 10",
|
|
472
470
|
stroke: "currentColor",
|
|
473
471
|
strokeWidth: "2",
|
|
@@ -475,7 +473,7 @@ const ArrowIcon = ({
|
|
|
475
473
|
strokeLinejoin: "round",
|
|
476
474
|
transform: isOpen ? 'rotate(180, 12, 12)' : ''
|
|
477
475
|
}));
|
|
478
|
-
const LoadingIcon = () => /*#__PURE__*/React
|
|
476
|
+
const LoadingIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
479
477
|
viewBox: "0 0 1024 1024",
|
|
480
478
|
focusable: "false",
|
|
481
479
|
"data-icon": "loading",
|
|
@@ -483,10 +481,10 @@ const LoadingIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
483
481
|
height: "12",
|
|
484
482
|
fill: "currentColor",
|
|
485
483
|
"aria-hidden": "true"
|
|
486
|
-
}, /*#__PURE__*/React
|
|
484
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
487
485
|
d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"
|
|
488
486
|
}));
|
|
489
|
-
const CheckIcon = () => /*#__PURE__*/React
|
|
487
|
+
const CheckIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
490
488
|
viewBox: "64 64 896 896",
|
|
491
489
|
focusable: "false",
|
|
492
490
|
"data-icon": "check",
|
|
@@ -494,10 +492,10 @@ const CheckIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
494
492
|
height: "12",
|
|
495
493
|
fill: "currentColor",
|
|
496
494
|
"aria-hidden": "true"
|
|
497
|
-
}, /*#__PURE__*/React
|
|
495
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
498
496
|
d: "M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"
|
|
499
497
|
}));
|
|
500
|
-
const SearchIcon = () => /*#__PURE__*/React
|
|
498
|
+
const SearchIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
501
499
|
viewBox: "64 64 896 896",
|
|
502
500
|
focusable: "false",
|
|
503
501
|
"data-icon": "search",
|
|
@@ -505,10 +503,10 @@ const SearchIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
505
503
|
height: "1em",
|
|
506
504
|
fill: "currentColor",
|
|
507
505
|
"aria-hidden": "true"
|
|
508
|
-
}, /*#__PURE__*/React
|
|
506
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
509
507
|
d: "M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"
|
|
510
508
|
}));
|
|
511
|
-
const CalendarIcon = () => /*#__PURE__*/React
|
|
509
|
+
const CalendarIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
512
510
|
viewBox: "64 64 896 896",
|
|
513
511
|
focusable: "false",
|
|
514
512
|
"data-icon": "calendar",
|
|
@@ -516,10 +514,10 @@ const CalendarIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
516
514
|
height: "1em",
|
|
517
515
|
fill: "currentColor",
|
|
518
516
|
"aria-hidden": "true"
|
|
519
|
-
}, /*#__PURE__*/React
|
|
517
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
520
518
|
d: "M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"
|
|
521
519
|
}));
|
|
522
|
-
const SuccessIcon = () => /*#__PURE__*/React
|
|
520
|
+
const SuccessIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
523
521
|
viewBox: "64 64 896 896",
|
|
524
522
|
focusable: "false",
|
|
525
523
|
"data-icon": "check-circle",
|
|
@@ -527,10 +525,10 @@ const SuccessIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
527
525
|
height: "1em",
|
|
528
526
|
fill: "currentColor",
|
|
529
527
|
"aria-hidden": "true"
|
|
530
|
-
}, /*#__PURE__*/React
|
|
528
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
531
529
|
d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"
|
|
532
530
|
}));
|
|
533
|
-
const ErrorIcon = () => /*#__PURE__*/React
|
|
531
|
+
const ErrorIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
534
532
|
className: "error-svg-icon",
|
|
535
533
|
viewBox: "64 64 896 896",
|
|
536
534
|
focusable: "false",
|
|
@@ -539,10 +537,10 @@ const ErrorIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
539
537
|
height: "1em",
|
|
540
538
|
fill: "currentColor",
|
|
541
539
|
"aria-hidden": "true"
|
|
542
|
-
}, /*#__PURE__*/React
|
|
540
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
543
541
|
d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"
|
|
544
542
|
}));
|
|
545
|
-
const DateDistanceIcon = () => /*#__PURE__*/React
|
|
543
|
+
const DateDistanceIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
546
544
|
viewBox: "0 0 1024 1024",
|
|
547
545
|
focusable: "false",
|
|
548
546
|
"data-icon": "swap-right",
|
|
@@ -550,10 +548,10 @@ const DateDistanceIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
550
548
|
height: "1em",
|
|
551
549
|
fill: "currentColor",
|
|
552
550
|
"aria-hidden": "true"
|
|
553
|
-
}, /*#__PURE__*/React
|
|
551
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
554
552
|
d: "M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"
|
|
555
553
|
}));
|
|
556
|
-
const TimeIcon = () => /*#__PURE__*/React
|
|
554
|
+
const TimeIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
557
555
|
viewBox: "64 64 896 896",
|
|
558
556
|
focusable: "false",
|
|
559
557
|
"data-icon": "clock-circle",
|
|
@@ -561,12 +559,12 @@ const TimeIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
561
559
|
height: "1em",
|
|
562
560
|
fill: "currentColor",
|
|
563
561
|
"aria-hidden": "true"
|
|
564
|
-
}, /*#__PURE__*/React
|
|
562
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
565
563
|
d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"
|
|
566
|
-
}), /*#__PURE__*/React
|
|
564
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
567
565
|
d: "M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"
|
|
568
566
|
}));
|
|
569
|
-
const StampleIcon = () => /*#__PURE__*/React
|
|
567
|
+
const StampleIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
570
568
|
viewBox: "64 64 896 896",
|
|
571
569
|
focusable: "false",
|
|
572
570
|
"data-icon": "paper-clip",
|
|
@@ -574,10 +572,10 @@ const StampleIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
574
572
|
height: "1em",
|
|
575
573
|
fill: "currentColor",
|
|
576
574
|
"aria-hidden": "true"
|
|
577
|
-
}, /*#__PURE__*/React
|
|
575
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
578
576
|
d: "M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"
|
|
579
577
|
}));
|
|
580
|
-
const TrashIcon = () => /*#__PURE__*/React
|
|
578
|
+
const TrashIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
581
579
|
viewBox: "64 64 896 896",
|
|
582
580
|
focusable: "false",
|
|
583
581
|
"data-icon": "delete",
|
|
@@ -585,10 +583,10 @@ const TrashIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
585
583
|
height: "1em",
|
|
586
584
|
fill: "currentColor",
|
|
587
585
|
"aria-hidden": "true"
|
|
588
|
-
}, /*#__PURE__*/React
|
|
586
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
589
587
|
d: "M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"
|
|
590
588
|
}));
|
|
591
|
-
const SpinerIcon = () => /*#__PURE__*/React
|
|
589
|
+
const SpinerIcon = () => /*#__PURE__*/React.createElement("svg", {
|
|
592
590
|
viewBox: "0 0 1024 1024",
|
|
593
591
|
focusable: "false",
|
|
594
592
|
"data-icon": "loading",
|
|
@@ -596,7 +594,7 @@ const SpinerIcon = () => /*#__PURE__*/React$1.createElement("svg", {
|
|
|
596
594
|
height: "1em",
|
|
597
595
|
fill: "currentColor",
|
|
598
596
|
"aria-hidden": "true"
|
|
599
|
-
}, /*#__PURE__*/React
|
|
597
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
600
598
|
d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"
|
|
601
599
|
}));
|
|
602
600
|
|
|
@@ -885,14 +883,14 @@ const useForm = (initialValues = {}, onFieldsChange, onValuesChange, scrollToFir
|
|
|
885
883
|
return formInstance;
|
|
886
884
|
};
|
|
887
885
|
|
|
888
|
-
function _extends
|
|
889
|
-
return _extends
|
|
886
|
+
function _extends() {
|
|
887
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
890
888
|
for (var e = 1; e < arguments.length; e++) {
|
|
891
889
|
var t = arguments[e];
|
|
892
890
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
893
891
|
}
|
|
894
892
|
return n;
|
|
895
|
-
}, _extends
|
|
893
|
+
}, _extends.apply(null, arguments);
|
|
896
894
|
}
|
|
897
895
|
|
|
898
896
|
const prefixClsForm = 'xUi-form';
|
|
@@ -1033,7 +1031,7 @@ const FormItem$1 = ({
|
|
|
1033
1031
|
}, [dependencies, name]);
|
|
1034
1032
|
const isRequired = useMemo(() => rules.some(rule => rule.required), [rules]);
|
|
1035
1033
|
const errorMessage = getFieldError(name)?.[0];
|
|
1036
|
-
return /*#__PURE__*/React
|
|
1034
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1037
1035
|
style: style,
|
|
1038
1036
|
"data-instance": name,
|
|
1039
1037
|
className: clsx([`${prefixCls}`, {
|
|
@@ -1041,10 +1039,10 @@ const FormItem$1 = ({
|
|
|
1041
1039
|
[className]: className,
|
|
1042
1040
|
noStyle: props.noStyle
|
|
1043
1041
|
}])
|
|
1044
|
-
}, !props.noStyle && (label || name) && !hideLabel && /*#__PURE__*/React
|
|
1042
|
+
}, !props.noStyle && (label || name) && !hideLabel && /*#__PURE__*/React.createElement("label", {
|
|
1045
1043
|
className: `${prefixCls}-label`,
|
|
1046
1044
|
htmlFor: name
|
|
1047
|
-
}, label || name, isRequired && /*#__PURE__*/React
|
|
1045
|
+
}, label || name, isRequired && /*#__PURE__*/React.createElement("span", {
|
|
1048
1046
|
className: `${prefixCls}-required`
|
|
1049
1047
|
}, "*")), Children.map(childrenList, (child, key) => {
|
|
1050
1048
|
if (/*#__PURE__*/isValidElement(child)) {
|
|
@@ -1056,7 +1054,7 @@ const FormItem$1 = ({
|
|
|
1056
1054
|
...childProps
|
|
1057
1055
|
} = child.props;
|
|
1058
1056
|
const fieldValue = value ?? getFieldValue(name) ?? initialValue;
|
|
1059
|
-
return /*#__PURE__*/React
|
|
1057
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormItemChildComponent, _extends({}, props, {
|
|
1060
1058
|
key: `${key}_${isReseting}`
|
|
1061
1059
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1062
1060
|
// @ts-expect-error
|
|
@@ -1076,9 +1074,9 @@ const FormItem$1 = ({
|
|
|
1076
1074
|
// @ts-expect-error
|
|
1077
1075
|
,
|
|
1078
1076
|
size: childProps.size || props.size
|
|
1079
|
-
})), extra ? /*#__PURE__*/React
|
|
1077
|
+
})), extra ? /*#__PURE__*/React.createElement("div", {
|
|
1080
1078
|
className: `${prefixCls}-extra`
|
|
1081
|
-
}, extra || '') : null, !props.noStyle && /*#__PURE__*/React
|
|
1079
|
+
}, extra || '') : null, !props.noStyle && /*#__PURE__*/React.createElement("span", {
|
|
1082
1080
|
ref: errorRef,
|
|
1083
1081
|
className: clsx([`${prefixCls}-error`, {
|
|
1084
1082
|
[`${prefixCls}-has-error`]: errorMessage?.length
|
|
@@ -1142,12 +1140,12 @@ const FormItemChildComponent = ({
|
|
|
1142
1140
|
const childProps = child.props;
|
|
1143
1141
|
const isWrapper = typeof child.type === 'string' && !('dangerouslySetInnerHTML' in childProps) && ['div', 'span', 'label'].includes(child.type);
|
|
1144
1142
|
if (isWrapper) {
|
|
1145
|
-
return /*#__PURE__*/React
|
|
1143
|
+
return /*#__PURE__*/React.createElement(child.type, childProps, Children.map(flattenChildren(childProps.children), injectPropsIntoFinalLeaf));
|
|
1146
1144
|
}
|
|
1147
1145
|
if (childProps?.__injected) {
|
|
1148
1146
|
return child;
|
|
1149
1147
|
}
|
|
1150
|
-
return /*#__PURE__*/React
|
|
1148
|
+
return /*#__PURE__*/React.createElement(child.type, _extends({}, props, {
|
|
1151
1149
|
ref: ref
|
|
1152
1150
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1153
1151
|
// @ts-expect-error
|
|
@@ -1226,20 +1224,20 @@ const Form$1 = ({
|
|
|
1226
1224
|
const childProps = child.props;
|
|
1227
1225
|
const isWrapper = typeof child.type === 'string' && !('dangerouslySetInnerHTML' in childProps) && ['div', 'span', 'label'].includes(child.type);
|
|
1228
1226
|
if (isWrapper) {
|
|
1229
|
-
return /*#__PURE__*/React
|
|
1227
|
+
return /*#__PURE__*/React.createElement(child.type, childProps, Children.map(flattenChildren(childProps.children), injectPropsIntoFinalLeaf));
|
|
1230
1228
|
}
|
|
1231
1229
|
if (childProps?.__injected) {
|
|
1232
1230
|
return child;
|
|
1233
1231
|
}
|
|
1234
|
-
return /*#__PURE__*/React
|
|
1232
|
+
return /*#__PURE__*/React.createElement(child.type, _extends({}, child.props, {
|
|
1235
1233
|
child: child,
|
|
1236
1234
|
size: childProps.size || rest.size,
|
|
1237
1235
|
layout: childProps.layout || layout
|
|
1238
1236
|
}));
|
|
1239
1237
|
};
|
|
1240
|
-
return /*#__PURE__*/React
|
|
1238
|
+
return /*#__PURE__*/React.createElement(FormContext.Provider, {
|
|
1241
1239
|
value: formInstance
|
|
1242
|
-
}, /*#__PURE__*/React
|
|
1240
|
+
}, /*#__PURE__*/React.createElement("form", {
|
|
1243
1241
|
style: style,
|
|
1244
1242
|
ref: formRef,
|
|
1245
1243
|
onSubmit: handleSubmit,
|
|
@@ -1401,27 +1399,27 @@ const ButtonComponent = ({
|
|
|
1401
1399
|
[`${prefixCls}-disabled`]: disabled
|
|
1402
1400
|
}, className])]);
|
|
1403
1401
|
}, [block, className, color, danger, disabled, ghost, innerLoading, prefixCls, rootClassName, shape, size, type, variant]);
|
|
1404
|
-
const iconNode = innerLoading ? typeof loading === 'object' && loading.icon || /*#__PURE__*/React
|
|
1402
|
+
const iconNode = innerLoading ? typeof loading === 'object' && loading.icon || /*#__PURE__*/React.createElement("span", {
|
|
1405
1403
|
className: `${prefixCls}-spinner`
|
|
1406
1404
|
}) : icon;
|
|
1407
|
-
const content = /*#__PURE__*/React
|
|
1405
|
+
const content = /*#__PURE__*/React.createElement(React.Fragment, null, iconNode && iconPosition === 'start' && /*#__PURE__*/React.createElement("span", {
|
|
1408
1406
|
className: clsx(`${prefixCls}-icon`, customClassNames.icon),
|
|
1409
1407
|
style: styles.icon
|
|
1410
|
-
}, iconNode), /*#__PURE__*/React
|
|
1408
|
+
}, iconNode), /*#__PURE__*/React.createElement("span", {
|
|
1411
1409
|
className: `${prefixCls}-content`
|
|
1412
|
-
}, children), iconNode && iconPosition === 'end' && /*#__PURE__*/React
|
|
1410
|
+
}, children), iconNode && iconPosition === 'end' && /*#__PURE__*/React.createElement("span", {
|
|
1413
1411
|
className: clsx(`${prefixCls}-icon`, customClassNames.icon),
|
|
1414
1412
|
style: styles.icon
|
|
1415
1413
|
}, iconNode));
|
|
1416
1414
|
const mergedDisabled = disabled || innerLoading;
|
|
1417
1415
|
if (href) {
|
|
1418
|
-
return /*#__PURE__*/React
|
|
1416
|
+
return /*#__PURE__*/React.createElement("a", {
|
|
1419
1417
|
className: classes,
|
|
1420
1418
|
href: mergedDisabled ? undefined : href,
|
|
1421
1419
|
"aria-disabled": mergedDisabled
|
|
1422
1420
|
}, content);
|
|
1423
1421
|
}
|
|
1424
|
-
return /*#__PURE__*/React
|
|
1422
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
1425
1423
|
type: htmlType,
|
|
1426
1424
|
className: classes,
|
|
1427
1425
|
disabled: mergedDisabled
|
|
@@ -1478,9 +1476,9 @@ const Checkbox = ({
|
|
|
1478
1476
|
setInternalChecked(checked);
|
|
1479
1477
|
}
|
|
1480
1478
|
}, [checked]);
|
|
1481
|
-
return /*#__PURE__*/React
|
|
1479
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1482
1480
|
className: `${prefixCls}-wrapper`
|
|
1483
|
-
}, /*#__PURE__*/React
|
|
1481
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1484
1482
|
ref: ref,
|
|
1485
1483
|
style: style,
|
|
1486
1484
|
onClick: handleClick,
|
|
@@ -1489,7 +1487,7 @@ const Checkbox = ({
|
|
|
1489
1487
|
[`${prefixCls}-disabled`]: disabled,
|
|
1490
1488
|
[`${prefixCls}-checked`]: internalChecked
|
|
1491
1489
|
}])
|
|
1492
|
-
}, /*#__PURE__*/React
|
|
1490
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
1493
1491
|
id: id,
|
|
1494
1492
|
type: type,
|
|
1495
1493
|
name: name,
|
|
@@ -1501,16 +1499,16 @@ const Checkbox = ({
|
|
|
1501
1499
|
onKeyPress: onKeyPress,
|
|
1502
1500
|
onMouseEnter: onMouseEnter,
|
|
1503
1501
|
onMouseLeave: onMouseLeave
|
|
1504
|
-
}), /*#__PURE__*/React
|
|
1502
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
1505
1503
|
className: `${prefixCls}-box`
|
|
1506
|
-
}, /*#__PURE__*/React
|
|
1504
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1507
1505
|
className: `${prefixCls}-check`,
|
|
1508
1506
|
style: {
|
|
1509
1507
|
opacity: internalChecked ? 1 : 0
|
|
1510
1508
|
}
|
|
1511
|
-
}))), titleClick ? /*#__PURE__*/React
|
|
1509
|
+
}))), titleClick ? /*#__PURE__*/React.createElement("div", {
|
|
1512
1510
|
onClick: handleClick
|
|
1513
|
-
}, children) : children && /*#__PURE__*/React
|
|
1511
|
+
}, children) : children && /*#__PURE__*/React.createElement("span", {
|
|
1514
1512
|
className: `${prefixCls}-label`
|
|
1515
1513
|
}, children));
|
|
1516
1514
|
};
|
|
@@ -1552,13 +1550,13 @@ const Switch = ({
|
|
|
1552
1550
|
setInternalChecked(checked);
|
|
1553
1551
|
}
|
|
1554
1552
|
}, [checked]);
|
|
1555
|
-
return /*#__PURE__*/React
|
|
1553
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1556
1554
|
className: `${prefixCls}-wrapper ${className} ${disabled ? `${prefixCls}__disabled` : ''}`,
|
|
1557
1555
|
style: style
|
|
1558
|
-
}, /*#__PURE__*/React
|
|
1556
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1559
1557
|
className: `${prefixCls} ${internalChecked ? `${prefixCls}__checked` : ''}`,
|
|
1560
1558
|
onClick: handleClick
|
|
1561
|
-
}, /*#__PURE__*/React
|
|
1559
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1562
1560
|
className: `${prefixCls}__slider`
|
|
1563
1561
|
})));
|
|
1564
1562
|
};
|
|
@@ -1579,33 +1577,33 @@ const EmptyContent = ({
|
|
|
1579
1577
|
title = 'No Data',
|
|
1580
1578
|
description = 'No data',
|
|
1581
1579
|
prefixCls = prefixClsEmpty
|
|
1582
|
-
}) => /*#__PURE__*/React
|
|
1580
|
+
}) => /*#__PURE__*/React.createElement("div", {
|
|
1583
1581
|
style: style,
|
|
1584
1582
|
className: `${prefixCls} ${prefixCls}-normal ${prefixCls}-small ${className}`
|
|
1585
|
-
}, /*#__PURE__*/React
|
|
1583
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1586
1584
|
className: `${prefixCls}-image`
|
|
1587
|
-
}, icon || /*#__PURE__*/React
|
|
1585
|
+
}, icon || /*#__PURE__*/React.createElement("svg", {
|
|
1588
1586
|
width: "64",
|
|
1589
1587
|
height: "41",
|
|
1590
1588
|
viewBox: "0 0 64 41",
|
|
1591
1589
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1592
|
-
}, /*#__PURE__*/React
|
|
1590
|
+
}, /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("g", {
|
|
1593
1591
|
transform: "translate(0 1)",
|
|
1594
1592
|
fill: "none"
|
|
1595
|
-
}, /*#__PURE__*/React
|
|
1593
|
+
}, /*#__PURE__*/React.createElement("ellipse", {
|
|
1596
1594
|
fill: "#f5f5f5",
|
|
1597
1595
|
cx: "32",
|
|
1598
1596
|
cy: "33",
|
|
1599
1597
|
rx: "32",
|
|
1600
1598
|
ry: "7"
|
|
1601
|
-
}), /*#__PURE__*/React
|
|
1599
|
+
}), /*#__PURE__*/React.createElement("g", {
|
|
1602
1600
|
stroke: "#d9d9d9"
|
|
1603
|
-
}, /*#__PURE__*/React
|
|
1601
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
1604
1602
|
d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
|
|
1605
|
-
}), /*#__PURE__*/React
|
|
1603
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
1606
1604
|
d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
|
|
1607
1605
|
fill: "#fafafa"
|
|
1608
|
-
}))))), /*#__PURE__*/React
|
|
1606
|
+
}))))), /*#__PURE__*/React.createElement("div", {
|
|
1609
1607
|
className: `${prefixCls}-description`
|
|
1610
1608
|
}, description));
|
|
1611
1609
|
|
|
@@ -1757,16 +1755,16 @@ const Upload = ({
|
|
|
1757
1755
|
uploadRef.current.click();
|
|
1758
1756
|
}
|
|
1759
1757
|
};
|
|
1760
|
-
return /*#__PURE__*/React
|
|
1758
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1761
1759
|
className: clsx([`${prefixCls}-wrapper`, className, rootClassName, {
|
|
1762
1760
|
noStyle: noStyle,
|
|
1763
1761
|
[`${prefixCls}-disabled`]: disabled
|
|
1764
1762
|
}]),
|
|
1765
1763
|
style: style
|
|
1766
|
-
}, /*#__PURE__*/React
|
|
1764
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1767
1765
|
className: clsx([`${prefixCls}`, `${prefixCls}-${listType}`]),
|
|
1768
1766
|
onClick: handleClick
|
|
1769
|
-
}, children, /*#__PURE__*/React
|
|
1767
|
+
}, children, /*#__PURE__*/React.createElement("input", _extends({
|
|
1770
1768
|
type: "file",
|
|
1771
1769
|
ref: uploadRef,
|
|
1772
1770
|
accept: accept,
|
|
@@ -1777,35 +1775,35 @@ const Upload = ({
|
|
|
1777
1775
|
}, directory ? {
|
|
1778
1776
|
directory: true,
|
|
1779
1777
|
webkitdirectory: true
|
|
1780
|
-
} : {}))), showUploadList && fileList.length > 0 && /*#__PURE__*/React
|
|
1778
|
+
} : {}))), showUploadList && fileList.length > 0 && /*#__PURE__*/React.createElement("ul", {
|
|
1781
1779
|
className: `${prefixCls}-list ${prefixCls}-list-${listType}`
|
|
1782
|
-
}, fileList.map(file => /*#__PURE__*/React
|
|
1780
|
+
}, fileList.map(file => /*#__PURE__*/React.createElement("li", {
|
|
1783
1781
|
key: file.uid,
|
|
1784
1782
|
className: `${prefixCls}-item ${prefixCls}-item-${file.status}`
|
|
1785
|
-
}, /*#__PURE__*/React
|
|
1783
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1786
1784
|
className: `${prefixCls}-remove`,
|
|
1787
1785
|
onClick: () => handleRemove(file.uid)
|
|
1788
1786
|
}, listType === 'picture' && (file.originFileObj || file.url) ?
|
|
1789
1787
|
/*#__PURE__*/
|
|
1790
1788
|
// eslint-disable-next-line @next/next/no-img-element
|
|
1791
|
-
React
|
|
1789
|
+
React.createElement("img", {
|
|
1792
1790
|
width: IMAGE_SIZE,
|
|
1793
1791
|
height: IMAGE_SIZE,
|
|
1794
1792
|
alt: file.name,
|
|
1795
1793
|
src: file.url || URL.createObjectURL(file.originFileObj),
|
|
1796
1794
|
className: `${prefixCls}-item-thumbnail`
|
|
1797
|
-
}) : /*#__PURE__*/React
|
|
1795
|
+
}) : /*#__PURE__*/React.createElement(StampleIcon, null)), /*#__PURE__*/React.createElement("div", {
|
|
1798
1796
|
style: {
|
|
1799
1797
|
width: '100%'
|
|
1800
1798
|
}
|
|
1801
|
-
}, /*#__PURE__*/React
|
|
1799
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1802
1800
|
className: `${prefixCls}-item-title`,
|
|
1803
1801
|
style: {
|
|
1804
1802
|
...(file.status === 'uploading' ? {
|
|
1805
1803
|
marginBottom: 12
|
|
1806
1804
|
} : {})
|
|
1807
1805
|
}
|
|
1808
|
-
}, /*#__PURE__*/React
|
|
1806
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
1809
1807
|
className: `${prefixCls}-item-remove-icon`,
|
|
1810
1808
|
onClick: () => handleRemove(file.uid),
|
|
1811
1809
|
style: {
|
|
@@ -1814,9 +1812,9 @@ const Upload = ({
|
|
|
1814
1812
|
},
|
|
1815
1813
|
role: "button",
|
|
1816
1814
|
"aria-label": "Remove file"
|
|
1817
|
-
}, /*#__PURE__*/React
|
|
1815
|
+
}, /*#__PURE__*/React.createElement(TrashIcon, null))), file.status === 'uploading' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
1818
1816
|
className: `${prefixCls}-item-progress-line`
|
|
1819
|
-
}), /*#__PURE__*/React
|
|
1817
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
1820
1818
|
className: `${prefixCls}-item-progress-line-percent`,
|
|
1821
1819
|
style: {
|
|
1822
1820
|
width: `${file.percent}%`
|
|
@@ -1914,31 +1912,31 @@ const RangePicker = ({
|
|
|
1914
1912
|
const renderMonthYearSelector = (monthOffset = 0, all) => {
|
|
1915
1913
|
const baseYear = currentYear;
|
|
1916
1914
|
const baseMonth = currentMonth + monthOffset;
|
|
1917
|
-
return /*#__PURE__*/React
|
|
1915
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1918
1916
|
className: `${prefixCls}-header`
|
|
1919
|
-
}, all || !monthOffset ? /*#__PURE__*/React
|
|
1917
|
+
}, all || !monthOffset ? /*#__PURE__*/React.createElement("div", {
|
|
1920
1918
|
className: `${prefixCls}-nav-buttons`
|
|
1921
|
-
}, /*#__PURE__*/React
|
|
1919
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1922
1920
|
onClick: () => setCurrentYear(y => y - 1)
|
|
1923
|
-
}, "\xAB"), /*#__PURE__*/React
|
|
1921
|
+
}, "\xAB"), /*#__PURE__*/React.createElement("button", {
|
|
1924
1922
|
onClick: () => setCurrentMonth(m => m === 0 ? (setCurrentYear(y => y - 1), MONTH_LENGTH) : m - 1)
|
|
1925
|
-
}, "\u2039")) : /*#__PURE__*/React
|
|
1923
|
+
}, "\u2039")) : /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("div", {
|
|
1926
1924
|
className: `${prefixCls}-dropdown-selects`
|
|
1927
|
-
}, /*#__PURE__*/React
|
|
1925
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1928
1926
|
type: "button",
|
|
1929
1927
|
className: `${prefixCls}-select`,
|
|
1930
1928
|
onClick: () => setViewMode('year')
|
|
1931
|
-
}, baseYear), /*#__PURE__*/React
|
|
1929
|
+
}, baseYear), /*#__PURE__*/React.createElement("button", {
|
|
1932
1930
|
type: "button",
|
|
1933
1931
|
className: `${prefixCls}-select`,
|
|
1934
1932
|
onClick: () => setViewMode('month')
|
|
1935
|
-
}, localeMonths[baseMonth])), all || monthOffset ? /*#__PURE__*/React
|
|
1933
|
+
}, localeMonths[baseMonth])), all || monthOffset ? /*#__PURE__*/React.createElement("div", {
|
|
1936
1934
|
className: `${prefixCls}-nav-buttons`
|
|
1937
|
-
}, /*#__PURE__*/React
|
|
1935
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
1938
1936
|
onClick: () => setCurrentMonth(m => m === MONTH_LENGTH ? (setCurrentYear(y => y + 1), 0) : m + 1)
|
|
1939
|
-
}, "\u203A"), /*#__PURE__*/React
|
|
1937
|
+
}, "\u203A"), /*#__PURE__*/React.createElement("button", {
|
|
1940
1938
|
onClick: () => setCurrentYear(y => y + 1)
|
|
1941
|
-
}, "\xBB")) : /*#__PURE__*/React
|
|
1939
|
+
}, "\xBB")) : /*#__PURE__*/React.createElement("span", null));
|
|
1942
1940
|
};
|
|
1943
1941
|
const renderCalendar = (monthOffset = 0, all) => {
|
|
1944
1942
|
const baseDate = new Date(currentYear, currentMonth + monthOffset, 1);
|
|
@@ -1962,20 +1960,20 @@ const RangePicker = ({
|
|
|
1962
1960
|
length: remaining
|
|
1963
1961
|
}, (_, i) => new Date(year, month + 1, i + 1));
|
|
1964
1962
|
const days = [...prevMonthDays, ...currentMonthDays, ...nextMonthDays];
|
|
1965
|
-
return /*#__PURE__*/React
|
|
1963
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
1966
1964
|
className: `${prefixCls}-calendar ${viewMode}`
|
|
1967
|
-
}, /*#__PURE__*/React
|
|
1965
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
1968
1966
|
className: `${prefixCls}-calendar-header`
|
|
1969
|
-
}, renderMonthYearSelector(monthOffset, all)), viewMode === 'day' && /*#__PURE__*/React
|
|
1967
|
+
}, renderMonthYearSelector(monthOffset, all)), viewMode === 'day' && /*#__PURE__*/React.createElement("div", {
|
|
1970
1968
|
className: `${prefixCls}-days-grid day`
|
|
1971
|
-
}, localeWeekdays.map((day, i) => /*#__PURE__*/React
|
|
1969
|
+
}, localeWeekdays.map((day, i) => /*#__PURE__*/React.createElement("div", {
|
|
1972
1970
|
key: i,
|
|
1973
1971
|
className: `${prefixCls}-weekday`
|
|
1974
1972
|
}, day)), days.map((day, i) => {
|
|
1975
1973
|
const isSelected = day && selectedDates.some(d => d?.toDateString() === day?.toDateString());
|
|
1976
1974
|
const inRange = day && isInRange(day);
|
|
1977
1975
|
const isSameMonth = day?.getMonth() === month;
|
|
1978
|
-
return /*#__PURE__*/React
|
|
1976
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
1979
1977
|
key: i,
|
|
1980
1978
|
disabled: disabledDate?.(day, {
|
|
1981
1979
|
from: undefined,
|
|
@@ -1990,9 +1988,9 @@ const RangePicker = ({
|
|
|
1990
1988
|
[`${prefixCls}-other-month`]: !isSameMonth
|
|
1991
1989
|
}])
|
|
1992
1990
|
}, day?.getDate());
|
|
1993
|
-
})), viewMode === 'month' && /*#__PURE__*/React
|
|
1991
|
+
})), viewMode === 'month' && /*#__PURE__*/React.createElement("div", {
|
|
1994
1992
|
className: `${prefixCls}-grid`
|
|
1995
|
-
}, localeMonths.map((m, i) => /*#__PURE__*/React
|
|
1993
|
+
}, localeMonths.map((m, i) => /*#__PURE__*/React.createElement("button", {
|
|
1996
1994
|
key: i,
|
|
1997
1995
|
className: `${prefixCls}-month`,
|
|
1998
1996
|
onClick: () => {
|
|
@@ -2000,13 +1998,13 @@ const RangePicker = ({
|
|
|
2000
1998
|
setViewMode('day');
|
|
2001
1999
|
},
|
|
2002
2000
|
disabled: isMonthDisabled(i)
|
|
2003
|
-
}, m))), viewMode === 'year' && /*#__PURE__*/React
|
|
2001
|
+
}, m))), viewMode === 'year' && /*#__PURE__*/React.createElement("div", {
|
|
2004
2002
|
className: `${prefixCls}-grid`
|
|
2005
2003
|
}, Array.from({
|
|
2006
2004
|
length: 12
|
|
2007
2005
|
}, (_, i) => {
|
|
2008
2006
|
const year = currentYear - NUMBER_SIX + i;
|
|
2009
|
-
return /*#__PURE__*/React
|
|
2007
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
2010
2008
|
key: year,
|
|
2011
2009
|
className: `${prefixCls}-year`,
|
|
2012
2010
|
disabled: isYearDisabled(year),
|
|
@@ -2021,16 +2019,16 @@ const RangePicker = ({
|
|
|
2021
2019
|
setSelectedDates([null, null]);
|
|
2022
2020
|
onChange?.(null, ['', '']);
|
|
2023
2021
|
};
|
|
2024
|
-
return /*#__PURE__*/React
|
|
2022
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2025
2023
|
ref: containerRef,
|
|
2026
2024
|
style: style,
|
|
2027
2025
|
className: clsx([`${prefixCls}-range-container`, {
|
|
2028
2026
|
[`${prefixCls}-${size}`]: size,
|
|
2029
2027
|
[className]: className
|
|
2030
2028
|
}])
|
|
2031
|
-
}, /*#__PURE__*/React
|
|
2029
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2032
2030
|
className: `${prefixCls}-range-input-wrapper`
|
|
2033
|
-
}, /*#__PURE__*/React
|
|
2031
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2034
2032
|
type: "button",
|
|
2035
2033
|
className: clsx([`${prefixCls}-input`, {
|
|
2036
2034
|
noBordered: !bordered,
|
|
@@ -2039,26 +2037,26 @@ const RangePicker = ({
|
|
|
2039
2037
|
}]),
|
|
2040
2038
|
disabled: disabled,
|
|
2041
2039
|
onClick: () => setIsOpen(!isOpen)
|
|
2042
|
-
}, prefix, /*#__PURE__*/React
|
|
2040
|
+
}, prefix, /*#__PURE__*/React.createElement("input", {
|
|
2043
2041
|
readOnly: inputReadOnly,
|
|
2044
2042
|
className: `${prefixCls}-selected-date`,
|
|
2045
2043
|
placeholder: placeholder[0],
|
|
2046
2044
|
value: selectedDates[0] ? formatDate(selectedDates[0]) : ''
|
|
2047
|
-
}), /*#__PURE__*/React
|
|
2045
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2048
2046
|
className: `${prefixCls}-range-separator`
|
|
2049
|
-
}, separator || /*#__PURE__*/React
|
|
2047
|
+
}, separator || /*#__PURE__*/React.createElement(DateDistanceIcon, null)), /*#__PURE__*/React.createElement("input", {
|
|
2050
2048
|
readOnly: inputReadOnly,
|
|
2051
2049
|
className: `${prefixCls}-selected-date`,
|
|
2052
2050
|
placeholder: placeholder[1],
|
|
2053
2051
|
value: selectedDates[1] ? formatDate(selectedDates[1]) : ''
|
|
2054
|
-
}), /*#__PURE__*/React
|
|
2052
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2055
2053
|
className: `${prefixCls}-icon`
|
|
2056
|
-
}, allowClear && (selectedDates[0] || selectedDates[1]) ? /*#__PURE__*/React
|
|
2054
|
+
}, allowClear && (selectedDates[0] || selectedDates[1]) ? /*#__PURE__*/React.createElement("span", {
|
|
2057
2055
|
className: `${prefixCls}-clear`,
|
|
2058
2056
|
onClick: handleClear
|
|
2059
|
-
}, /*#__PURE__*/React
|
|
2057
|
+
}, /*#__PURE__*/React.createElement(ClearIcon, null)) : /*#__PURE__*/React.createElement(CalendarIcon, null)))), isOpen && /*#__PURE__*/React.createElement("div", {
|
|
2060
2058
|
className: `${prefixCls}-dropdown-wrapper show`
|
|
2061
|
-
}, /*#__PURE__*/React
|
|
2059
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2062
2060
|
className: `${prefixCls}-dropdown-range`
|
|
2063
2061
|
}, renderCalendar(0, viewMode !== 'day'), viewMode === 'day' && renderCalendar(1, viewMode !== 'day'))));
|
|
2064
2062
|
};
|
|
@@ -2240,15 +2238,15 @@ const DatePickerComponent = ({
|
|
|
2240
2238
|
month: nextMonth,
|
|
2241
2239
|
year: nextMonthYear
|
|
2242
2240
|
}))];
|
|
2243
|
-
return /*#__PURE__*/React
|
|
2241
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2244
2242
|
ref: containerRef,
|
|
2245
2243
|
className: clsx([`${prefixCls}-container`, {
|
|
2246
2244
|
noStyle,
|
|
2247
2245
|
[`${prefixCls}-${size}`]: size
|
|
2248
2246
|
}])
|
|
2249
|
-
}, /*#__PURE__*/React
|
|
2247
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2250
2248
|
className: `${prefixCls}-input-wrapper`
|
|
2251
|
-
}, /*#__PURE__*/React
|
|
2249
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2252
2250
|
type: "button",
|
|
2253
2251
|
className: clsx([`${prefixCls}-input`, {
|
|
2254
2252
|
noBordered: !bordered,
|
|
@@ -2258,7 +2256,7 @@ const DatePickerComponent = ({
|
|
|
2258
2256
|
}]),
|
|
2259
2257
|
disabled: disabled,
|
|
2260
2258
|
onClick: () => setIsOpen(!isOpen)
|
|
2261
|
-
}, prefix || null, /*#__PURE__*/React
|
|
2259
|
+
}, prefix || null, /*#__PURE__*/React.createElement("input", {
|
|
2262
2260
|
size: INPUT_SIZE$1,
|
|
2263
2261
|
disabled: disabled,
|
|
2264
2262
|
readOnly: inputReadOnly,
|
|
@@ -2268,48 +2266,48 @@ const DatePickerComponent = ({
|
|
|
2268
2266
|
opacity: isOpen ? '0.6' : 1
|
|
2269
2267
|
},
|
|
2270
2268
|
defaultValue: selectedDatePlaceholder
|
|
2271
|
-
}), /*#__PURE__*/React
|
|
2269
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
2272
2270
|
className: `${prefixCls}-icon`
|
|
2273
|
-
}, allowClear && selectedDate ? /*#__PURE__*/React
|
|
2271
|
+
}, allowClear && selectedDate ? /*#__PURE__*/React.createElement("span", {
|
|
2274
2272
|
className: `${prefixCls}-clear`,
|
|
2275
2273
|
onClick: clearSelection
|
|
2276
|
-
}, typeof allowClear === 'object' && allowClear.clearIcon ? allowClear.clearIcon : /*#__PURE__*/React
|
|
2274
|
+
}, typeof allowClear === 'object' && allowClear.clearIcon ? allowClear.clearIcon : /*#__PURE__*/React.createElement(ClearIcon, null)) : suffixIcon || /*#__PURE__*/React.createElement(CalendarIcon, null), error && feedbackIcons ? /*#__PURE__*/React.createElement(ErrorIcon, null) : null))), /*#__PURE__*/React.createElement("div", {
|
|
2277
2275
|
style: popupContainerRef.current ? {
|
|
2278
2276
|
position: 'absolute'
|
|
2279
2277
|
} : {},
|
|
2280
2278
|
className: clsx([placement, `${prefixCls}-dropdown-wrapper`, {
|
|
2281
2279
|
show: isOpen
|
|
2282
2280
|
}])
|
|
2283
|
-
}, isOpen && /*#__PURE__*/React
|
|
2281
|
+
}, isOpen && /*#__PURE__*/React.createElement("div", {
|
|
2284
2282
|
className: `${prefixCls}-dropdown`,
|
|
2285
2283
|
style: placementPossition
|
|
2286
|
-
}, /*#__PURE__*/React
|
|
2284
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2287
2285
|
className: `${prefixCls}-header`
|
|
2288
|
-
}, /*#__PURE__*/React
|
|
2286
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2289
2287
|
className: `${prefixCls}-nav-buttons`
|
|
2290
|
-
}, /*#__PURE__*/React
|
|
2288
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2291
2289
|
onClick: () => setCurrentYear(y => y - 1)
|
|
2292
|
-
}, "\xAB"), /*#__PURE__*/React
|
|
2290
|
+
}, "\xAB"), /*#__PURE__*/React.createElement("button", {
|
|
2293
2291
|
onClick: () => setCurrentMonth(m => m === 0 ? (setCurrentYear(y => y - 1), MONTH_LENGTH) : m - 1)
|
|
2294
|
-
}, "\u2039")), /*#__PURE__*/React
|
|
2292
|
+
}, "\u2039")), /*#__PURE__*/React.createElement("div", {
|
|
2295
2293
|
className: `${prefixCls}-dropdown-selects`
|
|
2296
|
-
}, /*#__PURE__*/React
|
|
2294
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2297
2295
|
type: "button",
|
|
2298
2296
|
className: `${prefixCls}-select`,
|
|
2299
2297
|
onClick: () => setViewMode('year')
|
|
2300
|
-
}, currentYear), /*#__PURE__*/React
|
|
2298
|
+
}, currentYear), /*#__PURE__*/React.createElement("button", {
|
|
2301
2299
|
type: "button",
|
|
2302
2300
|
className: `${prefixCls}-select`,
|
|
2303
2301
|
onClick: () => setViewMode('month')
|
|
2304
|
-
}, localeMonths[currentMonth])), /*#__PURE__*/React
|
|
2302
|
+
}, localeMonths[currentMonth])), /*#__PURE__*/React.createElement("div", {
|
|
2305
2303
|
className: `${prefixCls}-nav-buttons`
|
|
2306
|
-
}, /*#__PURE__*/React
|
|
2304
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2307
2305
|
onClick: () => setCurrentMonth(m => m === MONTH_LENGTH ? (setCurrentYear(y => y + 1), 0) : m + 1)
|
|
2308
|
-
}, "\u203A"), /*#__PURE__*/React
|
|
2306
|
+
}, "\u203A"), /*#__PURE__*/React.createElement("button", {
|
|
2309
2307
|
onClick: () => setCurrentYear(y => y + 1)
|
|
2310
|
-
}, "\xBB"))), viewMode === 'day' && /*#__PURE__*/React
|
|
2308
|
+
}, "\xBB"))), viewMode === 'day' && /*#__PURE__*/React.createElement("div", {
|
|
2311
2309
|
className: `${prefixCls}-grid day`
|
|
2312
|
-
}, localeWeekdays.map(day => /*#__PURE__*/React
|
|
2310
|
+
}, localeWeekdays.map(day => /*#__PURE__*/React.createElement("div", {
|
|
2313
2311
|
key: day,
|
|
2314
2312
|
className: `${prefixCls}-day-header`
|
|
2315
2313
|
}, day)), days.map(({
|
|
@@ -2319,7 +2317,7 @@ const DatePickerComponent = ({
|
|
|
2319
2317
|
year
|
|
2320
2318
|
}, idx) => {
|
|
2321
2319
|
const isSelected = selectedDate && selectedDate.getDate() === day && selectedDate.getMonth() === month && selectedDate.getFullYear() === year;
|
|
2322
|
-
return /*#__PURE__*/React
|
|
2320
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
2323
2321
|
key: `${year}-${month}-${day}-${idx}`,
|
|
2324
2322
|
className: clsx([`${prefixCls}-day`, {
|
|
2325
2323
|
[`${prefixCls}-selected`]: isSelected,
|
|
@@ -2331,9 +2329,9 @@ const DatePickerComponent = ({
|
|
|
2331
2329
|
to: undefined
|
|
2332
2330
|
})
|
|
2333
2331
|
}, day);
|
|
2334
|
-
})), viewMode === 'month' && /*#__PURE__*/React
|
|
2332
|
+
})), viewMode === 'month' && /*#__PURE__*/React.createElement("div", {
|
|
2335
2333
|
className: `${prefixCls}-grid`
|
|
2336
|
-
}, localeMonths.map((m, i) => /*#__PURE__*/React
|
|
2334
|
+
}, localeMonths.map((m, i) => /*#__PURE__*/React.createElement("button", {
|
|
2337
2335
|
key: i,
|
|
2338
2336
|
className: `${prefixCls}-month`,
|
|
2339
2337
|
onClick: () => {
|
|
@@ -2341,13 +2339,13 @@ const DatePickerComponent = ({
|
|
|
2341
2339
|
setViewMode('day');
|
|
2342
2340
|
},
|
|
2343
2341
|
disabled: isMonthDisabled(i)
|
|
2344
|
-
}, m))), viewMode === 'year' && /*#__PURE__*/React
|
|
2342
|
+
}, m))), viewMode === 'year' && /*#__PURE__*/React.createElement("div", {
|
|
2345
2343
|
className: `${prefixCls}-grid`
|
|
2346
2344
|
}, Array.from({
|
|
2347
2345
|
length: 12
|
|
2348
2346
|
}, (_, i) => {
|
|
2349
2347
|
const year = currentYear - NUMBER_SIX + i;
|
|
2350
|
-
return /*#__PURE__*/React
|
|
2348
|
+
return /*#__PURE__*/React.createElement("button", {
|
|
2351
2349
|
key: year,
|
|
2352
2350
|
className: `${prefixCls}-year`,
|
|
2353
2351
|
disabled: isYearDisabled(year),
|
|
@@ -2356,12 +2354,12 @@ const DatePickerComponent = ({
|
|
|
2356
2354
|
setViewMode('month');
|
|
2357
2355
|
}
|
|
2358
2356
|
}, year);
|
|
2359
|
-
})), showToday && /*#__PURE__*/React
|
|
2357
|
+
})), showToday && /*#__PURE__*/React.createElement("div", {
|
|
2360
2358
|
className: `${prefixCls}-day-footer`,
|
|
2361
2359
|
style: {
|
|
2362
2360
|
gridColumn: 'span 7'
|
|
2363
2361
|
}
|
|
2364
|
-
}, /*#__PURE__*/React
|
|
2362
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
2365
2363
|
className: `${prefixCls}-select`,
|
|
2366
2364
|
disabled: disabledDate?.(new Date(DateNow.getDate(), DateNow.getMonth(), DateNow.getFullYear()), {
|
|
2367
2365
|
from: undefined,
|
|
@@ -2406,8 +2404,8 @@ const TimePicker = ({
|
|
|
2406
2404
|
onBlur,
|
|
2407
2405
|
onSelect,
|
|
2408
2406
|
showNow = true,
|
|
2409
|
-
clearIcon = /*#__PURE__*/React
|
|
2410
|
-
suffixIcon = /*#__PURE__*/React
|
|
2407
|
+
clearIcon = /*#__PURE__*/React.createElement(ClearIcon, null),
|
|
2408
|
+
suffixIcon = /*#__PURE__*/React.createElement(TimeIcon, null),
|
|
2411
2409
|
placeholder = 'Select time'
|
|
2412
2410
|
}) => {
|
|
2413
2411
|
const [open, setOpen] = useState(false);
|
|
@@ -2590,12 +2588,12 @@ const TimePicker = ({
|
|
|
2590
2588
|
} = getTimeParts(tempValue);
|
|
2591
2589
|
const currentHour = selectedHour ?? 0;
|
|
2592
2590
|
const currentMinute = selectedMinute ?? 0;
|
|
2593
|
-
return /*#__PURE__*/React
|
|
2591
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
2594
2592
|
className: `${prefixCls}-panel`
|
|
2595
|
-
}, /*#__PURE__*/React
|
|
2593
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2596
2594
|
ref: hourRef,
|
|
2597
2595
|
className: `${prefixCls}-column`
|
|
2598
|
-
}, hours.map((h, index) => h === false ? /*#__PURE__*/React
|
|
2596
|
+
}, hours.map((h, index) => h === false ? /*#__PURE__*/React.createElement("div", {
|
|
2599
2597
|
key: `${h}_${index}`,
|
|
2600
2598
|
className: `${prefixCls}-cell`,
|
|
2601
2599
|
style: {
|
|
@@ -2603,17 +2601,17 @@ const TimePicker = ({
|
|
|
2603
2601
|
userSelect: 'none',
|
|
2604
2602
|
cursor: 'inherit'
|
|
2605
2603
|
}
|
|
2606
|
-
}, "0") : /*#__PURE__*/React
|
|
2604
|
+
}, "0") : /*#__PURE__*/React.createElement("div", {
|
|
2607
2605
|
key: h,
|
|
2608
2606
|
className: clsx([`${prefixCls}-cell`, {
|
|
2609
2607
|
[`${prefixCls}-cell-disabled`]: getDisabled('hour').includes(h),
|
|
2610
2608
|
[`${prefixCls}-cell-selected`]: selectedHour === h
|
|
2611
2609
|
}]),
|
|
2612
2610
|
onClick: () => !getDisabled('hour').includes(h) && onSelectHour(h)
|
|
2613
|
-
}, pad(h)))), /*#__PURE__*/React
|
|
2611
|
+
}, pad(h)))), /*#__PURE__*/React.createElement("div", {
|
|
2614
2612
|
ref: minuteRef,
|
|
2615
2613
|
className: `${prefixCls}-column`
|
|
2616
|
-
}, minutesSeconds.map((m, index) => m === false ? /*#__PURE__*/React
|
|
2614
|
+
}, minutesSeconds.map((m, index) => m === false ? /*#__PURE__*/React.createElement("div", {
|
|
2617
2615
|
key: `${m}_${index}`,
|
|
2618
2616
|
className: `${prefixCls}-cell`,
|
|
2619
2617
|
style: {
|
|
@@ -2621,17 +2619,17 @@ const TimePicker = ({
|
|
|
2621
2619
|
userSelect: 'none',
|
|
2622
2620
|
cursor: 'inherit'
|
|
2623
2621
|
}
|
|
2624
|
-
}, "0") : /*#__PURE__*/React
|
|
2622
|
+
}, "0") : /*#__PURE__*/React.createElement("div", {
|
|
2625
2623
|
key: m,
|
|
2626
2624
|
className: clsx([`${prefixCls}-cell`, {
|
|
2627
2625
|
[`${prefixCls}-cell-disabled`]: getDisabled('minute', currentHour).includes(m),
|
|
2628
2626
|
[`${prefixCls}-cell-selected`]: selectedMinute === m
|
|
2629
2627
|
}]),
|
|
2630
2628
|
onClick: () => !getDisabled('minute', currentHour).includes(m) && onSelectMinute(m)
|
|
2631
|
-
}, pad(m)))), /*#__PURE__*/React
|
|
2629
|
+
}, pad(m)))), /*#__PURE__*/React.createElement("div", {
|
|
2632
2630
|
ref: secondRef,
|
|
2633
2631
|
className: `${prefixCls}-column`
|
|
2634
|
-
}, minutesSeconds.map((s, index) => s === false ? /*#__PURE__*/React
|
|
2632
|
+
}, minutesSeconds.map((s, index) => s === false ? /*#__PURE__*/React.createElement("div", {
|
|
2635
2633
|
key: `${s}_${index}`,
|
|
2636
2634
|
className: `${prefixCls}-cell`,
|
|
2637
2635
|
style: {
|
|
@@ -2639,31 +2637,31 @@ const TimePicker = ({
|
|
|
2639
2637
|
userSelect: 'none',
|
|
2640
2638
|
cursor: 'inherit'
|
|
2641
2639
|
}
|
|
2642
|
-
}, "0") : /*#__PURE__*/React
|
|
2640
|
+
}, "0") : /*#__PURE__*/React.createElement("div", {
|
|
2643
2641
|
key: s,
|
|
2644
2642
|
className: clsx([`${prefixCls}-cell`, {
|
|
2645
2643
|
[`${prefixCls}-cell-disabled`]: getDisabled('second', currentHour, currentMinute).includes(s),
|
|
2646
2644
|
[`${prefixCls}-cell-selected`]: selectedSecond === s
|
|
2647
2645
|
}]),
|
|
2648
2646
|
onClick: () => !getDisabled('second', currentHour, currentMinute).includes(s) && onSelectSecond(s)
|
|
2649
|
-
}, pad(s))))), /*#__PURE__*/React
|
|
2647
|
+
}, pad(s))))), /*#__PURE__*/React.createElement("div", {
|
|
2650
2648
|
className: `${prefixCls}-actions`
|
|
2651
|
-
}, showNow ? /*#__PURE__*/React
|
|
2649
|
+
}, showNow ? /*#__PURE__*/React.createElement("div", {
|
|
2652
2650
|
className: `${prefixCls}-now-btn`,
|
|
2653
2651
|
onClick: handleShowNow
|
|
2654
|
-
}, "Now") : /*#__PURE__*/React
|
|
2652
|
+
}, "Now") : /*#__PURE__*/React.createElement("span", null), /*#__PURE__*/React.createElement("button", {
|
|
2655
2653
|
className: `${prefixCls}-ok-btn`,
|
|
2656
2654
|
disabled: selectedHour === null || selectedMinute === null || selectedSecond === null,
|
|
2657
2655
|
onClick: handleOkButton
|
|
2658
2656
|
}, "OK")));
|
|
2659
2657
|
};
|
|
2660
|
-
return /*#__PURE__*/React
|
|
2658
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2661
2659
|
className: clsx([`${prefixCls}-wrapper`, className]),
|
|
2662
2660
|
style: style
|
|
2663
|
-
}, /*#__PURE__*/React
|
|
2661
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
2664
2662
|
className: `${prefixCls}-input-wrapper`,
|
|
2665
2663
|
onClick: () => setOpen(true)
|
|
2666
|
-
}, /*#__PURE__*/React
|
|
2664
|
+
}, /*#__PURE__*/React.createElement("input", _extends({
|
|
2667
2665
|
ref: inputRef,
|
|
2668
2666
|
size: INPUT_SIZE,
|
|
2669
2667
|
placeholder: placeholder,
|
|
@@ -2678,18 +2676,18 @@ const TimePicker = ({
|
|
|
2678
2676
|
source: 'input'
|
|
2679
2677
|
});
|
|
2680
2678
|
}
|
|
2681
|
-
})), /*#__PURE__*/React
|
|
2679
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
2682
2680
|
className: `${prefixCls}-icons`
|
|
2683
|
-
}, clearIcon && innerValue ? /*#__PURE__*/React
|
|
2681
|
+
}, clearIcon && innerValue ? /*#__PURE__*/React.createElement("span", {
|
|
2684
2682
|
className: `${prefixCls}-clear`,
|
|
2685
2683
|
onClick: handleClear
|
|
2686
|
-
}, clearIcon) : suffixIcon && /*#__PURE__*/React
|
|
2684
|
+
}, clearIcon) : suffixIcon && /*#__PURE__*/React.createElement("span", {
|
|
2687
2685
|
className: `${prefixCls}-suffix`,
|
|
2688
2686
|
onClick: e => {
|
|
2689
2687
|
e.stopPropagation();
|
|
2690
2688
|
setOpen(true);
|
|
2691
2689
|
}
|
|
2692
|
-
}, suffixIcon))), open && /*#__PURE__*/React
|
|
2690
|
+
}, suffixIcon))), open && /*#__PURE__*/React.createElement("div", {
|
|
2693
2691
|
ref: popupRef,
|
|
2694
2692
|
className: `${prefixCls}-popup`
|
|
2695
2693
|
}, renderOptions()));
|
|
@@ -2758,9 +2756,9 @@ const Textarea = ({
|
|
|
2758
2756
|
});
|
|
2759
2757
|
}
|
|
2760
2758
|
};
|
|
2761
|
-
return /*#__PURE__*/React
|
|
2759
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2762
2760
|
className: `${prefixCls}-wrapper ${rootClassName || ''}`
|
|
2763
|
-
}, /*#__PURE__*/React
|
|
2761
|
+
}, /*#__PURE__*/React.createElement("textarea", _extends({}, props, {
|
|
2764
2762
|
ref: ref || textareaRef,
|
|
2765
2763
|
value: inputValue,
|
|
2766
2764
|
onChange: handleChange,
|
|
@@ -2774,7 +2772,7 @@ const Textarea = ({
|
|
|
2774
2772
|
[`${prefixCls}-success`]: status === 'success',
|
|
2775
2773
|
[`${prefixCls}-error`]: status === 'error' || error
|
|
2776
2774
|
}])
|
|
2777
|
-
})), allowClear && inputValue && /*#__PURE__*/React
|
|
2775
|
+
})), allowClear && inputValue && /*#__PURE__*/React.createElement("button", {
|
|
2778
2776
|
className: `${prefixCls}-clear`,
|
|
2779
2777
|
onClick: handleClear
|
|
2780
2778
|
}, "\u2715"));
|
|
@@ -2939,7 +2937,7 @@ const InputComponent = ({
|
|
|
2939
2937
|
onPressEnter(e);
|
|
2940
2938
|
}
|
|
2941
2939
|
};
|
|
2942
|
-
return /*#__PURE__*/React
|
|
2940
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
2943
2941
|
className: clsx([`${prefixCls}-container`, {
|
|
2944
2942
|
[`${prefixCls}-error`]: error,
|
|
2945
2943
|
[`${prefixCls}-disabled`]: disabled,
|
|
@@ -2947,13 +2945,13 @@ const InputComponent = ({
|
|
|
2947
2945
|
noStyle: noStyle
|
|
2948
2946
|
}, className]),
|
|
2949
2947
|
style: props.style
|
|
2950
|
-
}, addonBefore && /*#__PURE__*/React
|
|
2948
|
+
}, addonBefore && /*#__PURE__*/React.createElement("span", {
|
|
2951
2949
|
className: `${prefixCls}-addon ${prefixCls}-before`
|
|
2952
|
-
}, addonBefore), /*#__PURE__*/React
|
|
2950
|
+
}, addonBefore), /*#__PURE__*/React.createElement("div", {
|
|
2953
2951
|
className: `${prefixCls}-wrapper`
|
|
2954
|
-
}, prefix && /*#__PURE__*/React
|
|
2952
|
+
}, prefix && /*#__PURE__*/React.createElement("span", {
|
|
2955
2953
|
className: `${prefixCls}-prefix`
|
|
2956
|
-
}, prefix), /*#__PURE__*/React
|
|
2954
|
+
}, prefix), /*#__PURE__*/React.createElement("input", _extends({}, props, {
|
|
2957
2955
|
ref: inputRef
|
|
2958
2956
|
}, props.type === 'password' && iconRender ? {
|
|
2959
2957
|
type: iconRenderVisible ? 'text' : 'password'
|
|
@@ -2963,14 +2961,14 @@ const InputComponent = ({
|
|
|
2963
2961
|
onChange: handleChange,
|
|
2964
2962
|
onKeyDown: handleOnKeyDown,
|
|
2965
2963
|
className: clsx([prefixCls, className])
|
|
2966
|
-
})), allowClear && internalValue ? /*#__PURE__*/React
|
|
2964
|
+
})), allowClear && internalValue ? /*#__PURE__*/React.createElement("span", {
|
|
2967
2965
|
className: `${prefixCls}-clear`,
|
|
2968
2966
|
onClick: handleClear
|
|
2969
|
-
}, /*#__PURE__*/React
|
|
2967
|
+
}, /*#__PURE__*/React.createElement(ErrorIcon, null)) : null, (suffix || iconRender) && /*#__PURE__*/React.createElement("span", _extends({
|
|
2970
2968
|
className: `${prefixCls}-suffix`
|
|
2971
2969
|
}, iconRender !== undefined ? {
|
|
2972
2970
|
onClick: () => setIconRenderVisible(icon => !icon)
|
|
2973
|
-
} : {}), suffix || iconRender?.(iconRenderVisible), error && feedbackIcons ? /*#__PURE__*/React
|
|
2971
|
+
} : {}), suffix || iconRender?.(iconRenderVisible), error && feedbackIcons ? /*#__PURE__*/React.createElement(ErrorIcon, null) : null)), addonAfter ? /*#__PURE__*/React.createElement("span", {
|
|
2974
2972
|
className: `${prefixCls}-addon ${prefixCls}-after`
|
|
2975
2973
|
}, addonAfter) : null);
|
|
2976
2974
|
};
|
|
@@ -3016,7 +3014,7 @@ const Radio = ({
|
|
|
3016
3014
|
onChange?.(parseValue(value));
|
|
3017
3015
|
}
|
|
3018
3016
|
}, [defaultChecked, checked]);
|
|
3019
|
-
return /*#__PURE__*/React
|
|
3017
|
+
return /*#__PURE__*/React.createElement("label", {
|
|
3020
3018
|
ref: ref,
|
|
3021
3019
|
title: title,
|
|
3022
3020
|
onMouseEnter: onMouseEnter,
|
|
@@ -3026,7 +3024,7 @@ const Radio = ({
|
|
|
3026
3024
|
noStyle: noStyle,
|
|
3027
3025
|
[className]: className
|
|
3028
3026
|
}])
|
|
3029
|
-
}, /*#__PURE__*/React
|
|
3027
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
3030
3028
|
name: name,
|
|
3031
3029
|
type: "radio",
|
|
3032
3030
|
onClick: onClick,
|
|
@@ -3035,9 +3033,9 @@ const Radio = ({
|
|
|
3035
3033
|
onBlur: e => onBlur?.(e),
|
|
3036
3034
|
onFocus: e => onFocus?.(e),
|
|
3037
3035
|
checked: checked ?? defaultChecked
|
|
3038
|
-
}), /*#__PURE__*/React
|
|
3036
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3039
3037
|
className: clsx([`${prefixCls} ${prefixCls}-${disabled ? 'disabled' : 'enabled'}`])
|
|
3040
|
-
}), /*#__PURE__*/React
|
|
3038
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3041
3039
|
className: `${prefixCls}-title`
|
|
3042
3040
|
}, children ?? title ?? value));
|
|
3043
3041
|
};
|
|
@@ -3060,7 +3058,7 @@ const RadioButton = ({
|
|
|
3060
3058
|
size = 'large',
|
|
3061
3059
|
...props
|
|
3062
3060
|
}) => {
|
|
3063
|
-
return /*#__PURE__*/React
|
|
3061
|
+
return /*#__PURE__*/React.createElement(Radio, _extends({}, props, {
|
|
3064
3062
|
checked: checked,
|
|
3065
3063
|
disabled: disabled,
|
|
3066
3064
|
className: clsx([`${prefixCls}-button`, {
|
|
@@ -3069,7 +3067,7 @@ const RadioButton = ({
|
|
|
3069
3067
|
[`${prefixCls}-button-${size}`]: size,
|
|
3070
3068
|
[`${prefixCls}-button-checked`]: checked
|
|
3071
3069
|
}])
|
|
3072
|
-
}), /*#__PURE__*/React
|
|
3070
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
3073
3071
|
className: `${prefixCls}-button-content`
|
|
3074
3072
|
}, children ?? props.value));
|
|
3075
3073
|
};
|
|
@@ -3104,7 +3102,7 @@ const RadioGroup = ({
|
|
|
3104
3102
|
return options.map((option, key) => {
|
|
3105
3103
|
const optionValue = typeof option === 'object' ? option.value : option;
|
|
3106
3104
|
const optionLabel = typeof option === 'object' ? option.label : option;
|
|
3107
|
-
return /*#__PURE__*/React
|
|
3105
|
+
return /*#__PURE__*/React.createElement(Radio, _extends({
|
|
3108
3106
|
value: optionValue,
|
|
3109
3107
|
key: `${key}_${optionValue}`,
|
|
3110
3108
|
checked: selectedValue === optionValue,
|
|
@@ -3119,7 +3117,7 @@ const RadioGroup = ({
|
|
|
3119
3117
|
const {
|
|
3120
3118
|
...childProps
|
|
3121
3119
|
} = child.props;
|
|
3122
|
-
return /*#__PURE__*/React
|
|
3120
|
+
return /*#__PURE__*/React.createElement(child.type, _extends({}, props, childProps, child.type === RadioButton ? {
|
|
3123
3121
|
size,
|
|
3124
3122
|
buttonStyle
|
|
3125
3123
|
} : {}, {
|
|
@@ -3132,7 +3130,7 @@ const RadioGroup = ({
|
|
|
3132
3130
|
return child;
|
|
3133
3131
|
});
|
|
3134
3132
|
};
|
|
3135
|
-
return /*#__PURE__*/React
|
|
3133
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
3136
3134
|
id: id,
|
|
3137
3135
|
style: style,
|
|
3138
3136
|
className: clsx([`${prefixCls}-group`, {
|
|
@@ -3149,1285 +3147,6 @@ var Group = /*#__PURE__*/Object.freeze({
|
|
|
3149
3147
|
default: RadioGroup
|
|
3150
3148
|
});
|
|
3151
3149
|
|
|
3152
|
-
var lib = {};
|
|
3153
|
-
|
|
3154
|
-
var uaParser_min = {exports: {}};
|
|
3155
|
-
|
|
3156
|
-
/* UAParser.js v1.0.41
|
|
3157
|
-
Copyright © 2012-2025 Faisal Salman <f@faisalman.com>
|
|
3158
|
-
MIT License */
|
|
3159
|
-
(function (module, exports) {
|
|
3160
|
-
(function (window, undefined$1) {
|
|
3161
|
-
|
|
3162
|
-
var LIBVERSION = "1.0.41",
|
|
3163
|
-
EMPTY = "",
|
|
3164
|
-
UNKNOWN = "?",
|
|
3165
|
-
FUNC_TYPE = "function",
|
|
3166
|
-
UNDEF_TYPE = "undefined",
|
|
3167
|
-
OBJ_TYPE = "object",
|
|
3168
|
-
STR_TYPE = "string",
|
|
3169
|
-
MAJOR = "major",
|
|
3170
|
-
MODEL = "model",
|
|
3171
|
-
NAME = "name",
|
|
3172
|
-
TYPE = "type",
|
|
3173
|
-
VENDOR = "vendor",
|
|
3174
|
-
VERSION = "version",
|
|
3175
|
-
ARCHITECTURE = "architecture",
|
|
3176
|
-
CONSOLE = "console",
|
|
3177
|
-
MOBILE = "mobile",
|
|
3178
|
-
TABLET = "tablet",
|
|
3179
|
-
SMARTTV = "smarttv",
|
|
3180
|
-
WEARABLE = "wearable",
|
|
3181
|
-
EMBEDDED = "embedded",
|
|
3182
|
-
UA_MAX_LENGTH = 500;
|
|
3183
|
-
var AMAZON = "Amazon",
|
|
3184
|
-
APPLE = "Apple",
|
|
3185
|
-
ASUS = "ASUS",
|
|
3186
|
-
BLACKBERRY = "BlackBerry",
|
|
3187
|
-
BROWSER = "Browser",
|
|
3188
|
-
CHROME = "Chrome",
|
|
3189
|
-
EDGE = "Edge",
|
|
3190
|
-
FIREFOX = "Firefox",
|
|
3191
|
-
GOOGLE = "Google",
|
|
3192
|
-
HONOR = "Honor",
|
|
3193
|
-
HUAWEI = "Huawei",
|
|
3194
|
-
LENOVO = "Lenovo",
|
|
3195
|
-
LG = "LG",
|
|
3196
|
-
MICROSOFT = "Microsoft",
|
|
3197
|
-
MOTOROLA = "Motorola",
|
|
3198
|
-
NVIDIA = "Nvidia",
|
|
3199
|
-
ONEPLUS = "OnePlus",
|
|
3200
|
-
OPERA = "Opera",
|
|
3201
|
-
OPPO = "OPPO",
|
|
3202
|
-
SAMSUNG = "Samsung",
|
|
3203
|
-
SHARP = "Sharp",
|
|
3204
|
-
SONY = "Sony",
|
|
3205
|
-
XIAOMI = "Xiaomi",
|
|
3206
|
-
ZEBRA = "Zebra",
|
|
3207
|
-
FACEBOOK = "Facebook",
|
|
3208
|
-
CHROMIUM_OS = "Chromium OS",
|
|
3209
|
-
MAC_OS = "Mac OS",
|
|
3210
|
-
SUFFIX_BROWSER = " Browser";
|
|
3211
|
-
var extend = function (regexes, extensions) {
|
|
3212
|
-
var mergedRegexes = {};
|
|
3213
|
-
for (var i in regexes) {
|
|
3214
|
-
if (extensions[i] && extensions[i].length % 2 === 0) {
|
|
3215
|
-
mergedRegexes[i] = extensions[i].concat(regexes[i]);
|
|
3216
|
-
} else {
|
|
3217
|
-
mergedRegexes[i] = regexes[i];
|
|
3218
|
-
}
|
|
3219
|
-
}
|
|
3220
|
-
return mergedRegexes;
|
|
3221
|
-
},
|
|
3222
|
-
enumerize = function (arr) {
|
|
3223
|
-
var enums = {};
|
|
3224
|
-
for (var i = 0; i < arr.length; i++) {
|
|
3225
|
-
enums[arr[i].toUpperCase()] = arr[i];
|
|
3226
|
-
}
|
|
3227
|
-
return enums;
|
|
3228
|
-
},
|
|
3229
|
-
has = function (str1, str2) {
|
|
3230
|
-
return typeof str1 === STR_TYPE ? lowerize(str2).indexOf(lowerize(str1)) !== -1 : false;
|
|
3231
|
-
},
|
|
3232
|
-
lowerize = function (str) {
|
|
3233
|
-
return str.toLowerCase();
|
|
3234
|
-
},
|
|
3235
|
-
majorize = function (version) {
|
|
3236
|
-
return typeof version === STR_TYPE ? version.replace(/[^\d\.]/g, EMPTY).split(".")[0] : undefined$1;
|
|
3237
|
-
},
|
|
3238
|
-
trim = function (str, len) {
|
|
3239
|
-
if (typeof str === STR_TYPE) {
|
|
3240
|
-
str = str.replace(/^\s\s*/, EMPTY);
|
|
3241
|
-
return typeof len === UNDEF_TYPE ? str : str.substring(0, UA_MAX_LENGTH);
|
|
3242
|
-
}
|
|
3243
|
-
};
|
|
3244
|
-
var rgxMapper = function (ua, arrays) {
|
|
3245
|
-
var i = 0,
|
|
3246
|
-
j,
|
|
3247
|
-
k,
|
|
3248
|
-
p,
|
|
3249
|
-
q,
|
|
3250
|
-
matches,
|
|
3251
|
-
match;
|
|
3252
|
-
while (i < arrays.length && !matches) {
|
|
3253
|
-
var regex = arrays[i],
|
|
3254
|
-
props = arrays[i + 1];
|
|
3255
|
-
j = k = 0;
|
|
3256
|
-
while (j < regex.length && !matches) {
|
|
3257
|
-
if (!regex[j]) {
|
|
3258
|
-
break;
|
|
3259
|
-
}
|
|
3260
|
-
matches = regex[j++].exec(ua);
|
|
3261
|
-
if (!!matches) {
|
|
3262
|
-
for (p = 0; p < props.length; p++) {
|
|
3263
|
-
match = matches[++k];
|
|
3264
|
-
q = props[p];
|
|
3265
|
-
if (typeof q === OBJ_TYPE && q.length > 0) {
|
|
3266
|
-
if (q.length === 2) {
|
|
3267
|
-
if (typeof q[1] == FUNC_TYPE) {
|
|
3268
|
-
this[q[0]] = q[1].call(this, match);
|
|
3269
|
-
} else {
|
|
3270
|
-
this[q[0]] = q[1];
|
|
3271
|
-
}
|
|
3272
|
-
} else if (q.length === 3) {
|
|
3273
|
-
if (typeof q[1] === FUNC_TYPE && !(q[1].exec && q[1].test)) {
|
|
3274
|
-
this[q[0]] = match ? q[1].call(this, match, q[2]) : undefined$1;
|
|
3275
|
-
} else {
|
|
3276
|
-
this[q[0]] = match ? match.replace(q[1], q[2]) : undefined$1;
|
|
3277
|
-
}
|
|
3278
|
-
} else if (q.length === 4) {
|
|
3279
|
-
this[q[0]] = match ? q[3].call(this, match.replace(q[1], q[2])) : undefined$1;
|
|
3280
|
-
}
|
|
3281
|
-
} else {
|
|
3282
|
-
this[q] = match ? match : undefined$1;
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
}
|
|
3286
|
-
}
|
|
3287
|
-
i += 2;
|
|
3288
|
-
}
|
|
3289
|
-
},
|
|
3290
|
-
strMapper = function (str, map) {
|
|
3291
|
-
for (var i in map) {
|
|
3292
|
-
if (typeof map[i] === OBJ_TYPE && map[i].length > 0) {
|
|
3293
|
-
for (var j = 0; j < map[i].length; j++) {
|
|
3294
|
-
if (has(map[i][j], str)) {
|
|
3295
|
-
return i === UNKNOWN ? undefined$1 : i;
|
|
3296
|
-
}
|
|
3297
|
-
}
|
|
3298
|
-
} else if (has(map[i], str)) {
|
|
3299
|
-
return i === UNKNOWN ? undefined$1 : i;
|
|
3300
|
-
}
|
|
3301
|
-
}
|
|
3302
|
-
return map.hasOwnProperty("*") ? map["*"] : str;
|
|
3303
|
-
};
|
|
3304
|
-
var oldSafariMap = {
|
|
3305
|
-
"1.0": "/8",
|
|
3306
|
-
1.2: "/1",
|
|
3307
|
-
1.3: "/3",
|
|
3308
|
-
"2.0": "/412",
|
|
3309
|
-
"2.0.2": "/416",
|
|
3310
|
-
"2.0.3": "/417",
|
|
3311
|
-
"2.0.4": "/419",
|
|
3312
|
-
"?": "/"
|
|
3313
|
-
},
|
|
3314
|
-
windowsVersionMap = {
|
|
3315
|
-
ME: "4.90",
|
|
3316
|
-
"NT 3.11": "NT3.51",
|
|
3317
|
-
"NT 4.0": "NT4.0",
|
|
3318
|
-
2e3: "NT 5.0",
|
|
3319
|
-
XP: ["NT 5.1", "NT 5.2"],
|
|
3320
|
-
Vista: "NT 6.0",
|
|
3321
|
-
7: "NT 6.1",
|
|
3322
|
-
8: "NT 6.2",
|
|
3323
|
-
8.1: "NT 6.3",
|
|
3324
|
-
10: ["NT 6.4", "NT 10.0"],
|
|
3325
|
-
RT: "ARM"
|
|
3326
|
-
};
|
|
3327
|
-
var regexes = {
|
|
3328
|
-
browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [VERSION, [NAME, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [VERSION, [NAME, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [NAME, VERSION], [/opios[\/ ]+([\w\.]+)/i], [VERSION, [NAME, OPERA + " Mini"]], [/\bop(?:rg)?x\/([\w\.]+)/i], [VERSION, [NAME, OPERA + " GX"]], [/\bopr\/([\w\.]+)/i], [VERSION, [NAME, OPERA]], [/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i], [VERSION, [NAME, "Baidu"]], [/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i], [VERSION, [NAME, "Maxthon"]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i, /(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i, /(heytap|ovi|115)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [NAME, VERSION], [/quark(?:pc)?\/([-\w\.]+)/i], [VERSION, [NAME, "Quark"]], [/\bddg\/([\w\.]+)/i], [VERSION, [NAME, "DuckDuckGo"]], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [VERSION, [NAME, "UC" + BROWSER]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i, /micromessenger\/([\w\.]+)/i], [VERSION, [NAME, "WeChat"]], [/konqueror\/([\w\.]+)/i], [VERSION, [NAME, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [VERSION, [NAME, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [VERSION, [NAME, "Yandex"]], [/slbrowser\/([\w\.]+)/i], [VERSION, [NAME, "Smart Lenovo " + BROWSER]], [/(avast|avg)\/([\w\.]+)/i], [[NAME, /(.+)/, "$1 Secure " + BROWSER], VERSION], [/\bfocus\/([\w\.]+)/i], [VERSION, [NAME, FIREFOX + " Focus"]], [/\bopt\/([\w\.]+)/i], [VERSION, [NAME, OPERA + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [VERSION, [NAME, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [VERSION, [NAME, "Dolphin"]], [/coast\/([\w\.]+)/i], [VERSION, [NAME, OPERA + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [VERSION, [NAME, "MIUI" + SUFFIX_BROWSER]], [/fxios\/([\w\.-]+)/i], [VERSION, [NAME, FIREFOX]], [/\bqihoobrowser\/?([\w\.]*)/i], [VERSION, [NAME, "360"]], [/\b(qq)\/([\w\.]+)/i], [[NAME, /(.+)/, "$1Browser"], VERSION], [/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i], [[NAME, /(.+)/, "$1" + SUFFIX_BROWSER], VERSION], [/samsungbrowser\/([\w\.]+)/i], [VERSION, [NAME, SAMSUNG + " Internet"]], [/metasr[\/ ]?([\d\.]+)/i], [VERSION, [NAME, "Sogou Explorer"]], [/(sogou)mo\w+\/([\d\.]+)/i], [[NAME, "Sogou Mobile"], VERSION], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i], [NAME, VERSION], [/(lbbrowser|rekonq)/i, /\[(linkedin)app\]/i], [NAME], [/ome\/([\w\.]+) \w* ?(iron) saf/i, /ome\/([\w\.]+).+qihu (360)[es]e/i], [VERSION, NAME], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[NAME, FACEBOOK], VERSION], [/(Klarna)\/([\w\.]+)/i, /(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /(daum)apps[\/ ]([\w\.]+)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(alipay)client\/([\w\.]+)/i, /(twitter)(?:and| f.+e\/([\w\.]+))/i, /(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i], [NAME, VERSION], [/\bgsa\/([\w\.]+) .*safari\//i], [VERSION, [NAME, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [VERSION, [NAME, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [VERSION, [NAME, CHROME + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[NAME, CHROME + " WebView"], VERSION], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [VERSION, [NAME, "Android " + BROWSER]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [NAME, VERSION], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [VERSION, [NAME, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [VERSION, NAME], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [NAME, [VERSION, strMapper, oldSafariMap]], [/(webkit|khtml)\/([\w\.]+)/i], [NAME, VERSION], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[NAME, "Netscape"], VERSION], [/(wolvic|librewolf)\/([\w\.]+)/i], [NAME, VERSION], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [VERSION, [NAME, FIREFOX + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /\b(links) \(([\w\.]+)/i], [NAME, [VERSION, /_/g, "."]], [/(cobalt)\/([\w\.]+)/i], [NAME, [VERSION, /master.|lts./, ""]]],
|
|
3329
|
-
cpu: [[/\b((amd|x|x86[-_]?|wow|win)64)\b/i], [[ARCHITECTURE, "amd64"]], [/(ia32(?=;))/i, /\b((i[346]|x)86)(pc)?\b/i], [[ARCHITECTURE, "ia32"]], [/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i], [[ARCHITECTURE, "arm64"]], [/\b(arm(v[67])?ht?n?[fl]p?)\b/i], [[ARCHITECTURE, "armhf"]], [/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i], [[ARCHITECTURE, "arm"]], [/((ppc|powerpc)(64)?)( mac|;|\))/i], [[ARCHITECTURE, /ower/, EMPTY, lowerize]], [/ sun4\w[;\)]/i], [[ARCHITECTURE, "sparc"]], [/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i], [[ARCHITECTURE, lowerize]]],
|
|
3330
|
-
device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [MODEL, [VENDOR, SAMSUNG], [TYPE, TABLET]], [/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]((?!sm-[lr])[-\w]+)/i, /sec-(sgh\w+)/i], [MODEL, [VENDOR, SAMSUNG], [TYPE, MOBILE]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [MODEL, [VENDOR, APPLE], [TYPE, MOBILE]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [MODEL, [VENDOR, APPLE], [TYPE, TABLET]], [/(macintosh);/i], [MODEL, [VENDOR, APPLE]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [MODEL, [VENDOR, SHARP], [TYPE, MOBILE]], [/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i], [MODEL, [VENDOR, HONOR], [TYPE, TABLET]], [/honor([-\w ]+)[;\)]/i], [MODEL, [VENDOR, HONOR], [TYPE, MOBILE]], [/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i], [MODEL, [VENDOR, HUAWEI], [TYPE, TABLET]], [/(?:huawei)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [MODEL, [VENDOR, HUAWEI], [TYPE, MOBILE]], [/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i, /\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i], [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE, TABLET]], [/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i, / ([\w ]+) miui\/v?\d/i], [[MODEL, /_/g, " "], [VENDOR, XIAOMI], [TYPE, MOBILE]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [MODEL, [VENDOR, OPPO], [TYPE, MOBILE]], [/\b(opd2(\d{3}a?))(?: bui|\))/i], [MODEL, [VENDOR, strMapper, {
|
|
3331
|
-
OnePlus: ["304", "403", "203"],
|
|
3332
|
-
"*": OPPO
|
|
3333
|
-
}], [TYPE, TABLET]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [MODEL, [VENDOR, "Vivo"], [TYPE, MOBILE]], [/\b(rmx[1-3]\d{3})(?: bui|;|\))/i], [MODEL, [VENDOR, "Realme"], [TYPE, MOBILE]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [MODEL, [VENDOR, MOTOROLA], [TYPE, MOBILE]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [MODEL, [VENDOR, MOTOROLA], [TYPE, TABLET]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [MODEL, [VENDOR, LG], [TYPE, TABLET]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i, /\blg-?([\d\w]+) bui/i], [MODEL, [VENDOR, LG], [TYPE, MOBILE]], [/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i, /lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i], [MODEL, [VENDOR, LENOVO], [TYPE, TABLET]], [/(nokia) (t[12][01])/i], [VENDOR, MODEL, [TYPE, TABLET]], [/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i, /nokia[-_ ]?(([-\w\. ]*))/i], [[MODEL, /_/g, " "], [TYPE, MOBILE], [VENDOR, "Nokia"]], [/(pixel (c|tablet))\b/i], [MODEL, [VENDOR, GOOGLE], [TYPE, TABLET]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [MODEL, [VENDOR, GOOGLE], [TYPE, MOBILE]], [/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [MODEL, [VENDOR, SONY], [TYPE, MOBILE]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[MODEL, "Xperia Tablet"], [VENDOR, SONY], [TYPE, TABLET]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [MODEL, [VENDOR, ONEPLUS], [TYPE, MOBILE]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [MODEL, [VENDOR, AMAZON], [TYPE, TABLET]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[MODEL, /(.+)/g, "Fire Phone $1"], [VENDOR, AMAZON], [TYPE, MOBILE]], [/(playbook);[-\w\),; ]+(rim)/i], [MODEL, VENDOR, [TYPE, TABLET]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [MODEL, [VENDOR, BLACKBERRY], [TYPE, MOBILE]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [MODEL, [VENDOR, ASUS], [TYPE, TABLET]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [MODEL, [VENDOR, ASUS], [TYPE, MOBILE]], [/(nexus 9)/i], [MODEL, [VENDOR, "HTC"], [TYPE, TABLET]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [VENDOR, [MODEL, /_/g, " "], [TYPE, MOBILE]], [/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i], [MODEL, [VENDOR, "TCL"], [TYPE, TABLET]], [/(itel) ((\w+))/i], [[VENDOR, lowerize], MODEL, [TYPE, strMapper, {
|
|
3334
|
-
tablet: ["p10001l", "w7001"],
|
|
3335
|
-
"*": "mobile"
|
|
3336
|
-
}]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [MODEL, [VENDOR, "Acer"], [TYPE, TABLET]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [MODEL, [VENDOR, "Meizu"], [TYPE, MOBILE]], [/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i], [MODEL, [VENDOR, "Ulefone"], [TYPE, MOBILE]], [/; (energy ?\w+)(?: bui|\))/i, /; energizer ([\w ]+)(?: bui|\))/i], [MODEL, [VENDOR, "Energizer"], [TYPE, MOBILE]], [/; cat (b35);/i, /; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i], [MODEL, [VENDOR, "Cat"], [TYPE, MOBILE]], [/((?:new )?andromax[\w- ]+)(?: bui|\))/i], [MODEL, [VENDOR, "Smartfren"], [TYPE, MOBILE]], [/droid.+; (a(?:015|06[35]|142p?))/i], [MODEL, [VENDOR, "Nothing"], [TYPE, MOBILE]], [/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i, /archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i], [MODEL, [VENDOR, "Archos"], [TYPE, TABLET]], [/archos ([\w ]+)( b|\))/i, /; (ac[3-6]\d\w{2,8})( b|\))/i], [MODEL, [VENDOR, "Archos"], [TYPE, MOBILE]], [/(imo) (tab \w+)/i, /(infinix) (x1101b?)/i], [VENDOR, MODEL, [TYPE, TABLET]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i, /; (hmd|imo) ([\w ]+?)(?: bui|\))/i, /(hp) ([\w ]+\w)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i, /(oppo) ?([\w ]+) bui/i], [VENDOR, MODEL, [TYPE, MOBILE]], [/(kobo)\s(ereader|touch)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [VENDOR, MODEL, [TYPE, TABLET]], [/(surface duo)/i], [MODEL, [VENDOR, MICROSOFT], [TYPE, TABLET]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [MODEL, [VENDOR, "Fairphone"], [TYPE, MOBILE]], [/(u304aa)/i], [MODEL, [VENDOR, "AT&T"], [TYPE, MOBILE]], [/\bsie-(\w*)/i], [MODEL, [VENDOR, "Siemens"], [TYPE, MOBILE]], [/\b(rct\w+) b/i], [MODEL, [VENDOR, "RCA"], [TYPE, TABLET]], [/\b(venue[\d ]{2,7}) b/i], [MODEL, [VENDOR, "Dell"], [TYPE, TABLET]], [/\b(q(?:mv|ta)\w+) b/i], [MODEL, [VENDOR, "Verizon"], [TYPE, TABLET]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [MODEL, [VENDOR, "Barnes & Noble"], [TYPE, TABLET]], [/\b(tm\d{3}\w+) b/i], [MODEL, [VENDOR, "NuVision"], [TYPE, TABLET]], [/\b(k88) b/i], [MODEL, [VENDOR, "ZTE"], [TYPE, TABLET]], [/\b(nx\d{3}j) b/i], [MODEL, [VENDOR, "ZTE"], [TYPE, MOBILE]], [/\b(gen\d{3}) b.+49h/i], [MODEL, [VENDOR, "Swiss"], [TYPE, MOBILE]], [/\b(zur\d{3}) b/i], [MODEL, [VENDOR, "Swiss"], [TYPE, TABLET]], [/\b((zeki)?tb.*\b) b/i], [MODEL, [VENDOR, "Zeki"], [TYPE, TABLET]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[VENDOR, "Dragon Touch"], MODEL, [TYPE, TABLET]], [/\b(ns-?\w{0,9}) b/i], [MODEL, [VENDOR, "Insignia"], [TYPE, TABLET]], [/\b((nxa|next)-?\w{0,9}) b/i], [MODEL, [VENDOR, "NextBook"], [TYPE, TABLET]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[VENDOR, "Voice"], MODEL, [TYPE, MOBILE]], [/\b(lvtel\-)?(v1[12]) b/i], [[VENDOR, "LvTel"], MODEL, [TYPE, MOBILE]], [/\b(ph-1) /i], [MODEL, [VENDOR, "Essential"], [TYPE, MOBILE]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [MODEL, [VENDOR, "Envizen"], [TYPE, TABLET]], [/\b(trio[-\w\. ]+) b/i], [MODEL, [VENDOR, "MachSpeed"], [TYPE, TABLET]], [/\btu_(1491) b/i], [MODEL, [VENDOR, "Rotor"], [TYPE, TABLET]], [/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i], [MODEL, [VENDOR, NVIDIA], [TYPE, TABLET]], [/(sprint) (\w+)/i], [VENDOR, MODEL, [TYPE, MOBILE]], [/(kin\.[onetw]{3})/i], [[MODEL, /\./g, " "], [VENDOR, MICROSOFT], [TYPE, MOBILE]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [MODEL, [VENDOR, ZEBRA], [TYPE, TABLET]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [MODEL, [VENDOR, ZEBRA], [TYPE, MOBILE]], [/smart-tv.+(samsung)/i], [VENDOR, [TYPE, SMARTTV]], [/hbbtv.+maple;(\d+)/i], [[MODEL, /^/, "SmartTV"], [VENDOR, SAMSUNG], [TYPE, SMARTTV]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[VENDOR, LG], [TYPE, SMARTTV]], [/(apple) ?tv/i], [VENDOR, [MODEL, APPLE + " TV"], [TYPE, SMARTTV]], [/crkey/i], [[MODEL, CHROME + "cast"], [VENDOR, GOOGLE], [TYPE, SMARTTV]], [/droid.+aft(\w+)( bui|\))/i], [MODEL, [VENDOR, AMAZON], [TYPE, SMARTTV]], [/(shield \w+ tv)/i], [MODEL, [VENDOR, NVIDIA], [TYPE, SMARTTV]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [MODEL, [VENDOR, SHARP], [TYPE, SMARTTV]], [/(bravia[\w ]+)( bui|\))/i], [MODEL, [VENDOR, SONY], [TYPE, SMARTTV]], [/(mi(tv|box)-?\w+) bui/i], [MODEL, [VENDOR, XIAOMI], [TYPE, SMARTTV]], [/Hbbtv.*(technisat) (.*);/i], [VENDOR, MODEL, [TYPE, SMARTTV]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[VENDOR, trim], [MODEL, trim], [TYPE, SMARTTV]], [/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i], [MODEL, [TYPE, SMARTTV]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[TYPE, SMARTTV]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [VENDOR, MODEL, [TYPE, CONSOLE]], [/droid.+; (shield)( bui|\))/i], [MODEL, [VENDOR, NVIDIA], [TYPE, CONSOLE]], [/(playstation \w+)/i], [MODEL, [VENDOR, SONY], [TYPE, CONSOLE]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [MODEL, [VENDOR, MICROSOFT], [TYPE, CONSOLE]], [/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i], [MODEL, [VENDOR, SAMSUNG], [TYPE, WEARABLE]], [/((pebble))app/i, /(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i], [VENDOR, MODEL, [TYPE, WEARABLE]], [/(ow(?:19|20)?we?[1-3]{1,3})/i], [MODEL, [VENDOR, OPPO], [TYPE, WEARABLE]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [MODEL, [VENDOR, APPLE], [TYPE, WEARABLE]], [/(opwwe\d{3})/i], [MODEL, [VENDOR, ONEPLUS], [TYPE, WEARABLE]], [/(moto 360)/i], [MODEL, [VENDOR, MOTOROLA], [TYPE, WEARABLE]], [/(smartwatch 3)/i], [MODEL, [VENDOR, SONY], [TYPE, WEARABLE]], [/(g watch r)/i], [MODEL, [VENDOR, LG], [TYPE, WEARABLE]], [/droid.+; (wt63?0{2,3})\)/i], [MODEL, [VENDOR, ZEBRA], [TYPE, WEARABLE]], [/droid.+; (glass) \d/i], [MODEL, [VENDOR, GOOGLE], [TYPE, WEARABLE]], [/(pico) (4|neo3(?: link|pro)?)/i], [VENDOR, MODEL, [TYPE, WEARABLE]], [/; (quest( \d| pro)?)/i], [MODEL, [VENDOR, FACEBOOK], [TYPE, WEARABLE]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [VENDOR, [TYPE, EMBEDDED]], [/(aeobc)\b/i], [MODEL, [VENDOR, AMAZON], [TYPE, EMBEDDED]], [/(homepod).+mac os/i], [MODEL, [VENDOR, APPLE], [TYPE, EMBEDDED]], [/windows iot/i], [[TYPE, EMBEDDED]], [/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i], [MODEL, [TYPE, MOBILE]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [MODEL, [TYPE, TABLET]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[TYPE, TABLET]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[TYPE, MOBILE]], [/droid .+?; ([\w\. -]+)( bui|\))/i], [MODEL, [VENDOR, "Generic"]]],
|
|
3337
|
-
engine: [[/windows.+ edge\/([\w\.]+)/i], [VERSION, [NAME, EDGE + "HTML"]], [/(arkweb)\/([\w\.]+)/i], [NAME, VERSION], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [VERSION, [NAME, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [NAME, VERSION], [/ladybird\//i], [[NAME, "LibWeb"]], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [VERSION, NAME]],
|
|
3338
|
-
os: [[/microsoft (windows) (vista|xp)/i], [NAME, VERSION], [/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i], [NAME, [VERSION, strMapper, windowsVersionMap]], [/windows nt 6\.2; (arm)/i, /windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i, /(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[VERSION, strMapper, windowsVersionMap], [NAME, "Windows"]], [/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i, /(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[VERSION, /_/g, "."], [NAME, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[NAME, MAC_OS], [VERSION, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [VERSION, NAME], [/(ubuntu) ([\w\.]+) like android/i], [[NAME, /(.+)/, "$1 Touch"], VERSION], [/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i], [NAME, VERSION], [/\(bb(10);/i], [VERSION, [NAME, BLACKBERRY]], [/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i], [VERSION, [NAME, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [VERSION, [NAME, FIREFOX + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [VERSION, [NAME, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [VERSION, [NAME, "watchOS"]], [/crkey\/([\d\.]+)/i], [VERSION, [NAME, CHROME + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[NAME, CHROMIUM_OS], VERSION], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [NAME, VERSION], [/(sunos) ?([\w\.\d]*)/i], [[NAME, "Solaris"], VERSION], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [NAME, VERSION]]
|
|
3339
|
-
};
|
|
3340
|
-
var UAParser = function (ua, extensions) {
|
|
3341
|
-
if (typeof ua === OBJ_TYPE) {
|
|
3342
|
-
extensions = ua;
|
|
3343
|
-
ua = undefined$1;
|
|
3344
|
-
}
|
|
3345
|
-
if (!(this instanceof UAParser)) {
|
|
3346
|
-
return new UAParser(ua, extensions).getResult();
|
|
3347
|
-
}
|
|
3348
|
-
var _navigator = typeof window !== UNDEF_TYPE && window.navigator ? window.navigator : undefined$1;
|
|
3349
|
-
var _ua = ua || (_navigator && _navigator.userAgent ? _navigator.userAgent : EMPTY);
|
|
3350
|
-
var _uach = _navigator && _navigator.userAgentData ? _navigator.userAgentData : undefined$1;
|
|
3351
|
-
var _rgxmap = extensions ? extend(regexes, extensions) : regexes;
|
|
3352
|
-
var _isSelfNav = _navigator && _navigator.userAgent == _ua;
|
|
3353
|
-
this.getBrowser = function () {
|
|
3354
|
-
var _browser = {};
|
|
3355
|
-
_browser[NAME] = undefined$1;
|
|
3356
|
-
_browser[VERSION] = undefined$1;
|
|
3357
|
-
rgxMapper.call(_browser, _ua, _rgxmap.browser);
|
|
3358
|
-
_browser[MAJOR] = majorize(_browser[VERSION]);
|
|
3359
|
-
if (_isSelfNav && _navigator && _navigator.brave && typeof _navigator.brave.isBrave == FUNC_TYPE) {
|
|
3360
|
-
_browser[NAME] = "Brave";
|
|
3361
|
-
}
|
|
3362
|
-
return _browser;
|
|
3363
|
-
};
|
|
3364
|
-
this.getCPU = function () {
|
|
3365
|
-
var _cpu = {};
|
|
3366
|
-
_cpu[ARCHITECTURE] = undefined$1;
|
|
3367
|
-
rgxMapper.call(_cpu, _ua, _rgxmap.cpu);
|
|
3368
|
-
return _cpu;
|
|
3369
|
-
};
|
|
3370
|
-
this.getDevice = function () {
|
|
3371
|
-
var _device = {};
|
|
3372
|
-
_device[VENDOR] = undefined$1;
|
|
3373
|
-
_device[MODEL] = undefined$1;
|
|
3374
|
-
_device[TYPE] = undefined$1;
|
|
3375
|
-
rgxMapper.call(_device, _ua, _rgxmap.device);
|
|
3376
|
-
if (_isSelfNav && !_device[TYPE] && _uach && _uach.mobile) {
|
|
3377
|
-
_device[TYPE] = MOBILE;
|
|
3378
|
-
}
|
|
3379
|
-
if (_isSelfNav && _device[MODEL] == "Macintosh" && _navigator && typeof _navigator.standalone !== UNDEF_TYPE && _navigator.maxTouchPoints && _navigator.maxTouchPoints > 2) {
|
|
3380
|
-
_device[MODEL] = "iPad";
|
|
3381
|
-
_device[TYPE] = TABLET;
|
|
3382
|
-
}
|
|
3383
|
-
return _device;
|
|
3384
|
-
};
|
|
3385
|
-
this.getEngine = function () {
|
|
3386
|
-
var _engine = {};
|
|
3387
|
-
_engine[NAME] = undefined$1;
|
|
3388
|
-
_engine[VERSION] = undefined$1;
|
|
3389
|
-
rgxMapper.call(_engine, _ua, _rgxmap.engine);
|
|
3390
|
-
return _engine;
|
|
3391
|
-
};
|
|
3392
|
-
this.getOS = function () {
|
|
3393
|
-
var _os = {};
|
|
3394
|
-
_os[NAME] = undefined$1;
|
|
3395
|
-
_os[VERSION] = undefined$1;
|
|
3396
|
-
rgxMapper.call(_os, _ua, _rgxmap.os);
|
|
3397
|
-
if (_isSelfNav && !_os[NAME] && _uach && _uach.platform && _uach.platform != "Unknown") {
|
|
3398
|
-
_os[NAME] = _uach.platform.replace(/chrome os/i, CHROMIUM_OS).replace(/macos/i, MAC_OS);
|
|
3399
|
-
}
|
|
3400
|
-
return _os;
|
|
3401
|
-
};
|
|
3402
|
-
this.getResult = function () {
|
|
3403
|
-
return {
|
|
3404
|
-
ua: this.getUA(),
|
|
3405
|
-
browser: this.getBrowser(),
|
|
3406
|
-
engine: this.getEngine(),
|
|
3407
|
-
os: this.getOS(),
|
|
3408
|
-
device: this.getDevice(),
|
|
3409
|
-
cpu: this.getCPU()
|
|
3410
|
-
};
|
|
3411
|
-
};
|
|
3412
|
-
this.getUA = function () {
|
|
3413
|
-
return _ua;
|
|
3414
|
-
};
|
|
3415
|
-
this.setUA = function (ua) {
|
|
3416
|
-
_ua = typeof ua === STR_TYPE && ua.length > UA_MAX_LENGTH ? trim(ua, UA_MAX_LENGTH) : ua;
|
|
3417
|
-
return this;
|
|
3418
|
-
};
|
|
3419
|
-
this.setUA(_ua);
|
|
3420
|
-
return this;
|
|
3421
|
-
};
|
|
3422
|
-
UAParser.VERSION = LIBVERSION;
|
|
3423
|
-
UAParser.BROWSER = enumerize([NAME, VERSION, MAJOR]);
|
|
3424
|
-
UAParser.CPU = enumerize([ARCHITECTURE]);
|
|
3425
|
-
UAParser.DEVICE = enumerize([MODEL, VENDOR, TYPE, CONSOLE, MOBILE, SMARTTV, TABLET, WEARABLE, EMBEDDED]);
|
|
3426
|
-
UAParser.ENGINE = UAParser.OS = enumerize([NAME, VERSION]);
|
|
3427
|
-
{
|
|
3428
|
-
if (module.exports) {
|
|
3429
|
-
exports = module.exports = UAParser;
|
|
3430
|
-
}
|
|
3431
|
-
exports.UAParser = UAParser;
|
|
3432
|
-
}
|
|
3433
|
-
var $ = typeof window !== UNDEF_TYPE && (window.jQuery || window.Zepto);
|
|
3434
|
-
if ($ && !$.ua) {
|
|
3435
|
-
var parser = new UAParser();
|
|
3436
|
-
$.ua = parser.getResult();
|
|
3437
|
-
$.ua.get = function () {
|
|
3438
|
-
return parser.getUA();
|
|
3439
|
-
};
|
|
3440
|
-
$.ua.set = function (ua) {
|
|
3441
|
-
parser.setUA(ua);
|
|
3442
|
-
var result = parser.getResult();
|
|
3443
|
-
for (var prop in result) {
|
|
3444
|
-
$.ua[prop] = result[prop];
|
|
3445
|
-
}
|
|
3446
|
-
};
|
|
3447
|
-
}
|
|
3448
|
-
})(typeof window === "object" ? window : commonjsGlobal);
|
|
3449
|
-
})(uaParser_min, uaParser_min.exports);
|
|
3450
|
-
var uaParser_minExports = uaParser_min.exports;
|
|
3451
|
-
|
|
3452
|
-
Object.defineProperty(lib, '__esModule', {
|
|
3453
|
-
value: true
|
|
3454
|
-
});
|
|
3455
|
-
function _interopDefault(ex) {
|
|
3456
|
-
return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;
|
|
3457
|
-
}
|
|
3458
|
-
var React = React$1;
|
|
3459
|
-
var React__default = _interopDefault(React);
|
|
3460
|
-
var UAParser = uaParser_minExports;
|
|
3461
|
-
var ClientUAInstance = new UAParser();
|
|
3462
|
-
var browser = ClientUAInstance.getBrowser();
|
|
3463
|
-
var cpu = ClientUAInstance.getCPU();
|
|
3464
|
-
var device = ClientUAInstance.getDevice();
|
|
3465
|
-
var engine = ClientUAInstance.getEngine();
|
|
3466
|
-
var os = ClientUAInstance.getOS();
|
|
3467
|
-
var ua = ClientUAInstance.getUA();
|
|
3468
|
-
var setUa = function setUa(userAgentString) {
|
|
3469
|
-
return ClientUAInstance.setUA(userAgentString);
|
|
3470
|
-
};
|
|
3471
|
-
var parseUserAgent = function parseUserAgent(userAgent) {
|
|
3472
|
-
if (!userAgent) {
|
|
3473
|
-
console.error('No userAgent string was provided');
|
|
3474
|
-
return;
|
|
3475
|
-
}
|
|
3476
|
-
var UserAgentInstance = new UAParser(userAgent);
|
|
3477
|
-
return {
|
|
3478
|
-
UA: UserAgentInstance,
|
|
3479
|
-
browser: UserAgentInstance.getBrowser(),
|
|
3480
|
-
cpu: UserAgentInstance.getCPU(),
|
|
3481
|
-
device: UserAgentInstance.getDevice(),
|
|
3482
|
-
engine: UserAgentInstance.getEngine(),
|
|
3483
|
-
os: UserAgentInstance.getOS(),
|
|
3484
|
-
ua: UserAgentInstance.getUA(),
|
|
3485
|
-
setUserAgent: function setUserAgent(userAgentString) {
|
|
3486
|
-
return UserAgentInstance.setUA(userAgentString);
|
|
3487
|
-
}
|
|
3488
|
-
};
|
|
3489
|
-
};
|
|
3490
|
-
var UAHelper = /*#__PURE__*/Object.freeze({
|
|
3491
|
-
ClientUAInstance: ClientUAInstance,
|
|
3492
|
-
browser: browser,
|
|
3493
|
-
cpu: cpu,
|
|
3494
|
-
device: device,
|
|
3495
|
-
engine: engine,
|
|
3496
|
-
os: os,
|
|
3497
|
-
ua: ua,
|
|
3498
|
-
setUa: setUa,
|
|
3499
|
-
parseUserAgent: parseUserAgent
|
|
3500
|
-
});
|
|
3501
|
-
function ownKeys(object, enumerableOnly) {
|
|
3502
|
-
var keys = Object.keys(object);
|
|
3503
|
-
if (Object.getOwnPropertySymbols) {
|
|
3504
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
3505
|
-
if (enumerableOnly) {
|
|
3506
|
-
symbols = symbols.filter(function (sym) {
|
|
3507
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
3508
|
-
});
|
|
3509
|
-
}
|
|
3510
|
-
keys.push.apply(keys, symbols);
|
|
3511
|
-
}
|
|
3512
|
-
return keys;
|
|
3513
|
-
}
|
|
3514
|
-
function _objectSpread2(target) {
|
|
3515
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3516
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
3517
|
-
if (i % 2) {
|
|
3518
|
-
ownKeys(Object(source), true).forEach(function (key) {
|
|
3519
|
-
_defineProperty(target, key, source[key]);
|
|
3520
|
-
});
|
|
3521
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
3522
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
3523
|
-
} else {
|
|
3524
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
3525
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
3526
|
-
});
|
|
3527
|
-
}
|
|
3528
|
-
}
|
|
3529
|
-
return target;
|
|
3530
|
-
}
|
|
3531
|
-
function _typeof(obj) {
|
|
3532
|
-
"@babel/helpers - typeof";
|
|
3533
|
-
|
|
3534
|
-
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
3535
|
-
_typeof = function (obj) {
|
|
3536
|
-
return typeof obj;
|
|
3537
|
-
};
|
|
3538
|
-
} else {
|
|
3539
|
-
_typeof = function (obj) {
|
|
3540
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
3541
|
-
};
|
|
3542
|
-
}
|
|
3543
|
-
return _typeof(obj);
|
|
3544
|
-
}
|
|
3545
|
-
function _classCallCheck(instance, Constructor) {
|
|
3546
|
-
if (!(instance instanceof Constructor)) {
|
|
3547
|
-
throw new TypeError("Cannot call a class as a function");
|
|
3548
|
-
}
|
|
3549
|
-
}
|
|
3550
|
-
function _defineProperties(target, props) {
|
|
3551
|
-
for (var i = 0; i < props.length; i++) {
|
|
3552
|
-
var descriptor = props[i];
|
|
3553
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
3554
|
-
descriptor.configurable = true;
|
|
3555
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
3556
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
3557
|
-
}
|
|
3558
|
-
}
|
|
3559
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
3560
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
3561
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
3562
|
-
return Constructor;
|
|
3563
|
-
}
|
|
3564
|
-
function _defineProperty(obj, key, value) {
|
|
3565
|
-
if (key in obj) {
|
|
3566
|
-
Object.defineProperty(obj, key, {
|
|
3567
|
-
value: value,
|
|
3568
|
-
enumerable: true,
|
|
3569
|
-
configurable: true,
|
|
3570
|
-
writable: true
|
|
3571
|
-
});
|
|
3572
|
-
} else {
|
|
3573
|
-
obj[key] = value;
|
|
3574
|
-
}
|
|
3575
|
-
return obj;
|
|
3576
|
-
}
|
|
3577
|
-
function _extends() {
|
|
3578
|
-
_extends = Object.assign || function (target) {
|
|
3579
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
3580
|
-
var source = arguments[i];
|
|
3581
|
-
for (var key in source) {
|
|
3582
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
3583
|
-
target[key] = source[key];
|
|
3584
|
-
}
|
|
3585
|
-
}
|
|
3586
|
-
}
|
|
3587
|
-
return target;
|
|
3588
|
-
};
|
|
3589
|
-
return _extends.apply(this, arguments);
|
|
3590
|
-
}
|
|
3591
|
-
function _inherits(subClass, superClass) {
|
|
3592
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
3593
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
3594
|
-
}
|
|
3595
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
3596
|
-
constructor: {
|
|
3597
|
-
value: subClass,
|
|
3598
|
-
writable: true,
|
|
3599
|
-
configurable: true
|
|
3600
|
-
}
|
|
3601
|
-
});
|
|
3602
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
3603
|
-
}
|
|
3604
|
-
function _getPrototypeOf(o) {
|
|
3605
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
3606
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
3607
|
-
};
|
|
3608
|
-
return _getPrototypeOf(o);
|
|
3609
|
-
}
|
|
3610
|
-
function _setPrototypeOf(o, p) {
|
|
3611
|
-
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
3612
|
-
o.__proto__ = p;
|
|
3613
|
-
return o;
|
|
3614
|
-
};
|
|
3615
|
-
return _setPrototypeOf(o, p);
|
|
3616
|
-
}
|
|
3617
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
3618
|
-
if (source == null) return {};
|
|
3619
|
-
var target = {};
|
|
3620
|
-
var sourceKeys = Object.keys(source);
|
|
3621
|
-
var key, i;
|
|
3622
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
3623
|
-
key = sourceKeys[i];
|
|
3624
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
3625
|
-
target[key] = source[key];
|
|
3626
|
-
}
|
|
3627
|
-
return target;
|
|
3628
|
-
}
|
|
3629
|
-
function _objectWithoutProperties(source, excluded) {
|
|
3630
|
-
if (source == null) return {};
|
|
3631
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
3632
|
-
var key, i;
|
|
3633
|
-
if (Object.getOwnPropertySymbols) {
|
|
3634
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
3635
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
3636
|
-
key = sourceSymbolKeys[i];
|
|
3637
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
3638
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
3639
|
-
target[key] = source[key];
|
|
3640
|
-
}
|
|
3641
|
-
}
|
|
3642
|
-
return target;
|
|
3643
|
-
}
|
|
3644
|
-
function _assertThisInitialized(self) {
|
|
3645
|
-
if (self === void 0) {
|
|
3646
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
3647
|
-
}
|
|
3648
|
-
return self;
|
|
3649
|
-
}
|
|
3650
|
-
function _possibleConstructorReturn(self, call) {
|
|
3651
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
3652
|
-
return call;
|
|
3653
|
-
} else if (call !== void 0) {
|
|
3654
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
3655
|
-
}
|
|
3656
|
-
return _assertThisInitialized(self);
|
|
3657
|
-
}
|
|
3658
|
-
function _slicedToArray(arr, i) {
|
|
3659
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
3660
|
-
}
|
|
3661
|
-
function _arrayWithHoles(arr) {
|
|
3662
|
-
if (Array.isArray(arr)) return arr;
|
|
3663
|
-
}
|
|
3664
|
-
function _iterableToArrayLimit(arr, i) {
|
|
3665
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3666
|
-
if (_i == null) return;
|
|
3667
|
-
var _arr = [];
|
|
3668
|
-
var _n = true;
|
|
3669
|
-
var _d = false;
|
|
3670
|
-
var _s, _e;
|
|
3671
|
-
try {
|
|
3672
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
3673
|
-
_arr.push(_s.value);
|
|
3674
|
-
if (i && _arr.length === i) break;
|
|
3675
|
-
}
|
|
3676
|
-
} catch (err) {
|
|
3677
|
-
_d = true;
|
|
3678
|
-
_e = err;
|
|
3679
|
-
} finally {
|
|
3680
|
-
try {
|
|
3681
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3682
|
-
} finally {
|
|
3683
|
-
if (_d) throw _e;
|
|
3684
|
-
}
|
|
3685
|
-
}
|
|
3686
|
-
return _arr;
|
|
3687
|
-
}
|
|
3688
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
3689
|
-
if (!o) return;
|
|
3690
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
3691
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3692
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3693
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
3694
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
3695
|
-
}
|
|
3696
|
-
function _arrayLikeToArray(arr, len) {
|
|
3697
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3698
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
3699
|
-
return arr2;
|
|
3700
|
-
}
|
|
3701
|
-
function _nonIterableRest() {
|
|
3702
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3703
|
-
}
|
|
3704
|
-
var DeviceTypes = {
|
|
3705
|
-
Mobile: 'mobile',
|
|
3706
|
-
Tablet: 'tablet',
|
|
3707
|
-
SmartTv: 'smarttv',
|
|
3708
|
-
Console: 'console',
|
|
3709
|
-
Wearable: 'wearable',
|
|
3710
|
-
Embedded: 'embedded',
|
|
3711
|
-
Browser: undefined
|
|
3712
|
-
};
|
|
3713
|
-
var BrowserTypes = {
|
|
3714
|
-
Chrome: 'Chrome',
|
|
3715
|
-
Firefox: 'Firefox',
|
|
3716
|
-
Opera: 'Opera',
|
|
3717
|
-
Yandex: 'Yandex',
|
|
3718
|
-
Safari: 'Safari',
|
|
3719
|
-
InternetExplorer: 'Internet Explorer',
|
|
3720
|
-
Edge: 'Edge',
|
|
3721
|
-
Chromium: 'Chromium',
|
|
3722
|
-
Ie: 'IE',
|
|
3723
|
-
MobileSafari: 'Mobile Safari',
|
|
3724
|
-
EdgeChromium: 'Edge Chromium',
|
|
3725
|
-
MIUI: 'MIUI Browser',
|
|
3726
|
-
SamsungBrowser: 'Samsung Browser'
|
|
3727
|
-
};
|
|
3728
|
-
var OsTypes = {
|
|
3729
|
-
IOS: 'iOS',
|
|
3730
|
-
Android: 'Android',
|
|
3731
|
-
WindowsPhone: 'Windows Phone',
|
|
3732
|
-
Windows: 'Windows',
|
|
3733
|
-
MAC_OS: 'Mac OS'
|
|
3734
|
-
};
|
|
3735
|
-
var InitialDeviceTypes = {
|
|
3736
|
-
isMobile: false,
|
|
3737
|
-
isTablet: false,
|
|
3738
|
-
isBrowser: false,
|
|
3739
|
-
isSmartTV: false,
|
|
3740
|
-
isConsole: false,
|
|
3741
|
-
isWearable: false
|
|
3742
|
-
};
|
|
3743
|
-
var checkDeviceType = function checkDeviceType(type) {
|
|
3744
|
-
switch (type) {
|
|
3745
|
-
case DeviceTypes.Mobile:
|
|
3746
|
-
return {
|
|
3747
|
-
isMobile: true
|
|
3748
|
-
};
|
|
3749
|
-
case DeviceTypes.Tablet:
|
|
3750
|
-
return {
|
|
3751
|
-
isTablet: true
|
|
3752
|
-
};
|
|
3753
|
-
case DeviceTypes.SmartTv:
|
|
3754
|
-
return {
|
|
3755
|
-
isSmartTV: true
|
|
3756
|
-
};
|
|
3757
|
-
case DeviceTypes.Console:
|
|
3758
|
-
return {
|
|
3759
|
-
isConsole: true
|
|
3760
|
-
};
|
|
3761
|
-
case DeviceTypes.Wearable:
|
|
3762
|
-
return {
|
|
3763
|
-
isWearable: true
|
|
3764
|
-
};
|
|
3765
|
-
case DeviceTypes.Browser:
|
|
3766
|
-
return {
|
|
3767
|
-
isBrowser: true
|
|
3768
|
-
};
|
|
3769
|
-
case DeviceTypes.Embedded:
|
|
3770
|
-
return {
|
|
3771
|
-
isEmbedded: true
|
|
3772
|
-
};
|
|
3773
|
-
default:
|
|
3774
|
-
return InitialDeviceTypes;
|
|
3775
|
-
}
|
|
3776
|
-
};
|
|
3777
|
-
var setUserAgent = function setUserAgent(userAgent) {
|
|
3778
|
-
return setUa(userAgent);
|
|
3779
|
-
};
|
|
3780
|
-
var setDefaults = function setDefaults(p) {
|
|
3781
|
-
var d = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'none';
|
|
3782
|
-
return p ? p : d;
|
|
3783
|
-
};
|
|
3784
|
-
var getNavigatorInstance = function getNavigatorInstance() {
|
|
3785
|
-
if (typeof window !== 'undefined') {
|
|
3786
|
-
if (window.navigator || navigator) {
|
|
3787
|
-
return window.navigator || navigator;
|
|
3788
|
-
}
|
|
3789
|
-
}
|
|
3790
|
-
return false;
|
|
3791
|
-
};
|
|
3792
|
-
var isIOS13Check = function isIOS13Check(type) {
|
|
3793
|
-
var nav = getNavigatorInstance();
|
|
3794
|
-
return nav && nav.platform && (nav.platform.indexOf(type) !== -1 || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1 && !window.MSStream);
|
|
3795
|
-
};
|
|
3796
|
-
var browserPayload = function browserPayload(isBrowser, browser, engine, os, ua) {
|
|
3797
|
-
return {
|
|
3798
|
-
isBrowser: isBrowser,
|
|
3799
|
-
browserMajorVersion: setDefaults(browser.major),
|
|
3800
|
-
browserFullVersion: setDefaults(browser.version),
|
|
3801
|
-
browserName: setDefaults(browser.name),
|
|
3802
|
-
engineName: setDefaults(engine.name),
|
|
3803
|
-
engineVersion: setDefaults(engine.version),
|
|
3804
|
-
osName: setDefaults(os.name),
|
|
3805
|
-
osVersion: setDefaults(os.version),
|
|
3806
|
-
userAgent: setDefaults(ua)
|
|
3807
|
-
};
|
|
3808
|
-
};
|
|
3809
|
-
var mobilePayload = function mobilePayload(type, device, os, ua) {
|
|
3810
|
-
return _objectSpread2({}, type, {
|
|
3811
|
-
vendor: setDefaults(device.vendor),
|
|
3812
|
-
model: setDefaults(device.model),
|
|
3813
|
-
os: setDefaults(os.name),
|
|
3814
|
-
osVersion: setDefaults(os.version),
|
|
3815
|
-
ua: setDefaults(ua)
|
|
3816
|
-
});
|
|
3817
|
-
};
|
|
3818
|
-
var smartTvPayload = function smartTvPayload(isSmartTV, engine, os, ua) {
|
|
3819
|
-
return {
|
|
3820
|
-
isSmartTV: isSmartTV,
|
|
3821
|
-
engineName: setDefaults(engine.name),
|
|
3822
|
-
engineVersion: setDefaults(engine.version),
|
|
3823
|
-
osName: setDefaults(os.name),
|
|
3824
|
-
osVersion: setDefaults(os.version),
|
|
3825
|
-
userAgent: setDefaults(ua)
|
|
3826
|
-
};
|
|
3827
|
-
};
|
|
3828
|
-
var consolePayload = function consolePayload(isConsole, engine, os, ua) {
|
|
3829
|
-
return {
|
|
3830
|
-
isConsole: isConsole,
|
|
3831
|
-
engineName: setDefaults(engine.name),
|
|
3832
|
-
engineVersion: setDefaults(engine.version),
|
|
3833
|
-
osName: setDefaults(os.name),
|
|
3834
|
-
osVersion: setDefaults(os.version),
|
|
3835
|
-
userAgent: setDefaults(ua)
|
|
3836
|
-
};
|
|
3837
|
-
};
|
|
3838
|
-
var wearablePayload = function wearablePayload(isWearable, engine, os, ua) {
|
|
3839
|
-
return {
|
|
3840
|
-
isWearable: isWearable,
|
|
3841
|
-
engineName: setDefaults(engine.name),
|
|
3842
|
-
engineVersion: setDefaults(engine.version),
|
|
3843
|
-
osName: setDefaults(os.name),
|
|
3844
|
-
osVersion: setDefaults(os.version),
|
|
3845
|
-
userAgent: setDefaults(ua)
|
|
3846
|
-
};
|
|
3847
|
-
};
|
|
3848
|
-
var embeddedPayload = function embeddedPayload(isEmbedded, device, engine, os, ua) {
|
|
3849
|
-
return {
|
|
3850
|
-
isEmbedded: isEmbedded,
|
|
3851
|
-
vendor: setDefaults(device.vendor),
|
|
3852
|
-
model: setDefaults(device.model),
|
|
3853
|
-
engineName: setDefaults(engine.name),
|
|
3854
|
-
engineVersion: setDefaults(engine.version),
|
|
3855
|
-
osName: setDefaults(os.name),
|
|
3856
|
-
osVersion: setDefaults(os.version),
|
|
3857
|
-
userAgent: setDefaults(ua)
|
|
3858
|
-
};
|
|
3859
|
-
};
|
|
3860
|
-
function deviceDetect(userAgent) {
|
|
3861
|
-
var _ref = userAgent ? parseUserAgent(userAgent) : UAHelper,
|
|
3862
|
-
device = _ref.device,
|
|
3863
|
-
browser = _ref.browser,
|
|
3864
|
-
engine = _ref.engine,
|
|
3865
|
-
os = _ref.os,
|
|
3866
|
-
ua = _ref.ua;
|
|
3867
|
-
var type = checkDeviceType(device.type);
|
|
3868
|
-
var isBrowser = type.isBrowser,
|
|
3869
|
-
isMobile = type.isMobile,
|
|
3870
|
-
isTablet = type.isTablet,
|
|
3871
|
-
isSmartTV = type.isSmartTV,
|
|
3872
|
-
isConsole = type.isConsole,
|
|
3873
|
-
isWearable = type.isWearable,
|
|
3874
|
-
isEmbedded = type.isEmbedded;
|
|
3875
|
-
if (isBrowser) {
|
|
3876
|
-
return browserPayload(isBrowser, browser, engine, os, ua);
|
|
3877
|
-
}
|
|
3878
|
-
if (isSmartTV) {
|
|
3879
|
-
return smartTvPayload(isSmartTV, engine, os, ua);
|
|
3880
|
-
}
|
|
3881
|
-
if (isConsole) {
|
|
3882
|
-
return consolePayload(isConsole, engine, os, ua);
|
|
3883
|
-
}
|
|
3884
|
-
if (isMobile) {
|
|
3885
|
-
return mobilePayload(type, device, os, ua);
|
|
3886
|
-
}
|
|
3887
|
-
if (isTablet) {
|
|
3888
|
-
return mobilePayload(type, device, os, ua);
|
|
3889
|
-
}
|
|
3890
|
-
if (isWearable) {
|
|
3891
|
-
return wearablePayload(isWearable, engine, os, ua);
|
|
3892
|
-
}
|
|
3893
|
-
if (isEmbedded) {
|
|
3894
|
-
return embeddedPayload(isEmbedded, device, engine, os, ua);
|
|
3895
|
-
}
|
|
3896
|
-
}
|
|
3897
|
-
var isMobileType = function isMobileType(_ref) {
|
|
3898
|
-
var type = _ref.type;
|
|
3899
|
-
return type === DeviceTypes.Mobile;
|
|
3900
|
-
};
|
|
3901
|
-
var isTabletType = function isTabletType(_ref2) {
|
|
3902
|
-
var type = _ref2.type;
|
|
3903
|
-
return type === DeviceTypes.Tablet;
|
|
3904
|
-
};
|
|
3905
|
-
var isMobileAndTabletType = function isMobileAndTabletType(_ref3) {
|
|
3906
|
-
var type = _ref3.type;
|
|
3907
|
-
return type === DeviceTypes.Mobile || type === DeviceTypes.Tablet;
|
|
3908
|
-
};
|
|
3909
|
-
var isSmartTVType = function isSmartTVType(_ref4) {
|
|
3910
|
-
var type = _ref4.type;
|
|
3911
|
-
return type === DeviceTypes.SmartTv;
|
|
3912
|
-
};
|
|
3913
|
-
var isBrowserType = function isBrowserType(_ref5) {
|
|
3914
|
-
var type = _ref5.type;
|
|
3915
|
-
return type === DeviceTypes.Browser;
|
|
3916
|
-
};
|
|
3917
|
-
var isWearableType = function isWearableType(_ref6) {
|
|
3918
|
-
var type = _ref6.type;
|
|
3919
|
-
return type === DeviceTypes.Wearable;
|
|
3920
|
-
};
|
|
3921
|
-
var isConsoleType = function isConsoleType(_ref7) {
|
|
3922
|
-
var type = _ref7.type;
|
|
3923
|
-
return type === DeviceTypes.Console;
|
|
3924
|
-
};
|
|
3925
|
-
var isEmbeddedType = function isEmbeddedType(_ref8) {
|
|
3926
|
-
var type = _ref8.type;
|
|
3927
|
-
return type === DeviceTypes.Embedded;
|
|
3928
|
-
};
|
|
3929
|
-
var getMobileVendor = function getMobileVendor(_ref9) {
|
|
3930
|
-
var vendor = _ref9.vendor;
|
|
3931
|
-
return setDefaults(vendor);
|
|
3932
|
-
};
|
|
3933
|
-
var getMobileModel = function getMobileModel(_ref10) {
|
|
3934
|
-
var model = _ref10.model;
|
|
3935
|
-
return setDefaults(model);
|
|
3936
|
-
};
|
|
3937
|
-
var getDeviceType = function getDeviceType(_ref11) {
|
|
3938
|
-
var type = _ref11.type;
|
|
3939
|
-
return setDefaults(type, 'browser');
|
|
3940
|
-
}; // os types
|
|
3941
|
-
|
|
3942
|
-
var isAndroidType = function isAndroidType(_ref12) {
|
|
3943
|
-
var name = _ref12.name;
|
|
3944
|
-
return name === OsTypes.Android;
|
|
3945
|
-
};
|
|
3946
|
-
var isWindowsType = function isWindowsType(_ref13) {
|
|
3947
|
-
var name = _ref13.name;
|
|
3948
|
-
return name === OsTypes.Windows;
|
|
3949
|
-
};
|
|
3950
|
-
var isMacOsType = function isMacOsType(_ref14) {
|
|
3951
|
-
var name = _ref14.name;
|
|
3952
|
-
return name === OsTypes.MAC_OS;
|
|
3953
|
-
};
|
|
3954
|
-
var isWinPhoneType = function isWinPhoneType(_ref15) {
|
|
3955
|
-
var name = _ref15.name;
|
|
3956
|
-
return name === OsTypes.WindowsPhone;
|
|
3957
|
-
};
|
|
3958
|
-
var isIOSType = function isIOSType(_ref16) {
|
|
3959
|
-
var name = _ref16.name;
|
|
3960
|
-
return name === OsTypes.IOS;
|
|
3961
|
-
};
|
|
3962
|
-
var getOsVersion = function getOsVersion(_ref17) {
|
|
3963
|
-
var version = _ref17.version;
|
|
3964
|
-
return setDefaults(version);
|
|
3965
|
-
};
|
|
3966
|
-
var getOsName = function getOsName(_ref18) {
|
|
3967
|
-
var name = _ref18.name;
|
|
3968
|
-
return setDefaults(name);
|
|
3969
|
-
}; // browser types
|
|
3970
|
-
|
|
3971
|
-
var isChromeType = function isChromeType(_ref19) {
|
|
3972
|
-
var name = _ref19.name;
|
|
3973
|
-
return name === BrowserTypes.Chrome;
|
|
3974
|
-
};
|
|
3975
|
-
var isFirefoxType = function isFirefoxType(_ref20) {
|
|
3976
|
-
var name = _ref20.name;
|
|
3977
|
-
return name === BrowserTypes.Firefox;
|
|
3978
|
-
};
|
|
3979
|
-
var isChromiumType = function isChromiumType(_ref21) {
|
|
3980
|
-
var name = _ref21.name;
|
|
3981
|
-
return name === BrowserTypes.Chromium;
|
|
3982
|
-
};
|
|
3983
|
-
var isEdgeType = function isEdgeType(_ref22) {
|
|
3984
|
-
var name = _ref22.name;
|
|
3985
|
-
return name === BrowserTypes.Edge;
|
|
3986
|
-
};
|
|
3987
|
-
var isYandexType = function isYandexType(_ref23) {
|
|
3988
|
-
var name = _ref23.name;
|
|
3989
|
-
return name === BrowserTypes.Yandex;
|
|
3990
|
-
};
|
|
3991
|
-
var isSafariType = function isSafariType(_ref24) {
|
|
3992
|
-
var name = _ref24.name;
|
|
3993
|
-
return name === BrowserTypes.Safari || name === BrowserTypes.MobileSafari;
|
|
3994
|
-
};
|
|
3995
|
-
var isMobileSafariType = function isMobileSafariType(_ref25) {
|
|
3996
|
-
var name = _ref25.name;
|
|
3997
|
-
return name === BrowserTypes.MobileSafari;
|
|
3998
|
-
};
|
|
3999
|
-
var isOperaType = function isOperaType(_ref26) {
|
|
4000
|
-
var name = _ref26.name;
|
|
4001
|
-
return name === BrowserTypes.Opera;
|
|
4002
|
-
};
|
|
4003
|
-
var isIEType = function isIEType(_ref27) {
|
|
4004
|
-
var name = _ref27.name;
|
|
4005
|
-
return name === BrowserTypes.InternetExplorer || name === BrowserTypes.Ie;
|
|
4006
|
-
};
|
|
4007
|
-
var isMIUIType = function isMIUIType(_ref28) {
|
|
4008
|
-
var name = _ref28.name;
|
|
4009
|
-
return name === BrowserTypes.MIUI;
|
|
4010
|
-
};
|
|
4011
|
-
var isSamsungBrowserType = function isSamsungBrowserType(_ref29) {
|
|
4012
|
-
var name = _ref29.name;
|
|
4013
|
-
return name === BrowserTypes.SamsungBrowser;
|
|
4014
|
-
};
|
|
4015
|
-
var getBrowserFullVersion = function getBrowserFullVersion(_ref30) {
|
|
4016
|
-
var version = _ref30.version;
|
|
4017
|
-
return setDefaults(version);
|
|
4018
|
-
};
|
|
4019
|
-
var getBrowserVersion = function getBrowserVersion(_ref31) {
|
|
4020
|
-
var major = _ref31.major;
|
|
4021
|
-
return setDefaults(major);
|
|
4022
|
-
};
|
|
4023
|
-
var getBrowserName = function getBrowserName(_ref32) {
|
|
4024
|
-
var name = _ref32.name;
|
|
4025
|
-
return setDefaults(name);
|
|
4026
|
-
}; // engine types
|
|
4027
|
-
|
|
4028
|
-
var getEngineName = function getEngineName(_ref33) {
|
|
4029
|
-
var name = _ref33.name;
|
|
4030
|
-
return setDefaults(name);
|
|
4031
|
-
};
|
|
4032
|
-
var getEngineVersion = function getEngineVersion(_ref34) {
|
|
4033
|
-
var version = _ref34.version;
|
|
4034
|
-
return setDefaults(version);
|
|
4035
|
-
};
|
|
4036
|
-
var isElectronType = function isElectronType() {
|
|
4037
|
-
var nav = getNavigatorInstance();
|
|
4038
|
-
var ua = nav && nav.userAgent && nav.userAgent.toLowerCase();
|
|
4039
|
-
return typeof ua === 'string' ? /electron/.test(ua) : false;
|
|
4040
|
-
};
|
|
4041
|
-
var isEdgeChromiumType = function isEdgeChromiumType(ua) {
|
|
4042
|
-
return typeof ua === 'string' && ua.indexOf('Edg/') !== -1;
|
|
4043
|
-
};
|
|
4044
|
-
var getIOS13 = function getIOS13() {
|
|
4045
|
-
var nav = getNavigatorInstance();
|
|
4046
|
-
return nav && (/iPad|iPhone|iPod/.test(nav.platform) || nav.platform === 'MacIntel' && nav.maxTouchPoints > 1) && !window.MSStream;
|
|
4047
|
-
};
|
|
4048
|
-
var getIPad13 = function getIPad13() {
|
|
4049
|
-
return isIOS13Check('iPad');
|
|
4050
|
-
};
|
|
4051
|
-
var getIphone13 = function getIphone13() {
|
|
4052
|
-
return isIOS13Check('iPhone');
|
|
4053
|
-
};
|
|
4054
|
-
var getIPod13 = function getIPod13() {
|
|
4055
|
-
return isIOS13Check('iPod');
|
|
4056
|
-
};
|
|
4057
|
-
var getUseragent = function getUseragent(userAg) {
|
|
4058
|
-
return setDefaults(userAg);
|
|
4059
|
-
};
|
|
4060
|
-
function buildSelectorsObject(options) {
|
|
4061
|
-
var _ref = options ? options : UAHelper,
|
|
4062
|
-
device = _ref.device,
|
|
4063
|
-
browser = _ref.browser,
|
|
4064
|
-
os = _ref.os,
|
|
4065
|
-
engine = _ref.engine,
|
|
4066
|
-
ua = _ref.ua;
|
|
4067
|
-
return {
|
|
4068
|
-
isSmartTV: isSmartTVType(device),
|
|
4069
|
-
isConsole: isConsoleType(device),
|
|
4070
|
-
isWearable: isWearableType(device),
|
|
4071
|
-
isEmbedded: isEmbeddedType(device),
|
|
4072
|
-
isMobileSafari: isMobileSafariType(browser) || getIPad13(),
|
|
4073
|
-
isChromium: isChromiumType(browser),
|
|
4074
|
-
isMobile: isMobileAndTabletType(device) || getIPad13(),
|
|
4075
|
-
isMobileOnly: isMobileType(device),
|
|
4076
|
-
isTablet: isTabletType(device) || getIPad13(),
|
|
4077
|
-
isBrowser: isBrowserType(device),
|
|
4078
|
-
isDesktop: isBrowserType(device),
|
|
4079
|
-
isAndroid: isAndroidType(os),
|
|
4080
|
-
isWinPhone: isWinPhoneType(os),
|
|
4081
|
-
isIOS: isIOSType(os) || getIPad13(),
|
|
4082
|
-
isChrome: isChromeType(browser),
|
|
4083
|
-
isFirefox: isFirefoxType(browser),
|
|
4084
|
-
isSafari: isSafariType(browser),
|
|
4085
|
-
isOpera: isOperaType(browser),
|
|
4086
|
-
isIE: isIEType(browser),
|
|
4087
|
-
osVersion: getOsVersion(os),
|
|
4088
|
-
osName: getOsName(os),
|
|
4089
|
-
fullBrowserVersion: getBrowserFullVersion(browser),
|
|
4090
|
-
browserVersion: getBrowserVersion(browser),
|
|
4091
|
-
browserName: getBrowserName(browser),
|
|
4092
|
-
mobileVendor: getMobileVendor(device),
|
|
4093
|
-
mobileModel: getMobileModel(device),
|
|
4094
|
-
engineName: getEngineName(engine),
|
|
4095
|
-
engineVersion: getEngineVersion(engine),
|
|
4096
|
-
getUA: getUseragent(ua),
|
|
4097
|
-
isEdge: isEdgeType(browser) || isEdgeChromiumType(ua),
|
|
4098
|
-
isYandex: isYandexType(browser),
|
|
4099
|
-
deviceType: getDeviceType(device),
|
|
4100
|
-
isIOS13: getIOS13(),
|
|
4101
|
-
isIPad13: getIPad13(),
|
|
4102
|
-
isIPhone13: getIphone13(),
|
|
4103
|
-
isIPod13: getIPod13(),
|
|
4104
|
-
isElectron: isElectronType(),
|
|
4105
|
-
isEdgeChromium: isEdgeChromiumType(ua),
|
|
4106
|
-
isLegacyEdge: isEdgeType(browser) && !isEdgeChromiumType(ua),
|
|
4107
|
-
isWindows: isWindowsType(os),
|
|
4108
|
-
isMacOs: isMacOsType(os),
|
|
4109
|
-
isMIUI: isMIUIType(browser),
|
|
4110
|
-
isSamsungBrowser: isSamsungBrowserType(browser)
|
|
4111
|
-
};
|
|
4112
|
-
}
|
|
4113
|
-
var isSmartTV = isSmartTVType(device);
|
|
4114
|
-
var isConsole = isConsoleType(device);
|
|
4115
|
-
var isWearable = isWearableType(device);
|
|
4116
|
-
var isEmbedded = isEmbeddedType(device);
|
|
4117
|
-
var isMobileSafari = isMobileSafariType(browser) || getIPad13();
|
|
4118
|
-
var isChromium = isChromiumType(browser);
|
|
4119
|
-
var isMobile = isMobileAndTabletType(device) || getIPad13();
|
|
4120
|
-
var isMobileOnly = isMobileType(device);
|
|
4121
|
-
var isTablet = isTabletType(device) || getIPad13();
|
|
4122
|
-
var isBrowser = isBrowserType(device);
|
|
4123
|
-
var isDesktop = isBrowserType(device);
|
|
4124
|
-
var isAndroid = isAndroidType(os);
|
|
4125
|
-
var isWinPhone = isWinPhoneType(os);
|
|
4126
|
-
var isIOS = isIOSType(os) || getIPad13();
|
|
4127
|
-
var isChrome = isChromeType(browser);
|
|
4128
|
-
var isFirefox = isFirefoxType(browser);
|
|
4129
|
-
var isSafari = isSafariType(browser);
|
|
4130
|
-
var isOpera = isOperaType(browser);
|
|
4131
|
-
var isIE = isIEType(browser);
|
|
4132
|
-
var osVersion = getOsVersion(os);
|
|
4133
|
-
var osName = getOsName(os);
|
|
4134
|
-
var fullBrowserVersion = getBrowserFullVersion(browser);
|
|
4135
|
-
var browserVersion = getBrowserVersion(browser);
|
|
4136
|
-
var browserName = getBrowserName(browser);
|
|
4137
|
-
var mobileVendor = getMobileVendor(device);
|
|
4138
|
-
var mobileModel = getMobileModel(device);
|
|
4139
|
-
var engineName = getEngineName(engine);
|
|
4140
|
-
var engineVersion = getEngineVersion(engine);
|
|
4141
|
-
var getUA = getUseragent(ua);
|
|
4142
|
-
var isEdge = isEdgeType(browser) || isEdgeChromiumType(ua);
|
|
4143
|
-
var isYandex = isYandexType(browser);
|
|
4144
|
-
var deviceType = getDeviceType(device);
|
|
4145
|
-
var isIOS13 = getIOS13();
|
|
4146
|
-
var isIPad13 = getIPad13();
|
|
4147
|
-
var isIPhone13 = getIphone13();
|
|
4148
|
-
var isIPod13 = getIPod13();
|
|
4149
|
-
var isElectron = isElectronType();
|
|
4150
|
-
var isEdgeChromium = isEdgeChromiumType(ua);
|
|
4151
|
-
var isLegacyEdge = isEdgeType(browser) && !isEdgeChromiumType(ua);
|
|
4152
|
-
var isWindows = isWindowsType(os);
|
|
4153
|
-
var isMacOs = isMacOsType(os);
|
|
4154
|
-
var isMIUI = isMIUIType(browser);
|
|
4155
|
-
var isSamsungBrowser = isSamsungBrowserType(browser);
|
|
4156
|
-
var getSelectorsByUserAgent = function getSelectorsByUserAgent(userAgent) {
|
|
4157
|
-
if (!userAgent || typeof userAgent !== 'string') {
|
|
4158
|
-
console.error('No valid user agent string was provided');
|
|
4159
|
-
return;
|
|
4160
|
-
}
|
|
4161
|
-
var _UAHelper$parseUserAg = parseUserAgent(userAgent),
|
|
4162
|
-
device = _UAHelper$parseUserAg.device,
|
|
4163
|
-
browser = _UAHelper$parseUserAg.browser,
|
|
4164
|
-
os = _UAHelper$parseUserAg.os,
|
|
4165
|
-
engine = _UAHelper$parseUserAg.engine,
|
|
4166
|
-
ua = _UAHelper$parseUserAg.ua;
|
|
4167
|
-
return buildSelectorsObject({
|
|
4168
|
-
device: device,
|
|
4169
|
-
browser: browser,
|
|
4170
|
-
os: os,
|
|
4171
|
-
engine: engine,
|
|
4172
|
-
ua: ua
|
|
4173
|
-
});
|
|
4174
|
-
};
|
|
4175
|
-
var AndroidView = function AndroidView(_ref) {
|
|
4176
|
-
var renderWithFragment = _ref.renderWithFragment,
|
|
4177
|
-
children = _ref.children,
|
|
4178
|
-
props = _objectWithoutProperties(_ref, ["renderWithFragment", "children"]);
|
|
4179
|
-
return isAndroid ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4180
|
-
};
|
|
4181
|
-
var BrowserView = function BrowserView(_ref2) {
|
|
4182
|
-
var renderWithFragment = _ref2.renderWithFragment,
|
|
4183
|
-
children = _ref2.children,
|
|
4184
|
-
props = _objectWithoutProperties(_ref2, ["renderWithFragment", "children"]);
|
|
4185
|
-
return isBrowser ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4186
|
-
};
|
|
4187
|
-
var IEView = function IEView(_ref3) {
|
|
4188
|
-
var renderWithFragment = _ref3.renderWithFragment,
|
|
4189
|
-
children = _ref3.children,
|
|
4190
|
-
props = _objectWithoutProperties(_ref3, ["renderWithFragment", "children"]);
|
|
4191
|
-
return isIE ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4192
|
-
};
|
|
4193
|
-
var IOSView = function IOSView(_ref4) {
|
|
4194
|
-
var renderWithFragment = _ref4.renderWithFragment,
|
|
4195
|
-
children = _ref4.children,
|
|
4196
|
-
props = _objectWithoutProperties(_ref4, ["renderWithFragment", "children"]);
|
|
4197
|
-
return isIOS ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4198
|
-
};
|
|
4199
|
-
var MobileView = function MobileView(_ref5) {
|
|
4200
|
-
var renderWithFragment = _ref5.renderWithFragment,
|
|
4201
|
-
children = _ref5.children,
|
|
4202
|
-
props = _objectWithoutProperties(_ref5, ["renderWithFragment", "children"]);
|
|
4203
|
-
return isMobile ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4204
|
-
};
|
|
4205
|
-
var TabletView = function TabletView(_ref6) {
|
|
4206
|
-
var renderWithFragment = _ref6.renderWithFragment,
|
|
4207
|
-
children = _ref6.children,
|
|
4208
|
-
props = _objectWithoutProperties(_ref6, ["renderWithFragment", "children"]);
|
|
4209
|
-
return isTablet ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4210
|
-
};
|
|
4211
|
-
var WinPhoneView = function WinPhoneView(_ref7) {
|
|
4212
|
-
var renderWithFragment = _ref7.renderWithFragment,
|
|
4213
|
-
children = _ref7.children,
|
|
4214
|
-
props = _objectWithoutProperties(_ref7, ["renderWithFragment", "children"]);
|
|
4215
|
-
return isWinPhone ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4216
|
-
};
|
|
4217
|
-
var MobileOnlyView = function MobileOnlyView(_ref8) {
|
|
4218
|
-
var renderWithFragment = _ref8.renderWithFragment,
|
|
4219
|
-
children = _ref8.children;
|
|
4220
|
-
_ref8.viewClassName;
|
|
4221
|
-
_ref8.style;
|
|
4222
|
-
var props = _objectWithoutProperties(_ref8, ["renderWithFragment", "children", "viewClassName", "style"]);
|
|
4223
|
-
return isMobileOnly ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4224
|
-
};
|
|
4225
|
-
var SmartTVView = function SmartTVView(_ref9) {
|
|
4226
|
-
var renderWithFragment = _ref9.renderWithFragment,
|
|
4227
|
-
children = _ref9.children,
|
|
4228
|
-
props = _objectWithoutProperties(_ref9, ["renderWithFragment", "children"]);
|
|
4229
|
-
return isSmartTV ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4230
|
-
};
|
|
4231
|
-
var ConsoleView = function ConsoleView(_ref10) {
|
|
4232
|
-
var renderWithFragment = _ref10.renderWithFragment,
|
|
4233
|
-
children = _ref10.children,
|
|
4234
|
-
props = _objectWithoutProperties(_ref10, ["renderWithFragment", "children"]);
|
|
4235
|
-
return isConsole ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4236
|
-
};
|
|
4237
|
-
var WearableView = function WearableView(_ref11) {
|
|
4238
|
-
var renderWithFragment = _ref11.renderWithFragment,
|
|
4239
|
-
children = _ref11.children,
|
|
4240
|
-
props = _objectWithoutProperties(_ref11, ["renderWithFragment", "children"]);
|
|
4241
|
-
return isWearable ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4242
|
-
};
|
|
4243
|
-
var CustomView = function CustomView(_ref12) {
|
|
4244
|
-
var renderWithFragment = _ref12.renderWithFragment,
|
|
4245
|
-
children = _ref12.children;
|
|
4246
|
-
_ref12.viewClassName;
|
|
4247
|
-
_ref12.style;
|
|
4248
|
-
var condition = _ref12.condition,
|
|
4249
|
-
props = _objectWithoutProperties(_ref12, ["renderWithFragment", "children", "viewClassName", "style", "condition"]);
|
|
4250
|
-
return condition ? renderWithFragment ? React__default.createElement(React.Fragment, null, children) : React__default.createElement("div", props, children) : null;
|
|
4251
|
-
};
|
|
4252
|
-
function withOrientationChange(WrappedComponent) {
|
|
4253
|
-
return /*#__PURE__*/function (_React$Component) {
|
|
4254
|
-
_inherits(_class, _React$Component);
|
|
4255
|
-
function _class(props) {
|
|
4256
|
-
var _this;
|
|
4257
|
-
_classCallCheck(this, _class);
|
|
4258
|
-
_this = _possibleConstructorReturn(this, _getPrototypeOf(_class).call(this, props));
|
|
4259
|
-
_this.isEventListenerAdded = false;
|
|
4260
|
-
_this.handleOrientationChange = _this.handleOrientationChange.bind(_assertThisInitialized(_this));
|
|
4261
|
-
_this.onOrientationChange = _this.onOrientationChange.bind(_assertThisInitialized(_this));
|
|
4262
|
-
_this.onPageLoad = _this.onPageLoad.bind(_assertThisInitialized(_this));
|
|
4263
|
-
_this.state = {
|
|
4264
|
-
isLandscape: false,
|
|
4265
|
-
isPortrait: false
|
|
4266
|
-
};
|
|
4267
|
-
return _this;
|
|
4268
|
-
}
|
|
4269
|
-
_createClass(_class, [{
|
|
4270
|
-
key: "handleOrientationChange",
|
|
4271
|
-
value: function handleOrientationChange() {
|
|
4272
|
-
if (!this.isEventListenerAdded) {
|
|
4273
|
-
this.isEventListenerAdded = true;
|
|
4274
|
-
}
|
|
4275
|
-
var orientation = window.innerWidth > window.innerHeight ? 90 : 0;
|
|
4276
|
-
this.setState({
|
|
4277
|
-
isPortrait: orientation === 0,
|
|
4278
|
-
isLandscape: orientation === 90
|
|
4279
|
-
});
|
|
4280
|
-
}
|
|
4281
|
-
}, {
|
|
4282
|
-
key: "onOrientationChange",
|
|
4283
|
-
value: function onOrientationChange() {
|
|
4284
|
-
this.handleOrientationChange();
|
|
4285
|
-
}
|
|
4286
|
-
}, {
|
|
4287
|
-
key: "onPageLoad",
|
|
4288
|
-
value: function onPageLoad() {
|
|
4289
|
-
this.handleOrientationChange();
|
|
4290
|
-
}
|
|
4291
|
-
}, {
|
|
4292
|
-
key: "componentDidMount",
|
|
4293
|
-
value: function componentDidMount() {
|
|
4294
|
-
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) !== undefined && isMobile) {
|
|
4295
|
-
if (!this.isEventListenerAdded) {
|
|
4296
|
-
this.handleOrientationChange();
|
|
4297
|
-
window.addEventListener("load", this.onPageLoad, false);
|
|
4298
|
-
} else {
|
|
4299
|
-
window.removeEventListener("load", this.onPageLoad, false);
|
|
4300
|
-
}
|
|
4301
|
-
window.addEventListener("resize", this.onOrientationChange, false);
|
|
4302
|
-
}
|
|
4303
|
-
}
|
|
4304
|
-
}, {
|
|
4305
|
-
key: "componentWillUnmount",
|
|
4306
|
-
value: function componentWillUnmount() {
|
|
4307
|
-
window.removeEventListener("resize", this.onOrientationChange, false);
|
|
4308
|
-
}
|
|
4309
|
-
}, {
|
|
4310
|
-
key: "render",
|
|
4311
|
-
value: function render() {
|
|
4312
|
-
return React__default.createElement(WrappedComponent, _extends({}, this.props, {
|
|
4313
|
-
isLandscape: this.state.isLandscape,
|
|
4314
|
-
isPortrait: this.state.isPortrait
|
|
4315
|
-
}));
|
|
4316
|
-
}
|
|
4317
|
-
}]);
|
|
4318
|
-
return _class;
|
|
4319
|
-
}(React__default.Component);
|
|
4320
|
-
}
|
|
4321
|
-
function useMobileOrientation() {
|
|
4322
|
-
var _useState = React.useState(function () {
|
|
4323
|
-
var orientation = window.innerWidth > window.innerHeight ? 90 : 0;
|
|
4324
|
-
return {
|
|
4325
|
-
isPortrait: orientation === 0,
|
|
4326
|
-
isLandscape: orientation === 90,
|
|
4327
|
-
orientation: orientation === 0 ? 'portrait' : 'landscape'
|
|
4328
|
-
};
|
|
4329
|
-
}),
|
|
4330
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
4331
|
-
state = _useState2[0],
|
|
4332
|
-
setState = _useState2[1];
|
|
4333
|
-
var handleOrientationChange = React.useCallback(function () {
|
|
4334
|
-
var orientation = window.innerWidth > window.innerHeight ? 90 : 0;
|
|
4335
|
-
var next = {
|
|
4336
|
-
isPortrait: orientation === 0,
|
|
4337
|
-
isLandscape: orientation === 90,
|
|
4338
|
-
orientation: orientation === 0 ? 'portrait' : 'landscape'
|
|
4339
|
-
};
|
|
4340
|
-
state.orientation !== next.orientation && setState(next);
|
|
4341
|
-
}, [state.orientation]);
|
|
4342
|
-
React.useEffect(function () {
|
|
4343
|
-
if ((typeof window === "undefined" ? "undefined" : _typeof(window)) !== undefined && isMobile) {
|
|
4344
|
-
handleOrientationChange();
|
|
4345
|
-
window.addEventListener("load", handleOrientationChange, false);
|
|
4346
|
-
window.addEventListener("resize", handleOrientationChange, false);
|
|
4347
|
-
}
|
|
4348
|
-
return function () {
|
|
4349
|
-
window.removeEventListener("resize", handleOrientationChange, false);
|
|
4350
|
-
window.removeEventListener("load", handleOrientationChange, false);
|
|
4351
|
-
};
|
|
4352
|
-
}, [handleOrientationChange]);
|
|
4353
|
-
return state;
|
|
4354
|
-
}
|
|
4355
|
-
function useDeviceData(userAgent) {
|
|
4356
|
-
var hookUserAgent = userAgent ? userAgent : window.navigator.userAgent;
|
|
4357
|
-
return parseUserAgent(hookUserAgent);
|
|
4358
|
-
}
|
|
4359
|
-
function useDeviceSelectors(userAgent) {
|
|
4360
|
-
var hookUserAgent = userAgent ? userAgent : window.navigator.userAgent;
|
|
4361
|
-
var deviceData = useDeviceData(hookUserAgent);
|
|
4362
|
-
var selectors = buildSelectorsObject(deviceData);
|
|
4363
|
-
return [selectors, deviceData];
|
|
4364
|
-
}
|
|
4365
|
-
lib.AndroidView = AndroidView;
|
|
4366
|
-
lib.BrowserTypes = BrowserTypes;
|
|
4367
|
-
lib.BrowserView = BrowserView;
|
|
4368
|
-
lib.ConsoleView = ConsoleView;
|
|
4369
|
-
lib.CustomView = CustomView;
|
|
4370
|
-
lib.IEView = IEView;
|
|
4371
|
-
lib.IOSView = IOSView;
|
|
4372
|
-
lib.MobileOnlyView = MobileOnlyView;
|
|
4373
|
-
lib.MobileView = MobileView;
|
|
4374
|
-
lib.OsTypes = OsTypes;
|
|
4375
|
-
lib.SmartTVView = SmartTVView;
|
|
4376
|
-
lib.TabletView = TabletView;
|
|
4377
|
-
lib.WearableView = WearableView;
|
|
4378
|
-
lib.WinPhoneView = WinPhoneView;
|
|
4379
|
-
lib.browserName = browserName;
|
|
4380
|
-
lib.browserVersion = browserVersion;
|
|
4381
|
-
lib.deviceDetect = deviceDetect;
|
|
4382
|
-
lib.deviceType = deviceType;
|
|
4383
|
-
lib.engineName = engineName;
|
|
4384
|
-
lib.engineVersion = engineVersion;
|
|
4385
|
-
lib.fullBrowserVersion = fullBrowserVersion;
|
|
4386
|
-
lib.getSelectorsByUserAgent = getSelectorsByUserAgent;
|
|
4387
|
-
lib.getUA = getUA;
|
|
4388
|
-
lib.isAndroid = isAndroid;
|
|
4389
|
-
lib.isBrowser = isBrowser;
|
|
4390
|
-
lib.isChrome = isChrome;
|
|
4391
|
-
lib.isChromium = isChromium;
|
|
4392
|
-
lib.isConsole = isConsole;
|
|
4393
|
-
lib.isDesktop = isDesktop;
|
|
4394
|
-
lib.isEdge = isEdge;
|
|
4395
|
-
lib.isEdgeChromium = isEdgeChromium;
|
|
4396
|
-
lib.isElectron = isElectron;
|
|
4397
|
-
lib.isEmbedded = isEmbedded;
|
|
4398
|
-
lib.isFirefox = isFirefox;
|
|
4399
|
-
lib.isIE = isIE;
|
|
4400
|
-
var isIOS_1 = lib.isIOS = isIOS;
|
|
4401
|
-
lib.isIOS13 = isIOS13;
|
|
4402
|
-
lib.isIPad13 = isIPad13;
|
|
4403
|
-
lib.isIPhone13 = isIPhone13;
|
|
4404
|
-
lib.isIPod13 = isIPod13;
|
|
4405
|
-
lib.isLegacyEdge = isLegacyEdge;
|
|
4406
|
-
lib.isMIUI = isMIUI;
|
|
4407
|
-
var isMacOs_1 = lib.isMacOs = isMacOs;
|
|
4408
|
-
lib.isMobile = isMobile;
|
|
4409
|
-
lib.isMobileOnly = isMobileOnly;
|
|
4410
|
-
lib.isMobileSafari = isMobileSafari;
|
|
4411
|
-
lib.isOpera = isOpera;
|
|
4412
|
-
lib.isSafari = isSafari;
|
|
4413
|
-
lib.isSamsungBrowser = isSamsungBrowser;
|
|
4414
|
-
lib.isSmartTV = isSmartTV;
|
|
4415
|
-
lib.isTablet = isTablet;
|
|
4416
|
-
lib.isWearable = isWearable;
|
|
4417
|
-
lib.isWinPhone = isWinPhone;
|
|
4418
|
-
lib.isWindows = isWindows;
|
|
4419
|
-
lib.isYandex = isYandex;
|
|
4420
|
-
lib.mobileModel = mobileModel;
|
|
4421
|
-
lib.mobileVendor = mobileVendor;
|
|
4422
|
-
lib.osName = osName;
|
|
4423
|
-
lib.osVersion = osVersion;
|
|
4424
|
-
lib.parseUserAgent = parseUserAgent;
|
|
4425
|
-
lib.setUserAgent = setUserAgent;
|
|
4426
|
-
lib.useDeviceData = useDeviceData;
|
|
4427
|
-
lib.useDeviceSelectors = useDeviceSelectors;
|
|
4428
|
-
lib.useMobileOrientation = useMobileOrientation;
|
|
4429
|
-
lib.withOrientationChange = withOrientationChange;
|
|
4430
|
-
|
|
4431
3150
|
var css_248z$7 = ".xUi-select-options{list-style:none;margin:0;padding:4px}.xUi-select-option,.xUi-select-options{border-radius:var(--xui-border-radius-sm)}.xUi-select-option{align-items:center;color:var(--xui-text-color);cursor:pointer;display:flex;font-size:var(--xui-font-size-md);margin-bottom:2px;padding:8px 16px}.xUi-select-option.xUi-select-focused,.xUi-select-option:hover{background-color:var(--xui-primary-color);color:var(--xui-background-color)}.xUi-select-option.xUi-select-focused{align-items:center;display:flex;font-weight:600;justify-content:space-between}.xUi-select-option.xUi-select-disabled{color:rgba(0,0,0,.25);cursor:not-allowed}.xUi-select-option.selected{background-color:var(--xui-primary-color);color:var(--xui-background-color)}.xUi-select-option.selected:hover{background-color:var(--xui-primary-color-light)}";
|
|
4432
3151
|
styleInject(css_248z$7);
|
|
4433
3152
|
|
|
@@ -4449,7 +3168,7 @@ const Option = ({
|
|
|
4449
3168
|
}
|
|
4450
3169
|
onClick?.(e);
|
|
4451
3170
|
};
|
|
4452
|
-
return /*#__PURE__*/React
|
|
3171
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
4453
3172
|
className: clsx([`${prefixCls}-option ${className} `, {
|
|
4454
3173
|
selected: selected,
|
|
4455
3174
|
disabled: disabled
|
|
@@ -4486,16 +3205,16 @@ const Tag = ({
|
|
|
4486
3205
|
e.target.value = value;
|
|
4487
3206
|
onClose?.(e);
|
|
4488
3207
|
};
|
|
4489
|
-
return /*#__PURE__*/React
|
|
3208
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4490
3209
|
style: {
|
|
4491
3210
|
...style,
|
|
4492
3211
|
backgroundColor: color
|
|
4493
3212
|
},
|
|
4494
3213
|
className: `${prefixCls}-tag ${className}`
|
|
4495
|
-
}, /*#__PURE__*/React
|
|
3214
|
+
}, /*#__PURE__*/React.createElement("span", null, label !== undefined ? label : value), closable && /*#__PURE__*/React.createElement("span", {
|
|
4496
3215
|
className: `${prefixCls}-tag-close-icon`,
|
|
4497
3216
|
onClick: handleOnClick
|
|
4498
|
-
}, icon || /*#__PURE__*/React
|
|
3217
|
+
}, icon || /*#__PURE__*/React.createElement(React.Fragment, null, "\u2715")));
|
|
4499
3218
|
};
|
|
4500
3219
|
|
|
4501
3220
|
var Tag$1 = /*#__PURE__*/Object.freeze({
|
|
@@ -4516,7 +3235,6 @@ const LIST_HEIGHT = 200;
|
|
|
4516
3235
|
const PADDING_PLACEMENT = 16;
|
|
4517
3236
|
const PADDING_TAG_INPUT = 4;
|
|
4518
3237
|
const FORM_MARGIN_BOTTOM = 20;
|
|
4519
|
-
const isAppleDevice = isMacOs_1 || isIOS_1;
|
|
4520
3238
|
function getTextFromNode(node) {
|
|
4521
3239
|
if (typeof node === 'string' || typeof node === 'number') {
|
|
4522
3240
|
return node.toString();
|
|
@@ -4815,7 +3533,7 @@ const SelectComponent = ({
|
|
|
4815
3533
|
if (!showArrow) {
|
|
4816
3534
|
return null;
|
|
4817
3535
|
}
|
|
4818
|
-
return showSearch && isOpen ? searchIcon || /*#__PURE__*/React
|
|
3536
|
+
return showSearch && isOpen ? searchIcon || /*#__PURE__*/React.createElement(SearchIcon, null) : /*#__PURE__*/React.createElement("span", null, suffixIcon || showArrow && /*#__PURE__*/React.createElement(ArrowIcon, {
|
|
4819
3537
|
isOpen: isOpen
|
|
4820
3538
|
}));
|
|
4821
3539
|
}, [showArrow, showSearch, isOpen, suffixIcon, searchIcon]);
|
|
@@ -4872,9 +3590,12 @@ const SelectComponent = ({
|
|
|
4872
3590
|
}
|
|
4873
3591
|
const timeout = setTimeout(() => {
|
|
4874
3592
|
const searchInput = document.getElementById(`${prefixCls}-search-tag-input`);
|
|
3593
|
+
console.log({
|
|
3594
|
+
searchInput,
|
|
3595
|
+
searchInputRef: searchInputRef?.current
|
|
3596
|
+
});
|
|
4875
3597
|
if (searchInput) {
|
|
4876
3598
|
searchInput?.focus();
|
|
4877
|
-
searchInputRef?.current?.focus();
|
|
4878
3599
|
setSearchFocused(true);
|
|
4879
3600
|
}
|
|
4880
3601
|
clearTimeout(timeout);
|
|
@@ -4887,7 +3608,7 @@ const SelectComponent = ({
|
|
|
4887
3608
|
...props
|
|
4888
3609
|
}, index) => {
|
|
4889
3610
|
const isSelected = hasMode ? selected.includes(props.value) : props.value === selected;
|
|
4890
|
-
return /*#__PURE__*/React
|
|
3611
|
+
return /*#__PURE__*/React.createElement(Option, _extends({
|
|
4891
3612
|
key: `${props.value}_${index}`
|
|
4892
3613
|
}, props, {
|
|
4893
3614
|
selected: isSelected,
|
|
@@ -4906,13 +3627,13 @@ const SelectComponent = ({
|
|
|
4906
3627
|
});
|
|
4907
3628
|
},
|
|
4908
3629
|
"data-value": props.value
|
|
4909
|
-
}), children || props.label || props.value, menuItemSelectedIcon && hasMode && isSelected && /*#__PURE__*/React
|
|
3630
|
+
}), children || props.label || props.value, menuItemSelectedIcon && hasMode && isSelected && /*#__PURE__*/React.createElement("span", {
|
|
4910
3631
|
className: `${prefixCls}-selected-icon`
|
|
4911
|
-
}, menuItemSelectedIcon === true ? /*#__PURE__*/React
|
|
3632
|
+
}, menuItemSelectedIcon === true ? /*#__PURE__*/React.createElement(CheckIcon, null) : menuItemSelectedIcon));
|
|
4912
3633
|
});
|
|
4913
3634
|
return options;
|
|
4914
3635
|
})();
|
|
4915
|
-
const dropdownContent = !loading && open && isOpen && /*#__PURE__*/React
|
|
3636
|
+
const dropdownContent = !loading && open && isOpen && /*#__PURE__*/React.createElement("div", {
|
|
4916
3637
|
className: clsx([`${prefixCls}-dropdown`, {
|
|
4917
3638
|
[placement]: placement,
|
|
4918
3639
|
[dropdownClassName]: dropdownClassName
|
|
@@ -4922,7 +3643,7 @@ const SelectComponent = ({
|
|
|
4922
3643
|
maxHeight: dropdownRender ? 'unset' : listHeight,
|
|
4923
3644
|
opacity: Object.keys(dropdownPosition).length ? 1 : 0
|
|
4924
3645
|
}
|
|
4925
|
-
}, filterable && /*#__PURE__*/React
|
|
3646
|
+
}, filterable && /*#__PURE__*/React.createElement("input", {
|
|
4926
3647
|
type: "text",
|
|
4927
3648
|
inputMode: "text",
|
|
4928
3649
|
className: `${prefixCls}-search`,
|
|
@@ -4933,26 +3654,26 @@ const SelectComponent = ({
|
|
|
4933
3654
|
/*#__PURE__*/
|
|
4934
3655
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
4935
3656
|
// @ts-expect-error
|
|
4936
|
-
React
|
|
3657
|
+
React.createElement(ConditionalWrapper, {
|
|
4937
3658
|
wrapper: element => {
|
|
4938
|
-
return dropdownRender?.(element || /*#__PURE__*/React
|
|
3659
|
+
return dropdownRender?.(element || /*#__PURE__*/React.createElement(React.Fragment, null, " ")) || /*#__PURE__*/React.createElement(React.Fragment, null, " ");
|
|
4939
3660
|
},
|
|
4940
3661
|
condition: !!dropdownRender
|
|
4941
|
-
}, /*#__PURE__*/React
|
|
3662
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
4942
3663
|
className: `${prefixCls}-options`,
|
|
4943
3664
|
style: {
|
|
4944
3665
|
maxHeight: listHeight,
|
|
4945
3666
|
overflowY: 'auto',
|
|
4946
3667
|
maxWidth: selectRef.current ? `${selectRef.current.getBoundingClientRect().width}px` : 'inherit'
|
|
4947
3668
|
}
|
|
4948
|
-
}, asTag && !!searchQuery && /*#__PURE__*/React
|
|
3669
|
+
}, asTag && !!searchQuery && /*#__PURE__*/React.createElement(Option, {
|
|
4949
3670
|
value: searchQuery,
|
|
4950
3671
|
className: `${prefixCls}-focused`,
|
|
4951
3672
|
onClick: e => {
|
|
4952
3673
|
handleSelect(e, searchQuery);
|
|
4953
3674
|
},
|
|
4954
3675
|
"data-value": searchQuery
|
|
4955
|
-
}, searchQuery), filteredOptions.length ? dataRender : !asTag ? notFoundContent || /*#__PURE__*/React
|
|
3676
|
+
}, searchQuery), filteredOptions.length ? dataRender : !asTag ? notFoundContent || /*#__PURE__*/React.createElement(EmptyContent, null) : null)));
|
|
4956
3677
|
const selectedOption = (() => {
|
|
4957
3678
|
const option = extractedOptions.find(e => e.value === selected || e.label === selected || e.children === selected) || selected;
|
|
4958
3679
|
return option?.children || option?.label || option?.value || null;
|
|
@@ -4989,7 +3710,7 @@ const SelectComponent = ({
|
|
|
4989
3710
|
}
|
|
4990
3711
|
}
|
|
4991
3712
|
}, [maxTagCount, container, tags, overflowCount]);
|
|
4992
|
-
return /*#__PURE__*/React
|
|
3713
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
4993
3714
|
id: id,
|
|
4994
3715
|
ref: selectRef,
|
|
4995
3716
|
style: style,
|
|
@@ -5002,12 +3723,12 @@ const SelectComponent = ({
|
|
|
5002
3723
|
[`${prefixCls}-multi`]: hasMode,
|
|
5003
3724
|
[`${prefixCls}-disabled`]: disabled
|
|
5004
3725
|
}])
|
|
5005
|
-
}, /*#__PURE__*/React
|
|
3726
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
5006
3727
|
onClick: handleTriggerClick,
|
|
5007
3728
|
onMouseEnter: handleMouseEnter,
|
|
5008
3729
|
onMouseLeave: handleMouseLeave,
|
|
5009
3730
|
className: `${prefixCls}-trigger`
|
|
5010
|
-
}, showSearch || hasMode ? /*#__PURE__*/React
|
|
3731
|
+
}, showSearch || hasMode ? /*#__PURE__*/React.createElement("div", {
|
|
5011
3732
|
ref: tagContainerRef,
|
|
5012
3733
|
style: {
|
|
5013
3734
|
...style,
|
|
@@ -5020,7 +3741,7 @@ const SelectComponent = ({
|
|
|
5020
3741
|
className: clsx([`${prefixCls}-tag-container`, {
|
|
5021
3742
|
[`${prefixCls}-tag-container-fixHeight`]: !tagContainerRef.current
|
|
5022
3743
|
}])
|
|
5023
|
-
}, hasMode ? /*#__PURE__*/React
|
|
3744
|
+
}, hasMode ? /*#__PURE__*/React.createElement(React.Fragment, null, selectedTags.length ? /*#__PURE__*/React.createElement(React.Fragment, null, tagsToDisplay.map((tag, index) => tagRender ? /*#__PURE__*/React.createElement("div", {
|
|
5024
3745
|
key: `${index}_${tag}`
|
|
5025
3746
|
}, tagRender?.({
|
|
5026
3747
|
label: (() => {
|
|
@@ -5030,7 +3751,7 @@ const SelectComponent = ({
|
|
|
5030
3751
|
value: tag,
|
|
5031
3752
|
onClose: handleRemoveTag,
|
|
5032
3753
|
closable: true
|
|
5033
|
-
})) : /*#__PURE__*/React
|
|
3754
|
+
})) : /*#__PURE__*/React.createElement(Tag, {
|
|
5034
3755
|
closable: true,
|
|
5035
3756
|
value: tag,
|
|
5036
3757
|
label: (() => {
|
|
@@ -5039,17 +3760,16 @@ const SelectComponent = ({
|
|
|
5039
3760
|
})() || tag || null,
|
|
5040
3761
|
onClose: handleRemoveTag,
|
|
5041
3762
|
key: `${index}_${tag}`
|
|
5042
|
-
})), overflowCount > 0 && /*#__PURE__*/React
|
|
3763
|
+
})), overflowCount > 0 && /*#__PURE__*/React.createElement(Tag, {
|
|
5043
3764
|
label: `+${overflowCount}`,
|
|
5044
3765
|
className: `${prefixCls}-tag-overflow`
|
|
5045
|
-
})) : /*#__PURE__*/React
|
|
3766
|
+
})) : /*#__PURE__*/React.createElement("span", {
|
|
5046
3767
|
style: {
|
|
5047
3768
|
opacity: 0.5
|
|
5048
3769
|
}
|
|
5049
|
-
}, searchFocused ? '' : placeholder)) : null, isOpen ? /*#__PURE__*/React
|
|
5050
|
-
className: `${prefixCls}-tag contentEditable
|
|
5051
|
-
|
|
5052
|
-
}, /*#__PURE__*/React$1.createElement("div", _extends$1({
|
|
3770
|
+
}, searchFocused ? '' : placeholder)) : null, isOpen ? /*#__PURE__*/React.createElement("div", {
|
|
3771
|
+
className: `${prefixCls}-tag contentEditable`
|
|
3772
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
5053
3773
|
ref: searchInputRef,
|
|
5054
3774
|
onClick: e => {
|
|
5055
3775
|
if (disabled) {
|
|
@@ -5069,27 +3789,27 @@ const SelectComponent = ({
|
|
|
5069
3789
|
} : {}, {
|
|
5070
3790
|
id: `${prefixCls}-search-tag-input`,
|
|
5071
3791
|
className: `${prefixCls}-tag-input`
|
|
5072
|
-
})), !hasMode && !searchQuery.length ? selected === '' ? placeholder : selectedOption : null) : !hasMode ? /*#__PURE__*/React
|
|
3792
|
+
})), !hasMode && !searchQuery.length ? selected === '' ? placeholder : selectedOption : null) : !hasMode ? /*#__PURE__*/React.createElement("div", {
|
|
5073
3793
|
className: `${prefixCls}-input globalEllipsis`,
|
|
5074
3794
|
style: {
|
|
5075
3795
|
opacity: isOpen ? '0.6' : '1'
|
|
5076
3796
|
}
|
|
5077
|
-
}, selected === '' ? placeholder : selectedOption) : null) : !hasMode ? /*#__PURE__*/React
|
|
3797
|
+
}, selected === '' ? placeholder : selectedOption) : null) : !hasMode ? /*#__PURE__*/React.createElement("div", {
|
|
5078
3798
|
className: `${prefixCls}-input globalEllipsis`,
|
|
5079
3799
|
onClick: () => !disabled && setIsOpen(!isOpen || defaultOpen),
|
|
5080
3800
|
style: {
|
|
5081
3801
|
opacity: isOpen ? '0.6' : '1'
|
|
5082
3802
|
}
|
|
5083
|
-
}, selected === '' ? placeholder : selectedOption) : null, isHover && !loading ? allowClear && selected ? /*#__PURE__*/React
|
|
3803
|
+
}, selected === '' ? placeholder : selectedOption) : null, isHover && !loading ? allowClear && selected ? /*#__PURE__*/React.createElement("button", {
|
|
5084
3804
|
className: `${prefixCls}-clear-btn`,
|
|
5085
3805
|
onClick: handleClear
|
|
5086
|
-
}, removeIcon || /*#__PURE__*/React
|
|
3806
|
+
}, removeIcon || /*#__PURE__*/React.createElement(ClearIcon, null)) : /*#__PURE__*/React.createElement("span", {
|
|
5087
3807
|
className: `${prefixCls}-arrow`
|
|
5088
|
-
}, ArrowContainer, error && feedbackIcons ? /*#__PURE__*/React
|
|
3808
|
+
}, ArrowContainer, error && feedbackIcons ? /*#__PURE__*/React.createElement(ErrorIcon, null) : null) : /*#__PURE__*/React.createElement(React.Fragment, null, !loading && /*#__PURE__*/React.createElement("span", {
|
|
5089
3809
|
className: `${prefixCls}-arrow`
|
|
5090
|
-
}, ArrowContainer, error && feedbackIcons ? /*#__PURE__*/React
|
|
3810
|
+
}, ArrowContainer, error && feedbackIcons ? /*#__PURE__*/React.createElement(ErrorIcon, null) : null), loading && /*#__PURE__*/React.createElement("span", {
|
|
5091
3811
|
className: `${prefixCls}-loading`
|
|
5092
|
-
}, /*#__PURE__*/React
|
|
3812
|
+
}, /*#__PURE__*/React.createElement(LoadingIcon, null)))), getPopupContainer?.(triggerNode) ? /*#__PURE__*/createPortal(dropdownContent, getPopupContainer(triggerNode)) : dropdownContent);
|
|
5093
3813
|
};
|
|
5094
3814
|
SelectComponent.displayName = 'Select';
|
|
5095
3815
|
const Select = Object.assign(SelectComponent, {
|
|
@@ -5117,12 +3837,12 @@ const SkeletonButton = ({
|
|
|
5117
3837
|
size = 'default',
|
|
5118
3838
|
applyElementStyle = true
|
|
5119
3839
|
}) => {
|
|
5120
|
-
return /*#__PURE__*/React
|
|
3840
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5121
3841
|
className: clsx([`${prefixCls}`, {
|
|
5122
3842
|
[`${prefixCls}-element`]: applyElementStyle,
|
|
5123
3843
|
[`${prefixCls}-active`]: active
|
|
5124
3844
|
}, className])
|
|
5125
|
-
}, /*#__PURE__*/React
|
|
3845
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5126
3846
|
className: clsx([`${prefixCls}-button `, BUTTON_SKELETON_SIZE[size], className]),
|
|
5127
3847
|
style: style
|
|
5128
3848
|
}));
|
|
@@ -5160,13 +3880,13 @@ const SkeletonAvatar = ({
|
|
|
5160
3880
|
applyElementStyle = true,
|
|
5161
3881
|
...props
|
|
5162
3882
|
}) => {
|
|
5163
|
-
return /*#__PURE__*/React
|
|
3883
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
5164
3884
|
className: clsx([`${prefixCls}`, {
|
|
5165
3885
|
[`${prefixCls}-element`]: applyElementStyle,
|
|
5166
3886
|
[`${prefixCls}-active`]: active
|
|
5167
3887
|
}, className]),
|
|
5168
3888
|
style: wrapperStyle
|
|
5169
|
-
}, props), /*#__PURE__*/React
|
|
3889
|
+
}, props), /*#__PURE__*/React.createElement("span", {
|
|
5170
3890
|
className: clsx([`${prefixCls}-avatar ${prefixCls}-avatar-${shape}`]),
|
|
5171
3891
|
style: {
|
|
5172
3892
|
...(size ? {
|
|
@@ -5196,10 +3916,10 @@ const SkeletonImage = ({
|
|
|
5196
3916
|
className,
|
|
5197
3917
|
style = {}
|
|
5198
3918
|
}) => {
|
|
5199
|
-
return /*#__PURE__*/React
|
|
3919
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5200
3920
|
className: `${prefixCls}-image ${className || ''}`,
|
|
5201
3921
|
style: style
|
|
5202
|
-
}, /*#__PURE__*/React
|
|
3922
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5203
3923
|
className: `${prefixCls}-icon`,
|
|
5204
3924
|
style: {
|
|
5205
3925
|
fontSize: `${style?.width || CUSTOm_ICON_SIZE}px`,
|
|
@@ -5211,13 +3931,13 @@ const SkeletonImage = ({
|
|
|
5211
3931
|
backgroundColor: style?.backgroundColor
|
|
5212
3932
|
} : {})
|
|
5213
3933
|
}
|
|
5214
|
-
}, /*#__PURE__*/React
|
|
3934
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
5215
3935
|
viewBox: "0 0 1098 1024",
|
|
5216
3936
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5217
3937
|
width: "1em",
|
|
5218
3938
|
height: "1em",
|
|
5219
3939
|
fill: "currentColor"
|
|
5220
|
-
}, /*#__PURE__*/React
|
|
3940
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
5221
3941
|
d: "M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",
|
|
5222
3942
|
className: `${prefixCls}-image-path`
|
|
5223
3943
|
}))));
|
|
@@ -5244,12 +3964,12 @@ const SkeletonInput = ({
|
|
|
5244
3964
|
className,
|
|
5245
3965
|
size = 'default'
|
|
5246
3966
|
}) => {
|
|
5247
|
-
return /*#__PURE__*/React
|
|
3967
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5248
3968
|
className: clsx([`${prefixCls}-element`, {
|
|
5249
3969
|
[`${prefixCls}-active`]: active,
|
|
5250
3970
|
[`${prefixCls}-block`]: block
|
|
5251
3971
|
}, className])
|
|
5252
|
-
}, /*#__PURE__*/React
|
|
3972
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
5253
3973
|
className: `${prefixCls}-input ${INPUT_SKELETON_SIZE[size]} ${className || ''}`,
|
|
5254
3974
|
style: style
|
|
5255
3975
|
}));
|
|
@@ -5285,28 +4005,28 @@ const SkeletonComponent = ({
|
|
|
5285
4005
|
} : {};
|
|
5286
4006
|
const PARAGRAPH_ROWS = avatar ? PARAGRAPH_AVATAR_ROWS : PARAGRAPH_DEFAULT_ROWS;
|
|
5287
4007
|
const HAS_PHARAGRAPH = typeof paragraph === 'boolean' || !paragraph ? PARAGRAPH_ROWS : paragraph?.rows ?? PARAGRAPH_ROWS;
|
|
5288
|
-
return /*#__PURE__*/React
|
|
4008
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5289
4009
|
className: clsx([prefixCls, {
|
|
5290
4010
|
[`${prefixCls}__withAvatar`]: avatar,
|
|
5291
4011
|
[`${prefixCls}-active`]: active,
|
|
5292
4012
|
[`${prefixCls}-round`]: round
|
|
5293
4013
|
}, className]),
|
|
5294
4014
|
style: style
|
|
5295
|
-
}, avatar && teamLogo && /*#__PURE__*/React
|
|
4015
|
+
}, avatar && teamLogo && /*#__PURE__*/React.createElement("div", {
|
|
5296
4016
|
className: `${prefixCls}__header`
|
|
5297
|
-
}, /*#__PURE__*/React
|
|
4017
|
+
}, /*#__PURE__*/React.createElement(SkeletonAvatar, GET_AVATAR_SKELETON_PROPS(avatar))), /*#__PURE__*/React.createElement("div", {
|
|
5298
4018
|
className: `${prefixCls}-content`
|
|
5299
|
-
}, /*#__PURE__*/React
|
|
4019
|
+
}, /*#__PURE__*/React.createElement("h3", {
|
|
5300
4020
|
className: clsx([`${prefixCls}-title ${GET_TITLE_SKELETON_PROPS.className}`, {
|
|
5301
4021
|
[`${prefixCls}-title-avatar`]: avatar
|
|
5302
4022
|
}]),
|
|
5303
4023
|
style: GET_TITLE_SKELETON_PROPS.style
|
|
5304
|
-
}), paragraph !== false && /*#__PURE__*/React
|
|
4024
|
+
}), paragraph !== false && /*#__PURE__*/React.createElement("ul", {
|
|
5305
4025
|
className: `${prefixCls}-paragraph`,
|
|
5306
4026
|
style: {
|
|
5307
4027
|
...(typeof paragraph !== 'boolean' && paragraph ? paragraph.style : {})
|
|
5308
4028
|
}
|
|
5309
|
-
}, createArray(HAS_PHARAGRAPH).map(key => /*#__PURE__*/React
|
|
4029
|
+
}, createArray(HAS_PHARAGRAPH).map(key => /*#__PURE__*/React.createElement("li", {
|
|
5310
4030
|
key: key
|
|
5311
4031
|
})))));
|
|
5312
4032
|
};
|