jk-vue-comps 0.2.7 → 0.2.9
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/chunks/{index-C5FNYxxn.js → index-BAhOHrWo.js} +15 -15
- package/dist/components/TelegramAuth.js +1 -1
- package/dist/hooks/useCopyToClipboard.js +29 -20
- package/dist/index.d.ts +3 -3
- package/dist/index.js +85 -85
- package/dist/utils/index.js +1 -1
- package/dist/utils/is.d.ts +1 -1
- package/dist/utils/is.js +34 -34
- package/dist/utils/math.d.ts +1 -1
- package/dist/utils/math.js +488 -486
- package/package.json +14 -14
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nextTick as N, createVNode as h } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { isObject as c, isString as l, isNumber as f, isHtmlStr as p, is as v, isArray as S, isBoolean as P, isClient as b, isDate as y, isDef as O, isEdgeBrowser as T, isElement as U, isEmail as $, isEmpty as E, isFunction as I, isInMobileBrowser as B, isIp as L, isMap as x, isNull as D, isNullAndUnDef as F, isNullOrUnDef as M, isPromise as R, isPromiseLink as V, isRegExp as W, isServer as _, isUnDef as k, isUrl as q, isValidPhoneNumber as j, isWindow as z, isZhLang as H } from "../utils/is.js";
|
|
3
|
+
import { isNanValue as m, toNum as g, BigNumber as A, DOWN as C, UP as G, add as Z, divide as J, eq as K, formatRate as Q, gt as X, gte as Y, helper as tt, isBigNum as et, isBool as it, isEqualTo as rt, isGreaterThan as nt, isGreaterThanOrEqualTo as ot, isInt as st, isLessThan as at, isLessThanOrEqualTo as ut, isNan as lt, isNum as ct, lt as ft, lte as pt, multiply as mt, power as gt, subtract as dt, toBigNum as wt, toDecimalPlaces as Nt, toInt as ht, toLocaleString as vt, toString as St, unFormatRate as Pt } from "../utils/math.js";
|
|
4
4
|
import { propTypes as bt } from "../utils/vuePropTypes.js";
|
|
5
5
|
import { timeZoneOptions as yt } from "../utils/timeZone.js";
|
|
6
6
|
import { withInstall as Ot } from "../utils/withInstall.js";
|
|
@@ -36,7 +36,7 @@ function Ut(t, e, r, o = "int", i = 6) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
function $t(t) {
|
|
39
|
-
return !l(t) || !
|
|
39
|
+
return !l(t) || !p(t) ? t : h("div", { innerHTML: t });
|
|
40
40
|
}
|
|
41
41
|
function Et() {
|
|
42
42
|
return window ? `${window.location.protocol}//${window.location.hostname}` : "";
|
|
@@ -60,7 +60,7 @@ function w(t = {}, e = {}) {
|
|
|
60
60
|
return t;
|
|
61
61
|
}
|
|
62
62
|
function Lt(t, e = 6, { showPrefix: r = !0, showSuffix: o = !0, middleStr: i = "****" } = {}) {
|
|
63
|
-
if (!l(t) && !
|
|
63
|
+
if (!l(t) && !f(t))
|
|
64
64
|
return t;
|
|
65
65
|
const n = String(t), a = n?.length ?? 0;
|
|
66
66
|
if (!n || !a || e <= 0)
|
|
@@ -70,7 +70,7 @@ function Lt(t, e = 6, { showPrefix: r = !0, showSuffix: o = !0, middleStr: i = "
|
|
|
70
70
|
}
|
|
71
71
|
function xt(t, e = "px") {
|
|
72
72
|
if (!(t === null || t === "" || t === void 0))
|
|
73
|
-
return
|
|
73
|
+
return m(t) ? String(t) : `${g(t)}${e}`;
|
|
74
74
|
}
|
|
75
75
|
function Dt(t) {
|
|
76
76
|
return t ? c(t) ? t : t.split(";").reduce((e, r) => {
|
|
@@ -117,7 +117,7 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
117
117
|
isFunction: I,
|
|
118
118
|
isGreaterThan: nt,
|
|
119
119
|
isGreaterThanOrEqualTo: ot,
|
|
120
|
-
isHtmlStr:
|
|
120
|
+
isHtmlStr: p,
|
|
121
121
|
isInMobileBrowser: B,
|
|
122
122
|
isInt: st,
|
|
123
123
|
isIp: L,
|
|
@@ -125,12 +125,12 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
125
125
|
isLessThanOrEqualTo: ut,
|
|
126
126
|
isMap: x,
|
|
127
127
|
isNan: lt,
|
|
128
|
-
isNanValue:
|
|
128
|
+
isNanValue: m,
|
|
129
129
|
isNull: D,
|
|
130
130
|
isNullAndUnDef: F,
|
|
131
131
|
isNullOrUnDef: M,
|
|
132
132
|
isNum: ct,
|
|
133
|
-
isNumber:
|
|
133
|
+
isNumber: f,
|
|
134
134
|
isObject: c,
|
|
135
135
|
isPromise: R,
|
|
136
136
|
isPromiseLink: V,
|
|
@@ -155,7 +155,7 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
155
155
|
toDecimalPlaces: Nt,
|
|
156
156
|
toInt: ht,
|
|
157
157
|
toLocaleString: vt,
|
|
158
|
-
toNum:
|
|
158
|
+
toNum: g,
|
|
159
159
|
toString: St,
|
|
160
160
|
toStyleObject: Dt,
|
|
161
161
|
toStyleUnit: xt,
|
|
@@ -164,15 +164,15 @@ const kt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
164
164
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
165
165
|
export {
|
|
166
166
|
kt as U,
|
|
167
|
-
|
|
167
|
+
Lt as a,
|
|
168
168
|
It as b,
|
|
169
|
-
|
|
169
|
+
Et as c,
|
|
170
170
|
w as d,
|
|
171
171
|
Tt as e,
|
|
172
172
|
d as f,
|
|
173
173
|
Ut as g,
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
$t as h,
|
|
175
|
+
xt as i,
|
|
176
|
+
Bt as r,
|
|
177
|
+
Dt as t
|
|
178
178
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as f, computed as p, onMounted as g, createVNode as h } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { c as w } from "../chunks/index-BAhOHrWo.js";
|
|
3
3
|
import { withInstall as b } from "../utils/withInstall.js";
|
|
4
4
|
import { isInMobileBrowser as l } from "../utils/is.js";
|
|
5
5
|
function u(t, a) {
|
|
@@ -1,26 +1,35 @@
|
|
|
1
|
-
import { ref as l, watch as
|
|
2
|
-
import { isDef as
|
|
3
|
-
function
|
|
4
|
-
const c = l(
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ref as l, watch as s } from "vue";
|
|
2
|
+
import { isDef as i } from "../utils/is.js";
|
|
3
|
+
function m(n) {
|
|
4
|
+
const c = l(n || ""), e = l(!1), o = l(!1);
|
|
5
|
+
return s(c, (t) => {
|
|
6
|
+
if (i(t) && t !== "")
|
|
7
|
+
try {
|
|
8
|
+
e.value = u(t), o.value = !0;
|
|
9
|
+
} catch (a) {
|
|
10
|
+
e.value = !1, o.value = !1, console.error("Copy failed:", a);
|
|
11
|
+
}
|
|
12
|
+
}, { immediate: !!n, flush: "sync" }), { clipboardRef: c, isSuccessRef: e, copiedRef: o };
|
|
8
13
|
}
|
|
9
|
-
function
|
|
10
|
-
const e = document.createElement("textarea"),
|
|
11
|
-
e.value =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
function u(n, { target: c = document.body } = {}) {
|
|
15
|
+
const e = document.createElement("textarea"), o = document.activeElement;
|
|
16
|
+
e.value = n, e.setAttribute("readonly", ""), Object.assign(e.style, {
|
|
17
|
+
contain: "strict",
|
|
18
|
+
position: "absolute",
|
|
19
|
+
left: "-9999px",
|
|
20
|
+
fontSize: "12pt"
|
|
21
|
+
});
|
|
22
|
+
const t = document.getSelection(), a = t && t.rangeCount > 0 ? t.getRangeAt(0) : null;
|
|
23
|
+
c.append(e), e.select(), e.selectionStart = 0, e.selectionEnd = n.length;
|
|
16
24
|
try {
|
|
17
|
-
|
|
18
|
-
} catch (
|
|
19
|
-
throw new Error(
|
|
25
|
+
return document.execCommand("copy");
|
|
26
|
+
} catch (r) {
|
|
27
|
+
throw new Error("Unable to copy text to clipboard", { cause: r });
|
|
28
|
+
} finally {
|
|
29
|
+
e.remove(), a && t && (t.removeAllRanges(), t.addRange(a)), o && o.focus && o.focus();
|
|
20
30
|
}
|
|
21
|
-
return e.remove(), s && t && (t.removeAllRanges(), t.addRange(s)), n && n.focus(), r;
|
|
22
31
|
}
|
|
23
32
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
u as copyTextToClipboard,
|
|
34
|
+
m as useCopyToClipboard
|
|
26
35
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ declare const JKVUEComps: {
|
|
|
49
49
|
isClient(): boolean;
|
|
50
50
|
isUrl(path: string): boolean;
|
|
51
51
|
isIp(ip: string): boolean;
|
|
52
|
-
isEmail(
|
|
52
|
+
isEmail(v: any): boolean;
|
|
53
53
|
isValidPhoneNumber(phoneNumber: string): boolean;
|
|
54
54
|
isInMobileBrowser(): false | RegExpMatchArray | null;
|
|
55
55
|
isZhLang(lang: string): boolean;
|
|
@@ -66,7 +66,7 @@ declare const JKVUEComps: {
|
|
|
66
66
|
isEqualTo(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
67
67
|
isGreaterThanOrEqualTo(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
68
68
|
isLessThanOrEqualTo(num1: Utils.BigNumVal, num2: Utils.BigNumVal): boolean;
|
|
69
|
-
toBigNum(val: Utils.BigNumValType): BigNumber;
|
|
69
|
+
toBigNum(val: Utils.BigNumValType): import("bignumber.js").BigNumber;
|
|
70
70
|
toNum(val: Utils.BigNumValType): number;
|
|
71
71
|
toInt(val: Utils.BigNumValType, isUp?: boolean): number;
|
|
72
72
|
toString(val: Utils.BigNumValType): string;
|
|
@@ -81,7 +81,7 @@ declare const JKVUEComps: {
|
|
|
81
81
|
unFormatRate(val: Utils.BigNumValType): number;
|
|
82
82
|
DOWN: 1;
|
|
83
83
|
UP: 0;
|
|
84
|
-
BigNumber: typeof BigNumber;
|
|
84
|
+
BigNumber: typeof import("bignumber.js").BigNumber;
|
|
85
85
|
gt: typeof Utils.isGreaterThan;
|
|
86
86
|
gte: typeof Utils.isGreaterThanOrEqualTo;
|
|
87
87
|
lt: typeof Utils.isLessThan;
|
package/dist/index.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
1
|
import { C as e } from "./chunks/index-DyiqKziC.js";
|
|
2
2
|
import { H as s } from "./chunks/index-BXoUaF-m.js";
|
|
3
|
-
import { U as t } from "./chunks/index-
|
|
4
|
-
import { d as n,
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
3
|
+
import { U as t } from "./chunks/index-BAhOHrWo.js";
|
|
4
|
+
import { d as n, a as p, e as u, f, g, b as d, c as h, r as N, h as x, t as T, i as b } from "./chunks/index-BAhOHrWo.js";
|
|
5
|
+
import { BigNumber as U, DOWN as E, UP as y, add as P, divide as S, eq as A, formatRate as B, gt as C, gte as D, helper as I, isBigNum as O, isBool as w, isEqualTo as F, isGreaterThan as L, isGreaterThanOrEqualTo as q, isInt as v, isLessThan as G, isLessThanOrEqualTo as H, isNan as M, isNanValue as R, isNum as W, lt as V, lte as j, multiply as k, power as K, subtract as Z, toBigNum as z, toDecimalPlaces as J, toInt as Q, toLocaleString as X, toNum as Y, toString as _, unFormatRate as $ } from "./utils/math.js";
|
|
6
|
+
import { GoogleAuth as se, toGoogleAuth as te } from "./components/GoogleAuth.js";
|
|
7
|
+
import { TelegramAuth as oe, getTelegramAuthUrlParams as ie, toTelegramAuth as ae } from "./components/TelegramAuth.js";
|
|
8
|
+
import { copyTextToClipboard as le, useCopyToClipboard as ne } from "./hooks/useCopyToClipboard.js";
|
|
9
|
+
import { is as ue, isArray as fe, isBoolean as ge, isClient as de, isDate as he, isDef as Ne, isEdgeBrowser as xe, isElement as Te, isEmail as be, isEmpty as ce, isFunction as Ue, isHtmlStr as Ee, isInMobileBrowser as ye, isIp as Pe, isMap as Se, isNull as Ae, isNullAndUnDef as Be, isNullOrUnDef as Ce, isNumber as De, isObject as Ie, isPromise as Oe, isPromiseLink as we, isRegExp as Fe, isServer as Le, isString as qe, isUnDef as ve, isUrl as Ge, isValidPhoneNumber as He, isWindow as Me, isZhLang as Re } from "./utils/is.js";
|
|
10
|
+
import { propTypes as Ve } from "./utils/vuePropTypes.js";
|
|
11
|
+
import { timeZoneOptions as ke } from "./utils/timeZone.js";
|
|
12
|
+
import { useFormKeypressEnter as Ze } from "./hooks/useFormKeypressEnter.js";
|
|
13
|
+
import { useMemo as Je } from "./hooks/useMemo.js";
|
|
14
14
|
import { withInstall as Xe } from "./utils/withInstall.js";
|
|
15
15
|
const a = { ...e, ...s, ...t, Comps: e, Hooks: s, Utils: t };
|
|
16
16
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
U as BigNumber,
|
|
18
|
+
E as DOWN,
|
|
19
|
+
se as GoogleAuth,
|
|
20
|
+
oe as TelegramAuth,
|
|
21
|
+
y as UP,
|
|
22
|
+
P as add,
|
|
23
|
+
le as copyTextToClipboard,
|
|
24
24
|
n as deepMerge,
|
|
25
25
|
a as default,
|
|
26
26
|
p as desensitization,
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
S as divide,
|
|
28
|
+
A as eq,
|
|
29
29
|
u as evalPro,
|
|
30
30
|
f as filterInputNum,
|
|
31
|
-
|
|
31
|
+
B as formatRate,
|
|
32
32
|
g as generateFilterInputNumFn,
|
|
33
33
|
d as getRouterParams,
|
|
34
|
-
|
|
34
|
+
ie as getTelegramAuthUrlParams,
|
|
35
35
|
h as getWebsiteUrl,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
36
|
+
C as gt,
|
|
37
|
+
D as gte,
|
|
38
|
+
I as helper,
|
|
39
|
+
ue as is,
|
|
40
|
+
fe as isArray,
|
|
41
|
+
O as isBigNum,
|
|
42
|
+
w as isBool,
|
|
43
|
+
ge as isBoolean,
|
|
44
|
+
de as isClient,
|
|
45
|
+
he as isDate,
|
|
46
|
+
Ne as isDef,
|
|
47
|
+
xe as isEdgeBrowser,
|
|
48
|
+
Te as isElement,
|
|
49
|
+
be as isEmail,
|
|
50
|
+
ce as isEmpty,
|
|
51
|
+
F as isEqualTo,
|
|
52
|
+
Ue as isFunction,
|
|
53
|
+
L as isGreaterThan,
|
|
54
|
+
q as isGreaterThanOrEqualTo,
|
|
55
|
+
Ee as isHtmlStr,
|
|
56
|
+
ye as isInMobileBrowser,
|
|
57
|
+
v as isInt,
|
|
58
|
+
Pe as isIp,
|
|
59
|
+
G as isLessThan,
|
|
60
|
+
H as isLessThanOrEqualTo,
|
|
61
|
+
Se as isMap,
|
|
62
|
+
M as isNan,
|
|
63
|
+
R as isNanValue,
|
|
64
|
+
Ae as isNull,
|
|
65
|
+
Be as isNullAndUnDef,
|
|
66
|
+
Ce as isNullOrUnDef,
|
|
67
|
+
W as isNum,
|
|
68
|
+
De as isNumber,
|
|
69
|
+
Ie as isObject,
|
|
70
|
+
Oe as isPromise,
|
|
71
|
+
we as isPromiseLink,
|
|
72
|
+
Fe as isRegExp,
|
|
73
|
+
Le as isServer,
|
|
74
|
+
qe as isString,
|
|
75
|
+
ve as isUnDef,
|
|
76
|
+
Ge as isUrl,
|
|
77
|
+
He as isValidPhoneNumber,
|
|
78
|
+
Me as isWindow,
|
|
79
|
+
Re as isZhLang,
|
|
80
|
+
V as lt,
|
|
81
|
+
j as lte,
|
|
82
|
+
k as multiply,
|
|
83
|
+
K as power,
|
|
84
|
+
Ve as propTypes,
|
|
85
85
|
N as removeWhitespace,
|
|
86
86
|
x as renderHtmlStr,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
Z as subtract,
|
|
88
|
+
ke as timeZoneOptions,
|
|
89
|
+
z as toBigNum,
|
|
90
|
+
J as toDecimalPlaces,
|
|
91
|
+
te as toGoogleAuth,
|
|
92
|
+
Q as toInt,
|
|
93
|
+
X as toLocaleString,
|
|
94
|
+
Y as toNum,
|
|
95
|
+
_ as toString,
|
|
96
96
|
T as toStyleObject,
|
|
97
97
|
b as toStyleUnit,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
98
|
+
ae as toTelegramAuth,
|
|
99
|
+
$ as unFormatRate,
|
|
100
|
+
ne as useCopyToClipboard,
|
|
101
|
+
Ze as useFormKeypressEnter,
|
|
102
|
+
Je as useMemo,
|
|
103
103
|
Xe as withInstall
|
|
104
104
|
};
|
package/dist/utils/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { BigNumber as F, DOWN as R, UP as W, add as M, divide as j, eq as A, for
|
|
|
4
4
|
import { propTypes as fe } from "./vuePropTypes.js";
|
|
5
5
|
import { timeZoneOptions as he } from "./timeZone.js";
|
|
6
6
|
import { withInstall as ce } from "./withInstall.js";
|
|
7
|
-
import { d as Se,
|
|
7
|
+
import { d as Se, a as Te, e as xe, f as Be, g as De, b as Ie, c as Oe, r as Pe, h as Ue, t as ye, i as we } from "../chunks/index-BAhOHrWo.js";
|
|
8
8
|
export {
|
|
9
9
|
F as BigNumber,
|
|
10
10
|
R as DOWN,
|
package/dist/utils/is.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare function isUrl(path: string): boolean;
|
|
|
46
46
|
/** 是否Ip */
|
|
47
47
|
export declare function isIp(ip: string): boolean;
|
|
48
48
|
/** 是否邮箱 */
|
|
49
|
-
export declare function isEmail(
|
|
49
|
+
export declare function isEmail(v: any): boolean;
|
|
50
50
|
/** 是否号码 */
|
|
51
51
|
export declare function isValidPhoneNumber(phoneNumber: string): boolean;
|
|
52
52
|
/** 是否移动端浏览器 */
|
package/dist/utils/is.js
CHANGED
|
@@ -7,16 +7,16 @@ function d(n) {
|
|
|
7
7
|
function s(n) {
|
|
8
8
|
return !d(n);
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function u(n) {
|
|
11
11
|
return n !== null && e(n, "Object");
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function l(n) {
|
|
14
14
|
return e(n, "Date");
|
|
15
15
|
}
|
|
16
16
|
function f(n) {
|
|
17
17
|
return n === null;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function w(n) {
|
|
20
20
|
return s(n) && f(n);
|
|
21
21
|
}
|
|
22
22
|
function m(n) {
|
|
@@ -28,7 +28,7 @@ function b(n) {
|
|
|
28
28
|
function c(n) {
|
|
29
29
|
return e(n, "String");
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function o(n) {
|
|
32
32
|
return typeof n == "function";
|
|
33
33
|
}
|
|
34
34
|
function y(n) {
|
|
@@ -41,43 +41,43 @@ function g(n) {
|
|
|
41
41
|
return n && Array.isArray(n);
|
|
42
42
|
}
|
|
43
43
|
function h(n) {
|
|
44
|
-
return g(n) || c(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 :
|
|
44
|
+
return g(n) || c(n) ? n.length === 0 : n instanceof Map || n instanceof Set ? n.size === 0 : u(n) ? Object.keys(n).length === 0 : !1;
|
|
45
45
|
}
|
|
46
46
|
function E(n) {
|
|
47
|
-
return e(n, "Promise") &&
|
|
47
|
+
return e(n, "Promise") && u(n) && o(n.then) && o(n.catch);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Z(n) {
|
|
50
50
|
return n instanceof Promise || typeof n?.then == "function";
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function N(n) {
|
|
53
53
|
return typeof window < "u" && e(n, "Window");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
55
|
+
function P(n) {
|
|
56
|
+
return u(n) && !!n.tagName;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function z(n) {
|
|
59
59
|
return e(n, "Map");
|
|
60
60
|
}
|
|
61
61
|
function p() {
|
|
62
62
|
return typeof window > "u";
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function S() {
|
|
65
65
|
return !p();
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function D(n) {
|
|
68
68
|
return /^(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?(\/#\/)?(?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(n);
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function M(n) {
|
|
71
71
|
return /\b(?:\d{1,3}.){3}\d{1,3}\b/.test(n);
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
73
|
+
function O(n) {
|
|
74
|
+
return !n || typeof n != "string" || n.length > 254 || /[\r\n]/.test(n) ? !1 : /^[a-zA-Z0-9]+([._+-][a-zA-Z0-9]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]{2,})+$/.test(n);
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function $(n) {
|
|
77
77
|
const t = /^1[3456789]\d{9}$/, r = /^(\d{3,4}-)?\d{7,8}$/;
|
|
78
78
|
return !!(t.test(n) || r.test(n));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function x() {
|
|
81
81
|
return typeof navigator < "u" && navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i);
|
|
82
82
|
}
|
|
83
83
|
function B(n) {
|
|
@@ -93,38 +93,38 @@ function U() {
|
|
|
93
93
|
return !0;
|
|
94
94
|
return !1;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function _(n) {
|
|
97
97
|
return c(n) && /<[^>]+>/g.test(n);
|
|
98
98
|
}
|
|
99
99
|
export {
|
|
100
100
|
e as is,
|
|
101
101
|
g as isArray,
|
|
102
102
|
y as isBoolean,
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
S as isClient,
|
|
104
|
+
l as isDate,
|
|
105
105
|
d as isDef,
|
|
106
106
|
U as isEdgeBrowser,
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
P as isElement,
|
|
108
|
+
O as isEmail,
|
|
109
109
|
h as isEmpty,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
110
|
+
o as isFunction,
|
|
111
|
+
_ as isHtmlStr,
|
|
112
|
+
x as isInMobileBrowser,
|
|
113
|
+
M as isIp,
|
|
114
|
+
z as isMap,
|
|
115
115
|
f as isNull,
|
|
116
|
-
|
|
116
|
+
w as isNullAndUnDef,
|
|
117
117
|
m as isNullOrUnDef,
|
|
118
118
|
b as isNumber,
|
|
119
|
-
|
|
119
|
+
u as isObject,
|
|
120
120
|
E as isPromise,
|
|
121
|
-
|
|
121
|
+
Z as isPromiseLink,
|
|
122
122
|
A as isRegExp,
|
|
123
123
|
p as isServer,
|
|
124
124
|
c as isString,
|
|
125
125
|
s as isUnDef,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
D as isUrl,
|
|
127
|
+
$ as isValidPhoneNumber,
|
|
128
|
+
N as isWindow,
|
|
129
129
|
B as isZhLang
|
|
130
130
|
};
|
package/dist/utils/math.d.ts
CHANGED