@lntvow/utils 4.0.15 → 4.0.17
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var rt=Object.create;var S=Object.defineProperty;var ot=Object.getOwnPropertyDescriptor;var it=Object.getOwnPropertyNames;var st=Object.getPrototypeOf,at=Object.prototype.hasOwnProperty;var mt=(t,e)=>{for(var n in e)S(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of it(e))!at.call(t,o)&&o!==n&&S(t,o,{get:()=>e[o],enumerable:!(r=ot(e,o))||r.enumerable});return t};var j=(t,e,n)=>(n=t!=null?rt(st(t)):{},Z(e||!t||!t.__esModule?S(n,"default",{value:t,enumerable:!0}):n,t)),ct=t=>Z(S({},"__esModule",{value:!0}),t);var $e={};mt($e,{base64Decode:()=>yt,base64Encode:()=>bt,castArray:()=>y,compose:()=>ht,composeRight:()=>Ot,debounce:()=>wt,debugWarn:()=>K,debugWarnInvalidTypeMessage:()=>Tt,decimalToBinary:()=>xt,deepClone:()=>O,deepMerge:()=>_,deprecated:()=>Mt,error:()=>jt,generateRandomArray:()=>Ut,generateRandomColor:()=>_t,generateRandomDate:()=>k,generateRandomEmail:()=>J,generateRandomFloat:()=>qt,generateRandomIdCard:()=>Bt,generateRandomMobilePhone:()=>Vt,generateRandomStringFromSource:()=>E,getRandomInt:()=>a,getRandomItem:()=>p,getRandomString:()=>g,getRandomUrl:()=>Xt,hasChanged:()=>dt,isArray:()=>u,isBoolean:()=>ft,isChineseString:()=>se,isDate:()=>Y,isDateString:()=>et,isDef:()=>lt,isEmail:()=>he,isEmptyString:()=>Oe,isEnglishAphabet:()=>Jt,isFloat:()=>ae,isFunction:()=>$,isIdCard:()=>we,isInteger:()=>ue,isLowerCase:()=>re,isLowerCaseAndNumber:()=>oe,isLowerCaseAndNumberAndChinese:()=>ie,isMap:()=>C,isMobilePhone:()=>be,isNegativeFloat:()=>pe,isNegativeInteger:()=>de,isNonNegativeFloat:()=>ce,isNonNegativeInteger:()=>le,isNonPositiveFloat:()=>fe,isNonPositiveInteger:()=>xe,isNull:()=>ut,isNumber:()=>f,isNumberOrNumberString:()=>Qt,isObject:()=>pt,isObjectLike:()=>w,isPlainObject:()=>x,isPositiveFloat:()=>me,isPositiveInteger:()=>ge,isPromise:()=>U,isRegExp:()=>v,isSet:()=>F,isString:()=>I,isSymbol:()=>N,isUndef:()=>h,isUndefined:()=>gt,isUpperCase:()=>te,isUpperCaseAndNumber:()=>ee,isUpperCaseAndNumberAndChinese:()=>ne,isUrl:()=>ye,log:()=>A,objectToString:()=>G,omit:()=>vt,pick:()=>L,qs:()=>Dt,throttle:()=>Pt,throwError:()=>s,throwErrorInvalidTypeMessage:()=>Rt,toTypeString:()=>b,toTypeValue:()=>M,validatorChineseOrEnglish:()=>Nt,validatorChineseOrEnglishOrNumber:()=>It,validatorUppercaseOrNumbersOrSpecial:()=>Ct,validatorUppercaseOrNumbersOrUnderline:()=>Ft,warn:()=>St});module.exports=ct($e);function pt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var G=Object.prototype.toString,b=t=>G.call(t),M=t=>b(t).slice(8,-1),I=t=>typeof t=="string",f=t=>typeof t=="number"&&Number.isFinite(t),ft=t=>typeof t=="boolean",ut=t=>t===null,gt=t=>t===void 0,N=t=>typeof t=="symbol",u=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",Y=t=>b(t)==="[object Date]",v=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,lt=t=>t!=null,dt=(t,e)=>t!==e;function x(t){return b(t)==="[object Object]"}function y(t){return u(t)?t:[t]}function xt(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function bt(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=q[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function yt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=q.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function ht(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Ot(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function wt(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(Y(r))return new Date(r);if(v(r))return new RegExp(r);if(U(r))return r;if(e.has(r))return e.get(r);if(C(r)){let i=new Map;return e.set(r,i),r.forEach((c,l)=>i.set(n(l),n(c))),i}if(F(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=u(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function _(t,e,n={}){return V(B(t,n),B(e,n),n)}function V(t,e,n){return u(t)?At(t,e,n):$t(t,e,n)}function $t(t,e,n){if(!x(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(x(t[o])||u(t[o]))&&(x(e[o])||u(e[o]))?t[o]=V(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function At(t,e,n){let{mergeStrategy:r="replace"}=n;if(u(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function B(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var R=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new R(`[${t}] ${e}`)}function K(t,e){let n=I(t)?new R(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function St(...t){console.warn(...t)}function jt(...t){console.error(...t)}var Mt=({from:t,replacement:e,version:n,type:r="API"})=>{K(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Rt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${M(r)} with value ${r}.`;s(t,o)}function Tt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${M(r)} with value ${r}.`;K(t,o)}var T=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},A=(t,...e)=>{T("info",t,...e)};A.info=(t,...e)=>{T("info",t,...e)};A.error=(t,...e)=>{T("error",t,...e)};A.warn=(t,...e)=>{T("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=A);function kt(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function X(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function Et(t,e,n){let r=_({encode:!0},{...n}),o=X(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var Dt={parse:kt,stringify:X,appendQueryString:Et};function Pt(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function It(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Nt(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Ct(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Ft(t){return/^[\dA-Z_]+$/.test(t)}function L(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return x(t)&&y(e).forEach(l=>{N(l)&&!o||!(r?l in t:Object.hasOwn(t,l))||!m&&(r?Yt(t,l):Object.getOwnPropertyDescriptor(t,l))?.enumerable===!1||(i[l]=O(t[l]))}),i}function Yt(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function vt(t,e){if(!x(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return L(n,o)}function Ut(t,e){return(!f(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function _t(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var d=j(require("dayjs"),1),Q=j(require("dayjs/plugin/customParseFormat"),1);function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){f(t)&&(t={max:t});let{min:e=1,max:n=p(Lt())}=t;Kt(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function Kt(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Lt(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,d.extend)(Q.default);function k(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,d.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,d.default)(e).isValid()||!(0,d.default)(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,d.default)(e).year(),m=(0,d.default)(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),l=a({min:1,max:31}),W=a(23),H=a(59),nt=a(59),P=(0,d.default)(`${i}-${c}-${l} ${W}:${H}:${nt}`);return P.isBefore((0,d.default)(e))||P.isAfter((0,d.default)(n))?k(t):P.format(r)}function g(t={}){let e=Wt(t),n=Ht(e);Zt(n);let{length:r}=e;Gt(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var zt=16,z=1;function Wt(t){let e=f(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:f(t.length)?{max:t.length,min:t.length}:{max:zt,min:z,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function Ht(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function Zt(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Gt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<z&&s("getRandomString",`Minimum length cannot be less than ${z}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function J(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${g(1)}${g({length:a({max:30,min:1})})}${g(1)}@${p(t)}`;return/\.{2,}/.test(e)?J():e}function qt(t={}){f(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function E(t,e){(!f(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!u(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function Bt(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,k({format:"YYYYMMDD"}),E(3,e),E(1,[...e,"X","x"])].join("")}function Vt(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Xt(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${g({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${g({length:{min:2,max:4}})}`,`?query=${g({length:{min:5,max:6}})}`,`?search=${g({length:{min:1,max:4}})}`,`?token=${g({length:{min:16,max:16}})}`];return`${p(t)}${g({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Qt(t){return/^\d+$/.test(t)}function Jt(t){return/^[A-Z]+$/i.test(t)}function te(t){return/^[A-Z]+$/.test(t)}function ee(t){return/^[\dA-Z]+$/.test(t)}function ne(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function re(t){return/^[a-z]+$/.test(t)}function oe(t){return/^[\da-z]+$/.test(t)}function ie(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function se(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function ae(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function me(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function ce(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function pe(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function fe(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function ue(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ge(t){return/^[1-9]\d*$/.test(t)}function le(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function de(t){return/^-[1-9]\d*$/.test(t)}function xe(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var D=j(require("dayjs"),1),tt=j(require("dayjs/plugin/customParseFormat"),1);function be(t){return/^1[3-9]\d{9}$/.test(t)}function ye(t){return/^https?:\/\/\S+$/i.test(t)}function he(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function Oe(t){return t===""}function et(t,e="YYYY-MM-DD HH:mm:ss"){return(0,D.extend)(tt.default),(0,D.default)(t,e,!0).isValid()}function we(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&et(t.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,error,generateRandomArray,generateRandomColor,generateRandomDate,generateRandomEmail,generateRandomFloat,generateRandomIdCard,generateRandomMobilePhone,generateRandomStringFromSource,getRandomInt,getRandomItem,getRandomString,getRandomUrl,hasChanged,isArray,isBoolean,isChineseString,isDate,isDateString,isDef,isEmail,isEmptyString,isEnglishAphabet,isFloat,isFunction,isIdCard,isInteger,isLowerCase,isLowerCaseAndNumber,isLowerCaseAndNumberAndChinese,isMap,isMobilePhone,isNegativeFloat,isNegativeInteger,isNonNegativeFloat,isNonNegativeInteger,isNonPositiveFloat,isNonPositiveInteger,isNull,isNumber,isNumberOrNumberString,isObject,isObjectLike,isPlainObject,isPositiveFloat,isPositiveInteger,isPromise,isRegExp,isSet,isString,isSymbol,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,isUrl,log,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline,warn});
|
|
1
|
+
"use strict";var nt=Object.create;var A=Object.defineProperty;var rt=Object.getOwnPropertyDescriptor;var ot=Object.getOwnPropertyNames;var it=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty;var at=(t,e)=>{for(var n in e)A(t,n,{get:e[n],enumerable:!0})},H=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of ot(e))!st.call(t,o)&&o!==n&&A(t,o,{get:()=>e[o],enumerable:!(r=rt(e,o))||r.enumerable});return t};var D=(t,e,n)=>(n=t!=null?nt(it(t)):{},H(e||!t||!t.__esModule?A(n,"default",{value:t,enumerable:!0}):n,t)),mt=t=>H(A({},"__esModule",{value:!0}),t);var we={};at(we,{base64Decode:()=>bt,base64Encode:()=>xt,castArray:()=>y,compose:()=>yt,composeRight:()=>ht,debounce:()=>Ot,debugWarn:()=>_,debugWarnInvalidTypeMessage:()=>Rt,decimalToBinary:()=>dt,deepClone:()=>O,deepMerge:()=>U,deprecated:()=>jt,error:()=>St,generateRandomArray:()=>Yt,generateRandomColor:()=>Ut,generateRandomDate:()=>T,generateRandomEmail:()=>Q,generateRandomFloat:()=>Gt,generateRandomIdCard:()=>qt,generateRandomMobilePhone:()=>Bt,generateRandomStringFromSource:()=>k,getRandomInt:()=>a,getRandomItem:()=>p,getRandomString:()=>g,getRandomUrl:()=>Vt,hasChanged:()=>lt,isArray:()=>u,isBoolean:()=>pt,isChineseString:()=>ie,isDate:()=>F,isDateString:()=>tt,isDef:()=>gt,isEmail:()=>ye,isEmptyString:()=>he,isEnglishAphabet:()=>Qt,isFloat:()=>se,isFunction:()=>$,isIdCard:()=>Oe,isInteger:()=>fe,isLowerCase:()=>ne,isLowerCaseAndNumber:()=>re,isLowerCaseAndNumberAndChinese:()=>oe,isMap:()=>N,isMobilePhone:()=>xe,isNegativeFloat:()=>ce,isNegativeInteger:()=>le,isNonNegativeFloat:()=>me,isNonNegativeInteger:()=>ge,isNonPositiveFloat:()=>pe,isNonPositiveInteger:()=>de,isNull:()=>ft,isNumber:()=>f,isNumberOrNumberString:()=>Xt,isObject:()=>ct,isObjectLike:()=>w,isPlainObject:()=>x,isPositiveFloat:()=>ae,isPositiveInteger:()=>ue,isPromise:()=>Y,isRegExp:()=>v,isSet:()=>C,isString:()=>I,isSymbol:()=>P,isUndef:()=>h,isUndefined:()=>ut,isUpperCase:()=>Jt,isUpperCaseAndNumber:()=>te,isUpperCaseAndNumberAndChinese:()=>ee,isUrl:()=>be,objectToString:()=>Z,omit:()=>vt,pick:()=>L,qs:()=>Et,throttle:()=>Dt,throwError:()=>s,throwErrorInvalidTypeMessage:()=>Mt,toTypeString:()=>b,toTypeValue:()=>S,validatorChineseOrEnglish:()=>Pt,validatorChineseOrEnglishOrNumber:()=>It,validatorUppercaseOrNumbersOrSpecial:()=>Nt,validatorUppercaseOrNumbersOrUnderline:()=>Ct,warn:()=>At});module.exports=mt(we);function ct(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var Z=Object.prototype.toString,b=t=>Z.call(t),S=t=>b(t).slice(8,-1),I=t=>typeof t=="string",f=t=>typeof t=="number"&&Number.isFinite(t),pt=t=>typeof t=="boolean",ft=t=>t===null,ut=t=>t===void 0,P=t=>typeof t=="symbol",u=Array.isArray,$=t=>typeof t=="function",N=t=>b(t)==="[object Map]",C=t=>b(t)==="[object Set]",F=t=>b(t)==="[object Date]",v=t=>b(t)==="[object RegExp]",Y=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,gt=t=>t!=null,lt=(t,e)=>t!==e;function x(t){return b(t)==="[object Object]"}function y(t){return u(t)?t:[t]}function dt(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function xt(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=G[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function bt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=G.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function yt(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function ht(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function Ot(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(F(r))return new Date(r);if(v(r))return new RegExp(r);if(Y(r))return r;if(e.has(r))return e.get(r);if(N(r)){let i=new Map;return e.set(r,i),r.forEach((c,l)=>i.set(n(l),n(c))),i}if(C(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=u(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function U(t,e,n={}){return B(q(t,n),q(e,n),n)}function B(t,e,n){return u(t)?$t(t,e,n):wt(t,e,n)}function wt(t,e,n){if(!x(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(x(t[o])||u(t[o]))&&(x(e[o])||u(e[o]))?t[o]=B(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function $t(t,e,n){let{mergeStrategy:r="replace"}=n;if(u(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function q(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var j=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new j(`[${t}] ${e}`)}function _(t,e){let n=I(t)?new j(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function At(...t){console.warn(...t)}function St(...t){console.error(...t)}var jt=({from:t,replacement:e,version:n,type:r="API"})=>{_(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Mt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${S(r)} with value ${r}.`;s(t,o)}function Rt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${S(r)} with value ${r}.`;_(t,o)}var M=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},R=(t,...e)=>{M("info",t,...e)};R.info=(t,...e)=>{M("info",t,...e)};R.error=(t,...e)=>{M("error",t,...e)};R.warn=(t,...e)=>{M("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=R);function Tt(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function V(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function kt(t,e,n){let r=U({encode:!0},{...n}),o=V(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var Et={parse:Tt,stringify:V,appendQueryString:kt};function Dt(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function It(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Pt(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Nt(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function Ct(t){return/^[\dA-Z_]+$/.test(t)}function L(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return x(t)&&y(e).forEach(l=>{P(l)&&!o||!(r?l in t:Object.hasOwn(t,l))||!m&&(r?Ft(t,l):Object.getOwnPropertyDescriptor(t,l))?.enumerable===!1||(i[l]=O(t[l]))}),i}function Ft(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function vt(t,e){if(!x(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return L(n,o)}function Yt(t,e){return(!f(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Ut(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var d=D(require("dayjs"),1),X=D(require("dayjs/plugin/customParseFormat.js"),1);function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){f(t)&&(t={max:t});let{min:e=1,max:n=p(Lt())}=t;_t(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function _t(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Lt(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}d.default.extend(X.default);function T(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,d.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,d.default)(e).isValid()||!(0,d.default)(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=(0,d.default)(e).year(),m=(0,d.default)(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),l=a({min:1,max:31}),z=a(23),W=a(59),et=a(59),E=(0,d.default)(`${i}-${c}-${l} ${z}:${W}:${et}`);return E.isBefore((0,d.default)(e))||E.isAfter((0,d.default)(n))?T(t):E.format(r)}function g(t={}){let e=zt(t),n=Wt(e);Ht(n);let{length:r}=e;Zt(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var Kt=16,K=1;function zt(t){let e=f(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:f(t.length)?{max:t.length,min:t.length}:{max:Kt,min:K,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function Wt(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function Ht(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Zt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<K&&s("getRandomString",`Minimum length cannot be less than ${K}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function Q(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${g(1)}${g({length:a({max:30,min:1})})}${g(1)}@${p(t)}`;return/\.{2,}/.test(e)?Q():e}function Gt(t={}){f(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function k(t,e){(!f(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!u(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function qt(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,T({format:"YYYYMMDD"}),k(3,e),k(1,[...e,"X","x"])].join("")}function Bt(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Vt(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${g({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${g({length:{min:2,max:4}})}`,`?query=${g({length:{min:5,max:6}})}`,`?search=${g({length:{min:1,max:4}})}`,`?token=${g({length:{min:16,max:16}})}`];return`${p(t)}${g({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Xt(t){return/^\d+$/.test(t)}function Qt(t){return/^[A-Z]+$/i.test(t)}function Jt(t){return/^[A-Z]+$/.test(t)}function te(t){return/^[\dA-Z]+$/.test(t)}function ee(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function ne(t){return/^[a-z]+$/.test(t)}function re(t){return/^[\da-z]+$/.test(t)}function oe(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function ie(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function se(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function ae(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function me(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function ce(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function pe(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function fe(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ue(t){return/^[1-9]\d*$/.test(t)}function ge(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function le(t){return/^-[1-9]\d*$/.test(t)}function de(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var J=D(require("dayjs"),1);function xe(t){return/^1[3-9]\d{9}$/.test(t)}function be(t){return/^https?:\/\/\S+$/i.test(t)}function ye(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function he(t){return t===""}function tt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,J.default)(t,e,!0).isValid()}function Oe(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&tt(t.slice(6,14),"YYYYMMDD")}0&&(module.exports={base64Decode,base64Encode,castArray,compose,composeRight,debounce,debugWarn,debugWarnInvalidTypeMessage,decimalToBinary,deepClone,deepMerge,deprecated,error,generateRandomArray,generateRandomColor,generateRandomDate,generateRandomEmail,generateRandomFloat,generateRandomIdCard,generateRandomMobilePhone,generateRandomStringFromSource,getRandomInt,getRandomItem,getRandomString,getRandomUrl,hasChanged,isArray,isBoolean,isChineseString,isDate,isDateString,isDef,isEmail,isEmptyString,isEnglishAphabet,isFloat,isFunction,isIdCard,isInteger,isLowerCase,isLowerCaseAndNumber,isLowerCaseAndNumberAndChinese,isMap,isMobilePhone,isNegativeFloat,isNegativeInteger,isNonNegativeFloat,isNonNegativeInteger,isNonPositiveFloat,isNonPositiveInteger,isNull,isNumber,isNumberOrNumberString,isObject,isObjectLike,isPlainObject,isPositiveFloat,isPositiveInteger,isPromise,isRegExp,isSet,isString,isSymbol,isUndef,isUndefined,isUpperCase,isUpperCaseAndNumber,isUpperCaseAndNumberAndChinese,isUrl,objectToString,omit,pick,qs,throttle,throwError,throwErrorInvalidTypeMessage,toTypeString,toTypeValue,validatorChineseOrEnglish,validatorChineseOrEnglishOrNumber,validatorUppercaseOrNumbersOrSpecial,validatorUppercaseOrNumbersOrUnderline,warn});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var Vt=Object.create;var kt=Object.defineProperty;var Xt=Object.getOwnPropertyDescriptor;var qt=Object.getOwnPropertyNames;var Bt=Object.getPrototypeOf,Gt=Object.prototype.hasOwnProperty;var jt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Jt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of qt(e))!Gt.call(t,i)&&i!==n&&kt(t,i,{get:()=>e[i],enumerable:!(r=Xt(e,i))||r.enumerable});return t};var ut=(t,e,n)=>(n=t!=null?Vt(Bt(t)):{},Jt(e||!t||!t.__esModule?kt(n,"default",{value:t,enumerable:!0}):n,t));var wt=jt(($t,Mt)=>{"use strict";(function(t,e){typeof $t=="object"&&typeof Mt<"u"?Mt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})($t,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",v="month",X="quarter",I="year",_="date",it="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},H={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,v),f=o-a<0,m=s.clone().add(u+(f?-1:1),v);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:v,y:I,w:h,d:b,D:_,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=H;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==it},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,T){var L=g.w(a.$u?Date.UTC(a.$y,T,V):new Date(a.$y,T,V),a);return f?L:L.endOf(b)},w=function(V,T){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(T)),a)},S=this.$W,A=this.$M,C=this.$D,G="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case v:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,tt=(S<q?S+7:S)-q;return d(f?C-tt:C+(6-tt),A);case b:case _:return w(G+"Hours",0);case l:return w(G+"Minutes",1);case y:return w(G+"Seconds",2);case i:return w(G+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[_]=m+"Date",a[v]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===v||f===I){var S=this.clone().set(_,1);S.$d[d](w),S.init(),this.$d=S.set(_,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===v)return this.set(v,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||it;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,G=a.meridiem,q=function(T,L,B,J){return T&&(T[L]||T(u,f))||B[L].slice(0,J)},tt=function(T){return g.s(d%12||12,T,"0")},V=G||function(T,L,B){var J=T<12?"AM":"PM";return B?J.toLowerCase():J};return f.replace(x,function(T,L){return L||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return tt(1);case"hh":return tt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(T)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case v:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(v).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",v],["$y",I],["$D",_]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var Dt=jt((Ot,St)=>{"use strict";(function(t,e){typeof Ot=="object"&&typeof St<"u"?St.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Ot,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},v=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var H=1;H<=24;H+=1)if(p.indexOf(M(H,0,x))>-1){O=H>12;break}}else O=p===(x?"pm":"PM");return O},_={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:v,ZZ:v};function it(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),H=M.length,j=0;j<H;j+=1){var P=M[j],K=_[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<H;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,H=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=it(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,G=d.minutes,q=d.seconds,tt=d.milliseconds,V=d.zone,T=d.week,L=new Date,B=A||(w||S?1:L.getDate()),J=w||L.getFullYear(),st=0;w&&!S||(st=S>0?S-1:L.getMonth());var at,gt=C||0,ht=G||0,xt=q||0,yt=tt||0;return V?new Date(Date.UTC(J,st,B,gt,ht,xt,yt+60*V.offset*1e3)):f?new Date(Date.UTC(J,st,B,gt,ht,xt,yt)):(at=new Date(J,st,B,gt,ht,xt,yt),T&&(at=m(at).week(T).toDate()),at)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else H.call(this,j)}}})});function he(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function ct(t){return t!==null&&typeof t=="object"}var Qt=Object.prototype.toString,et=t=>Qt.call(t),bt=t=>et(t).slice(8,-1),Yt=t=>typeof t=="string",U=t=>typeof t=="number"&&Number.isFinite(t),$e=t=>typeof t=="boolean",Me=t=>t===null,we=t=>t===void 0,Rt=t=>typeof t=="symbol",Z=Array.isArray,ft=t=>typeof t=="function",Et=t=>et(t)==="[object Map]",Ct=t=>et(t)==="[object Set]",It=t=>et(t)==="[object Date]",Pt=t=>et(t)==="[object RegExp]",Nt=t=>ct(t)&&ft(t?.then)&&ft(t?.catch),rt=t=>t==null,Oe=t=>t!=null,Se=(t,e)=>t!==e;function Q(t){return et(t)==="[object Object]"}function nt(t){return Z(t)?t:[t]}function Ne(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function _e(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=_t[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Le(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_t.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function He(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function Ue(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function We(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!ct(r))return r;if(It(r))return new Date(r);if(Pt(r))return new RegExp(r);if(Nt(r))return r;if(e.has(r))return e.get(r);if(Et(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Ct(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=Z(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function Ft(t,e,n={}){return Ht(Lt(t,n),Lt(e,n),n)}function Ht(t,e,n){return Z(t)?ee(t,e,n):te(t,e,n)}function te(t,e,n){if(!Q(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(Q(t[i])||Z(t[i]))&&(Q(e[i])||Z(e[i]))?t[i]=Ht(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function ee(t,e,n){let{mergeStrategy:r="replace"}=n;if(Z(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Lt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var mt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new mt(`[${t}] ${e}`)}function Ut(t,e){let n=Yt(t)?new mt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Je(...t){console.warn(...t)}function Qe(...t){console.error(...t)}var tn=({from:t,replacement:e,version:n,type:r="API"})=>{Ut(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function en(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${bt(r)} with value ${r}.`;D(t,i)}function nn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${bt(r)} with value ${r}.`;Ut(t,i)}var pt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},dt=(t,...e)=>{pt("info",t,...e)};dt.info=(t,...e)=>{pt("info",t,...e)};dt.error=(t,...e)=>{pt("error",t,...e)};dt.warn=(t,...e)=>{pt("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=dt);function ne(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Zt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function re(t,e,n){let r=Ft({encode:!0},{...n}),i=Zt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var an={parse:ne,stringify:Zt,appendQueryString:re};function fn(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function dn(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function ln(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function gn(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function hn(t){return/^[\dA-Z_]+$/.test(t)}function Wt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return Q(t)&&nt(e).forEach(h=>{Rt(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?oe(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function oe(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Nn(t,e){if(!Q(t))return{};let n=ot(t),r=nt(e),i=Object.keys(n).filter(y=>!r.includes(y));return Wt(n,i)}function Wn(t,e){return(!U(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),ft(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Kn(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var W=ut(wt(),1),zt=ut(Dt(),1);function F(t){return t[Math.floor(Math.random()*t.length)]}function k(t={}){U(t)&&(t={max:t});let{min:e=1,max:n=F(se())}=t;ie(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function ie(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function se(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,W.extend)(zt.default);function At(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,W.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,W.default)(e).isValid()||!(0,W.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,W.default)(e).year(),y=(0,W.default)(n).year(),l=k({min:i,max:y}),b=k({min:1,max:12}),h=k({min:1,max:31}),v=k(23),X=k(59),I=k(59),_=(0,W.default)(`${l}-${b}-${h} ${v}:${X}:${I}`);return _.isBefore((0,W.default)(e))||_.isAfter((0,W.default)(n))?At(t):_.format(r)}function z(t={}){let e=ue(t),n=ce(e);fe(n);let{length:r}=e;me(r.min,r.max);let i=k(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var ae=16,vt=1;function ue(t){let e=U(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:U(t.length)?{max:t.length,min:t.length}:{max:ae,min:vt,...t.length},extra:e?[]:[...new Set(nt(t.extra||[]))]}}function ce(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=nt(t.extra).join(""),e}function fe(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function me(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<vt&&D("getRandomString",`Minimum length cannot be less than ${vt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function pe(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${z(1)}${z({length:k({max:30,min:1})})}${z(1)}@${F(t)}`;return/\.{2,}/.test(e)?pe():e}function pr(t={}){U(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function Tt(t,e){(!U(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!Z(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=F(e);return n}function Mr(){let t=k({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,At({format:"YYYYMMDD"}),Tt(3,e),Tt(1,[...e,"X","x"])].join("")}function Dr(){return F(["13","14","15","16","17","18","19"])+k(999999999).toString().padEnd(9,"0")}function jr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${z({length:{min:4,max:8}})}`,`?id=${k()}`,`?page=${z({length:{min:2,max:4}})}`,`?query=${z({length:{min:5,max:6}})}`,`?search=${z({length:{min:1,max:4}})}`,`?token=${z({length:{min:16,max:16}})}`];return`${F(t)}${z({length:{min:5,max:25}})}${F(e)}${F(n)}`}function Kr(t){return/^\d+$/.test(t)}function Vr(t){return/^[A-Z]+$/i.test(t)}function Xr(t){return/^[A-Z]+$/.test(t)}function qr(t){return/^[\dA-Z]+$/.test(t)}function Br(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Gr(t){return/^[a-z]+$/.test(t)}function Jr(t){return/^[\da-z]+$/.test(t)}function Qr(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function to(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function no(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function ro(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function oo(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function io(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function so(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function uo(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function co(t){return/^[1-9]\d*$/.test(t)}function fo(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function mo(t){return/^-[1-9]\d*$/.test(t)}function po(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var lt=ut(wt(),1),Kt=ut(Dt(),1);function go(t){return/^1[3-9]\d{9}$/.test(t)}function ho(t){return/^https?:\/\/\S+$/i.test(t)}function xo(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function yo(t){return t===""}function de(t,e="YYYY-MM-DD HH:mm:ss"){return(0,lt.extend)(Kt.default),(0,lt.default)(t,e,!0).isValid()}function bo(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&de(t.slice(6,14),"YYYYMMDD")}export{Le as base64Decode,_e as base64Encode,nt as castArray,He as compose,Ue as composeRight,We as debounce,Ut as debugWarn,nn as debugWarnInvalidTypeMessage,Ne as decimalToBinary,ot as deepClone,Ft as deepMerge,tn as deprecated,Qe as error,Wn as generateRandomArray,Kn as generateRandomColor,At as generateRandomDate,pe as generateRandomEmail,pr as generateRandomFloat,Mr as generateRandomIdCard,Dr as generateRandomMobilePhone,Tt as generateRandomStringFromSource,k as getRandomInt,F as getRandomItem,z as getRandomString,jr as getRandomUrl,Se as hasChanged,Z as isArray,$e as isBoolean,to as isChineseString,It as isDate,de as isDateString,Oe as isDef,xo as isEmail,yo as isEmptyString,Vr as isEnglishAphabet,no as isFloat,ft as isFunction,bo as isIdCard,uo as isInteger,Gr as isLowerCase,Jr as isLowerCaseAndNumber,Qr as isLowerCaseAndNumberAndChinese,Et as isMap,go as isMobilePhone,io as isNegativeFloat,mo as isNegativeInteger,oo as isNonNegativeFloat,fo as isNonNegativeInteger,so as isNonPositiveFloat,po as isNonPositiveInteger,Me as isNull,U as isNumber,Kr as isNumberOrNumberString,he as isObject,ct as isObjectLike,Q as isPlainObject,ro as isPositiveFloat,co as isPositiveInteger,Nt as isPromise,Pt as isRegExp,Ct as isSet,Yt as isString,Rt as isSymbol,rt as isUndef,we as isUndefined,Xr as isUpperCase,qr as isUpperCaseAndNumber,Br as isUpperCaseAndNumberAndChinese,ho as isUrl,dt as log,Qt as objectToString,Nn as omit,Wt as pick,an as qs,fn as throttle,D as throwError,en as throwErrorInvalidTypeMessage,et as toTypeString,bt as toTypeValue,ln as validatorChineseOrEnglish,dn as validatorChineseOrEnglishOrNumber,gn as validatorUppercaseOrNumbersOrSpecial,hn as validatorUppercaseOrNumbersOrUnderline,Je as warn};
|
|
1
|
+
var Kt=Object.create;var At=Object.defineProperty;var Vt=Object.getOwnPropertyDescriptor;var Xt=Object.getOwnPropertyNames;var qt=Object.getPrototypeOf,Bt=Object.prototype.hasOwnProperty;var Tt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Gt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Xt(e))!Bt.call(t,i)&&i!==n&&At(t,i,{get:()=>e[i],enumerable:!(r=Vt(e,i))||r.enumerable});return t};var xt=(t,e,n)=>(n=t!=null?Kt(qt(t)):{},Gt(e||!t||!t.__esModule?At(n,"default",{value:t,enumerable:!0}):n,t));var Mt=Tt((bt,$t)=>{"use strict";(function(t,e){typeof bt=="object"&&typeof $t<"u"?$t.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(bt,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",A="month",X="quarter",I="year",L="date",it="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},H={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,A),f=o-a<0,m=s.clone().add(u+(f?-1:1),A);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:A,y:I,w:h,d:b,D:L,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",N={};N[j]=O;var z="$isDayjsObject",P=function(c){return c instanceof Y||!(!c||!c[z])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();N[f]&&(a=f),o&&(N[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;N[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(P(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=H;g.l=R,g.i=P,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[z]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==it},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(K,T){var _=g.w(a.$u?Date.UTC(a.$y,T,K):new Date(a.$y,T,K),a);return f?_:_.endOf(b)},w=function(K,T){return g.w(a.toDate()[K].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(T)),a)},S=this.$W,v=this.$M,C=this.$D,G="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case A:return f?d(1,v):d(0,v+1);case h:var q=this.$locale().weekStart||0,tt=(S<q?S+7:S)-q;return d(f?C-tt:C+(6-tt),v);case b:case L:return w(G+"Hours",0);case l:return w(G+"Minutes",1);case y:return w(G+"Seconds",2);case i:return w(G+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[L]=m+"Date",a[A]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===A||f===I){var S=this.clone().set(L,1);S.$d[d](w),S.init(),this.$d=S.set(L,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(v){var C=$(f);return g.w(C.date(C.date()+Math.round(v*o)),f)};if(m===A)return this.set(A,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||it;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,v=a.weekdays,C=a.months,G=a.meridiem,q=function(T,_,B,J){return T&&(T[_]||T(u,f))||B[_].slice(0,J)},tt=function(T){return g.s(d%12||12,T,"0")},K=G||function(T,_,B){var J=T<12?"AM":"PM";return B?J.toLowerCase():J};return f.replace(x,function(T,_){return _||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,v,2);case"ddd":return q(a.weekdaysShort,u.$W,v,3);case"dddd":return v[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return tt(1);case"hh":return tt(2);case"a":return K(d,w,!0);case"A":return K(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(T)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,v=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case A:f=C();break;case X:f=C()/3;break;case h:f=(v-S)/6048e5;break;case b:f=(v-S)/864e5;break;case l:f=v/n;break;case y:f=v/e;break;case i:f=v/t;break;default:f=v}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(A).$D},s.$locale=function(){return N[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",A],["$y",I],["$D",L]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=P,$.unix=function(c){return $(1e3*c)},$.en=N[j],$.Ls=N,$.p={},$})});var Zt=Tt((wt,Ot)=>{"use strict";(function(t,e){typeof wt=="object"&&typeof Ot<"u"?Ot.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(wt,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},A=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var H=1;H<=24;H+=1)if(p.indexOf(M(H,0,x))>-1){O=H>12;break}}else O=p===(x?"pm":"PM");return O},L={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:A,ZZ:A};function it(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),H=M.length,j=0;j<H;j+=1){var N=M[j],z=L[N],P=z&&z[0],R=z&&z[1];M[j]=R?{regex:P,parser:R}:N.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<H;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,H=M.parse;M.parse=function(j){var N=j.date,z=j.utc,P=j.args;this.$u=z;var R=P[1];if(typeof R=="string"){var $=P[2]===!0,g=P[3]===!0,Y=$||g,E=P[2];g&&(E=P[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=it(a)(u),w=d.year,S=d.month,v=d.day,C=d.hours,G=d.minutes,q=d.seconds,tt=d.milliseconds,K=d.zone,T=d.week,_=new Date,B=v||(w||S?1:_.getDate()),J=w||_.getFullYear(),st=0;w&&!S||(st=S>0?S-1:_.getMonth());var at,dt=C||0,lt=G||0,gt=q||0,ht=tt||0;return K?new Date(Date.UTC(J,st,B,dt,lt,gt,ht+60*K.offset*1e3)):f?new Date(Date.UTC(J,st,B,dt,lt,gt,ht)):(at=new Date(J,st,B,dt,lt,gt,ht),T&&(at=m(at).week(T).toDate()),at)}catch{return new Date("")}}(N,R,z,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&N!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){P[1]=R[s-1];var o=O.apply(this,P);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else H.call(this,j)}}})});function ge(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function ut(t){return t!==null&&typeof t=="object"}var Jt=Object.prototype.toString,et=t=>Jt.call(t),yt=t=>et(t).slice(8,-1),kt=t=>typeof t=="string",U=t=>typeof t=="number"&&Number.isFinite(t),be=t=>typeof t=="boolean",$e=t=>t===null,Me=t=>t===void 0,jt=t=>typeof t=="symbol",Z=Array.isArray,ct=t=>typeof t=="function",Yt=t=>et(t)==="[object Map]",Rt=t=>et(t)==="[object Set]",Et=t=>et(t)==="[object Date]",Ct=t=>et(t)==="[object RegExp]",It=t=>ut(t)&&ct(t?.then)&&ct(t?.catch),rt=t=>t==null,we=t=>t!=null,Oe=(t,e)=>t!==e;function Q(t){return et(t)==="[object Object]"}function nt(t){return Z(t)?t:[t]}function Ne(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Pe(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Nt[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Le(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Nt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function Fe(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function He(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function Ze(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!ut(r))return r;if(Et(r))return new Date(r);if(Ct(r))return new RegExp(r);if(It(r))return r;if(e.has(r))return e.get(r);if(Yt(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Rt(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=Z(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function Lt(t,e,n={}){return _t(Pt(t,n),Pt(e,n),n)}function _t(t,e,n){return Z(t)?te(t,e,n):Qt(t,e,n)}function Qt(t,e,n){if(!Q(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(Q(t[i])||Z(t[i]))&&(Q(e[i])||Z(e[i]))?t[i]=_t(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function te(t,e,n){let{mergeStrategy:r="replace"}=n;if(Z(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Pt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var ft=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new ft(`[${t}] ${e}`)}function Ft(t,e){let n=kt(t)?new ft(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Ge(...t){console.warn(...t)}function Je(...t){console.error(...t)}var Qe=({from:t,replacement:e,version:n,type:r="API"})=>{Ft(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function tn(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;D(t,i)}function en(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${yt(r)} with value ${r}.`;Ft(t,i)}var mt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},pt=(t,...e)=>{mt("info",t,...e)};pt.info=(t,...e)=>{mt("info",t,...e)};pt.error=(t,...e)=>{mt("error",t,...e)};pt.warn=(t,...e)=>{mt("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=pt);function ee(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Ht(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function ne(t,e,n){let r=Lt({encode:!0},{...n}),i=Ht(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var on={parse:ee,stringify:Ht,appendQueryString:ne};function un(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function mn(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function pn(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function dn(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function ln(t){return/^[\dA-Z_]+$/.test(t)}function Ut(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return Q(t)&&nt(e).forEach(h=>{jt(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?re(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function re(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function In(t,e){if(!Q(t))return{};let n=ot(t),r=nt(e),i=Object.keys(n).filter(y=>!r.includes(y));return Ut(n,i)}function Un(t,e){return(!U(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),ct(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Wn(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var V=xt(Mt(),1),Wt=xt(Zt(),1);function F(t){return t[Math.floor(Math.random()*t.length)]}function k(t={}){U(t)&&(t={max:t});let{min:e=1,max:n=F(ie())}=t;oe(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function oe(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function ie(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}V.default.extend(Wt.default);function St(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,V.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,V.default)(e).isValid()||!(0,V.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,V.default)(e).year(),y=(0,V.default)(n).year(),l=k({min:i,max:y}),b=k({min:1,max:12}),h=k({min:1,max:31}),A=k(23),X=k(59),I=k(59),L=(0,V.default)(`${l}-${b}-${h} ${A}:${X}:${I}`);return L.isBefore((0,V.default)(e))||L.isAfter((0,V.default)(n))?St(t):L.format(r)}function W(t={}){let e=ae(t),n=ue(e);ce(n);let{length:r}=e;fe(r.min,r.max);let i=k(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var se=16,Dt=1;function ae(t){let e=U(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:U(t.length)?{max:t.length,min:t.length}:{max:se,min:Dt,...t.length},extra:e?[]:[...new Set(nt(t.extra||[]))]}}function ue(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=nt(t.extra).join(""),e}function ce(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function fe(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Dt&&D("getRandomString",`Minimum length cannot be less than ${Dt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function me(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${W(1)}${W({length:k({max:30,min:1})})}${W(1)}@${F(t)}`;return/\.{2,}/.test(e)?me():e}function fr(t={}){U(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function vt(t,e){(!U(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!Z(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=F(e);return n}function br(){let t=k({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,St({format:"YYYYMMDD"}),vt(3,e),vt(1,[...e,"X","x"])].join("")}function Or(){return F(["13","14","15","16","17","18","19"])+k(999999999).toString().padEnd(9,"0")}function Tr(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${W({length:{min:4,max:8}})}`,`?id=${k()}`,`?page=${W({length:{min:2,max:4}})}`,`?query=${W({length:{min:5,max:6}})}`,`?search=${W({length:{min:1,max:4}})}`,`?token=${W({length:{min:16,max:16}})}`];return`${F(t)}${W({length:{min:5,max:25}})}${F(e)}${F(n)}`}function Wr(t){return/^\d+$/.test(t)}function zr(t){return/^[A-Z]+$/i.test(t)}function Kr(t){return/^[A-Z]+$/.test(t)}function Vr(t){return/^[\dA-Z]+$/.test(t)}function Xr(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function qr(t){return/^[a-z]+$/.test(t)}function Br(t){return/^[\da-z]+$/.test(t)}function Gr(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Jr(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function to(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function eo(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function no(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function ro(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function oo(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function so(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ao(t){return/^[1-9]\d*$/.test(t)}function uo(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function co(t){return/^-[1-9]\d*$/.test(t)}function fo(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var zt=xt(Mt(),1);function po(t){return/^1[3-9]\d{9}$/.test(t)}function lo(t){return/^https?:\/\/\S+$/i.test(t)}function go(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function ho(t){return t===""}function pe(t,e="YYYY-MM-DD HH:mm:ss"){return(0,zt.default)(t,e,!0).isValid()}function xo(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&pe(t.slice(6,14),"YYYYMMDD")}export{Le as base64Decode,Pe as base64Encode,nt as castArray,Fe as compose,He as composeRight,Ze as debounce,Ft as debugWarn,en as debugWarnInvalidTypeMessage,Ne as decimalToBinary,ot as deepClone,Lt as deepMerge,Qe as deprecated,Je as error,Un as generateRandomArray,Wn as generateRandomColor,St as generateRandomDate,me as generateRandomEmail,fr as generateRandomFloat,br as generateRandomIdCard,Or as generateRandomMobilePhone,vt as generateRandomStringFromSource,k as getRandomInt,F as getRandomItem,W as getRandomString,Tr as getRandomUrl,Oe as hasChanged,Z as isArray,be as isBoolean,Jr as isChineseString,Et as isDate,pe as isDateString,we as isDef,go as isEmail,ho as isEmptyString,zr as isEnglishAphabet,to as isFloat,ct as isFunction,xo as isIdCard,so as isInteger,qr as isLowerCase,Br as isLowerCaseAndNumber,Gr as isLowerCaseAndNumberAndChinese,Yt as isMap,po as isMobilePhone,ro as isNegativeFloat,co as isNegativeInteger,no as isNonNegativeFloat,uo as isNonNegativeInteger,oo as isNonPositiveFloat,fo as isNonPositiveInteger,$e as isNull,U as isNumber,Wr as isNumberOrNumberString,ge as isObject,ut as isObjectLike,Q as isPlainObject,eo as isPositiveFloat,ao as isPositiveInteger,It as isPromise,Ct as isRegExp,Rt as isSet,kt as isString,jt as isSymbol,rt as isUndef,Me as isUndefined,Kr as isUpperCase,Vr as isUpperCaseAndNumber,Xr as isUpperCaseAndNumberAndChinese,lo as isUrl,Jt as objectToString,In as omit,Ut as pick,on as qs,un as throttle,D as throwError,tn as throwErrorInvalidTypeMessage,et as toTypeString,yt as toTypeValue,pn as validatorChineseOrEnglish,mn as validatorChineseOrEnglishOrNumber,dn as validatorUppercaseOrNumbersOrSpecial,ln as validatorUppercaseOrNumbersOrUnderline,Ge as warn};
|
|
@@ -516,6 +516,10 @@ declare const log: {
|
|
|
516
516
|
error(name: unknown, ...arg: unknown[]): void;
|
|
517
517
|
warn(name: unknown, ...arg: unknown[]): void;
|
|
518
518
|
};
|
|
519
|
+
type Log = typeof log;
|
|
520
|
+
declare global {
|
|
521
|
+
var log: Log;
|
|
522
|
+
}
|
|
519
523
|
|
|
520
524
|
/**
|
|
521
525
|
* 解析查询字符串
|
|
@@ -828,4 +832,4 @@ declare function isDateString(val: string, format?: string): boolean;
|
|
|
828
832
|
*/
|
|
829
833
|
declare function isIdCard(val: string): boolean;
|
|
830
834
|
|
|
831
|
-
export { type AnyObject, type ArrayItem, type Arrayable, type ParseOptions, type PlainObject, type StringNumber, type StringifyOptions, base64Decode, base64Encode, castArray, compose, composeRight, debounce, debugWarn, debugWarnInvalidTypeMessage, decimalToBinary, deepClone, deepMerge, deprecated, error, generateRandomArray, generateRandomColor, generateRandomDate, generateRandomEmail, generateRandomFloat, generateRandomIdCard, generateRandomMobilePhone, generateRandomStringFromSource, getRandomInt, getRandomItem, getRandomString, getRandomUrl, hasChanged, isArray, isBoolean, isChineseString, isDate, isDateString, isDef, isEmail, isEmptyString, isEnglishAphabet, isFloat, isFunction, isIdCard, isInteger, isLowerCase, isLowerCaseAndNumber, isLowerCaseAndNumberAndChinese, isMap, isMobilePhone, isNegativeFloat, isNegativeInteger, isNonNegativeFloat, isNonNegativeInteger, isNonPositiveFloat, isNonPositiveInteger, isNull, isNumber, isNumberOrNumberString, isObject, isObjectLike, isPlainObject, isPositiveFloat, isPositiveInteger, isPromise, isRegExp, isSet, isString, isSymbol, isUndef, isUndefined, isUpperCase, isUpperCaseAndNumber, isUpperCaseAndNumberAndChinese, isUrl,
|
|
835
|
+
export { type AnyObject, type ArrayItem, type Arrayable, type ParseOptions, type PlainObject, type StringNumber, type StringifyOptions, base64Decode, base64Encode, castArray, compose, composeRight, debounce, debugWarn, debugWarnInvalidTypeMessage, decimalToBinary, deepClone, deepMerge, deprecated, error, generateRandomArray, generateRandomColor, generateRandomDate, generateRandomEmail, generateRandomFloat, generateRandomIdCard, generateRandomMobilePhone, generateRandomStringFromSource, getRandomInt, getRandomItem, getRandomString, getRandomUrl, hasChanged, isArray, isBoolean, isChineseString, isDate, isDateString, isDef, isEmail, isEmptyString, isEnglishAphabet, isFloat, isFunction, isIdCard, isInteger, isLowerCase, isLowerCaseAndNumber, isLowerCaseAndNumberAndChinese, isMap, isMobilePhone, isNegativeFloat, isNegativeInteger, isNonNegativeFloat, isNonNegativeInteger, isNonPositiveFloat, isNonPositiveInteger, isNull, isNumber, isNumberOrNumberString, isObject, isObjectLike, isPlainObject, isPositiveFloat, isPositiveInteger, isPromise, isRegExp, isSet, isString, isSymbol, isUndef, isUndefined, isUpperCase, isUpperCaseAndNumber, isUpperCaseAndNumberAndChinese, isUrl, objectToString, omit, pick, qs, throttle, throwError, throwErrorInvalidTypeMessage, toTypeString, toTypeValue, validatorChineseOrEnglish, validatorChineseOrEnglishOrNumber, validatorUppercaseOrNumbersOrSpecial, validatorUppercaseOrNumbersOrUnderline, warn };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* @ts-self-types="./esm-bundler.d.ts" */
|
|
2
|
-
function lt(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var q=Object.prototype.toString,b=t=>q.call(t),R=t=>b(t).slice(8,-1),I=t=>typeof t=="string",u=t=>typeof t=="number"&&Number.isFinite(t),yt=t=>typeof t=="boolean",ht=t=>t===null,Ot=t=>t===void 0,N=t=>typeof t=="symbol",g=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",Y=t=>b(t)==="[object Date]",v=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,wt=t=>t!=null,$t=(t,e)=>t!==e;function d(t){return b(t)==="[object Object]"}function y(t){return g(t)?t:[t]}function Ct(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Ft(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=_[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Yt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function Ut(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function _t(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function Lt(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(Y(r))return new Date(r);if(v(r))return new RegExp(r);if(U(r))return r;if(e.has(r))return e.get(r);if(C(r)){let i=new Map;return e.set(r,i),r.forEach((c,f)=>i.set(n(f),n(c))),i}if(F(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=g(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function L(t,e,n={}){return z(K(t,n),K(e,n),n)}function z(t,e,n){return g(t)?V(t,e,n):B(t,e,n)}function B(t,e,n){if(!d(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(d(t[o])||g(t[o]))&&(d(e[o])||g(e[o]))?t[o]=z(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function V(t,e,n){let{mergeStrategy:r="replace"}=n;if(g(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function K(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var A=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new A(`[${t}] ${e}`)}function W(t,e){let n=I(t)?new A(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Vt(...t){console.warn(...t)}function Xt(...t){console.error(...t)}var Qt=({from:t,replacement:e,version:n,type:r="API"})=>{W(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Jt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${R(r)} with value ${r}.`;s(t,o)}function te(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${R(r)} with value ${r}.`;W(t,o)}var S=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},j=(t,...e)=>{S("info",t,...e)};j.info=(t,...e)=>{S("info",t,...e)};j.error=(t,...e)=>{S("error",t,...e)};j.warn=(t,...e)=>{S("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=j);function X(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function H(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function Q(t,e,n){let r=L({encode:!0},{...n}),o=H(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var oe={parse:X,stringify:H,appendQueryString:Q};function ae(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function pe(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function fe(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ue(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function ge(t){return/^[\dA-Z_]+$/.test(t)}function Z(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return d(t)&&y(e).forEach(f=>{N(f)&&!o||!(r?f in t:Object.hasOwn(t,f))||!m&&(r?J(t,f):Object.getOwnPropertyDescriptor(t,f))?.enumerable===!1||(i[f]=O(t[f]))}),i}function J(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ne(t,e){if(!d(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return Z(n,o)}function Ke(t,e){return(!u(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function ze(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import x,{extend as nt}from"dayjs";import rt from"dayjs/plugin/customParseFormat";function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){u(t)&&(t={max:t});let{min:e=1,max:n=p(et())}=t;tt(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function tt(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function et(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}nt(rt);function T(t={}){let{start:e="1800-01-01 00:00:00",end:n=x().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!x(e).isValid()||!x(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=x(e).year(),m=x(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),f=a({min:1,max:31}),D=a(23),P=a(59),G=a(59),M=x(`${i}-${c}-${f} ${D}:${P}:${G}`);return M.isBefore(x(e))||M.isAfter(x(n))?T(t):M.format(r)}function l(t={}){let e=it(t),n=st(e);at(n);let{length:r}=e;mt(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var ot=16,k=1;function it(t){let e=u(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:u(t.length)?{max:t.length,min:t.length}:{max:ot,min:k,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function st(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function at(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function mt(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<k&&s("getRandomString",`Minimum length cannot be less than ${k}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function ct(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${l(1)}${l({length:a({max:30,min:1})})}${l(1)}@${p(t)}`;return/\.{2,}/.test(e)?ct():e}function un(t={}){u(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function E(t,e){(!u(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function wn(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,T({format:"YYYYMMDD"}),E(3,e),E(1,[...e,"X","x"])].join("")}function jn(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function En(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${l({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${l({length:{min:2,max:4}})}`,`?query=${l({length:{min:5,max:6}})}`,`?search=${l({length:{min:1,max:4}})}`,`?token=${l({length:{min:16,max:16}})}`];return`${p(t)}${l({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Zn(t){return/^\d+$/.test(t)}function Gn(t){return/^[A-Z]+$/i.test(t)}function qn(t){return/^[A-Z]+$/.test(t)}function Bn(t){return/^[\dA-Z]+$/.test(t)}function Vn(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Xn(t){return/^[a-z]+$/.test(t)}function Qn(t){return/^[\da-z]+$/.test(t)}function Jn(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function tr(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function nr(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function rr(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function or(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function ir(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function sr(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function mr(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function cr(t){return/^[1-9]\d*$/.test(t)}function pr(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function fr(t){return/^-[1-9]\d*$/.test(t)}function ur(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}import pt,{extend as ft}from"dayjs";import ut from"dayjs/plugin/customParseFormat";function xr(t){return/^1[3-9]\d{9}$/.test(t)}function br(t){return/^https?:\/\/\S+$/i.test(t)}function yr(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function hr(t){return t===""}function gt(t,e="YYYY-MM-DD HH:mm:ss"){return ft(ut),pt(t,e,!0).isValid()}function Or(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&>(t.slice(6,14),"YYYYMMDD")}export{Yt as base64Decode,Ft as base64Encode,y as castArray,Ut as compose,_t as composeRight,Lt as debounce,W as debugWarn,te as debugWarnInvalidTypeMessage,Ct as decimalToBinary,O as deepClone,L as deepMerge,Qt as deprecated,Xt as error,Ke as generateRandomArray,ze as generateRandomColor,T as generateRandomDate,ct as generateRandomEmail,un as generateRandomFloat,wn as generateRandomIdCard,jn as generateRandomMobilePhone,E as generateRandomStringFromSource,a as getRandomInt,p as getRandomItem,l as getRandomString,En as getRandomUrl,$t as hasChanged,g as isArray,yt as isBoolean,tr as isChineseString,Y as isDate,gt as isDateString,wt as isDef,yr as isEmail,hr as isEmptyString,Gn as isEnglishAphabet,nr as isFloat,$ as isFunction,Or as isIdCard,mr as isInteger,Xn as isLowerCase,Qn as isLowerCaseAndNumber,Jn as isLowerCaseAndNumberAndChinese,C as isMap,xr as isMobilePhone,ir as isNegativeFloat,fr as isNegativeInteger,or as isNonNegativeFloat,pr as isNonNegativeInteger,sr as isNonPositiveFloat,ur as isNonPositiveInteger,ht as isNull,u as isNumber,Zn as isNumberOrNumberString,lt as isObject,w as isObjectLike,d as isPlainObject,rr as isPositiveFloat,cr as isPositiveInteger,U as isPromise,v as isRegExp,F as isSet,I as isString,N as isSymbol,h as isUndef,Ot as isUndefined,qn as isUpperCase,Bn as isUpperCaseAndNumber,Vn as isUpperCaseAndNumberAndChinese,br as isUrl,j as log,q as objectToString,Ne as omit,Z as pick,oe as qs,ae as throttle,s as throwError,Jt as throwErrorInvalidTypeMessage,b as toTypeString,R as toTypeValue,fe as validatorChineseOrEnglish,pe as validatorChineseOrEnglishOrNumber,ue as validatorUppercaseOrNumbersOrSpecial,ge as validatorUppercaseOrNumbersOrUnderline,Vt as warn};
|
|
2
|
+
function ft(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function w(t){return t!==null&&typeof t=="object"}var q=Object.prototype.toString,b=t=>q.call(t),R=t=>b(t).slice(8,-1),P=t=>typeof t=="string",u=t=>typeof t=="number"&&Number.isFinite(t),dt=t=>typeof t=="boolean",xt=t=>t===null,bt=t=>t===void 0,N=t=>typeof t=="symbol",g=Array.isArray,$=t=>typeof t=="function",C=t=>b(t)==="[object Map]",F=t=>b(t)==="[object Set]",v=t=>b(t)==="[object Date]",Y=t=>b(t)==="[object RegExp]",U=t=>w(t)&&$(t?.then)&&$(t?.catch),h=t=>t==null,yt=t=>t!=null,ht=(t,e)=>t!==e;function x(t){return b(t)==="[object Object]"}function y(t){return g(t)?t:[t]}function It(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var _="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Pt(t){let e="",n="";for(let o=0;o<t.length;o++)n+=t[o].charCodeAt(0).toString(2).padStart(8,"0");for(let o=0;o<n.length;o+=6)e+=_[parseInt(n.slice(o,o+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function Nt(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=_.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let o=parseInt(n.slice(r,r+8),2);o&&(e+=String.fromCharCode(o))}return e}function Ft(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function vt(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function Ut(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function O(t){let e=new WeakMap;function n(r){if(!w(r))return r;if(v(r))return new Date(r);if(Y(r))return new RegExp(r);if(U(r))return r;if(e.has(r))return e.get(r);if(C(r)){let i=new Map;return e.set(r,i),r.forEach((c,f)=>i.set(n(f),n(c))),i}if(F(r)){let i=new Set;return e.set(r,i),r.forEach(c=>i.add(n(c))),i}let o=g(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,o);let m=Object.getOwnPropertyDescriptors(r);for(let i of Reflect.ownKeys(m)){let c=m[i];c.get||c.set?Object.defineProperty(o,i,c):Object.defineProperty(o,i,{...c,value:n(c.value)})}return o}return n(t)}function K(t,e,n={}){return z(L(t,n),L(e,n),n)}function z(t,e,n){return g(t)?V(t,e,n):B(t,e,n)}function B(t,e,n){if(!x(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(o=>{(x(t[o])||g(t[o]))&&(x(e[o])||g(e[o]))?t[o]=z(t[o],e[o],n):Object.defineProperty(t,o,r[o])}),t}function V(t,e,n){let{mergeStrategy:r="replace"}=n;if(g(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function L(t,e){let{deepClone:n=!0}=e;return n?O(t):t}var A=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function s(t,e){throw new A(`[${t}] ${e}`)}function W(t,e){let n=P(t)?new A(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function Gt(...t){console.warn(...t)}function qt(...t){console.error(...t)}var Bt=({from:t,replacement:e,version:n,type:r="API"})=>{W(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Vt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${R(r)} with value ${r}.`;s(t,o)}function Xt(t,e,n,r){let o=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${R(r)} with value ${r}.`;W(t,o)}var S=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},j=(t,...e)=>{S("info",t,...e)};j.info=(t,...e)=>{S("info",t,...e)};j.error=(t,...e)=>{S("error",t,...e)};j.warn=(t,...e)=>{S("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=j);function X(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let o=t.split("&").filter(Boolean);for(let m of o){let[i,c]=m.split("=");r[i]=n?decodeURIComponent(c):c}return r}function H(t,e){let{encode:n=!0}=e||{},r=[];for(let o in t){let m=t[o];r.push(`${o}=${n?encodeURIComponent(m):m}`)}return r.join("&")}function Q(t,e,n){let r=K({encode:!0},{...n}),o=H(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${o}`:`${t}&${o}`:`${t}?${o}`}var te={parse:X,stringify:H,appendQueryString:Q};function re(t,e=500){let n=null;return function(...r){if(h(n))return n=Date.now(),t.apply(this,r);let o=Date.now();if(o-n>=e)return n=o,t.apply(this,r)}}function se(t){return!h(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function ae(t){return!h(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function me(t){return!h(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function ce(t){return/^[\dA-Z_]+$/.test(t)}function Z(t,e,n={}){let{includeProto:r=!1,includeSymbols:o=!0,includeNonEnum:m=!1}=n,i={};return x(t)&&y(e).forEach(f=>{N(f)&&!o||!(r?f in t:Object.hasOwn(t,f))||!m&&(r?J(t,f):Object.getOwnPropertyDescriptor(t,f))?.enumerable===!1||(i[f]=O(t[f]))}),i}function J(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ee(t,e){if(!x(t))return{};let n=O(t),r=y(e),o=Object.keys(n).filter(m=>!r.includes(m));return Z(n,o)}function ve(t,e){return(!u(t)||t<=0)&&s("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),$(e)||s("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Ue(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}import d from"dayjs";import nt from"dayjs/plugin/customParseFormat.js";function p(t){return t[Math.floor(Math.random()*t.length)]}function a(t={}){u(t)&&(t={max:t});let{min:e=1,max:n=p(et())}=t;tt(e,n);let r=Math.ceil(e),o=Math.floor(n);return Math.floor(Math.random()*(o-r+1)+r)}function tt(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||s("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||s("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&s("getRandomInt",`No integer value found between ${t} and ${e}`),s("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function et(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}d.extend(nt);function T(t={}){let{start:e="1800-01-01 00:00:00",end:n=d().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!d(e).isValid()||!d(n).isValid())&&s("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let o=d(e).year(),m=d(n).year(),i=a({min:o,max:m}),c=a({min:1,max:12}),f=a({min:1,max:31}),D=a(23),I=a(59),G=a(59),M=d(`${i}-${c}-${f} ${D}:${I}:${G}`);return M.isBefore(d(e))||M.isAfter(d(n))?T(t):M.format(r)}function l(t={}){let e=ot(t),n=it(e);st(n);let{length:r}=e;at(r.min,r.max);let o=a(r),m=e.prefix||"";for(let i=0;i<o;i++)m+=n.charAt(Math.floor(Math.random()*n.length));return m+(e.suffix||"")}var rt=16,k=1;function ot(t){let e=u(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:u(t.length)?{max:t.length,min:t.length}:{max:rt,min:k,...t.length},extra:e?[]:[...new Set(y(t.extra||[]))]}}function it(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=y(t.extra).join(""),e}function st(t){t.length===0&&s("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function at(t,e){Number.isInteger(t)||s("getRandomString","min must be an integer"),Number.isInteger(e)||s("getRandomString","max must be an integer"),t<k&&s("getRandomString",`Minimum length cannot be less than ${k}`),e<t&&s("getRandomString","Maximum length cannot be less than minimum length")}function mt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${l(1)}${l({length:a({max:30,min:1})})}${l(1)}@${p(t)}`;return/\.{2,}/.test(e)?mt():e}function mn(t={}){u(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function E(t,e){(!u(t)||t<=0)&&s("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!g(e)||e.length===0)&&s("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=p(e);return n}function bn(){let t=a({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,T({format:"YYYYMMDD"}),E(3,e),E(1,[...e,"X","x"])].join("")}function wn(){return p(["13","14","15","16","17","18","19"])+a(999999999).toString().padEnd(9,"0")}function Mn(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${l({length:{min:4,max:8}})}`,`?id=${a()}`,`?page=${l({length:{min:2,max:4}})}`,`?query=${l({length:{min:5,max:6}})}`,`?search=${l({length:{min:1,max:4}})}`,`?token=${l({length:{min:16,max:16}})}`];return`${p(t)}${l({length:{min:5,max:25}})}${p(e)}${p(n)}`}function Kn(t){return/^\d+$/.test(t)}function zn(t){return/^[A-Z]+$/i.test(t)}function Wn(t){return/^[A-Z]+$/.test(t)}function Hn(t){return/^[\dA-Z]+$/.test(t)}function Zn(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Gn(t){return/^[a-z]+$/.test(t)}function qn(t){return/^[\da-z]+$/.test(t)}function Bn(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Vn(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function Qn(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function Jn(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function tr(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function er(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function nr(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function or(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function ir(t){return/^[1-9]\d*$/.test(t)}function sr(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function ar(t){return/^-[1-9]\d*$/.test(t)}function mr(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}import ct from"dayjs";function fr(t){return/^1[3-9]\d{9}$/.test(t)}function ur(t){return/^https?:\/\/\S+$/i.test(t)}function gr(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function lr(t){return t===""}function pt(t,e="YYYY-MM-DD HH:mm:ss"){return ct(t,e,!0).isValid()}function dr(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&pt(t.slice(6,14),"YYYYMMDD")}export{Nt as base64Decode,Pt as base64Encode,y as castArray,Ft as compose,vt as composeRight,Ut as debounce,W as debugWarn,Xt as debugWarnInvalidTypeMessage,It as decimalToBinary,O as deepClone,K as deepMerge,Bt as deprecated,qt as error,ve as generateRandomArray,Ue as generateRandomColor,T as generateRandomDate,mt as generateRandomEmail,mn as generateRandomFloat,bn as generateRandomIdCard,wn as generateRandomMobilePhone,E as generateRandomStringFromSource,a as getRandomInt,p as getRandomItem,l as getRandomString,Mn as getRandomUrl,ht as hasChanged,g as isArray,dt as isBoolean,Vn as isChineseString,v as isDate,pt as isDateString,yt as isDef,gr as isEmail,lr as isEmptyString,zn as isEnglishAphabet,Qn as isFloat,$ as isFunction,dr as isIdCard,or as isInteger,Gn as isLowerCase,qn as isLowerCaseAndNumber,Bn as isLowerCaseAndNumberAndChinese,C as isMap,fr as isMobilePhone,er as isNegativeFloat,ar as isNegativeInteger,tr as isNonNegativeFloat,sr as isNonNegativeInteger,nr as isNonPositiveFloat,mr as isNonPositiveInteger,xt as isNull,u as isNumber,Kn as isNumberOrNumberString,ft as isObject,w as isObjectLike,x as isPlainObject,Jn as isPositiveFloat,ir as isPositiveInteger,U as isPromise,Y as isRegExp,F as isSet,P as isString,N as isSymbol,h as isUndef,bt as isUndefined,Wn as isUpperCase,Hn as isUpperCaseAndNumber,Zn as isUpperCaseAndNumberAndChinese,ur as isUrl,q as objectToString,Ee as omit,Z as pick,te as qs,re as throttle,s as throwError,Vt as throwErrorInvalidTypeMessage,b as toTypeString,R as toTypeValue,ae as validatorChineseOrEnglish,se as validatorChineseOrEnglishOrNumber,me as validatorUppercaseOrNumbersOrSpecial,ce as validatorUppercaseOrNumbersOrUnderline,Gt as warn};
|
package/dist/utils.global.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var lntvowUtils=(()=>{var Gt=Object.create;var mt=Object.defineProperty;var Jt=Object.getOwnPropertyDescriptor;var Qt=Object.getOwnPropertyNames;var te=Object.getPrototypeOf,ee=Object.prototype.hasOwnProperty;var Ft=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ne=(t,e)=>{for(var n in e)mt(t,n,{get:e[n],enumerable:!0})},Ht=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Qt(e))!ee.call(t,i)&&i!==n&&mt(t,i,{get:()=>e[i],enumerable:!(r=Jt(e,i))||r.enumerable});return t};var pt=(t,e,n)=>(n=t!=null?Gt(te(t)):{},Ht(e||!t||!t.__esModule?mt(n,"default",{value:t,enumerable:!0}):n,t)),re=t=>Ht(mt({},"__esModule",{value:!0}),t);var It=Ft((Et,Ct)=>{"use strict";(function(t,e){typeof Et=="object"&&typeof Ct<"u"?Ct.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Et,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",T="month",X="quarter",I="year",L="date",ut="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},W={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,T),f=o-a<0,m=s.clone().add(u+(f?-1:1),T);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:T,y:I,w:h,d:b,D:L,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",P={};P[j]=O;var K="$isDayjsObject",N=function(c){return c instanceof Y||!(!c||!c[K])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();P[f]&&(a=f),o&&(P[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;P[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(N(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=W;g.l=R,g.i=N,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[K]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==ut},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(V,k){var F=g.w(a.$u?Date.UTC(a.$y,k,V):new Date(a.$y,k,V),a);return f?F:F.endOf(b)},w=function(V,k){return g.w(a.toDate()[V].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(k)),a)},S=this.$W,A=this.$M,C=this.$D,J="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case T:return f?d(1,A):d(0,A+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),A);case b:case L:return w(J+"Hours",0);case l:return w(J+"Minutes",1);case y:return w(J+"Seconds",2);case i:return w(J+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[L]=m+"Date",a[T]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===T||f===I){var S=this.clone().set(L,1);S.$d[d](w),S.init(),this.$d=S.set(L,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(A){var C=$(f);return g.w(C.date(C.date()+Math.round(A*o)),f)};if(m===T)return this.set(T,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||ut;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,A=a.weekdays,C=a.months,J=a.meridiem,q=function(k,F,B,Q){return k&&(k[F]||k(u,f))||B[F].slice(0,Q)},nt=function(k){return g.s(d%12||12,k,"0")},V=J||function(k,F,B){var Q=k<12?"AM":"PM";return B?Q.toLowerCase():Q};return f.replace(x,function(k,F){return F||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,A,2);case"ddd":return q(a.weekdaysShort,u.$W,A,3);case"dddd":return A[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return V(d,w,!0);case"A":return V(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(k)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,A=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case T:f=C();break;case X:f=C()/3;break;case h:f=(A-S)/6048e5;break;case b:f=(A-S)/864e5;break;case l:f=A/n;break;case y:f=A/e;break;case i:f=A/t;break;default:f=A}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return P[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",T],["$y",I],["$D",L]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=N,$.unix=function(c){return $(1e3*c)},$.en=P[j],$.Ls=P,$.p={},$})});var _t=Ft((Pt,Nt)=>{"use strict";(function(t,e){typeof Pt=="object"&&typeof Nt<"u"?Nt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Pt,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},T=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var W=1;W<=24;W+=1)if(p.indexOf(M(W,0,x))>-1){O=W>12;break}}else O=p===(x?"pm":"PM");return O},L={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:T,ZZ:T};function ut(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),W=M.length,j=0;j<W;j+=1){var P=M[j],K=L[P],N=K&&K[0],R=K&&K[1];M[j]=R?{regex:N,parser:R}:P.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<W;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,W=M.parse;M.parse=function(j){var P=j.date,K=j.utc,N=j.args;this.$u=K;var R=N[1];if(typeof R=="string"){var $=N[2]===!0,g=N[3]===!0,Y=$||g,E=N[2];g&&(E=N[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=ut(a)(u),w=d.year,S=d.month,A=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,V=d.zone,k=d.week,F=new Date,B=A||(w||S?1:F.getDate()),Q=w||F.getFullYear(),ct=0;w&&!S||(ct=S>0?S-1:F.getMonth());var ft,bt=C||0,$t=J||0,Mt=q||0,wt=nt||0;return V?new Date(Date.UTC(Q,ct,B,bt,$t,Mt,wt+60*V.offset*1e3)):f?new Date(Date.UTC(Q,ct,B,bt,$t,Mt,wt)):(ft=new Date(Q,ct,B,bt,$t,Mt,wt),k&&(ft=m(ft).week(k).toDate()),ft)}catch{return new Date("")}}(P,R,K,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&P!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){N[1]=R[s-1];var o=O.apply(this,N);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else W.call(this,j)}}})});var xn={};ne(xn,{base64Decode:()=>pe,base64Encode:()=>me,castArray:()=>et,compose:()=>de,composeRight:()=>le,debounce:()=>ge,debugWarn:()=>Yt,debugWarnInvalidTypeMessage:()=>we,decimalToBinary:()=>fe,deepClone:()=>ot,deepMerge:()=>jt,deprecated:()=>$e,error:()=>be,generateRandomArray:()=>Ee,generateRandomColor:()=>Ce,generateRandomDate:()=>ht,generateRandomEmail:()=>Xt,generateRandomFloat:()=>Ue,generateRandomIdCard:()=>Ze,generateRandomMobilePhone:()=>We,generateRandomStringFromSource:()=>xt,getRandomInt:()=>v,getRandomItem:()=>_,getRandomString:()=>Z,getRandomUrl:()=>ze,hasChanged:()=>ce,isArray:()=>U,isBoolean:()=>ie,isChineseString:()=>tn,isDate:()=>vt,isDateString:()=>Bt,isDef:()=>ue,isEmail:()=>ln,isEmptyString:()=>gn,isEnglishAphabet:()=>Ve,isFloat:()=>en,isFunction:()=>st,isIdCard:()=>hn,isInteger:()=>an,isLowerCase:()=>Ge,isLowerCaseAndNumber:()=>Je,isLowerCaseAndNumberAndChinese:()=>Qe,isMap:()=>Dt,isMobilePhone:()=>pn,isNegativeFloat:()=>on,isNegativeInteger:()=>fn,isNonNegativeFloat:()=>rn,isNonNegativeInteger:()=>cn,isNonPositiveFloat:()=>sn,isNonPositiveInteger:()=>mn,isNull:()=>se,isNumber:()=>H,isNumberOrNumberString:()=>Ke,isObject:()=>oe,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>nn,isPositiveInteger:()=>un,isPromise:()=>kt,isRegExp:()=>Tt,isSet:()=>At,isString:()=>Ot,isSymbol:()=>St,isUndef:()=>rt,isUndefined:()=>ae,isUpperCase:()=>Xe,isUpperCaseAndNumber:()=>qe,isUpperCaseAndNumberAndChinese:()=>Be,isUrl:()=>dn,log:()=>at,objectToString:()=>Ut,omit:()=>Re,pick:()=>Rt,qs:()=>De,throttle:()=>Ae,throwError:()=>D,throwErrorInvalidTypeMessage:()=>Me,toTypeString:()=>tt,toTypeValue:()=>dt,validatorChineseOrEnglish:()=>Te,validatorChineseOrEnglishOrNumber:()=>ve,validatorUppercaseOrNumbersOrSpecial:()=>ke,validatorUppercaseOrNumbersOrUnderline:()=>je,warn:()=>ye});function oe(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function it(t){return t!==null&&typeof t=="object"}var Ut=Object.prototype.toString,tt=t=>Ut.call(t),dt=t=>tt(t).slice(8,-1),Ot=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),ie=t=>typeof t=="boolean",se=t=>t===null,ae=t=>t===void 0,St=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",Dt=t=>tt(t)==="[object Map]",At=t=>tt(t)==="[object Set]",vt=t=>tt(t)==="[object Date]",Tt=t=>tt(t)==="[object RegExp]",kt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,ue=t=>t!=null,ce=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function fe(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function me(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Zt[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function pe(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Zt.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function de(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function le(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function ge(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!it(r))return r;if(vt(r))return new Date(r);if(Tt(r))return new RegExp(r);if(kt(r))return r;if(e.has(r))return e.get(r);if(Dt(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(At(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=U(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function jt(t,e,n={}){return zt(Wt(t,n),Wt(e,n),n)}function zt(t,e,n){return U(t)?xe(t,e,n):he(t,e,n)}function he(t,e,n){if(!G(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(G(t[i])||U(t[i]))&&(G(e[i])||U(e[i]))?t[i]=zt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function xe(t,e,n){let{mergeStrategy:r="replace"}=n;if(U(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Wt(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var lt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new lt(`[${t}] ${e}`)}function Yt(t,e){let n=Ot(t)?new lt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function ye(...t){console.warn(...t)}function be(...t){console.error(...t)}var $e=({from:t,replacement:e,version:n,type:r="API"})=>{Yt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function Me(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${dt(r)} with value ${r}.`;D(t,i)}function we(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${dt(r)} with value ${r}.`;Yt(t,i)}var gt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},at=(t,...e)=>{gt("info",t,...e)};at.info=(t,...e)=>{gt("info",t,...e)};at.error=(t,...e)=>{gt("error",t,...e)};at.warn=(t,...e)=>{gt("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=at);function Oe(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Kt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function Se(t,e,n){let r=jt({encode:!0},{...n}),i=Kt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var De={parse:Oe,stringify:Kt,appendQueryString:Se};function Ae(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function ve(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Te(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function ke(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function je(t){return/^[\dA-Z_]+$/.test(t)}function Rt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return G(t)&&et(e).forEach(h=>{St(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?Ye(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function Ye(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Re(t,e){if(!G(t))return{};let n=ot(t),r=et(e),i=Object.keys(n).filter(y=>!r.includes(y));return Rt(n,i)}function Ee(t,e){return(!H(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),st(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Ce(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var z=pt(It(),1),Vt=pt(_t(),1);function _(t){return t[Math.floor(Math.random()*t.length)]}function v(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=_(Pe())}=t;Ie(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function Ie(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Pe(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}(0,z.extend)(Vt.default);function ht(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,z.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,z.default)(e).isValid()||!(0,z.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,z.default)(e).year(),y=(0,z.default)(n).year(),l=v({min:i,max:y}),b=v({min:1,max:12}),h=v({min:1,max:31}),T=v(23),X=v(59),I=v(59),L=(0,z.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return L.isBefore((0,z.default)(e))||L.isAfter((0,z.default)(n))?ht(t):L.format(r)}function Z(t={}){let e=_e(t),n=Le(e);Fe(n);let{length:r}=e;He(r.min,r.max);let i=v(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var Ne=16,Lt=1;function _e(t){let e=H(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:H(t.length)?{max:t.length,min:t.length}:{max:Ne,min:Lt,...t.length},extra:e?[]:[...new Set(et(t.extra||[]))]}}function Le(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=et(t.extra).join(""),e}function Fe(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function He(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Lt&&D("getRandomString",`Minimum length cannot be less than ${Lt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function Xt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:v({max:30,min:1})})}${Z(1)}@${_(t)}`;return/\.{2,}/.test(e)?Xt():e}function Ue(t={}){H(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function xt(t,e){(!H(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!U(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=_(e);return n}function Ze(){let t=v({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,ht({format:"YYYYMMDD"}),xt(3,e),xt(1,[...e,"X","x"])].join("")}function We(){return _(["13","14","15","16","17","18","19"])+v(999999999).toString().padEnd(9,"0")}function ze(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${v()}`,`?page=${Z({length:{min:2,max:4}})}`,`?query=${Z({length:{min:5,max:6}})}`,`?search=${Z({length:{min:1,max:4}})}`,`?token=${Z({length:{min:16,max:16}})}`];return`${_(t)}${Z({length:{min:5,max:25}})}${_(e)}${_(n)}`}function Ke(t){return/^\d+$/.test(t)}function Ve(t){return/^[A-Z]+$/i.test(t)}function Xe(t){return/^[A-Z]+$/.test(t)}function qe(t){return/^[\dA-Z]+$/.test(t)}function Be(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Ge(t){return/^[a-z]+$/.test(t)}function Je(t){return/^[\da-z]+$/.test(t)}function Qe(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function tn(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function en(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function nn(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function rn(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function on(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function sn(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function an(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function un(t){return/^[1-9]\d*$/.test(t)}function cn(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function fn(t){return/^-[1-9]\d*$/.test(t)}function mn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var yt=pt(It(),1),qt=pt(_t(),1);function pn(t){return/^1[3-9]\d{9}$/.test(t)}function dn(t){return/^https?:\/\/\S+$/i.test(t)}function ln(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function gn(t){return t===""}function Bt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,yt.extend)(qt.default),(0,yt.default)(t,e,!0).isValid()}function hn(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&Bt(t.slice(6,14),"YYYYMMDD")}return re(xn);})();
|
|
1
|
+
"use strict";var lntvowUtils=(()=>{var Bt=Object.create;var ft=Object.defineProperty;var Gt=Object.getOwnPropertyDescriptor;var Jt=Object.getOwnPropertyNames;var Qt=Object.getPrototypeOf,te=Object.prototype.hasOwnProperty;var Lt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ee=(t,e)=>{for(var n in e)ft(t,n,{get:e[n],enumerable:!0})},_t=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jt(e))!te.call(t,i)&&i!==n&&ft(t,i,{get:()=>e[i],enumerable:!(r=Gt(e,i))||r.enumerable});return t};var Mt=(t,e,n)=>(n=t!=null?Bt(Qt(t)):{},_t(e||!t||!t.__esModule?ft(n,"default",{value:t,enumerable:!0}):n,t)),ne=t=>_t(ft({},"__esModule",{value:!0}),t);var Ct=Lt((Rt,Et)=>{"use strict";(function(t,e){typeof Rt=="object"&&typeof Et<"u"?Et.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=e()})(Rt,function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",y="minute",l="hour",b="day",h="week",T="month",X="quarter",I="year",_="date",at="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var s=["th","st","nd","rd"],o=c%100;return"["+c+(s[(o-20)%10]||s[o]||s[0])+"]"}},M=function(c,s,o){var u=String(c);return!u||u.length>=s?c:""+Array(s+1-u.length).join(o)+c},W={s:M,z:function(c){var s=-c.utcOffset(),o=Math.abs(s),u=Math.floor(o/60),a=o%60;return(s<=0?"+":"-")+M(u,2,"0")+":"+M(a,2,"0")},m:function c(s,o){if(s.date()<o.date())return-c(o,s);var u=12*(o.year()-s.year())+(o.month()-s.month()),a=s.clone().add(u,T),f=o-a<0,m=s.clone().add(u+(f?-1:1),T);return+(-(u+(o-a)/(f?a-m:m-a))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:T,y:I,w:h,d:b,D:_,h:l,m:y,s:i,ms:r,Q:X}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return c===void 0}},j="en",N={};N[j]=O;var z="$isDayjsObject",P=function(c){return c instanceof Y||!(!c||!c[z])},R=function c(s,o,u){var a;if(!s)return j;if(typeof s=="string"){var f=s.toLowerCase();N[f]&&(a=f),o&&(N[f]=o,a=f);var m=s.split("-");if(!a&&m.length>1)return c(m[0])}else{var d=s.name;N[d]=s,a=d}return!u&&a&&(j=a),a||!u&&j},$=function(c,s){if(P(c))return c.clone();var o=typeof s=="object"?s:{};return o.date=c,o.args=arguments,new Y(o)},g=W;g.l=R,g.i=P,g.w=function(c,s){return $(c,{locale:s.$L,utc:s.$u,x:s.$x,$offset:s.$offset})};var Y=function(){function c(o){this.$L=R(o.locale,null,!0),this.parse(o),this.$x=this.$x||o.x||{},this[z]=!0}var s=c.prototype;return s.parse=function(o){this.$d=function(u){var a=u.date,f=u.utc;if(a===null)return new Date(NaN);if(g.u(a))return new Date;if(a instanceof Date)return new Date(a);if(typeof a=="string"&&!/Z$/i.test(a)){var m=a.match(p);if(m){var d=m[2]-1||0,w=(m[7]||"0").substring(0,3);return f?new Date(Date.UTC(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)):new Date(m[1],d,m[3]||1,m[4]||0,m[5]||0,m[6]||0,w)}}return new Date(a)}(o),this.init()},s.init=function(){var o=this.$d;this.$y=o.getFullYear(),this.$M=o.getMonth(),this.$D=o.getDate(),this.$W=o.getDay(),this.$H=o.getHours(),this.$m=o.getMinutes(),this.$s=o.getSeconds(),this.$ms=o.getMilliseconds()},s.$utils=function(){return g},s.isValid=function(){return this.$d.toString()!==at},s.isSame=function(o,u){var a=$(o);return this.startOf(u)<=a&&a<=this.endOf(u)},s.isAfter=function(o,u){return $(o)<this.startOf(u)},s.isBefore=function(o,u){return this.endOf(u)<$(o)},s.$g=function(o,u,a){return g.u(o)?this[u]:this.set(a,o)},s.unix=function(){return Math.floor(this.valueOf()/1e3)},s.valueOf=function(){return this.$d.getTime()},s.startOf=function(o,u){var a=this,f=!!g.u(u)||u,m=g.p(o),d=function(K,k){var F=g.w(a.$u?Date.UTC(a.$y,k,K):new Date(a.$y,k,K),a);return f?F:F.endOf(b)},w=function(K,k){return g.w(a.toDate()[K].apply(a.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(k)),a)},S=this.$W,v=this.$M,C=this.$D,J="set"+(this.$u?"UTC":"");switch(m){case I:return f?d(1,0):d(31,11);case T:return f?d(1,v):d(0,v+1);case h:var q=this.$locale().weekStart||0,nt=(S<q?S+7:S)-q;return d(f?C-nt:C+(6-nt),v);case b:case _:return w(J+"Hours",0);case l:return w(J+"Minutes",1);case y:return w(J+"Seconds",2);case i:return w(J+"Milliseconds",3);default:return this.clone()}},s.endOf=function(o){return this.startOf(o,!1)},s.$set=function(o,u){var a,f=g.p(o),m="set"+(this.$u?"UTC":""),d=(a={},a[b]=m+"Date",a[_]=m+"Date",a[T]=m+"Month",a[I]=m+"FullYear",a[l]=m+"Hours",a[y]=m+"Minutes",a[i]=m+"Seconds",a[r]=m+"Milliseconds",a)[f],w=f===b?this.$D+(u-this.$W):u;if(f===T||f===I){var S=this.clone().set(_,1);S.$d[d](w),S.init(),this.$d=S.set(_,Math.min(this.$D,S.daysInMonth())).$d}else d&&this.$d[d](w);return this.init(),this},s.set=function(o,u){return this.clone().$set(o,u)},s.get=function(o){return this[g.p(o)]()},s.add=function(o,u){var a,f=this;o=Number(o);var m=g.p(u),d=function(v){var C=$(f);return g.w(C.date(C.date()+Math.round(v*o)),f)};if(m===T)return this.set(T,this.$M+o);if(m===I)return this.set(I,this.$y+o);if(m===b)return d(1);if(m===h)return d(7);var w=(a={},a[y]=e,a[l]=n,a[i]=t,a)[m]||1,S=this.$d.getTime()+o*w;return g.w(S,this)},s.subtract=function(o,u){return this.add(-1*o,u)},s.format=function(o){var u=this,a=this.$locale();if(!this.isValid())return a.invalidDate||at;var f=o||"YYYY-MM-DDTHH:mm:ssZ",m=g.z(this),d=this.$H,w=this.$m,S=this.$M,v=a.weekdays,C=a.months,J=a.meridiem,q=function(k,F,B,Q){return k&&(k[F]||k(u,f))||B[F].slice(0,Q)},nt=function(k){return g.s(d%12||12,k,"0")},K=J||function(k,F,B){var Q=k<12?"AM":"PM";return B?Q.toLowerCase():Q};return f.replace(x,function(k,F){return F||function(B){switch(B){case"YY":return String(u.$y).slice(-2);case"YYYY":return g.s(u.$y,4,"0");case"M":return S+1;case"MM":return g.s(S+1,2,"0");case"MMM":return q(a.monthsShort,S,C,3);case"MMMM":return q(C,S);case"D":return u.$D;case"DD":return g.s(u.$D,2,"0");case"d":return String(u.$W);case"dd":return q(a.weekdaysMin,u.$W,v,2);case"ddd":return q(a.weekdaysShort,u.$W,v,3);case"dddd":return v[u.$W];case"H":return String(d);case"HH":return g.s(d,2,"0");case"h":return nt(1);case"hh":return nt(2);case"a":return K(d,w,!0);case"A":return K(d,w,!1);case"m":return String(w);case"mm":return g.s(w,2,"0");case"s":return String(u.$s);case"ss":return g.s(u.$s,2,"0");case"SSS":return g.s(u.$ms,3,"0");case"Z":return m}return null}(k)||m.replace(":","")})},s.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},s.diff=function(o,u,a){var f,m=this,d=g.p(u),w=$(o),S=(w.utcOffset()-this.utcOffset())*e,v=this-w,C=function(){return g.m(m,w)};switch(d){case I:f=C()/12;break;case T:f=C();break;case X:f=C()/3;break;case h:f=(v-S)/6048e5;break;case b:f=(v-S)/864e5;break;case l:f=v/n;break;case y:f=v/e;break;case i:f=v/t;break;default:f=v}return a?f:g.a(f)},s.daysInMonth=function(){return this.endOf(T).$D},s.$locale=function(){return N[this.$L]},s.locale=function(o,u){if(!o)return this.$L;var a=this.clone(),f=R(o,u,!0);return f&&(a.$L=f),a},s.clone=function(){return g.w(this.$d,this)},s.toDate=function(){return new Date(this.valueOf())},s.toJSON=function(){return this.isValid()?this.toISOString():null},s.toISOString=function(){return this.$d.toISOString()},s.toString=function(){return this.$d.toUTCString()},c}(),E=Y.prototype;return $.prototype=E,[["$ms",r],["$s",i],["$m",y],["$H",l],["$W",b],["$M",T],["$y",I],["$D",_]].forEach(function(c){E[c[1]]=function(s){return this.$g(s,c[0],c[1])}}),$.extend=function(c,s){return c.$i||(c(s,Y,$),c.$i=!0),$},$.locale=R,$.isDayjs=P,$.unix=function(c){return $(1e3*c)},$.en=N[j],$.Ls=N,$.p={},$})});var zt=Lt((It,Nt)=>{"use strict";(function(t,e){typeof It=="object"&&typeof Nt<"u"?Nt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(It,function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,l={},b=function(p){return(p=+p)+(p>68?1900:2e3)},h=function(p){return function(x){this[p]=+x}},T=[/[+-]\d\d:?(\d\d)?|Z/,function(p){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var O=x.match(/([+-]|\d\d)/g),M=60*O[1]+(+O[2]||0);return M===0?0:O[0]==="+"?-M:M}(p)}],X=function(p){var x=l[p];return x&&(x.indexOf?x:x.s.concat(x.f))},I=function(p,x){var O,M=l.meridiem;if(M){for(var W=1;W<=24;W+=1)if(p.indexOf(M(W,0,x))>-1){O=W>12;break}}else O=p===(x?"pm":"PM");return O},_={A:[y,function(p){this.afternoon=I(p,!1)}],a:[y,function(p){this.afternoon=I(p,!0)}],Q:[n,function(p){this.month=3*(p-1)+1}],S:[n,function(p){this.milliseconds=100*+p}],SS:[r,function(p){this.milliseconds=10*+p}],SSS:[/\d{3}/,function(p){this.milliseconds=+p}],s:[i,h("seconds")],ss:[i,h("seconds")],m:[i,h("minutes")],mm:[i,h("minutes")],H:[i,h("hours")],h:[i,h("hours")],HH:[i,h("hours")],hh:[i,h("hours")],D:[i,h("day")],DD:[r,h("day")],Do:[y,function(p){var x=l.ordinal,O=p.match(/\d+/);if(this.day=O[0],x)for(var M=1;M<=31;M+=1)x(M).replace(/\[|\]/g,"")===p&&(this.day=M)}],w:[i,h("week")],ww:[r,h("week")],M:[i,h("month")],MM:[r,h("month")],MMM:[y,function(p){var x=X("months"),O=(X("monthsShort")||x.map(function(M){return M.slice(0,3)})).indexOf(p)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[y,function(p){var x=X("months").indexOf(p)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,h("year")],YY:[r,function(p){this.year=b(p)}],YYYY:[/\d{4}/,h("year")],Z:T,ZZ:T};function at(p){var x,O;x=p,O=l&&l.formats;for(var M=(p=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function($,g,Y){var E=Y&&Y.toUpperCase();return g||O[Y]||t[Y]||O[E].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,s,o){return s||o.slice(1)})})).match(e),W=M.length,j=0;j<W;j+=1){var N=M[j],z=_[N],P=z&&z[0],R=z&&z[1];M[j]=R?{regex:P,parser:R}:N.replace(/^\[|\]$/g,"")}return function($){for(var g={},Y=0,E=0;Y<W;Y+=1){var c=M[Y];if(typeof c=="string")E+=c.length;else{var s=c.regex,o=c.parser,u=$.slice(E),a=s.exec(u)[0];o.call(g,a),$=$.replace(a,"")}}return function(f){var m=f.afternoon;if(m!==void 0){var d=f.hours;m?d<12&&(f.hours+=12):d===12&&(f.hours=0),delete f.afternoon}}(g),g}}return function(p,x,O){O.p.customParseFormat=!0,p&&p.parseTwoDigitYear&&(b=p.parseTwoDigitYear);var M=x.prototype,W=M.parse;M.parse=function(j){var N=j.date,z=j.utc,P=j.args;this.$u=z;var R=P[1];if(typeof R=="string"){var $=P[2]===!0,g=P[3]===!0,Y=$||g,E=P[2];g&&(E=P[2]),l=this.$locale(),!$&&E&&(l=O.Ls[E]),this.$d=function(u,a,f,m){try{if(["x","X"].indexOf(a)>-1)return new Date((a==="X"?1e3:1)*u);var d=at(a)(u),w=d.year,S=d.month,v=d.day,C=d.hours,J=d.minutes,q=d.seconds,nt=d.milliseconds,K=d.zone,k=d.week,F=new Date,B=v||(w||S?1:F.getDate()),Q=w||F.getFullYear(),ut=0;w&&!S||(ut=S>0?S-1:F.getMonth());var ct,xt=C||0,yt=J||0,bt=q||0,$t=nt||0;return K?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t+60*K.offset*1e3)):f?new Date(Date.UTC(Q,ut,B,xt,yt,bt,$t)):(ct=new Date(Q,ut,B,xt,yt,bt,$t),k&&(ct=m(ct).week(k).toDate()),ct)}catch{return new Date("")}}(N,R,z,O),this.init(),E&&E!==!0&&(this.$L=this.locale(E).$L),Y&&N!=this.format(R)&&(this.$d=new Date("")),l={}}else if(R instanceof Array)for(var c=R.length,s=1;s<=c;s+=1){P[1]=R[s-1];var o=O.apply(this,P);if(o.isValid()){this.$d=o.$d,this.$L=o.$L,this.init();break}s===c&&(this.$d=new Date(""))}else W.call(this,j)}}})});var hn={};ee(hn,{base64Decode:()=>me,base64Encode:()=>fe,castArray:()=>et,compose:()=>pe,composeRight:()=>de,debounce:()=>le,debugWarn:()=>jt,debugWarnInvalidTypeMessage:()=>Me,decimalToBinary:()=>ce,deepClone:()=>ot,deepMerge:()=>kt,deprecated:()=>be,error:()=>ye,generateRandomArray:()=>Re,generateRandomColor:()=>Ee,generateRandomDate:()=>gt,generateRandomEmail:()=>Vt,generateRandomFloat:()=>He,generateRandomIdCard:()=>Ue,generateRandomMobilePhone:()=>Ze,generateRandomStringFromSource:()=>ht,getRandomInt:()=>A,getRandomItem:()=>L,getRandomString:()=>Z,getRandomUrl:()=>We,hasChanged:()=>ue,isArray:()=>U,isBoolean:()=>oe,isChineseString:()=>Qe,isDate:()=>vt,isDateString:()=>qt,isDef:()=>ae,isEmail:()=>dn,isEmptyString:()=>ln,isEnglishAphabet:()=>Ke,isFloat:()=>tn,isFunction:()=>st,isIdCard:()=>gn,isInteger:()=>sn,isLowerCase:()=>Be,isLowerCaseAndNumber:()=>Ge,isLowerCaseAndNumberAndChinese:()=>Je,isMap:()=>St,isMobilePhone:()=>mn,isNegativeFloat:()=>rn,isNegativeInteger:()=>cn,isNonNegativeFloat:()=>nn,isNonNegativeInteger:()=>un,isNonPositiveFloat:()=>on,isNonPositiveInteger:()=>fn,isNull:()=>ie,isNumber:()=>H,isNumberOrNumberString:()=>ze,isObject:()=>re,isObjectLike:()=>it,isPlainObject:()=>G,isPositiveFloat:()=>en,isPositiveInteger:()=>an,isPromise:()=>Tt,isRegExp:()=>At,isSet:()=>Dt,isString:()=>wt,isSymbol:()=>Ot,isUndef:()=>rt,isUndefined:()=>se,isUpperCase:()=>Ve,isUpperCaseAndNumber:()=>Xe,isUpperCaseAndNumberAndChinese:()=>qe,isUrl:()=>pn,objectToString:()=>Ft,omit:()=>Ye,pick:()=>Yt,qs:()=>Se,throttle:()=>De,throwError:()=>D,throwErrorInvalidTypeMessage:()=>$e,toTypeString:()=>tt,toTypeValue:()=>mt,validatorChineseOrEnglish:()=>Ae,validatorChineseOrEnglishOrNumber:()=>ve,validatorUppercaseOrNumbersOrSpecial:()=>Te,validatorUppercaseOrNumbersOrUnderline:()=>ke,warn:()=>xe});function re(t){let e=typeof t;return t!==null&&(e==="object"||e==="function")}function it(t){return t!==null&&typeof t=="object"}var Ft=Object.prototype.toString,tt=t=>Ft.call(t),mt=t=>tt(t).slice(8,-1),wt=t=>typeof t=="string",H=t=>typeof t=="number"&&Number.isFinite(t),oe=t=>typeof t=="boolean",ie=t=>t===null,se=t=>t===void 0,Ot=t=>typeof t=="symbol",U=Array.isArray,st=t=>typeof t=="function",St=t=>tt(t)==="[object Map]",Dt=t=>tt(t)==="[object Set]",vt=t=>tt(t)==="[object Date]",At=t=>tt(t)==="[object RegExp]",Tt=t=>it(t)&&st(t?.then)&&st(t?.catch),rt=t=>t==null,ae=t=>t!=null,ue=(t,e)=>t!==e;function G(t){return tt(t)==="[object Object]"}function et(t){return U(t)?t:[t]}function ce(t){let e=[],n,r="";for(;t>0;)n=Math.floor(t%2),e.push(n),t=Math.floor(t/2);for(;e.length>0;)r+=e.pop().toString();return r}var Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function fe(t){let e="",n="";for(let i=0;i<t.length;i++)n+=t[i].charCodeAt(0).toString(2).padStart(8,"0");for(let i=0;i<n.length;i+=6)e+=Ht[parseInt(n.slice(i,i+6).padEnd(6,"0"),2)];let r=e.length%4;return r!==0&&(e+="=".repeat(4-r)),e}function me(t){let e="",n="";for(let r=0;r<t.length&&t[r]!=="=";r++)n+=Ht.indexOf(t[r]).toString(2).padStart(6,"0");for(let r=0;r<n.length;r+=8){let i=parseInt(n.slice(r,r+8),2);i&&(e+=String.fromCharCode(i))}return e}function pe(...t){return t.reduce((e,n)=>function(...r){return n(e(...r))})}function de(...t){return t.reduce((e,n)=>function(...r){return e(n(...r))})}function le(t,e=500){let n=null;return function(...r){n&&clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function ot(t){let e=new WeakMap;function n(r){if(!it(r))return r;if(vt(r))return new Date(r);if(At(r))return new RegExp(r);if(Tt(r))return r;if(e.has(r))return e.get(r);if(St(r)){let l=new Map;return e.set(r,l),r.forEach((b,h)=>l.set(n(h),n(b))),l}if(Dt(r)){let l=new Set;return e.set(r,l),r.forEach(b=>l.add(n(b))),l}let i=U(r)?Object.setPrototypeOf([],Object.getPrototypeOf(r)):Object.create(Object.getPrototypeOf(r));e.set(r,i);let y=Object.getOwnPropertyDescriptors(r);for(let l of Reflect.ownKeys(y)){let b=y[l];b.get||b.set?Object.defineProperty(i,l,b):Object.defineProperty(i,l,{...b,value:n(b.value)})}return i}return n(t)}function kt(t,e,n={}){return Zt(Ut(t,n),Ut(e,n),n)}function Zt(t,e,n){return U(t)?he(t,e,n):ge(t,e,n)}function ge(t,e,n){if(!G(e))return e;let r=Object.getOwnPropertyDescriptors(e);return Reflect.ownKeys(e).forEach(i=>{(G(t[i])||U(t[i]))&&(G(e[i])||U(e[i]))?t[i]=Zt(t[i],e[i],n):Object.defineProperty(t,i,r[i])}),t}function he(t,e,n){let{mergeStrategy:r="replace"}=n;if(U(e))switch(r){case"merge":return t.concat(e);case"replace":return e;default:return e}return e}function Ut(t,e){let{deepClone:n=!0}=e;return n?ot(t):t}var pt=class extends Error{constructor(e,n="Utils"){super(e),this.name=n}};function D(t,e){throw new pt(`[${t}] ${e}`)}function jt(t,e){let n=wt(t)?new pt(`[${t}] ${e}`,"UtilsWarn"):t;console.warn(n)}function xe(...t){console.warn(...t)}function ye(...t){console.error(...t)}var be=({from:t,replacement:e,version:n,type:r="API"})=>{jt(`${r}`,`${t} is about to be deprecated in version ${n}, please use ${e} instead.`)};function $e(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${mt(r)} with value ${r}.`;D(t,i)}function Me(t,e,n,r){let i=`Invalid params: type check failed for params "${e}". Expected ${n}, got ${mt(r)} with value ${r}.`;jt(t,i)}var dt=(t,e,...n)=>{if(!e)return;let r=n.length===0?"":n.length===1?n[0]:n;console[t](`[Log] ${e}:`,r)},lt=(t,...e)=>{dt("info",t,...e)};lt.info=(t,...e)=>{dt("info",t,...e)};lt.error=(t,...e)=>{dt("error",t,...e)};lt.warn=(t,...e)=>{dt("warn",t,...e)};typeof globalThis<"u"&&(globalThis.log=lt);function we(t,e){let{decode:n=!0}=e||{},r={};t.startsWith("?")&&(t=t.slice(1)),t.includes("?")&&(t=t.slice(t.indexOf("?")+1));let i=t.split("&").filter(Boolean);for(let y of i){let[l,b]=y.split("=");r[l]=n?decodeURIComponent(b):b}return r}function Wt(t,e){let{encode:n=!0}=e||{},r=[];for(let i in t){let y=t[i];r.push(`${i}=${n?encodeURIComponent(y):y}`)}return r.join("&")}function Oe(t,e,n){let r=kt({encode:!0},{...n}),i=Wt(e,r);return t.includes("?")?t.endsWith("?")||t.endsWith("&")?`${t}${i}`:`${t}&${i}`:`${t}?${i}`}var Se={parse:we,stringify:Wt,appendQueryString:Oe};function De(t,e=500){let n=null;return function(...r){if(rt(n))return n=Date.now(),t.apply(this,r);let i=Date.now();if(i-n>=e)return n=i,t.apply(this,r)}}function ve(t){return!rt(t)&&/^[\dA-Z\u4E00-\u9FA5]+$/i.test(t)}function Ae(t){return!rt(t)&&/^[A-Z\u4E00-\u9FA5]+$/i.test(t)}function Te(t){return!rt(t)&&/^[\d!"#$%&'()*+,./:;<=>?@A-Z[\\\]^_`{|}~]+$/.test(t)}function ke(t){return/^[\dA-Z_]+$/.test(t)}function Yt(t,e,n={}){let{includeProto:r=!1,includeSymbols:i=!0,includeNonEnum:y=!1}=n,l={};return G(t)&&et(e).forEach(h=>{Ot(h)&&!i||!(r?h in t:Object.hasOwn(t,h))||!y&&(r?je(t,h):Object.getOwnPropertyDescriptor(t,h))?.enumerable===!1||(l[h]=ot(t[h]))}),l}function je(t,e){let n=t;for(;n!==null;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ye(t,e){if(!G(t))return{};let n=ot(t),r=et(e),i=Object.keys(n).filter(y=>!r.includes(y));return Yt(n,i)}function Re(t,e){return(!H(t)||t<=0)&&D("generateRandomArray","num \u5FC5\u987B\u5927\u4E8E0"),st(e)||D("generateRandomArray","cb \u5FC5\u987B\u662F\u51FD\u6570"),Array.from({length:t}).fill(0).map((n,r)=>e(n,r))}function Ee(){return`#${Math.random().toString(16).slice(2,8).padEnd(6,"0")}`}var V=Mt(Ct(),1),Kt=Mt(zt(),1);function L(t){return t[Math.floor(Math.random()*t.length)]}function A(t={}){H(t)&&(t={max:t});let{min:e=1,max:n=L(Ie())}=t;Ce(e,n);let r=Math.ceil(e),i=Math.floor(n);return Math.floor(Math.random()*(i-r+1)+r)}function Ce(t,e){let n=Math.ceil(t),r=Math.floor(e);Number.isSafeInteger(n)||D("getRandomInt",`The minimum value Math.ceil(${t}) should be a safe integer`),Number.isSafeInteger(r)||D("getRandomInt",`The maximum value Math.floor(${e}) should be a safe integer`),r<n&&(e>=t&&D("getRandomInt",`No integer value found between ${t} and ${e}`),D("getRandomInt",`The maximum value ${e} should be greater than the minimum value ${t}`))}function Ie(){return Array.from({length:Number.MAX_SAFE_INTEGER.toString().length}).map((t,e)=>{let n=Number.MAX_SAFE_INTEGER.toString().slice(0,e+1);return Number(n)})}V.default.extend(Kt.default);function gt(t={}){let{start:e="1800-01-01 00:00:00",end:n=(0,V.default)().format("YYYY-MM-DD HH:mm:ss"),format:r="YYYY-MM-DD HH:mm:ss"}=t;(!(0,V.default)(e).isValid()||!(0,V.default)(n).isValid())&&D("generateRandomDate","start end \u53C2\u6570\u5FC5\u987B\u662F\u5408\u6CD5\u7684\u65F6\u95F4\u683C\u5F0F");let i=(0,V.default)(e).year(),y=(0,V.default)(n).year(),l=A({min:i,max:y}),b=A({min:1,max:12}),h=A({min:1,max:31}),T=A(23),X=A(59),I=A(59),_=(0,V.default)(`${l}-${b}-${h} ${T}:${X}:${I}`);return _.isBefore((0,V.default)(e))||_.isAfter((0,V.default)(n))?gt(t):_.format(r)}function Z(t={}){let e=Pe(t),n=Le(e);_e(n);let{length:r}=e;Fe(r.min,r.max);let i=A(r),y=e.prefix||"";for(let l=0;l<i;l++)y+=n.charAt(Math.floor(Math.random()*n.length));return y+(e.suffix||"")}var Ne=16,Pt=1;function Pe(t){let e=H(t);return{lowerCase:!0,upperCase:!0,number:!0,...e?{}:t,length:e?{max:t,min:t}:H(t.length)?{max:t.length,min:t.length}:{max:Ne,min:Pt,...t.length},extra:e?[]:[...new Set(et(t.extra||[]))]}}function Le(t){let e="";return t.lowerCase&&(e+="abcdefghijklmnopqrstuvwxyz"),t.upperCase&&(e+="ABCDEFGHIJKLMNOPQRSTUVWXYZ"),t.number&&(e+="0123456789"),e+=et(t.extra).join(""),e}function _e(t){t.length===0&&D("getRandomString","At least one character set (lowercase, uppercase, number) must be enabled or extra characters provided")}function Fe(t,e){Number.isInteger(t)||D("getRandomString","min must be an integer"),Number.isInteger(e)||D("getRandomString","max must be an integer"),t<Pt&&D("getRandomString",`Minimum length cannot be less than ${Pt}`),e<t&&D("getRandomString","Maximum length cannot be less than minimum length")}function Vt(){let t=["gmail.com","outlook.com.cn","example.com","qq.com","163.com","test.com.cn"],e=`${Z(1)}${Z({length:A({max:30,min:1})})}${Z(1)}@${L(t)}`;return/\.{2,}/.test(e)?Vt():e}function He(t={}){H(t)&&(t={max:t});let{min:e=0,max:n=1,fractionDigits:r=2}=t;if(e===n)return e;if(e>n)throw new Error(`\u6700\u5927\u503C ${n} \u5E94\u5927\u4E8E\u6700\u5C0F\u503C ${e}`);return Math.random()*(n-e)+e}function ht(t,e){(!H(t)||t<=0)&&D("generateRandomStringFromSource","num \u5FC5\u987B\u5927\u4E8E0"),(!U(e)||e.length===0)&&D("generateRandomStringFromSource","source \u4E0D\u80FD\u4E3A\u7A7A\u6570\u7EC4");let n="";for(let r=0;r<t;r++)n+=L(e);return n}function Ue(){let t=A({min:1e5,max:999999}),e=[0,1,2,3,4,5,6,7,8,9];return[t,gt({format:"YYYYMMDD"}),ht(3,e),ht(1,[...e,"X","x"])].join("")}function Ze(){return L(["13","14","15","16","17","18","19"])+A(999999999).toString().padEnd(9,"0")}function We(){let t=["http://","https://"],e=[".com",".net",".org",".cn",".top"],n=[`?name=${Z({length:{min:4,max:8}})}`,`?id=${A()}`,`?page=${Z({length:{min:2,max:4}})}`,`?query=${Z({length:{min:5,max:6}})}`,`?search=${Z({length:{min:1,max:4}})}`,`?token=${Z({length:{min:16,max:16}})}`];return`${L(t)}${Z({length:{min:5,max:25}})}${L(e)}${L(n)}`}function ze(t){return/^\d+$/.test(t)}function Ke(t){return/^[A-Z]+$/i.test(t)}function Ve(t){return/^[A-Z]+$/.test(t)}function Xe(t){return/^[\dA-Z]+$/.test(t)}function qe(t){return/^[\dA-Z\u4E00-\u9FA5]+$/.test(t)}function Be(t){return/^[a-z]+$/.test(t)}function Ge(t){return/^[\da-z]+$/.test(t)}function Je(t){return/^[\da-z\u4E00-\u9FA5]+$/.test(t)}function Qe(t){return/^[\u4E00-\u9FA5]+$/.test(t)}function tn(t){return/^-?(?:0|[1-9]\d*)\.\d+$/.test(t)}function en(t){return/^(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function nn(t){return/^(?:0|[1-9]\d*)\.\d+$/.test(t)}function rn(t){return/^-(?:0\.0*[1-9]\d*|[1-9]\d*\.\d+)$/.test(t)}function on(t){return/^-(?:0|[1-9]\d*)\.\d+$/.test(t)}function sn(t){return/^-?(?:0|[1-9]\d*)$/.test(t)}function an(t){return/^[1-9]\d*$/.test(t)}function un(t){return/^(?:0|[1-9]\d*)$/.test(t)&&!Object.is(t,-0)}function cn(t){return/^-[1-9]\d*$/.test(t)}function fn(t){return/^-(?:0|[1-9]\d*)$/.test(t)||Object.is(t,-0)}var Xt=Mt(Ct(),1);function mn(t){return/^1[3-9]\d{9}$/.test(t)}function pn(t){return/^https?:\/\/\S+$/i.test(t)}function dn(t){return/^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(t)}function ln(t){return t===""}function qt(t,e="YYYY-MM-DD HH:mm:ss"){return(0,Xt.default)(t,e,!0).isValid()}function gn(t){return/^[1-9]\d{5}(?:18|19|20)\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])\d{3}[\dX]$/i.test(t)&&qt(t.slice(6,14),"YYYYMMDD")}return ne(hn);})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lntvow/utils",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript utilities",
|
|
6
6
|
"keywords": [
|
|
@@ -29,9 +29,21 @@
|
|
|
29
29
|
"dayjs": "^1.11.13"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@
|
|
32
|
+
"@commitlint/cli": "^19.8.1",
|
|
33
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
34
|
+
"@lntvow/dev": "^5.0.10",
|
|
35
|
+
"@lntvow/eslint-config": "^9.24.8",
|
|
36
|
+
"@types/node": "^24.0.3",
|
|
33
37
|
"@vitest/coverage-v8": "^3.2.4",
|
|
34
38
|
"@vitest/ui": "^3.2.4",
|
|
39
|
+
"bumpp": "^10.2.0",
|
|
40
|
+
"commitizen": "^4.3.1",
|
|
41
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
42
|
+
"eslint": "^9.29.0",
|
|
43
|
+
"lint-staged": "^16.1.2",
|
|
44
|
+
"npm-run-all": "^4.1.5",
|
|
45
|
+
"prettier": "^3.5.3",
|
|
46
|
+
"simple-git-hooks": "^2.13.0",
|
|
35
47
|
"tsup": "^8.5.0",
|
|
36
48
|
"typescript": "^5.8.3",
|
|
37
49
|
"vitest": "^3.2.4"
|
|
@@ -39,8 +51,8 @@
|
|
|
39
51
|
"scripts": {
|
|
40
52
|
"postinstall": "simple-git-hooks",
|
|
41
53
|
"rimraf": "rimraf ./node_modules/",
|
|
42
|
-
"ncu": "ncu -u && pnpm install",
|
|
43
|
-
"commit": "git add . && git-cz &&
|
|
54
|
+
"ncu": "ncu -u --reject @types/node && pnpm install",
|
|
55
|
+
"commit": "git add . && git-cz && pnpm release -y",
|
|
44
56
|
"release": "git add . && bumpp package.json jsr.json --all --no-tag --no-print-commits",
|
|
45
57
|
"lint:eslint": "eslint \"src/**/*.{js,jsx,ts,tsx,vue}\" --fix",
|
|
46
58
|
"lint:tsc": "tsc --noEmit",
|