easy-soft-utility 2.3.12 → 2.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +1 -1
- package/es/utils/constants.d.ts +1 -0
- package/es/utils/loggerAssist.d.ts +7 -0
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"node-cache";import e from"lodash/isBoolean";import n from"lodash/isDate";import r from"lodash/isEqual";import o from"lodash/isFunction";import a from"lodash/isNull";import i from"lodash/isNumber";import u from"lodash/isObject";import c from"lodash/isString";import l from"lodash/isUndefined";import s from"lodash/replace";import f from"lodash/assign";import d from"lodash/assignWith";import h from"lodash/difference";import m from"lodash/dropRight";import g from"lodash/endsWith";import v from"lodash/filter";import p from"lodash/find";import y from"lodash/findIndex";import w from"lodash/first";import b from"lodash/floor";import x from"lodash/forEach";import A from"lodash/get";import S from"lodash/gte";import M from"lodash/map";import D from"lodash/memoize";import C from"lodash/remove";import E from"lodash/reverse";import I from"lodash/round";import O from"lodash/set";import j from"lodash/size";import k from"lodash/sortBy";import N from"lodash/sortedUniq";import T from"lodash/split";import P from"lodash/startsWith";import F from"lodash/trim";import Y from"lodash/uniqBy";import B from"lodash/toNumber";import H from"lodash/toString";import U from"object-hash";import W from"dayjs";import{stringify as L,parse as R}from"qs";var K,Q="function"==typeof atob,G="function"==typeof btoa,J="function"==typeof Buffer,V="function"==typeof TextDecoder?new TextDecoder:void 0,z="function"==typeof TextEncoder?new TextEncoder:void 0,q=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Z=(K={},q.forEach((function(t,e){return K[t]=e})),K),$=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,X=String.fromCharCode.bind(String),_="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t};return new Uint8Array(Array.prototype.slice.call(t,0).map(e))},tt=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},et=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},nt=G?function(t){return btoa(t)}:J?function(t){return Buffer.from(t,"binary").toString("base64")}:function(t){for(var e,n,r,o,a="",i=t.length%3,u=0;u<t.length;){if((n=t.charCodeAt(u++))>255||(r=t.charCodeAt(u++))>255||(o=t.charCodeAt(u++))>255)throw new TypeError("invalid character found");a+=q[(e=n<<16|r<<8|o)>>18&63]+q[e>>12&63]+q[e>>6&63]+q[63&e]}return i?a.slice(0,i-3)+"===".substring(i):a},rt=J?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=[],n=0,r=t.length;n<r;n+=4096)e.push(X.apply(null,t.subarray(n,n+4096)));return nt(e.join(""))},ot=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?X(192|e>>>6)+X(128|63&e):X(224|e>>>12&15)+X(128|e>>>6&63)+X(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return X(240|e>>>18&7)+X(128|e>>>12&63)+X(128|e>>>6&63)+X(128|63&e)},at=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,it=J?function(t){return Buffer.from(t,"utf8").toString("base64")}:z?function(t){return rt(z.encode(t))}:function(t){return nt(t.replace(at,ot))},ut=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ct=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return X(55296+(e>>>10))+X(56320+(1023&e));case 3:return X((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return X((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},lt=Q?function(t){return atob(et(t))}:J?function(t){return Buffer.from(t,"base64").toString("binary")}:function(t){if(t=t.replace(/\s+/g,""),!$.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,r,o="",a=0;a<t.length;)e=Z[t.charAt(a++)]<<18|Z[t.charAt(a++)]<<12|(n=Z[t.charAt(a++)])<<6|(r=Z[t.charAt(a++)]),o+=64===n?X(e>>16&255):64===r?X(e>>16&255,e>>8&255):X(e>>16&255,e>>8&255,255&e);return o},st=J?function(t){return _(Buffer.from(t,"base64"))}:function(t){return _(lt(t),(function(t){return t.charCodeAt(0)}))},ft=J?function(t){return Buffer.from(t,"base64").toString("utf8")}:V?function(t){return V.decode(st(t))}:function(t){return lt(t).replace(ut,ct)},dt=function(t){return ft(et(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"}))))};function ht(t){return dt(t)}function mt(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?tt(it(t)):it(t)}(t)}function gt(t){return 1*t<10?"0".concat(t):t}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function pt(t){var e=function(t,e){if("object"!==vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vt(e)?e:String(e)}function yt(t,e,n){return(e=pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return A(t,e,n)}function At(t,e){return I(t,e)}function St(t,e,n){return g(t,e,n)}function Mt(t){return N(t)}function Dt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return T(t,e,n)}function Ct(t,e){return f(t,e)}function Et(t,e,n){return d(t,e,n)}function It(t){return E(t)}function Ot(t,e){return x(t,e)}function jt(t,e){return S(t,e)}function kt(t){return D(t)}function Nt(t,e){return b(t,e)}function Tt(t){return w(t)}function Pt(t,e){return P(t,e)}function Ft(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return m(t,e)}function Yt(t,e){return Y(t,e)}function Bt(t){return F(t)}function Ht(t,e,n){return s(t,e,n)}function Ut(t,e){return C(t,e)}function Wt(t,e){return M(t,e)}function Lt(t,e,n){return O(t,e,n)}function Rt(t){return j(t)}function Kt(t,e){return h(t,e)}function Qt(t,e){return v(t,e)}function Gt(t,e){return k(t,e)}function Jt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return y(t,e,n)}function Vt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t,e,n)}function zt(t){return ne(t)}function qt(t){var e="".concat(ne(t)?null:t).match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(null==e)return!1;var n=new Date(e[1],e[3]-1,e[4]);return n.getFullYear()===parseInt(e[1],10)&&n.getMonth()+1===parseInt(e[3],10)&&n.getDate()===parseInt(e[4],10)}function Zt(t){return i(t)}function $t(t){var e="".concat(ne(t)?null:t);if(""===e)return!1;return new RegExp(/^([1-9][\d]{0,15}|0)(\.[\d]{1,2})?$/).test(e)}function Xt(t,e){return r(t,e)}function _t(t,e){return JSON.stringify(t||{})===JSON.stringify(e||{})}function te(t){return o(t)}function ee(t){return e(t)}function ne(t){return l(t)}function re(t){return a(t)}function oe(t){return n(t)}function ae(t){return c(t)}function ie(t){return Array.isArray(t)}function ue(t){return u(t)}function ce(t){return null!==t&&"object"===vt(t)&&!ie(t)}function le(t){return ce(t)&&te(t.then)&&te(t.catch)}function se(t){return new RegExp(/(http|https):\/\/([\w.]+\/?)\S*/).test(t)}function fe(t){return new RegExp(/(data):image\/([\w.]+\/?)\S*/).test(t)}function de(t){return""===Bt(s(t||""," ",""))}function he(t,e){var n=!1;return ie(t)?(t.some((function(t){return t===e&&(n=!0,!0)})),n):n}var me="easy-soft-utility",ge={WEAPP:"WEAPP",WEB:"WEB",RN:"RN",SWAN:"SWAN",ALIPAY:"ALIPAY",TT:"TT",QQ:"QQ",JD:"JD",UNKNOWN:"UNKNOWN"},ve={loadApiPath:"",firstLoadSuccess:!1,loadSuccess:!1,registering:!1,dataLoading:!1,reloading:!1,searching:!1,refreshing:!1,paging:!1,processing:!1,dispatchComplete:!0,metaData:null,metaExtra:null,metaListData:[],metaOriginalData:null,urlParams:null,externalData:null},pe={dataLoading:!0},ye={get:"GET",post:"POST",put:"PUT",delete:"DELETE",trace:"TRACE",connect:"CONNECT"},we="0",be=0,xe="1970-01-01 00:00",Ae={number:"number",datetime:"datetime",string:"string",moment:"moment",money:"money",array:"array",boolean:"boolean"},Se={money:"money",datetime:"datetime",chineseMoney:"chineseMoney",percentage:"percentage"},Me={yearMonthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",yearMonthDayHourMinute:"YYYY-MM-DD HH:mm",yearMonthDay:"YYYY-MM-DD",yearMonth:"YYYY-MM",year:"YYYY",monthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",monthDayHourMinute:"MM-DD HH:mm",monthDay:"MM-DD",hourMinute:"HH:mm",hourMinuteSecond:"HH:mm:ss",month:"MM",day:"DD",hour:"HH",minute:"mm",second:"ss"},De={moveUp:"moveUp",moveDown:"moveDown"},Ce={no:"0",yes:"1"},Ee={no:0,yes:1},Ie={trace:"trace",debug:"debug",warn:"warn",error:"error",exception:"exception",info:"info",config:"config",execute:"execute"},Oe={auto:"auto",text:"text",object:"object"},je={success:"success",error:"error",info:"info",warning:"warning",warn:"warn",open:"open"},ke=bt({},je),Ne=bt({},je),Te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAYAAACGGCK3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cExAQAAAMKg9U9tDQ8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA3NXV7AAHfw7zWAAAAAElFTkSuQmCC",Pe=Te;function Fe(t){return U(t,{algorithm:"sha1"})}function Ye(t){return U(t,{algorithm:"md5"})}function Be(t,e){var n=Math.pow(10,e+1),r=Math.floor(He(t)*n);return 10*Math.round(r/10)/n}function He(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=B(t),r=Number.isNaN(n)?0:n;return null==(e||null)?r:Be(r,e)}function Ue(t,e,n){if(!Zt(t))throw new Error("value must be number value");var r=He(t);return void 0!==e&&(r=Math.max(t,e)),void 0!==n&&(r=Math.min(r,n)),r}function We(t){return $t(t)?parseFloat(t,10):0}function Le(t){return"".concat(We(1e3*He(t)/10),"%")}function Re(t){return H(t)}function Ke(t){return!!t}function Qe(t){return Re(t).toUpperCase()}function Ge(t){return Re(t).toLowerCase()}function Je(t){if(null==(t||null))return null;if(oe(t))return t;if(ae(t)&&t.indexOf("T")<0){var e=t.replace(/\-/g,"/");return new Date(e)}return new Date(t)}function Ve(t){return le(t)?t:Promise.resolve(t)}function ze(t,e){return At(t,e)}function qe(t){var e=t.target,n=t.convert;if(te(n))return n(e);if(ae(n))switch(n){case Ae.number:return He(e);case Ae.datetime:return Je(e);case Ae.string:return Re(e);case Ae.money:return We(e);case Ae.array:return null==(e||null)?[]:ie(e)?e:[e];default:return e}return e}function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $e(t,e){if(t){if("string"==typeof t)return Ze(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(t,e):void 0}}function Xe(t){return function(t){if(Array.isArray(t))return Ze(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(t){return new Function("return ".concat(t))()}function tn(){var t=navigator.userAgent;return{trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")}}function en(){var t;return{versions:tn(),language:(null!==(t=navigator.browserLanguage||navigator.language)&&void 0!==t?t:"").toLowerCase()}}function nn(t){var e=t.seed,n=t.min||0;return n+(9301*e+49297)%233280/233280*((t.max||1)-n)}function rn(t){return null==t?null:JSON.parse(JSON.stringify(t))}function on(t,e,n){var r=[];return null!=t&&(r=Xe(t)),null!=n&&(r=[].concat(Xe(r),Xe(n))),null!=e&&(r=[e].concat(Xe(r))),r}function an(t,e,n,r,o){var a=r,i=void 0===n?null:n;return null!=e&&("function"==typeof convertValue?a.initialValue=o(t)||i:a.initialValue=t||i),a}function un(t,e,n){var r=null;return null==e||(n||[]).forEach((function(n){n[t]===e&&(r=n)})),r}function cn(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[],a=0;if(n=n||r.length,e)for(a=0;a<e;a++)o[a]=r[0|Math.random()*n];else for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",a=0;a<36;a++)o[a]||(t=0|16*Math.random(),o[a]=r[19===a?3&t|8:t]);return o.join("")}function ln(t){var e=t.pageNo,n=t.pageSize,r=t.total;return!((r||0)<=0)&&(e||0)*(n||0)<(r||0)}function sn(){return"development"===process.env.NODE_ENV}function fn(t){return Object.keys(t).map((function(e){return t[e]})).join(",")}function dn(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[t].concat(r).filter((function(t){return ae(t)&&!de(t)}));return"".concat(a.join("::"),"::").concat(de(e)?"":e)}var hn="loggerAssist",mn={loggerDisplaySwitchPromptSetInformationComplete:!1,loggerDisplaySwitchSetComplete:!1,display:!1},gn={config:"#F8C471",execute:"#C39BD3",info:"#89CA78",warn:"#F16F17",debug:"#00768F",trace:"#596032",error:"#E33F3E",exception:"#DC428E"};function vn(t){var e=t.text,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation,u=void 0===i?"":i,c=function(t,e){return"".concat(Re(t)).concat(de(e)?"":" -> ".concat(e))}(ae(e)?e:JSON.stringify(e),u);de(vn)||console.log("%c%s","color:".concat(r,";"),"".concat(de(a)?"":"[".concat(Qe(a),"] ")).concat(c))}function pn(t){var e=t.data,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation;vn({text:"check the following object data",color:r,dataDescription:a,ancillaryInformation:void 0===i?"":i}),console.log(e)}function yn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe.auto,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ie.debug,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=On();if(!mn.loggerDisplaySwitchSetComplete&&!mn.loggerDisplaySwitchPromptSetInformationComplete){var a=dn(me,"logData -> logger display switch default is false, if want to display log, please set it before first log, use setLoggerDisplaySwitch to set it, this message only show once",hn);vn({text:a,color:"#08BBEE",dataDescription:"hint",ancillaryInformation:""});try{throw new Error("please set use setLoggerDisplaySwitch")}catch(t){console.error(t)}mn.loggerDisplaySwitchPromptSetInformationComplete=!0}if(o||n===Ie.exception){var i=null==(e||null)||de(e)?Oe.auto:e;if(!he([Oe.auto,Oe.text,Oe.object],i))throw new Error("Invalid log display mode -> ".concat(i));if(i===Oe.auto&&(i=ae(t)?Oe.text:Oe.object),n!==Ie.exception)o&&(n===Ie.trace&&(i===Oe.text&&vn({text:t,color:gn.trace,dataDescription:"trace",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.trace,dataDescription:"trace",ancillaryInformation:r})),n===Ie.debug&&(i===Oe.text&&vn({text:t,color:gn.debug,dataDescription:"debug",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.debug,dataDescription:"debug",ancillaryInformation:r})),n===Ie.warn&&(i===Oe.text&&vn({text:t,color:gn.warn,dataDescription:"warn",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.warn,dataDescription:"warn",ancillaryInformation:r})),n===Ie.info&&(i===Oe.text&&vn({text:t,color:gn.info,dataDescription:"info",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.info,dataDescription:"info",ancillaryInformation:r})),n===Ie.execute&&(i===Oe.text&&vn({text:t,color:gn.execute,dataDescription:"execute",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.execute,dataDescription:"execute",ancillaryInformation:r})),n===Ie.config&&(i===Oe.text&&vn({text:t,color:gn.config,dataDescription:"config",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.config,dataDescription:"config",ancillaryInformation:r})),n===Ie.error&&(i===Oe.text&&vn({text:t,color:gn.error,dataDescription:"error",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.error,dataDescription:"error",ancillaryInformation:r})));else{i===Oe.text&&vn({text:t,color:gn.exception,dataDescription:"exception",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.exception,dataDescription:"exception",ancillaryInformation:r});try{throw new Error("an error occur, check the above error message, the stack information is as follows")}catch(t){console.error(t)}}}}function wn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.warn,e):In(t,Ie.warn,e)}function bn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.info,e):In(t,Ie.info,e)}function xn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.config,e):In(t,Ie.config,e)}function An(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.trace,e):In(t,Ie.trace,e)}function Sn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.debug,e):In(t,Ie.debug,e)}function Mn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.execute,e):In(t,Ie.execute,e)}function Dn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.error,e):In(t,Ie.error,e)}function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?En(t,Ie.exception,e):In(t,Ie.exception,e)}function En(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";yn(t,Oe.text,e,n)}function In(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";yn(t,Oe.object,e,n)}function On(){return Ke(mn.display)}function jn(t){sn()&&vn({text:"setLoggerDisplaySwitch",color:gn.execute,dataDescription:"execute",ancillaryInformation:""}),mn.display=Ke(t),mn.loggerDisplaySwitchSetComplete=!0}var kn={mountComplete:!1,target:null};function Nn(e){if(Mn("setCacheMount"),!ue(e))throw Sn(e),new Error(dn(me,"setCacheMount -> cache mount target must be a object, current type is ".concat(vt(e)),"cacheAssist"));null==(e.localRuntimeCache||null)&&(e.localRuntimeCache=new t),kn.target=e,kn.mountComplete=!0,bn("setCacheMount -> cache mount success.")}function Tn(t){return de(t)?(Cn("checkKey -> cache key is null or empty"),!1):!(!ae(t)&&!Zt(t))||(Cn("cache key must be string or number, current type id ".concat(vt(t))),!1)}function Pn(){if(!kn.mountComplete||!kn.target||!kn.target.localRuntimeCache)throw new Error("getCachePool -> please use setCacheMount function to set cache mount target before get it.");return kn.target.localRuntimeCache}function Fn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.has(e)}function Yn(t){var e=t.key,n=t.value,r=t.expiration,o=void 0===r?0:r;if(Tn(e)){var a=Pn();if(null==a)throw new Error("cache pool not exist");return a.set(e,n,o)}}function Bn(t){if(!ie(t))throw new Error("setMultiCache: list must be array");if(t.length<=0)return!0;var e=[];if(t.forEach((function(t){var n=bt(bt({},{key:"",value:"",expiration:0}),t),r=n.key,o=n.value,a=n.expiration;if(!de(r)){if(!Tn(r))return;e.push({key:r,value:o,ttl:a})}})),e.length<=0)return!1;var n=Pn();if(null==n)throw new Error("cache pool not exist");return n.mset(e)}function Hn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.getTtl(e)}function Un(t){var e=t.key,n=t.expiration,r=Pn();if(null==r)throw new Error("cache pool not exist");return r.ttl(e,n)}function Wn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.get(e)}function Ln(){var t=Pn();if(null==t)throw new Error("cache pool not exist");return t.keys()}function Rn(t){if(!ie(t))throw new Error("getMultiCache: list must be array");var e=Pn();if(null==e)throw new Error("cache pool not exist");return e.mget(t)}function Kn(t){var e=t.key,n=Pn();if(null==n)throw new Error("cache pool not exist");return n.take(e)}function Qn(t){var e=t.key;if(Tn(e)){var n=Pn();if(null==n)throw new Error("cache pool not exist");return n.del(e)}}function Gn(t){if(!ie(t))throw new Error("deleteMultiCache: list must be array");var e=Pn();if(null==e)throw new Error("cache pool not exist");return e.del(t)}function Jn(){var t=Pn();if(null==t)throw new Error("cache pool not exist");return t.flushAll()}function Vn(){var t=Pn();if(null==t)throw new Error("cache pool not exist");return t.getStats()}function zn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,u=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||$e(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qn(t){var e=t.seed;return"#".concat("00000".concat((16777216*nn({seed:e})<<0).toString(16)).substring(-6))}function Zn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"RGB",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,o=(null!=t?t:"").toLowerCase();if(r.test(o)){if(4===o.length){for(var a="#",i=1;i<4;i+=1)a+=o.slice(i,i+1).concat(o.slice(i,i+1));o=a}for(var u=[],c=1;c<7;c+=2)u.push(parseInt("0x"+o.slice(c,c+2)));return e?"".concat(e,"(").concat(u.join(","),")"):n?u:u.join(",")}return Cn("Invalid hex color -> ".concat(t)),o}function $n(t){var e=t.progress,n=t.startColor,r=t.endColor,o=Zn(n,null,!0),a=Zn(r,null,!0),i=zn(o,3),u=i[0],c=i[1],l=i[2],s=zn(a,3),f=s[0],d=s[1],h=s[2],m=[(u+Math.round((f-u)*e)).toString(16),(c+Math.round((d-c)*e)).toString(16),(l+Math.round((h-l)*e)).toString(16)];return"#".concat(m.join("").toUpperCase())}function Xn(t){var e=t.direct,n=t.list,r=void 0===n?[]:n,o=Zt(e)?"".concat(e,"deg"):e;return"linear-gradient(".concat(o,", ").concat(r.join(),")")}function _n(t,e){var n=Je(t);return n.setHours(n.getHours()+e)}function tr(t,e){var n=Je(t);return n.setMinutes(n.getMinutes()+e)}function er(t,e){var n=Je(t);return n.setSeconds(n.getSeconds()+e)}function nr(){return new Date}function rr(t,e){var n=t.getTime(),r=(e.getTime()-n)/1e3,o=parseInt(r/86400),a=parseInt((r-24*o*60*60)/3600),i=parseInt((r-24*o*60*60-60*a*60)/60);return{day:o,hour:a,minute:i,second:r-24*o*60*60-60*a*60-60*i}}var or=function(t,e,n){var r=Je(t),o=e?Je(e):new Date,a=o.getTime()-r.getTime();return"second"===n&&a/1e3||"minute"===n&&a/1e3/60||"hour"===n&&a/1e3/60/60||"day"===n&&a/1e3/60/60/24||"week"===n&&a/1e3/60/60/24/7||"month"===n&&ar(r,o)||"quarter"===n&&ar(r,o)/3||"year"===n&&ar(r,o)/12||a},ar=function(t,e){var n=Je(t),r=Je(e);return 12*(n.getFullYear()-r.getFullYear())+n.getMonth()-r.getMonth()};function ir(t){var e=t.data;return W(e).day()}function ur(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=W().day();if(!t)return e;var n="";switch(He(e)){case 0:n="日";break;case 1:n="一";break;case 2:n="二";break;case 3:n="三";break;case 4:n="四";break;case 5:n="五";break;case 6:n="六";break;default:n=""}return de(n)?"":"星期".concat(n)}function cr(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.thousand,a=void 0===o?",":o,i=t.decimal;return lr({data:e,places:r,symbol:"",thousand:a,decimal:void 0===i?".":i})}function lr(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.symbol,a=void 0===o?"¥":o,i=t.thousand,u=void 0===i?",":i,c=t.decimal,l=void 0===c?".":c,s=e||0,f=isNaN(r=Math.abs(r))?2:r,d=void 0!==a?a:"¥",h=u||",",m=l||".",g=s<0?"-":"",v=parseInt(s=Math.abs(+s||0).toFixed(f),10)+"",p=v.length;return d+g+((p=p>3?p%3:0)?v.substr(0,p)+h:"")+v.substr(p).replace(/(\d{3})(?=\d)/g,a+"1"+h)+(f?m+Math.abs(s-He(v)).toFixed(f).slice(2):"")}function sr(t){var e,n,r,o=t.target,a=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],i=["","拾","佰","仟"],u=["","万","亿","兆"],c=["角","分","毫","厘"],l="";if(""===o)return"";if((o=parseFloat(o))>=1e15)return"超出最大处理数字";if(0===o)return l=a[0]+"元";if(-1===(o=o.toString()).indexOf("."))e=o,n="";else{var s=zn(r=o.split("."),2);e=s[0],n=s[1],n=r[1].substr(0,4)}if(parseInt(e,10)>0){for(var f=0,d=e.length,h=0;h<d;h+=1){var m=e.substr(h,1),g=d-h-1,v=g/4,p=g%4;"0"===m?f+=1:(f>0&&(l+=a[0]),f=0,l+=a[parseInt(m,10)]+i[p]),0===p&&f<4&&(l+=u[v])}l+="元"}if(""!==n)for(var y=n.length,w=0;w<y;w+=1){var b=n.substr(w,1);"0"!==b&&(l+=a[Number(b)]+c[w])}return""===l&&(l+=a[0]+"元"),l}function fr(t){var e=t.data,n=t.fmt,r=void 0===n?Me.yearMonthDayHourMinuteSecond:n;return null==(e||null)?"":W(e).format(r)}function dr(t){var e=t.target,n=t.format,r=t.option,o=void 0===r?{}:r;if(te(n))return n(e);if(ae(n))switch(n){case Se.money:return lr({data:e});case Se.datetime:return fr({data:e});case Se.chineseMoney:return sr({target:e,option:o});case Se.percentage:return"".concat(ze(100*e,1),"%");default:return e}return e}function hr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=bt(bt({},{second:["刚刚","片刻后"],seconds:["%d 秒前","%d 秒后"],minute:["大约 1 分钟前","大约 1 分钟后"],minutes:["%d 分钟前","%d 分钟后"],hour:["大约 1 小时前","大约 1 小时后"],hours:["%d 小时前","%d 小时后"],day:["1 天前","1 天后"],days:["%d 天前","%d 天后"],month:["大约 1 个月前","大约 1 个月后"],months:["%d 月前","%d 月后"],year:["大约 1 年前","大约 1 年后"],years:["%d 年前","%d 年后"]}),n||{}),o=or(t,e),a=o<0?1:0,i=Math.abs(o)/1e3,u=i/60,c=u/60,l=c/24,s=l/365,f=function(t,e){return t.replace(/%d/i,e)};return i<10&&f(r.second[a],parseInt(i))||i<45&&f(r.seconds[a],parseInt(i))||i<90&&f(r.minute[a],1)||u<45&&f(r.minutes[a],parseInt(u))||u<90&&f(r.hour[a],1)||c<24&&f(r.hours[a],parseInt(c))||c<42&&f(r.day[a],1)||l<30&&f(r.days[a],parseInt(l))||l<45&&f(r.month[a],1)||l<365&&f(r.months[a],parseInt(l/30))||s<1.5&&f(r.year[a],1)||f(r.years[a],parseInt(s))}function mr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return hr(t,nr(),e)}function gr(t){return de(t.text||null)&&wn(dn(me,"checkMessagePromptData option text disallow empty","loggerAssist")),!0}var vr={showOpenMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showInfoMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showSuccessMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showWarnMessage:function(t){var e=t.text;t.duration,t.onClose,wn(e)},showWarningMessage:function(t){var e=t.text;t.duration,t.onClose,wn(e)},showErrorMessage:function(t){var e=t.text;t.duration,t.onClose,Dn(e)},setErrorMessageDisplayMonitorComplete:!1};function pr(t){vr.showOpenMessage=t}function yr(t){vr.showInfoMessage=t}function wr(t){vr.showSuccessMessage=t}function br(t){vr.showWarnMessage=t}function xr(t){vr.showWarningMessage=t}function Ar(t){vr.showErrorMessage=t,vr.setErrorMessageDisplayMonitorComplete=!0}function Sr(t){Mr({text:t})}function Mr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showOpenMessage)&&(gr({text:e}),vr.showOpenMessage({text:e,duration:r,onClose:a}))}function Dr(t){Cr({text:t})}function Cr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showInfoMessage)&&(gr({text:e}),vr.showInfoMessage({text:e,duration:r,onClose:a}))}function Er(t){Ir({text:t})}function Ir(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showSuccessMessage)&&(gr({text:e}),vr.showSuccessMessage({text:e,duration:r,onClose:a}))}function Or(t){jr({text:t})}function jr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showWarnMessage)&&(gr({text:e}),vr.showWarnMessage({text:e,duration:r,onClose:a}))}function kr(t){Nr({text:t})}function Nr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showWarningMessage)&&(gr({text:e}),vr.showWarningMessage({text:e,duration:r,onClose:a}))}function Tr(t){Pr({text:t})}function Pr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(vr.showErrorMessage)&&(gr({text:e}),vr.showErrorMessage({text:e,duration:r,onClose:a}))}function Fr(t){Yr({text:t})}function Yr(t){var e=t.text;de(e||"")||(vr.setErrorMessageDisplayMonitorComplete&&Pr({text:e}),Cn({text:e}))}function Br(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t&&t.length>e?"".concat(Re(t).substring(0,e)).concat(n):Re(t)}function Hr(t,e,n,r){var o=Re(t),a=(t||"").length;a>0&&(n>=0||r>=0)&&(o=n>=a||r>=a||(n||0)+(r||0)>=a?t:t.substr(0,n)+e+t.substr(a-r,r));return o||""}function Ur(t,e){for(var n=(new Date).getTime();!((new Date).getTime()-n>t););te(e)&&e()}function Wr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(ne(t))return n;if(null==t)return n;if(!ae(e)){var r="getPathValue Function param path must be string";return Yr({message:r}),null}var o=xt(t,e,n);return ne(n)||re(n)?o:o||n}function Lr(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string target");if(!ae(e))throw new Error("removeEndMatch only use for string match");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0&&t.length===n+e.length?t.substr(n,e.length):t}function Rr(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string source");if(!ae(e))throw new Error("removeEndMatch only use for string target");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0?t.substr(n,e.length):t}function Kr(t){var e=t.data,n=t.key,r=t.defaultValue,o=void 0===r?null:r,a=t.convert,i=void 0===a?null:a,u=t.convertBuilder,c=void 0===u?null:u,l=t.format,s=void 0===l?null:l,f=t.formatBuilder,d=void 0===f?null:f,h=Wr(e,n,o),m=h;return null==(c||null)&&null==(i||null)||(m=te(c)?qe({target:h,convert:c}):qe({target:h,convert:i})),null==(d||null)&&null==(s||null)||(m=te(d)?dr({target:m,format:d}):dr({target:m,format:s})),m}function Qr(t){var e=t.operate,n=t.item,r=t.list,o=t.key,a=t.sortInitialValue,i=void 0===a?0:a;if(null==(n||null))return r;var u=[],c=[],l=[];if((r||[]).length<=1){return jr({message:"无需排序!"}),r}var s=Kr({data:n,key:o,convert:Ae.number});switch((r||[]).forEach((function(t){var e=Kr({data:t,key:o,convert:Ae.number});e<s&&u.push(t),e>s&&c.push(t)})),e){case De.moveUp:if(s===i){return jr({message:"已经排在首位!"}),r}(u||[]).forEach((function(t,e){if(e<u.length-1)l.push(t);else{var r=n;r[o]-=1,l.push(r);var a=t;a[o]+=1,l.push(a)}})),l=l.concat(c);break;case De.moveDown:if(s===(r||[]).length+i-1){return jr({message:"已经排在末位!"}),r}l=l.concat(u),(c||[]).forEach((function(t,e){if(0===e){var r=t;r[o]-=1,l.push(r);var a=n;a[o]+=1,l.push(a)}else l.push(t)}));break;default:jr({message:"不符合的操作, 允许的操作为['".concat(De.moveUp,"','").concat(De.moveDown,"']!")})}return l}function Gr(t){var e=t.list,n=void 0===e?[]:e,r=t.convert,o=void 0===r?null:r,a=t.recursiveKey,i=void 0===a?"children":a;return(ie(n)?n:[n]).map((function(t){return Jr({data:t,convert:o,target:i})}))}function Jr(t){var e=t.data,n=t.convert,r=void 0===n?null:n,o=t.recursiveKey,a=void 0===o?"children":o;if(!te(r))return e;var i=r(e),u=e[a],c=[];return ie(u)&&(c=u.map((function(t){return Jr({data:t,convert:r,target:a})}))),i[a]=c,i}function Vr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Vt(t,e,n);return!ne(r)}function zr(){function t(t,e){return ne(e)?t:e}for(var e=Ct({},arguments.length<=0?void 0:arguments[0]),n=1;n<arguments.length;n++)e=Et(e,n<0||arguments.length<=n?void 0:arguments[n],t);return e}function qr(t){if(t&&"object"===vt(t)){var e="";return Object.keys(t).forEach((function(n){var r,o=(null!==(r=n.replace(/([A-Z])/g,"-$1"))&&void 0!==r?r:"").toLowerCase();e+="".concat(o,":").concat(t[n],";")})),e}return t&&"string"==typeof t?t:""}function Zr(t,e){return t&&"object"===vt(t)&&e&&"object"===vt(e)?Object.assign({},t,e):qr(t)+qr(e)}function $r(t,e){var n=t;for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n}var Xr="htmlAssist";function _r(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!Zt(t))return t;if(!Zt(e)||e<=0)throw new Error(dn(me,"pxToRem -> root value must be number and greater than 0, current root value [".concat(e,"] is invalid"),Xr));var o=parseFloat(t);if(o<r)return t;var a=He(o/e,n);return 0===a?"0":a+"rem"}var to="localStorageAssist",eo={getStorage:function(t){Cn(dn(me,"setStorageGetter need config, use setStorageGetter to set it",to))},setStorage:function(t,e){Cn(dn(me,"setStorageSetter need config, use setStorageSetter to set it",to))},removeStorage:function(t){Cn(dn(me,"setStorageRemover need config, use setStorageRemover to set it",to))},flushStorage:function(){Cn(dn(me,"setStorageFlusher need config, use setStorageFlusher to set it",to))}};function no(t){eo.getStorage=t}function ro(t){eo.setStorage=t}function oo(t){eo.removeStorage=t}function ao(t){eo.flushStorage=t}function io(t){try{return eo.getStorage(t)}catch(e){throw Cn({key:t,e:e}),e}}function uo(t){var e=io(t);return de(e)?null:JSON.parse(e||"{}")}function co(t,e){eo.setStorage(t,e)}function lo(t,e){eo.setStorage(t,JSON.stringify(e||{}))}function so(t){eo.removeStorage(t)}function fo(){eo.flushStorage()}var ho=function(t){var e=t.text;t.duration,t.onClose,bn({text:e})};var mo="nearestLocalhostNotify";function go(){var t=uo(mo);return null==(t||null)||null==(t.nearestTime||null)?null:t||null}function vo(){return lo(mo,{nearestTime:parseInt((new Date).getTime()/1e3,10)})}function po(){so(mo)}function yo(t){var e=t.text,n=!1,r=0,o=go()||null;null==o?n=!0:r=o.nearestTime||0;var a=parseInt((new Date).getTime()/1e3,10);try{if(r+30<a&&(n=!0),n){var i="当前接口域名: ".concat(e,". ");!function(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(ho)&&ho({text:e,duration:r,onClose:a})}({text:i}),En({message:i}),vo()}}catch(t){yn(t)}}function wo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=L(t);if(de(e))return n;if(de(n))return e;var r=e.lastIndexOf("?")>=0?"&":"?";return"".concat(e).concat(r).concat(n)}function bo(t){return R(t)}function xo(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"请".concat(e||"输入").concat(t).concat(de(n)?"":",".concat(n))}function Ao(t){var e=t.label,n=t.name,r=t.helper,o="",a="",i="";if(ae(e))o=e;else{wn({label:e,name:n,helper:r}),Yr({message:"label必须为文本"})}if(ae(n))a=n;else{wn({label:e,name:n,helper:r}),Yr({message:"name必须为文本"})}if(ae(r))i=r;else{wn({label:e,name:n,helper:r}),Yr({message:"helper必须为文本"})}return{label:o,name:a,helper:i}}function So(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"注: ";return"".concat(e).concat(t,". ")}export{_n as addHour,tr as addMinute,er as addSecond,Ct as assign,Et as assignWith,$r as attachPropertiesToComponent,xo as buildFieldDescription,So as buildFieldHelper,$n as buildHexColor,Xn as buildLinearGradient,dn as buildPromptModuleInfo,wo as buildQueryStringify,Zn as buildRGBColorFromHexColor,qn as buildRandomHexColor,qr as buildStringStyle,kn as cacheMountTarget,or as calculateDateInterval,ar as calculateMonthInterval,rr as calculateTimeInterval,Vr as checkExist,Ao as checkFromConfig,ln as checkHasMore,he as checkInCollection,gr as checkMessagePromptData,de as checkStringIsNullOrWhiteSpace,sn as checkWhetherDevelopmentEnvironment,rn as cloneWithoutMethod,Ae as convertCollection,_r as convertPixelToRem,Me as datetimeFormat,ht as decodeBase64,Qn as deleteCache,Gn as deleteMultiCache,Kt as difference,pn as displayObjectMessage,vn as displayTextMessage,Ft as dropRight,Br as ellipsis,xe as emptyDatetime,mt as encodeBase64,St as endsWith,ge as envCollection,Pe as errorImage,_e as evil,Qt as filter,Vt as find,Jt as findIndex,Tt as first,gt as fixedZero,Nt as floor,Jn as flushAllCache,fo as flushLocalStorage,Ot as forEach,Se as formatCollection,hr as formatDateInterval,mr as formatDateIntervalWithNow,fr as formatDatetime,cr as formatDecimal,lr as formatMoney,sr as formatMoneyToChinese,dr as formatTarget,xt as get,en as getBrowserInfo,tn as getBrowserVersion,Wn as getCache,Pn as getCachePool,ir as getDayOfWeek,Hn as getExpiration,cn as getGuid,uo as getJsonFromLocalStorage,On as getLoggerDisplaySwitch,Rn as getMultiCache,go as getNearestLocalhostNotifyCache,nr as getNow,Wr as getPathValue,io as getStringFromLocalStorage,ur as getTodayOfWeek,fn as getValue,Kr as getValueByKey,jt as gte,Fn as hasCache,ie as isArray,ee as isBoolean,oe as isDate,qt as isDatetime,Xt as isEqual,_t as isEqualBySerialize,te as isFunction,fe as isImageBase4,zt as isInvalid,$t as isMoney,re as isNull,Zt as isNumber,ue as isObject,ce as isPlainObject,le as isPromise,ae as isString,ne as isUndefined,se as isUrl,Ln as keys,eo as localStorageAssist,gn as logColorCollection,xn as logConfig,yn as logData,Sn as logDebug,Oe as logDisplay,Dn as logError,Cn as logException,Mn as logExecute,bn as logInfo,Ie as logLevel,In as logObject,En as logText,An as logTrace,wn as logWarn,mn as loggerSwitch,Wt as map,kt as memoize,zr as mergeProps,Zr as mergeStyle,vr as messagePromptAssist,Ne as messageTypeCollection,ke as notificationTypeCollection,bo as parseQueryString,on as refitCommonData,an as refitFieldDecoratorOption,Lr as removeEndMatch,Ut as removeFromArray,Rr as removeLastMatch,so as removeLocalStorage,po as removeNearestLocalhostNotifyCache,Ht as replace,Hr as replaceWithKeep,ye as requestMethod,It as reverse,At as round,lo as saveJsonToLocalStorage,co as saveStringToLocalStorage,un as searchFromList,nn as seededRandom,Lt as set,Yn as setCache,Nn as setCacheMount,Ar as setErrorMessageDisplayMonitor,Un as setExpiration,yr as setInfoMessageDisplayMonitor,jn as setLoggerDisplaySwitch,Bn as setMultiCache,vo as setNearestLocalhostNotifyCache,pr as setOpenMessageDisplayMonitor,ao as setStorageFlusher,no as setStorageGetter,oo as setStorageRemover,ro as setStorageSetter,wr as setSuccessMessageDisplayMonitor,br as setWarnMessageDisplayMonitor,xr as setWarningMessageDisplayMonitor,Pr as showErrorMessage,Cr as showInfoMessage,Mr as showOpenMessage,Yr as showRuntimeError,Tr as showSimpleErrorMessage,Dr as showSimpleInfoMessage,Sr as showSimpleOpenMessage,Fr as showSimpleRuntimeError,Er as showSimpleSuccessMessage,Or as showSimpleWarnMessage,kr as showSimpleWarningMessage,Ir as showSuccessMessage,jr as showWarnMessage,Nr as showWarningMessage,Rt as size,Ur as sleep,Gt as sortBy,Qr as sortCollectionByKey,De as sortOperate,Mt as sortedUnique,Dt as split,Pt as startsWith,Vn as statisticsCache,Kn as takeCache,qe as to,Ke as toBoolean,Ue as toBoundary,Je as toDatetime,Ge as toLower,Ye as toMd5,We as toMoney,He as toNumber,Le as toPercentage,Ve as toPromise,ze as toRound,Fe as toSha1,Re as toString,Qe as toUpper,Jr as transformData,Gr as transformListData,Te as transparentImage,Bt as trim,yo as trySendNearestLocalhostNotify,pe as underlyingExtensionState,ve as underlyingState,Yt as uniqBy,Ee as whetherNumber,Ce as whetherString,be as zeroInt,we as zeroString};
|
|
1
|
+
import t from"node-cache";import e from"lodash/isBoolean";import n from"lodash/isDate";import r from"lodash/isEqual";import o from"lodash/isFunction";import a from"lodash/isNull";import i from"lodash/isNumber";import u from"lodash/isObject";import c from"lodash/isString";import l from"lodash/isUndefined";import s from"lodash/replace";import f from"lodash/assign";import d from"lodash/assignWith";import h from"lodash/difference";import m from"lodash/dropRight";import g from"lodash/endsWith";import v from"lodash/filter";import p from"lodash/find";import y from"lodash/findIndex";import w from"lodash/first";import b from"lodash/floor";import x from"lodash/forEach";import A from"lodash/get";import S from"lodash/gte";import M from"lodash/map";import D from"lodash/memoize";import C from"lodash/remove";import E from"lodash/reverse";import I from"lodash/round";import O from"lodash/set";import j from"lodash/size";import k from"lodash/sortBy";import N from"lodash/sortedUniq";import T from"lodash/split";import P from"lodash/startsWith";import F from"lodash/trim";import Y from"lodash/uniqBy";import B from"lodash/toNumber";import H from"lodash/toString";import U from"object-hash";import W from"dayjs";import{stringify as L,parse as R}from"qs";var K,Q="function"==typeof atob,G="function"==typeof btoa,J="function"==typeof Buffer,V="function"==typeof TextDecoder?new TextDecoder:void 0,z="function"==typeof TextEncoder?new TextEncoder:void 0,q=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),Z=(K={},q.forEach((function(t,e){return K[t]=e})),K),$=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,X=String.fromCharCode.bind(String),_="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t){return t};return new Uint8Array(Array.prototype.slice.call(t,0).map(e))},tt=function(t){return t.replace(/=/g,"").replace(/[+\/]/g,(function(t){return"+"==t?"-":"_"}))},et=function(t){return t.replace(/[^A-Za-z0-9\+\/]/g,"")},nt=G?function(t){return btoa(t)}:J?function(t){return Buffer.from(t,"binary").toString("base64")}:function(t){for(var e,n,r,o,a="",i=t.length%3,u=0;u<t.length;){if((n=t.charCodeAt(u++))>255||(r=t.charCodeAt(u++))>255||(o=t.charCodeAt(u++))>255)throw new TypeError("invalid character found");a+=q[(e=n<<16|r<<8|o)>>18&63]+q[e>>12&63]+q[e>>6&63]+q[63&e]}return i?a.slice(0,i-3)+"===".substring(i):a},rt=J?function(t){return Buffer.from(t).toString("base64")}:function(t){for(var e=[],n=0,r=t.length;n<r;n+=4096)e.push(X.apply(null,t.subarray(n,n+4096)));return nt(e.join(""))},ot=function(t){if(t.length<2)return(e=t.charCodeAt(0))<128?t:e<2048?X(192|e>>>6)+X(128|63&e):X(224|e>>>12&15)+X(128|e>>>6&63)+X(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return X(240|e>>>18&7)+X(128|e>>>12&63)+X(128|e>>>6&63)+X(128|63&e)},at=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,it=J?function(t){return Buffer.from(t,"utf8").toString("base64")}:z?function(t){return rt(z.encode(t))}:function(t){return nt(t.replace(at,ot))},ut=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ct=function(t){switch(t.length){case 4:var e=((7&t.charCodeAt(0))<<18|(63&t.charCodeAt(1))<<12|(63&t.charCodeAt(2))<<6|63&t.charCodeAt(3))-65536;return X(55296+(e>>>10))+X(56320+(1023&e));case 3:return X((15&t.charCodeAt(0))<<12|(63&t.charCodeAt(1))<<6|63&t.charCodeAt(2));default:return X((31&t.charCodeAt(0))<<6|63&t.charCodeAt(1))}},lt=Q?function(t){return atob(et(t))}:J?function(t){return Buffer.from(t,"base64").toString("binary")}:function(t){if(t=t.replace(/\s+/g,""),!$.test(t))throw new TypeError("malformed base64.");t+="==".slice(2-(3&t.length));for(var e,n,r,o="",a=0;a<t.length;)e=Z[t.charAt(a++)]<<18|Z[t.charAt(a++)]<<12|(n=Z[t.charAt(a++)])<<6|(r=Z[t.charAt(a++)]),o+=64===n?X(e>>16&255):64===r?X(e>>16&255,e>>8&255):X(e>>16&255,e>>8&255,255&e);return o},st=J?function(t){return _(Buffer.from(t,"base64"))}:function(t){return _(lt(t),(function(t){return t.charCodeAt(0)}))},ft=J?function(t){return Buffer.from(t,"base64").toString("utf8")}:V?function(t){return V.decode(st(t))}:function(t){return lt(t).replace(ut,ct)},dt=function(t){return ft(et(t.replace(/[-_]/g,(function(t){return"-"==t?"+":"/"}))))};function ht(t){return dt(t)}function mt(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e?tt(it(t)):it(t)}(t)}function gt(t){return 1*t<10?"0".concat(t):t}function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function pt(t){var e=function(t,e){if("object"!==vt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===vt(e)?e:String(e)}function yt(t,e,n){return(e=pt(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wt(Object(n),!0).forEach((function(e){yt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function xt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return A(t,e,n)}function At(t,e){return I(t,e)}function St(t,e,n){return g(t,e,n)}function Mt(t){return N(t)}function Dt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;return T(t,e,n)}function Ct(t,e){return f(t,e)}function Et(t,e,n){return d(t,e,n)}function It(t){return E(t)}function Ot(t,e){return x(t,e)}function jt(t,e){return S(t,e)}function kt(t){return D(t)}function Nt(t,e){return b(t,e)}function Tt(t){return w(t)}function Pt(t,e){return P(t,e)}function Ft(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return m(t,e)}function Yt(t,e){return Y(t,e)}function Bt(t){return F(t)}function Ht(t,e,n){return s(t,e,n)}function Ut(t,e){return C(t,e)}function Wt(t,e){return M(t,e)}function Lt(t,e,n){return O(t,e,n)}function Rt(t){return j(t)}function Kt(t,e){return h(t,e)}function Qt(t,e){return v(t,e)}function Gt(t,e){return k(t,e)}function Jt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return y(t,e,n)}function Vt(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return p(t,e,n)}function zt(t){return ne(t)}function qt(t){var e="".concat(ne(t)?null:t).match(/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/);if(null==e)return!1;var n=new Date(e[1],e[3]-1,e[4]);return n.getFullYear()===parseInt(e[1],10)&&n.getMonth()+1===parseInt(e[3],10)&&n.getDate()===parseInt(e[4],10)}function Zt(t){return i(t)}function $t(t){var e="".concat(ne(t)?null:t);if(""===e)return!1;return new RegExp(/^([1-9][\d]{0,15}|0)(\.[\d]{1,2})?$/).test(e)}function Xt(t,e){return r(t,e)}function _t(t,e){return JSON.stringify(t||{})===JSON.stringify(e||{})}function te(t){return o(t)}function ee(t){return e(t)}function ne(t){return l(t)}function re(t){return a(t)}function oe(t){return n(t)}function ae(t){return c(t)}function ie(t){return Array.isArray(t)}function ue(t){return u(t)}function ce(t){return null!==t&&"object"===vt(t)&&!ie(t)}function le(t){return ce(t)&&te(t.then)&&te(t.catch)}function se(t){return new RegExp(/(http|https):\/\/([\w.]+\/?)\S*/).test(t)}function fe(t){return new RegExp(/(data):image\/([\w.]+\/?)\S*/).test(t)}function de(t){return""===Bt(s(t||""," ",""))}function he(t,e){var n=!1;return ie(t)?(t.some((function(t){return t===e&&(n=!0,!0)})),n):n}var me="easy-soft-utility",ge={WEAPP:"WEAPP",WEB:"WEB",RN:"RN",SWAN:"SWAN",ALIPAY:"ALIPAY",TT:"TT",QQ:"QQ",JD:"JD",UNKNOWN:"UNKNOWN"},ve={loadApiPath:"",firstLoadSuccess:!1,loadSuccess:!1,registering:!1,dataLoading:!1,reloading:!1,searching:!1,refreshing:!1,paging:!1,processing:!1,dispatchComplete:!0,metaData:null,metaExtra:null,metaListData:[],metaOriginalData:null,urlParams:null,externalData:null},pe={dataLoading:!0},ye={get:"GET",post:"POST",put:"PUT",delete:"DELETE",trace:"TRACE",connect:"CONNECT"},we="0",be=0,xe="1970-01-01 00:00",Ae={number:"number",datetime:"datetime",string:"string",moment:"moment",money:"money",array:"array",boolean:"boolean"},Se={money:"money",datetime:"datetime",chineseMoney:"chineseMoney",percentage:"percentage"},Me={yearMonthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",yearMonthDayHourMinute:"YYYY-MM-DD HH:mm",yearMonthDay:"YYYY-MM-DD",yearMonth:"YYYY-MM",year:"YYYY",monthDayHourMinuteSecond:"YYYY-MM-DD HH:mm:ss",monthDayHourMinute:"MM-DD HH:mm",monthDay:"MM-DD",hourMinute:"HH:mm",hourMinuteSecond:"HH:mm:ss",month:"MM",day:"DD",hour:"HH",minute:"mm",second:"ss"},De={moveUp:"moveUp",moveDown:"moveDown"},Ce={no:"0",yes:"1"},Ee={no:0,yes:1},Ie={trace:"trace",debug:"debug",warn:"warn",error:"error",exception:"exception",info:"info",config:"config",execute:"execute",stack:"stack"},Oe={auto:"auto",text:"text",object:"object"},je={success:"success",error:"error",info:"info",warning:"warning",warn:"warn",open:"open"},ke=bt({},je),Ne=bt({},je),Te="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABLCAYAAACGGCK3AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA0SURBVHhe7cExAQAAAMKg9U9tDQ8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIA3NXV7AAHfw7zWAAAAAElFTkSuQmCC",Pe=Te;function Fe(t){return U(t,{algorithm:"sha1"})}function Ye(t){return U(t,{algorithm:"md5"})}function Be(t,e){var n=Math.pow(10,e+1),r=Math.floor(He(t)*n);return 10*Math.round(r/10)/n}function He(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=B(t),r=Number.isNaN(n)?0:n;return null==(e||null)?r:Be(r,e)}function Ue(t,e,n){if(!Zt(t))throw new Error("value must be number value");var r=He(t);return void 0!==e&&(r=Math.max(t,e)),void 0!==n&&(r=Math.min(r,n)),r}function We(t){return $t(t)?parseFloat(t,10):0}function Le(t){return"".concat(We(1e3*He(t)/10),"%")}function Re(t){return H(t)}function Ke(t){return!!t}function Qe(t){return Re(t).toUpperCase()}function Ge(t){return Re(t).toLowerCase()}function Je(t){if(null==(t||null))return null;if(oe(t))return t;if(ae(t)&&t.indexOf("T")<0){var e=t.replace(/\-/g,"/");return new Date(e)}return new Date(t)}function Ve(t){return le(t)?t:Promise.resolve(t)}function ze(t,e){return At(t,e)}function qe(t){var e=t.target,n=t.convert;if(te(n))return n(e);if(ae(n))switch(n){case Ae.number:return He(e);case Ae.datetime:return Je(e);case Ae.string:return Re(e);case Ae.money:return We(e);case Ae.array:return null==(e||null)?[]:ie(e)?e:[e];default:return e}return e}function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function $e(t,e){if(t){if("string"==typeof t)return Ze(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ze(t,e):void 0}}function Xe(t){return function(t){if(Array.isArray(t))return Ze(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||$e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _e(t){return new Function("return ".concat(t))()}function tn(){var t=navigator.userAgent;return{trident:t.indexOf("Trident")>-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1===t.indexOf("Safari")}}function en(){var t;return{versions:tn(),language:(null!==(t=navigator.browserLanguage||navigator.language)&&void 0!==t?t:"").toLowerCase()}}function nn(t){var e=t.seed,n=t.min||0;return n+(9301*e+49297)%233280/233280*((t.max||1)-n)}function rn(t){return null==t?null:JSON.parse(JSON.stringify(t))}function on(t,e,n){var r=[];return null!=t&&(r=Xe(t)),null!=n&&(r=[].concat(Xe(r),Xe(n))),null!=e&&(r=[e].concat(Xe(r))),r}function an(t,e,n,r,o){var a=r,i=void 0===n?null:n;return null!=e&&("function"==typeof convertValue?a.initialValue=o(t)||i:a.initialValue=t||i),a}function un(t,e,n){var r=null;return null==e||(n||[]).forEach((function(n){n[t]===e&&(r=n)})),r}function cn(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:16,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),o=[],a=0;if(n=n||r.length,e)for(a=0;a<e;a++)o[a]=r[0|Math.random()*n];else for(o[8]=o[13]=o[18]=o[23]="-",o[14]="4",a=0;a<36;a++)o[a]||(t=0|16*Math.random(),o[a]=r[19===a?3&t|8:t]);return o.join("")}function ln(t){var e=t.pageNo,n=t.pageSize,r=t.total;return!((r||0)<=0)&&(e||0)*(n||0)<(r||0)}function sn(){return"development"===process.env.NODE_ENV}function fn(t){return Object.keys(t).map((function(e){return t[e]})).join(",")}function dn(t,e){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var a=[t].concat(r).filter((function(t){return ae(t)&&!de(t)}));return"".concat(a.join("::"),"::").concat(de(e)?"":e)}var hn="loggerAssist",mn={loggerDisplaySwitchPromptSetInformationComplete:!1,loggerDisplaySwitchSetComplete:!1,display:!1},gn={config:"#F8C471",execute:"#C39BD3",info:"#89CA78",warn:"#F16F17",debug:"#00768F",trace:"#596032",error:"#E33F3E",exception:"#DC428E",stack:"#81977c"};function vn(t){var e=t.text,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation,u=void 0===i?"":i,c=function(t,e){return"".concat(Re(t)).concat(de(e)?"":" -> ".concat(e))}(ae(e)?e:JSON.stringify(e),u);de(vn)||console.log("%c%s","color:".concat(r,";"),"".concat(de(a)?"":"[".concat(Qe(a),"] ")).concat(c))}function pn(t){var e=t.data,n=t.color,r=void 0===n?"":n,o=t.dataDescription,a=void 0===o?"":o,i=t.ancillaryInformation;vn({text:"check the following object data",color:r,dataDescription:a,ancillaryInformation:void 0===i?"":i}),console.log(e)}function yn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Oe.auto,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ie.debug,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=jn();if(!mn.loggerDisplaySwitchSetComplete&&!mn.loggerDisplaySwitchPromptSetInformationComplete){var a=dn(me,"logData -> logger display switch default is false, if want to display log, please set it before first log, use setLoggerDisplaySwitch to set it, this message only show once",hn);vn({text:a,color:"#08BBEE",dataDescription:"hint",ancillaryInformation:""});try{throw new Error("please set use setLoggerDisplaySwitch")}catch(t){console.error(t)}mn.loggerDisplaySwitchPromptSetInformationComplete=!0}if(o||n===Ie.exception){var i=null==(e||null)||de(e)?Oe.auto:e;if(!he([Oe.auto,Oe.text,Oe.object],i))throw new Error("Invalid log display mode -> ".concat(i));if(i===Oe.auto&&(i=ae(t)?Oe.text:Oe.object),n!==Ie.exception){if(o){if(n===Ie.trace&&(i===Oe.text&&vn({text:t,color:gn.trace,dataDescription:"trace",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.trace,dataDescription:"trace",ancillaryInformation:r})),n===Ie.debug&&(i===Oe.text&&vn({text:t,color:gn.debug,dataDescription:"debug",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.debug,dataDescription:"debug",ancillaryInformation:r})),n===Ie.warn&&(i===Oe.text&&vn({text:t,color:gn.warn,dataDescription:"warn",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.warn,dataDescription:"warn",ancillaryInformation:r})),n===Ie.info&&(i===Oe.text&&vn({text:t,color:gn.info,dataDescription:"info",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.info,dataDescription:"info",ancillaryInformation:r})),n===Ie.execute&&(i===Oe.text&&vn({text:t,color:gn.execute,dataDescription:"execute",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.execute,dataDescription:"execute",ancillaryInformation:r})),n===Ie.config&&(i===Oe.text&&vn({text:t,color:gn.config,dataDescription:"config",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.config,dataDescription:"config",ancillaryInformation:r})),n===Ie.stack){i===Oe.text&&vn({text:t,color:gn.stack,dataDescription:"stack",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.stack,dataDescription:"stack",ancillaryInformation:r});try{throw new Error("stack call trace as bellow")}catch(t){var u=t.stack;console.log(Ht(u,"Error:","Stack:"))}}n===Ie.error&&(i===Oe.text&&vn({text:t,color:gn.error,dataDescription:"error",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.error,dataDescription:"error",ancillaryInformation:r}))}}else{i===Oe.text&&vn({text:t,color:gn.exception,dataDescription:"exception",ancillaryInformation:r}),i===Oe.object&&pn({data:t,color:gn.exception,dataDescription:"exception",ancillaryInformation:r});try{throw new Error("an error occur, check the above error message, the stack information is as follows")}catch(t){console.error(t)}}}}function wn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.warn,e):On(t,Ie.warn,e)}function bn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.info,e):On(t,Ie.info,e)}function xn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.config,e):On(t,Ie.config,e)}function An(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.stack,e):On(t,Ie.stack,e)}function Sn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.trace,e):On(t,Ie.trace,e)}function Mn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.debug,e):On(t,Ie.debug,e)}function Dn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.execute,e):On(t,Ie.execute,e)}function Cn(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.error,e):On(t,Ie.error,e)}function En(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";ae(t)?In(t,Ie.exception,e):On(t,Ie.exception,e)}function In(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";yn(t,Oe.text,e,n)}function On(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie.trace,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";yn(t,Oe.object,e,n)}function jn(){return Ke(mn.display)}function kn(t){sn()&&vn({text:"setLoggerDisplaySwitch",color:gn.execute,dataDescription:"execute",ancillaryInformation:""}),mn.display=Ke(t),mn.loggerDisplaySwitchSetComplete=!0}var Nn={mountComplete:!1,target:null};function Tn(e){if(Dn("setCacheMount"),!ue(e))throw Mn(e),new Error(dn(me,"setCacheMount -> cache mount target must be a object, current type is ".concat(vt(e)),"cacheAssist"));null==(e.localRuntimeCache||null)&&(e.localRuntimeCache=new t),Nn.target=e,Nn.mountComplete=!0,bn("setCacheMount -> cache mount success.")}function Pn(t){return de(t)?(En("checkKey -> cache key is null or empty"),!1):!(!ae(t)&&!Zt(t))||(En("cache key must be string or number, current type id ".concat(vt(t))),!1)}function Fn(){if(!Nn.mountComplete||!Nn.target||!Nn.target.localRuntimeCache)throw new Error("getCachePool -> please use setCacheMount function to set cache mount target before get it.");return Nn.target.localRuntimeCache}function Yn(t){var e=t.key,n=Fn();if(null==n)throw new Error("cache pool not exist");return n.has(e)}function Bn(t){var e=t.key,n=t.value,r=t.expiration,o=void 0===r?0:r;if(Pn(e)){var a=Fn();if(null==a)throw new Error("cache pool not exist");return a.set(e,n,o)}}function Hn(t){if(!ie(t))throw new Error("setMultiCache: list must be array");if(t.length<=0)return!0;var e=[];if(t.forEach((function(t){var n=bt(bt({},{key:"",value:"",expiration:0}),t),r=n.key,o=n.value,a=n.expiration;if(!de(r)){if(!Pn(r))return;e.push({key:r,value:o,ttl:a})}})),e.length<=0)return!1;var n=Fn();if(null==n)throw new Error("cache pool not exist");return n.mset(e)}function Un(t){var e=t.key,n=Fn();if(null==n)throw new Error("cache pool not exist");return n.getTtl(e)}function Wn(t){var e=t.key,n=t.expiration,r=Fn();if(null==r)throw new Error("cache pool not exist");return r.ttl(e,n)}function Ln(t){var e=t.key,n=Fn();if(null==n)throw new Error("cache pool not exist");return n.get(e)}function Rn(){var t=Fn();if(null==t)throw new Error("cache pool not exist");return t.keys()}function Kn(t){if(!ie(t))throw new Error("getMultiCache: list must be array");var e=Fn();if(null==e)throw new Error("cache pool not exist");return e.mget(t)}function Qn(t){var e=t.key,n=Fn();if(null==n)throw new Error("cache pool not exist");return n.take(e)}function Gn(t){var e=t.key;if(Pn(e)){var n=Fn();if(null==n)throw new Error("cache pool not exist");return n.del(e)}}function Jn(t){if(!ie(t))throw new Error("deleteMultiCache: list must be array");var e=Fn();if(null==e)throw new Error("cache pool not exist");return e.del(t)}function Vn(){var t=Fn();if(null==t)throw new Error("cache pool not exist");return t.flushAll()}function zn(){var t=Fn();if(null==t)throw new Error("cache pool not exist");return t.getStats()}function qn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,o,a,i,u=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||$e(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zn(t){var e=t.seed;return"#".concat("00000".concat((16777216*nn({seed:e})<<0).toString(16)).substring(-6))}function $n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"RGB",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/,o=(null!=t?t:"").toLowerCase();if(r.test(o)){if(4===o.length){for(var a="#",i=1;i<4;i+=1)a+=o.slice(i,i+1).concat(o.slice(i,i+1));o=a}for(var u=[],c=1;c<7;c+=2)u.push(parseInt("0x"+o.slice(c,c+2)));return e?"".concat(e,"(").concat(u.join(","),")"):n?u:u.join(",")}return En("Invalid hex color -> ".concat(t)),o}function Xn(t){var e=t.progress,n=t.startColor,r=t.endColor,o=$n(n,null,!0),a=$n(r,null,!0),i=qn(o,3),u=i[0],c=i[1],l=i[2],s=qn(a,3),f=s[0],d=s[1],h=s[2],m=[(u+Math.round((f-u)*e)).toString(16),(c+Math.round((d-c)*e)).toString(16),(l+Math.round((h-l)*e)).toString(16)];return"#".concat(m.join("").toUpperCase())}function _n(t){var e=t.direct,n=t.list,r=void 0===n?[]:n,o=Zt(e)?"".concat(e,"deg"):e;return"linear-gradient(".concat(o,", ").concat(r.join(),")")}function tr(t,e){var n=Je(t);return n.setHours(n.getHours()+e)}function er(t,e){var n=Je(t);return n.setMinutes(n.getMinutes()+e)}function nr(t,e){var n=Je(t);return n.setSeconds(n.getSeconds()+e)}function rr(){return new Date}function or(t,e){var n=t.getTime(),r=(e.getTime()-n)/1e3,o=parseInt(r/86400),a=parseInt((r-24*o*60*60)/3600),i=parseInt((r-24*o*60*60-60*a*60)/60);return{day:o,hour:a,minute:i,second:r-24*o*60*60-60*a*60-60*i}}var ar=function(t,e,n){var r=Je(t),o=e?Je(e):new Date,a=o.getTime()-r.getTime();return"second"===n&&a/1e3||"minute"===n&&a/1e3/60||"hour"===n&&a/1e3/60/60||"day"===n&&a/1e3/60/60/24||"week"===n&&a/1e3/60/60/24/7||"month"===n&&ir(r,o)||"quarter"===n&&ir(r,o)/3||"year"===n&&ir(r,o)/12||a},ir=function(t,e){var n=Je(t),r=Je(e);return 12*(n.getFullYear()-r.getFullYear())+n.getMonth()-r.getMonth()};function ur(t){var e=t.data;return W(e).day()}function cr(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=W().day();if(!t)return e;var n="";switch(He(e)){case 0:n="日";break;case 1:n="一";break;case 2:n="二";break;case 3:n="三";break;case 4:n="四";break;case 5:n="五";break;case 6:n="六";break;default:n=""}return de(n)?"":"星期".concat(n)}function lr(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.thousand,a=void 0===o?",":o,i=t.decimal;return sr({data:e,places:r,symbol:"",thousand:a,decimal:void 0===i?".":i})}function sr(t){var e=t.data,n=t.places,r=void 0===n?2:n,o=t.symbol,a=void 0===o?"¥":o,i=t.thousand,u=void 0===i?",":i,c=t.decimal,l=void 0===c?".":c,s=e||0,f=isNaN(r=Math.abs(r))?2:r,d=void 0!==a?a:"¥",h=u||",",m=l||".",g=s<0?"-":"",v=parseInt(s=Math.abs(+s||0).toFixed(f),10)+"",p=v.length;return d+g+((p=p>3?p%3:0)?v.substr(0,p)+h:"")+v.substr(p).replace(/(\d{3})(?=\d)/g,a+"1"+h)+(f?m+Math.abs(s-He(v)).toFixed(f).slice(2):"")}function fr(t){var e,n,r,o=t.target,a=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],i=["","拾","佰","仟"],u=["","万","亿","兆"],c=["角","分","毫","厘"],l="";if(""===o)return"";if((o=parseFloat(o))>=1e15)return"超出最大处理数字";if(0===o)return l=a[0]+"元";if(-1===(o=o.toString()).indexOf("."))e=o,n="";else{var s=qn(r=o.split("."),2);e=s[0],n=s[1],n=r[1].substr(0,4)}if(parseInt(e,10)>0){for(var f=0,d=e.length,h=0;h<d;h+=1){var m=e.substr(h,1),g=d-h-1,v=g/4,p=g%4;"0"===m?f+=1:(f>0&&(l+=a[0]),f=0,l+=a[parseInt(m,10)]+i[p]),0===p&&f<4&&(l+=u[v])}l+="元"}if(""!==n)for(var y=n.length,w=0;w<y;w+=1){var b=n.substr(w,1);"0"!==b&&(l+=a[Number(b)]+c[w])}return""===l&&(l+=a[0]+"元"),l}function dr(t){var e=t.data,n=t.fmt,r=void 0===n?Me.yearMonthDayHourMinuteSecond:n;return null==(e||null)?"":W(e).format(r)}function hr(t){var e=t.target,n=t.format,r=t.option,o=void 0===r?{}:r;if(te(n))return n(e);if(ae(n))switch(n){case Se.money:return sr({data:e});case Se.datetime:return dr({data:e});case Se.chineseMoney:return fr({target:e,option:o});case Se.percentage:return"".concat(ze(100*e,1),"%");default:return e}return e}function mr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=bt(bt({},{second:["刚刚","片刻后"],seconds:["%d 秒前","%d 秒后"],minute:["大约 1 分钟前","大约 1 分钟后"],minutes:["%d 分钟前","%d 分钟后"],hour:["大约 1 小时前","大约 1 小时后"],hours:["%d 小时前","%d 小时后"],day:["1 天前","1 天后"],days:["%d 天前","%d 天后"],month:["大约 1 个月前","大约 1 个月后"],months:["%d 月前","%d 月后"],year:["大约 1 年前","大约 1 年后"],years:["%d 年前","%d 年后"]}),n||{}),o=ar(t,e),a=o<0?1:0,i=Math.abs(o)/1e3,u=i/60,c=u/60,l=c/24,s=l/365,f=function(t,e){return t.replace(/%d/i,e)};return i<10&&f(r.second[a],parseInt(i))||i<45&&f(r.seconds[a],parseInt(i))||i<90&&f(r.minute[a],1)||u<45&&f(r.minutes[a],parseInt(u))||u<90&&f(r.hour[a],1)||c<24&&f(r.hours[a],parseInt(c))||c<42&&f(r.day[a],1)||l<30&&f(r.days[a],parseInt(l))||l<45&&f(r.month[a],1)||l<365&&f(r.months[a],parseInt(l/30))||s<1.5&&f(r.year[a],1)||f(r.years[a],parseInt(s))}function gr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return mr(t,rr(),e)}function vr(t){return de(t.text||null)&&wn(dn(me,"checkMessagePromptData option text disallow empty","loggerAssist")),!0}var pr={showOpenMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showInfoMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showSuccessMessage:function(t){var e=t.text;t.duration,t.onClose,bn({text:e})},showWarnMessage:function(t){var e=t.text;t.duration,t.onClose,wn(e)},showWarningMessage:function(t){var e=t.text;t.duration,t.onClose,wn(e)},showErrorMessage:function(t){var e=t.text;t.duration,t.onClose,Cn(e)},setErrorMessageDisplayMonitorComplete:!1};function yr(t){pr.showOpenMessage=t}function wr(t){pr.showInfoMessage=t}function br(t){pr.showSuccessMessage=t}function xr(t){pr.showWarnMessage=t}function Ar(t){pr.showWarningMessage=t}function Sr(t){pr.showErrorMessage=t,pr.setErrorMessageDisplayMonitorComplete=!0}function Mr(t){Dr({text:t})}function Dr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(pr.showOpenMessage)&&(vr({text:e}),pr.showOpenMessage({text:e,duration:r,onClose:a}))}function Cr(t){Er({text:t})}function Er(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(pr.showInfoMessage)&&(vr({text:e}),pr.showInfoMessage({text:e,duration:r,onClose:a}))}function Ir(t){Or({text:t})}function Or(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(pr.showSuccessMessage)&&(vr({text:e}),pr.showSuccessMessage({text:e,duration:r,onClose:a}))}function jr(t){kr({text:t})}function kr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(pr.showWarnMessage)&&(vr({text:e}),pr.showWarnMessage({text:e,duration:r,onClose:a}))}function Nr(t){Tr({text:t})}function Tr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(pr.showWarningMessage)&&(vr({text:e}),pr.showWarningMessage({text:e,duration:r,onClose:a}))}function Pr(t){Fr({text:t})}function Fr(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(pr.showErrorMessage)&&(vr({text:e}),pr.showErrorMessage({text:e,duration:r,onClose:a}))}function Yr(t){Br({text:t})}function Br(t){var e=t.text;de(e||"")||(pr.setErrorMessageDisplayMonitorComplete&&Fr({text:e}),En({text:e}))}function Hr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return t&&t.length>e?"".concat(Re(t).substring(0,e)).concat(n):Re(t)}function Ur(t,e,n,r){var o=Re(t),a=(t||"").length;a>0&&(n>=0||r>=0)&&(o=n>=a||r>=a||(n||0)+(r||0)>=a?t:t.substr(0,n)+e+t.substr(a-r,r));return o||""}function Wr(t,e){for(var n=(new Date).getTime();!((new Date).getTime()-n>t););te(e)&&e()}function Lr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(ne(t))return n;if(null==t)return n;if(!ae(e)){var r="getPathValue Function param path must be string";return Br({message:r}),null}var o=xt(t,e,n);return ne(n)||re(n)?o:o||n}function Rr(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string target");if(!ae(e))throw new Error("removeEndMatch only use for string match");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0&&t.length===n+e.length?t.substr(n,e.length):t}function Kr(t,e){if(!ae(t))throw new Error("removeEndMatch only use for string source");if(!ae(e))throw new Error("removeEndMatch only use for string target");if(de(t))return t;if(de(e))return t;var n=t.lastIndexOf(e);return n>=0?t.substr(n,e.length):t}function Qr(t){var e=t.data,n=t.key,r=t.defaultValue,o=void 0===r?null:r,a=t.convert,i=void 0===a?null:a,u=t.convertBuilder,c=void 0===u?null:u,l=t.format,s=void 0===l?null:l,f=t.formatBuilder,d=void 0===f?null:f,h=Lr(e,n,o),m=h;return null==(c||null)&&null==(i||null)||(m=te(c)?qe({target:h,convert:c}):qe({target:h,convert:i})),null==(d||null)&&null==(s||null)||(m=te(d)?hr({target:m,format:d}):hr({target:m,format:s})),m}function Gr(t){var e=t.operate,n=t.item,r=t.list,o=t.key,a=t.sortInitialValue,i=void 0===a?0:a;if(null==(n||null))return r;var u=[],c=[],l=[];if((r||[]).length<=1){return kr({message:"无需排序!"}),r}var s=Qr({data:n,key:o,convert:Ae.number});switch((r||[]).forEach((function(t){var e=Qr({data:t,key:o,convert:Ae.number});e<s&&u.push(t),e>s&&c.push(t)})),e){case De.moveUp:if(s===i){return kr({message:"已经排在首位!"}),r}(u||[]).forEach((function(t,e){if(e<u.length-1)l.push(t);else{var r=n;r[o]-=1,l.push(r);var a=t;a[o]+=1,l.push(a)}})),l=l.concat(c);break;case De.moveDown:if(s===(r||[]).length+i-1){return kr({message:"已经排在末位!"}),r}l=l.concat(u),(c||[]).forEach((function(t,e){if(0===e){var r=t;r[o]-=1,l.push(r);var a=n;a[o]+=1,l.push(a)}else l.push(t)}));break;default:kr({message:"不符合的操作, 允许的操作为['".concat(De.moveUp,"','").concat(De.moveDown,"']!")})}return l}function Jr(t){var e=t.list,n=void 0===e?[]:e,r=t.convert,o=void 0===r?null:r,a=t.recursiveKey,i=void 0===a?"children":a;return(ie(n)?n:[n]).map((function(t){return Vr({data:t,convert:o,target:i})}))}function Vr(t){var e=t.data,n=t.convert,r=void 0===n?null:n,o=t.recursiveKey,a=void 0===o?"children":o;if(!te(r))return e;var i=r(e),u=e[a],c=[];return ie(u)&&(c=u.map((function(t){return Vr({data:t,convert:r,target:a})}))),i[a]=c,i}function zr(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=Vt(t,e,n);return!ne(r)}function qr(){function t(t,e){return ne(e)?t:e}for(var e=Ct({},arguments.length<=0?void 0:arguments[0]),n=1;n<arguments.length;n++)e=Et(e,n<0||arguments.length<=n?void 0:arguments[n],t);return e}function Zr(t){if(t&&"object"===vt(t)){var e="";return Object.keys(t).forEach((function(n){var r,o=(null!==(r=n.replace(/([A-Z])/g,"-$1"))&&void 0!==r?r:"").toLowerCase();e+="".concat(o,":").concat(t[n],";")})),e}return t&&"string"==typeof t?t:""}function $r(t,e){return t&&"object"===vt(t)&&e&&"object"===vt(e)?Object.assign({},t,e):Zr(t)+Zr(e)}function Xr(t,e){var n=t;for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n}var _r="htmlAssist";function to(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(!Zt(t))return t;if(!Zt(e)||e<=0)throw new Error(dn(me,"pxToRem -> root value must be number and greater than 0, current root value [".concat(e,"] is invalid"),_r));var o=parseFloat(t);if(o<r)return t;var a=He(o/e,n);return 0===a?"0":a+"rem"}var eo="localStorageAssist",no={getStorage:function(t){En(dn(me,"setStorageGetter need config, use setStorageGetter to set it",eo))},setStorage:function(t,e){En(dn(me,"setStorageSetter need config, use setStorageSetter to set it",eo))},removeStorage:function(t){En(dn(me,"setStorageRemover need config, use setStorageRemover to set it",eo))},flushStorage:function(){En(dn(me,"setStorageFlusher need config, use setStorageFlusher to set it",eo))}};function ro(t){no.getStorage=t}function oo(t){no.setStorage=t}function ao(t){no.removeStorage=t}function io(t){no.flushStorage=t}function uo(t){try{return no.getStorage(t)}catch(e){throw En({key:t,e:e}),e}}function co(t){var e=uo(t);return de(e)?null:JSON.parse(e||"{}")}function lo(t,e){no.setStorage(t,e)}function so(t,e){no.setStorage(t,JSON.stringify(e||{}))}function fo(t){no.removeStorage(t)}function ho(){no.flushStorage()}var mo=function(t){var e=t.text;t.duration,t.onClose,bn({text:e})};var go="nearestLocalhostNotify";function vo(){var t=co(go);return null==(t||null)||null==(t.nearestTime||null)?null:t||null}function po(){return so(go,{nearestTime:parseInt((new Date).getTime()/1e3,10)})}function yo(){fo(go)}function wo(t){var e=t.text,n=!1,r=0,o=vo()||null;null==o?n=!0:r=o.nearestTime||0;var a=parseInt((new Date).getTime()/1e3,10);try{if(r+30<a&&(n=!0),n){var i="当前接口域名: ".concat(e,". ");!function(t){var e=t.text,n=t.duration,r=void 0===n?1500:n,o=t.onClose,a=void 0===o?function(){}:o;te(mo)&&mo({text:e,duration:r,onClose:a})}({text:i}),In({message:i}),po()}}catch(t){yn(t)}}function bo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=L(t);if(de(e))return n;if(de(n))return e;var r=e.lastIndexOf("?")>=0?"&":"?";return"".concat(e).concat(r).concat(n)}function xo(t){return R(t)}function Ao(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return"请".concat(e||"输入").concat(t).concat(de(n)?"":",".concat(n))}function So(t){var e=t.label,n=t.name,r=t.helper,o="",a="",i="";if(ae(e))o=e;else{wn({label:e,name:n,helper:r}),Br({message:"label必须为文本"})}if(ae(n))a=n;else{wn({label:e,name:n,helper:r}),Br({message:"name必须为文本"})}if(ae(r))i=r;else{wn({label:e,name:n,helper:r}),Br({message:"helper必须为文本"})}return{label:o,name:a,helper:i}}function Mo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"注: ";return"".concat(e).concat(t,". ")}export{tr as addHour,er as addMinute,nr as addSecond,Ct as assign,Et as assignWith,Xr as attachPropertiesToComponent,Ao as buildFieldDescription,Mo as buildFieldHelper,Xn as buildHexColor,_n as buildLinearGradient,dn as buildPromptModuleInfo,bo as buildQueryStringify,$n as buildRGBColorFromHexColor,Zn as buildRandomHexColor,Zr as buildStringStyle,Nn as cacheMountTarget,ar as calculateDateInterval,ir as calculateMonthInterval,or as calculateTimeInterval,zr as checkExist,So as checkFromConfig,ln as checkHasMore,he as checkInCollection,vr as checkMessagePromptData,de as checkStringIsNullOrWhiteSpace,sn as checkWhetherDevelopmentEnvironment,rn as cloneWithoutMethod,Ae as convertCollection,to as convertPixelToRem,Me as datetimeFormat,ht as decodeBase64,Gn as deleteCache,Jn as deleteMultiCache,Kt as difference,pn as displayObjectMessage,vn as displayTextMessage,Ft as dropRight,Hr as ellipsis,xe as emptyDatetime,mt as encodeBase64,St as endsWith,ge as envCollection,Pe as errorImage,_e as evil,Qt as filter,Vt as find,Jt as findIndex,Tt as first,gt as fixedZero,Nt as floor,Vn as flushAllCache,ho as flushLocalStorage,Ot as forEach,Se as formatCollection,mr as formatDateInterval,gr as formatDateIntervalWithNow,dr as formatDatetime,lr as formatDecimal,sr as formatMoney,fr as formatMoneyToChinese,hr as formatTarget,xt as get,en as getBrowserInfo,tn as getBrowserVersion,Ln as getCache,Fn as getCachePool,ur as getDayOfWeek,Un as getExpiration,cn as getGuid,co as getJsonFromLocalStorage,jn as getLoggerDisplaySwitch,Kn as getMultiCache,vo as getNearestLocalhostNotifyCache,rr as getNow,Lr as getPathValue,uo as getStringFromLocalStorage,cr as getTodayOfWeek,fn as getValue,Qr as getValueByKey,jt as gte,Yn as hasCache,ie as isArray,ee as isBoolean,oe as isDate,qt as isDatetime,Xt as isEqual,_t as isEqualBySerialize,te as isFunction,fe as isImageBase4,zt as isInvalid,$t as isMoney,re as isNull,Zt as isNumber,ue as isObject,ce as isPlainObject,le as isPromise,ae as isString,ne as isUndefined,se as isUrl,Rn as keys,no as localStorageAssist,gn as logColorCollection,xn as logConfig,yn as logData,Mn as logDebug,Oe as logDisplay,Cn as logError,En as logException,Dn as logExecute,bn as logInfo,Ie as logLevel,On as logObject,An as logStack,In as logText,Sn as logTrace,wn as logWarn,mn as loggerSwitch,Wt as map,kt as memoize,qr as mergeProps,$r as mergeStyle,pr as messagePromptAssist,Ne as messageTypeCollection,ke as notificationTypeCollection,xo as parseQueryString,on as refitCommonData,an as refitFieldDecoratorOption,Rr as removeEndMatch,Ut as removeFromArray,Kr as removeLastMatch,fo as removeLocalStorage,yo as removeNearestLocalhostNotifyCache,Ht as replace,Ur as replaceWithKeep,ye as requestMethod,It as reverse,At as round,so as saveJsonToLocalStorage,lo as saveStringToLocalStorage,un as searchFromList,nn as seededRandom,Lt as set,Bn as setCache,Tn as setCacheMount,Sr as setErrorMessageDisplayMonitor,Wn as setExpiration,wr as setInfoMessageDisplayMonitor,kn as setLoggerDisplaySwitch,Hn as setMultiCache,po as setNearestLocalhostNotifyCache,yr as setOpenMessageDisplayMonitor,io as setStorageFlusher,ro as setStorageGetter,ao as setStorageRemover,oo as setStorageSetter,br as setSuccessMessageDisplayMonitor,xr as setWarnMessageDisplayMonitor,Ar as setWarningMessageDisplayMonitor,Fr as showErrorMessage,Er as showInfoMessage,Dr as showOpenMessage,Br as showRuntimeError,Pr as showSimpleErrorMessage,Cr as showSimpleInfoMessage,Mr as showSimpleOpenMessage,Yr as showSimpleRuntimeError,Ir as showSimpleSuccessMessage,jr as showSimpleWarnMessage,Nr as showSimpleWarningMessage,Or as showSuccessMessage,kr as showWarnMessage,Tr as showWarningMessage,Rt as size,Wr as sleep,Gt as sortBy,Gr as sortCollectionByKey,De as sortOperate,Mt as sortedUnique,Dt as split,Pt as startsWith,zn as statisticsCache,Qn as takeCache,qe as to,Ke as toBoolean,Ue as toBoundary,Je as toDatetime,Ge as toLower,Ye as toMd5,We as toMoney,He as toNumber,Le as toPercentage,Ve as toPromise,ze as toRound,Fe as toSha1,Re as toString,Qe as toUpper,Vr as transformData,Jr as transformListData,Te as transparentImage,Bt as trim,wo as trySendNearestLocalhostNotify,pe as underlyingExtensionState,ve as underlyingState,Yt as uniqBy,Ee as whetherNumber,Ce as whetherString,be as zeroInt,we as zeroString};
|
package/es/utils/constants.d.ts
CHANGED
|
@@ -52,6 +52,12 @@ export function logInfo(data: string | Object, ancillaryInformation?: string): v
|
|
|
52
52
|
* @param {String} ancillaryInformation when ancillary Information not empty, it will be display
|
|
53
53
|
*/
|
|
54
54
|
export function logConfig(data: string | Object, ancillaryInformation?: string): void;
|
|
55
|
+
/**
|
|
56
|
+
* Log stack message, default ancillaryInformation is empty string
|
|
57
|
+
* @param {String|Object} data the data will be display
|
|
58
|
+
* @param {String} ancillaryInformation when ancillary Information not empty, it will be display
|
|
59
|
+
*/
|
|
60
|
+
export function logStack(data: string | Object, ancillaryInformation?: string): void;
|
|
55
61
|
/**
|
|
56
62
|
* Log trace message, default ancillaryInformation is empty string
|
|
57
63
|
* @param {String|Object} data the data will be display
|
|
@@ -119,4 +125,5 @@ export namespace logColorCollection {
|
|
|
119
125
|
const trace: string;
|
|
120
126
|
const error: string;
|
|
121
127
|
const exception: string;
|
|
128
|
+
const stack: string;
|
|
122
129
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-soft-utility",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "easy-soft-utility",
|
|
6
6
|
"keywords": [
|
|
@@ -123,5 +123,5 @@
|
|
|
123
123
|
"stylelint-declaration-block-no-ignored-properties": "^2.6.0",
|
|
124
124
|
"webpack": "^5.75.0"
|
|
125
125
|
},
|
|
126
|
-
"gitHead": "
|
|
126
|
+
"gitHead": "07b46b2bdf935b3bdcd4f05ed443752c18cbc160"
|
|
127
127
|
}
|