util-helpers 5.5.0 → 5.5.1

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,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).utilHelpers={})}(this,(function(e){"use strict";var t=void 0,n="undefined",r="object",o=Object.prototype,i=o.toString,a=o.hasOwnProperty,c=o.propertyIsEnumerable,u=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,f=Object.keys,l=Function.prototype.toString,d=typeof Symbol!==n?Symbol.prototype:t,p=Math.min,v=Math.max,h=Math.random,m=Math.floor,g=Math.ceil,y=Number.isFinite,b=typeof globalThis===r&&globalThis,w=typeof global===r&&global,x=typeof self===r&&self,j=Number.MAX_SAFE_INTEGER||9007199254740991,O=Number.MIN_SAFE_INTEGER||-9007199254740991,N=["Function","AsyncFunction","GeneratorFunction","Proxy"].map((function(e){return"[object "+e+"]"}));function E(e){return Array.isArray(e)}function C(e){return null!==e&&"object"==typeof e}function A(e){return"function"==typeof e||C(e)}function k(e){return i.call(e)}function F(e){return"symbol"==typeof e||"[object Symbol]"===k(e)}var T=/^0b[01]+$/i,S=/^0o[0-7]+$/i,P=/^[-+]0x[0-9a-f]+$/i;function M(e){if("number"==typeof e)return e;if(F(e))return NaN;if(A(e)&&(e=Number(e)),"string"!=typeof e)return 0===e?e:+e;e=e.trim();var t=T.test(e);return t||S.test(e)?parseInt(e.slice(2),t?2:8):P.test(e)?NaN:+e}function _(e){return e}function R(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=j}(e.length)&&!function(e){if("function"==typeof e)return!0;var t=k(e);return N.some((function(e){return e===t}))}(e)}function B(e){return e?(e=M(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function I(e,t){void 0===e&&(e=0),void 0===t&&(t=1),e=B(e),t=B(t);var n=g(p(e,t)||0),r=m(v(e,t)||0);if(n>r){var o=n;n=r,r=o}return m(n+h()*(r-n+1))}function L(e){return A(e)?f(e).concat(function(e){return u&&null!==e?u(e).filter((function(t){return c.call(e,t)})):[]}(e)):[]}var $,z=($=1,function(e,t){void 0===t&&(t=_);for(var n=!R(e)&&L(e),r=(n||e).length,o=0;o>=0&&o<r;){var i=n?n[o]:o;if(!1===t(e[i],i,e))break;o+=$}return e});function U(e){return"number"==typeof e||"[object Number]"===k(e)}var V=d?d.toString:t;function D(e){if("string"==typeof e)return e;if(E(e))return""+e.map(D);if(F(e))return V?V.call(e):"";var t=""+e;return"0"===t&&1/e==-1/0?"-0":t}function K(e){return function(e){return null==e}(e)?"":D(e)}var Z=typeof Blob!==n;function W(e){return!!(Z&&e instanceof Blob)||"[object Blob]"===k(e)}var H=l.call(Object);function X(e){if(!C(e)||"[object Object]"!==k(e))return!1;var t=s(Object(e));if(null===t)return!0;var n=a.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)===H}var q=typeof File!==n;var G=b&&globalThis.Object===Object&&globalThis,J=w&&global.Object===Object&&global,Q=x&&self.Object===Object&&self,Y=G||J||Q||Function("return this")();function ee(e){return U(e)&&Y.isNaN(e)}function te(e){return A(e)&&"function"==typeof e.then}function ne(e){return"string"==typeof e||"[object String]"===k(e)}function re(e,t,n){void 0===n&&(n=0);var r=Math[e];if(t=M(t),n=p(function(e){var t=M(e);if(!t||t===1/0||t===-1/0)return t==t?t:0;var n=t%1;return n?t-n:t}(n),292),0===n||!function(e){return y?y(e):"number"==typeof e&&Y.isFinite(e)}(t))return r(t);var o=K(t).split("e");return+((o=K(t=r(+(o[0]+"e"+(o[1]?+o[1]+n:n)))).split("e"))[0]+"e"+(o[1]?+o[1]-n:-n))}function oe(e,t){return re("round",e,t)}var ie=function(e,t){return ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ie(e,t)};var ae=function(){return ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ae.apply(this,arguments)};function ce(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function ue(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function se(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function fe(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var le=function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{var o=e.apply(void 0,fe([],se(n),!1));return te(o)?o.then((function(e){return[null,e]})).catch((function(e){return[e,t]})):[null,o]}catch(e){return[e,t]}}},de=0;h().toString(36).substring(2,4);var pe=/^1[3456789]\d{9}$/;var ve=/^(0\d{2,3}-)?([2-9]\d{6,7})(-\d{1,6})?$/;var he=/^\d{6}$/;var me=/^[1-9]\d{5}(19|20)?\d{2}((0[1-9])|(1[012]))(([0-2][1-9])|10|20|30|31)\d{3}(\d|X)?$/i;var ge=/^[\da-z]+([-._]?[\da-z]+)*@[\da-z]+([-.]?[\da-z]+)*(\.[a-z]{2,})+$/i;var ye=/^[1-9]\d{4,10}$/;var be=/^[a-z]([-_a-z0-9]{5,19})+$/i;var we=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})|([A-Z0-9]{5}[DF])|([DF][A-Z0-9]{5}))$/;var xe=/^[1-9]\d{9,20}$/,je=/^\d{8,30}$/;var Oe=/^[\dA-HJ-NPQRTUWXY]{2}\d{6}[\dA-HJ-NPQRTUWXY]{10}$/,Ne="0123456789ABCDEFGHJKLMNPQRTUWXY".split("");var Ee={disableWarning:!0};function Ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];Ee.disableWarning||console.warn.apply(void 0,e)}var Ae=/\d/,ke=/[a-z]/,Fe=/[A-Z]/,Te=/[\d|a-z]/gi;function Se(e){return e.indexOf("\\x")>-1||e.indexOf("\\u")>-1}function Pe(e,t){void 0===t&&(t={});var n=t.level,r=void 0===n?2:n,o=t.ignoreCase,i=void 0!==o&&o,a=t.special,c=void 0===a?"\\x21-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\x7E":a,u=e;"string"!=typeof e&&(Ce("[validatePassword] value must be a string."),u="");var s=0,f=Ae.test(u),l=ke.test(u),d=Fe.test(u),p=function(e,t){if(!t||!e)return!1;var n=e.replace(Te,"");if(!n)return!1;var r=Se(t)?new RegExp("[".concat(t,"]")):null;if(r)return r.test(n);var o=!1;return n.split("").some((function(e){return t.indexOf(e)>-1&&(o=!0),o})),o}(u,c),v=function(e,t){if(!e)return!1;var n=e.replace(Te,"");if(!n)return!1;if(!t)return!0;var r=Se(t)?new RegExp("[^".concat(t,"]")):null;if(r)return r.test(n);var o=!1;return n.split("").some((function(e){return-1===t.indexOf(e)&&(o=!0),o})),o}(u,c);return f&&(s+=1),i?(l||d)&&(s+=1):(l&&(s+=1),d&&(s+=1)),p&&(s+=1),{validated:s>=r&&!v,level:s,containes:{number:f,lowerCaseLetter:l,upperCaseLetter:d,specialCharacter:p,unallowableCharacter:v}}}var Me=/^((e[\da-z])|(de)|(se)|(pe)|([khm][\da-z]))[\da-z]{7}$/i;var _e,Re="undefined"!=typeof URL,Be=void 0,Ie=Object.keys,Le=Object.values,$e=Re?URL.createObjectURL:(_e="",function(){return _e}),ze=Re?URL.revokeObjectURL:function(){},Ue={chineseBasic:"[一-龥]",chineseExtend:"[麦-鿿]",chineseExtend2:"[豈-龎]",chineseExtendA:"[㐀-䶿]",chineseExtendB:"[𠀀-𪛟]",chineseExtendC:"[𪜀-𫜸]",chineseExtendD:"[𫝀-𫠝]",chineseExtendE:"[𫠠-𬺡]",chineseExtendF:"[𬺰-𮯠]",chineseExtendG:"[𰀀-𱍊]",chineseExtendH:"[𱍐-𲎯]",chineseExtendI:"[𮯰-𮹝]"},Ve=Ue.chineseBasic+"+",De="^"+Ue.chineseBasic+"+$",Ke="(?:"+Le(Ue).join("|")+")",Ze=Ke+"+",We="^"+Ke+"+$",He=RegExp.prototype.hasOwnProperty("unicode");var Xe=/^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;var qe=/^((([0-9A-F]{1,4}:){7}([0-9A-F]{1,4}|:))|(([0-9A-F]{1,4}:){6}(:[0-9A-F]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3})|:))|(([0-9A-F]{1,4}:){5}(((:[0-9A-F]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3})|:))|(([0-9A-F]{1,4}:){4}(((:[0-9A-F]{1,4}){1,3})|((:[0-9A-F]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(([0-9A-F]{1,4}:){3}(((:[0-9A-F]{1,4}){1,4})|((:[0-9A-F]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(([0-9A-F]{1,4}:){2}(((:[0-9A-F]{1,4}){1,5})|((:[0-9A-F]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(([0-9A-F]{1,4}:){1}(((:[0-9A-F]{1,4}){1,6})|((:[0-9A-F]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(:(((:[0-9A-F]{1,4}){1,7})|((:[0-9A-F]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:)))(%.+)?$/i;var Ge="localhost|(([^\\s:\\/]+?\\.)+?[^\\s:\\/]+)",Je=":\\d+",Qe="\\/.*",Ye="\\?.*",et=new RegExp("^".concat("[\\w-.]+:\\/\\/","(?:").concat("[-;:&=\\+\\$,\\w]+@",")?(?:").concat(Ge,")(?:").concat(Je,")?(?:").concat(Qe,")*(?:").concat(Ye,")?(?:").concat("#.*",")?$")),tt=new RegExp("^(?:".concat(Ge,")(?:").concat(Je,")?(?:").concat(Qe,")*(?:").concat(Ye,")?(?:").concat("#.*",")?$"));function nt(e){var t=K(e);return et.test(t)||tt.test(t)}var rt=/^\d{15}$/;var ot=/^[hm]{1}([0-9]{10}|[0-9]{8})$/i;var it=/^\d{8}$/i,at=/^[\da-z]{10,12}$/i;var ct=/^[A-Z]{6}[A-Z\d]{2}(?:[A-Z\d]{3})?$/;function ut(e,t){var n;return void 0===t&&(t=!1),"number"==typeof(n=t?"string"==typeof e&&""!==e?Number(e):e:"number"==typeof e?e:F(e)?Number.NaN:Number(e))&&!ee(n)}var st=/^[-+]?0[b|o|x]\d+/i,ft=/^\.\d+/;function lt(e){var t;return ne(e)?""===(t=e.trim())?t=Number(t):st.test(t)||ft.test(t)?t=M(t):ee(Number(t))&&(t=Number.NaN):t=F(e)?Number.NaN:U(e)?e:Number(e),ee(t)?Number.NaN:t}function dt(e,t){return void 0===t&&(t=12),+parseFloat(e.toPrecision(t))}function pt(e){var t=e.toString().split(/e/i),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function vt(e){var t=String(e);if(!function(e){return/\d+\.?\d*e[+-]*\d+/i.test(e)}(t))return Number(t.replace(".",""));var n=pt(e);return n>0?dt(+e*Math.pow(10,n)):+e}function ht(e){(+e>j||+e<O)&&Ce("".concat(e," is beyond boundary when transfer to integer, the results may not be accurate"))}var mt,gt,yt,bt=["零","一","二","三","四","五","六","七","八","九"],wt=["","十","百","千"],xt=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],jt=["","拾","佰","仟"];function Ot(e){for(var t="",n="",r=!1,o=0;e>0;){var i=e%10;0==i?r&&(r=!1,n=mt[i]+n):(r=!0,t=mt[i],n=(t+=gt[o])+n),o++,e=Math.floor(e/10)}return n}function Nt(e){for(var t=e+"",n="",r=0,o=t.length;r<o;r++)n+=mt[parseInt(t[r])];return n}function Et(e,t){void 0===t&&(t={});var n=t.spaceMark,r=void 0===n?" ":n,o=t.precision,i=void 0===o?2:o,a="number"!=typeof e?Number(e):e;if(0===a||ee(a))return"0".concat(r,"B");var c=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],u=Math.floor(Math.log(a)/Math.log(1024));return c[u]?"".concat(Number((a/Math.pow(1024,u)).toFixed(i))).concat(r).concat(c[u]):a+""}var Ct=/^(\d{2})(\d{2})(\d{2})((?:\d{2})?\d{2})(\d{2})(\d{2})\d{2}(\d)(?:\d|X)?$/i,At=[["11","北京市"],["12","天津市"],["13","河北省"],["14","山西省"],["15","内蒙古自治区"],["21","辽宁省"],["22","吉林省"],["23","黑龙江省"],["31","上海市"],["32","江苏省"],["33","浙江省"],["34","安徽省"],["35","福建省"],["36","江西省"],["37","山东省"],["41","河南省"],["42","湖北省"],["43","湖南省"],["44","广东省"],["45","广西壮族自治区"],["46","海南省"],["50","重庆市"],["51","四川省"],["52","贵州省"],["53","云南省"],["54","西藏自治区"],["61","陕西省"],["62","甘肃省"],["63","青海省"],["64","宁夏回族自治区"],["65","新疆维吾尔自治区"],["71","台湾省"],["83","台湾省"],["81","香港特别行政区"],["82","澳门特别行政区"]];var kt=function(e,t,n){if(void 0===n&&(n=!0),X(e)){var r={};return z(e,(function(e,o){var i=n&&(X(e)||E(e))?kt(e,t):t(e,o);r[o]=i})),r}if(E(e)){var o=[];return z(e,(function(e,r){var i=n&&(X(e)||E(e))?kt(e,t):t(e,r);o.push(i)})),o}return e};function Ft(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=void 0===e[1]?1:e[1],o=e.slice(2);if(o.length>0)return Ft.apply(void 0,[Ft(n,r)].concat(o));if(n=lt(n),r=lt(r),ee(n)||ee(r))return Number.NaN;var i=vt(n),a=vt(r),c=pt(n)+pt(r),u=i*a;return ht(u),u/Math.pow(10,c)}function Tt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=void 0===e[1]?1:e[1],o=e.slice(2);if(o.length>0)return Tt.apply(void 0,[Tt(n,r)].concat(o));if(n=lt(n),r=lt(r),ee(n)||ee(r))return Number.NaN;var i=vt(n),a=vt(r);return ht(i),ht(a),Ft(i/a,dt(Math.pow(10,pt(r)-pt(n))))}function St(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=void 0===e[1]?0:e[1],o=e.slice(2);if(o.length>0)return St.apply(void 0,[St(n,r)].concat(o));if(n=Math.abs(oe(n)),r=Math.abs(oe(r)),ee(n)||ee(r))return Number.NaN;if(0===n&&0===r)return 0;if(0===n)return r;if(0===r)return n;var i=r;for(n<r&&(i=n,n=r,r=i);i;)i=n%r,n=r,r=i;return M(n)}function Pt(e,t){var n=t||{},r=n.method,o=void 0===r?"get":r,i=n.data,a=void 0===i?null:i,c=n.timeout,u=n.headers,s=n.withCredentials,f=void 0!==s&&s,l=n.async,d=void 0===l||l,p=n.user,v=void 0===p?null:p,h=n.password,m=void 0===h?null:h,g=n.responseType,y=n.onReadyStateChange,b=n.onLoadStart,w=n.onProgress,x=n.onAbort,j=n.onTimeout,O=n.onError,N=n.onLoad,E=n.onLoadEnd;return new Promise((function(t,n){var r=new XMLHttpRequest;r.open(o.toLowerCase(),e,d,v,m),y&&(r.onreadystatechange=y),"number"==typeof c&&c>0&&(r.timeout=c),r.withCredentials=f,g&&(r.responseType=g),"object"==typeof u&&Ie(u).map((function(e){r.setRequestHeader(e,u[e])}));var i,s=function(e){return function(t){n(t),null==e||e.call(r,t)}},l={loadstart:b,progress:w,abort:s(x),timeout:s(j),error:s(O),load:(i=N,function(e){t(e),null==i||i.call(r,e)}),loadend:E};Ie(l).map((function(e){var t=l[e];t&&r.addEventListener(e,t)})),r.send(a)}))}function Mt(e){return!(!C(e)||!ne(e.name))}function _t(e){return ne(e)&&e.indexOf(".")>0?"."+(n=e.split("."),void 0===(r=-1)&&(r=0),R(n)?n[r+=r<0?n.length:0]:t):"";var n,r}function Rt(e,t){var n,r,o=function(e){return!!(q&&e instanceof File)||"[object File]"===k(e)}(e);if(!o&&!Mt(e))return!1;if(ne(t)||(t=K(t)),!(t=t.trim())||"*"===t)return!0;var i=!1,a=t.toLowerCase().split(/,(?:\s+)?/),c=(e.name||!o&&(e.fileName||(null===(n=e.originFileObj)||void 0===n?void 0:n.name))||"").toLowerCase(),u=e.type||!o&&(null===(r=e.originFileObj)||void 0===r?void 0:r.type)||"",s=!o&&e.url||"";return a.some((function(e){if("*"===e||u===e||0===e.indexOf(".")&&(_t(c)===e||_t(s)===e))i=!0;else if(e.includes("/*")&&u.includes("/")){var t=e.match(/(.*)\/\*/),n=u.split("/")[0];t&&t[1]===n&&(i=!0)}return i})),i}var Bt=[200,304];function It(e,t){return new Promise((function(n,r){W(e)?n(e):Pt(e,ae({responseType:"blob"},t)).then((function(t){var o=t.target.status;if(-1!==Bt.indexOf(o))n(t.target.response);else{var i=new Error("The file does not support get requests, responseStatus ".concat(o,", '").concat(e,"'."));console.error(i),r(i)}})).catch((function(e){console.error(new Error("Failed to request file. ".concat(e))),r(e)}))}))}function Lt(e){return new Promise((function(t,n){var r=W(e),o=r?$e(e):e,i=new Image;r||(i.crossOrigin="anonymous"),i.onload=function(){t(i)},i.onerror=function(t){r&&ze(o),console.error("[loadImage] The image load failed, '".concat(e,"'.")),n(t)},i.src=o}))}function $t(e,t){return It(e,t).then((function(e){return Lt(e).then((function(t){return{blob:e,image:t}}))}))}function zt(e){for(var t=e.split(","),n=t[0].substring(5).split(";"),r=n[0],o=(-1!==n.indexOf("base64")?atob:decodeURIComponent)(t[1]),i=o.length,a=new Uint8Array(i);i--;)a[i]=o.charCodeAt(i);return new Blob([a],{type:r})}function Ut(e,t){void 0===t&&(t="");var n=document.createElement("a");n.href=e,n.style.display="none",n.setAttribute("download",t),n.addEventListener("click",(function e(t){t.stopPropagation(),n.removeEventListener("click",e)})),document.body.appendChild(n),n.click(),document.body.removeChild(n)}var Vt={arrayBuffer:"readAsArrayBuffer",binaryString:"readAsBinaryString",dataURL:"readAsDataURL",text:"readAsText"},Dt={image:"image/*,.jpeg,.jpg,.gif,.bmp,.png,.webp,.svg,.apng,.avif,.ico,.tif,.tiff",audio:"audio/*,.mp3,.wav,.aac,.flac",video:"video/*,.mp4,.webm,.ogg,.mov",pdf:"application/pdf,.pdf",word:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,.doc,.docx",excel:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,.xls,.xlsx"};var Kt=[["text/plain",["txt"]],["text/css",["css"]],["text/html",["htm","html"]],["text/javascript",["js","mjs"]],["text/csv",["csv"]],["text/markdown",["md","markdown"]],["image/gif",["gif"]],["image/jpeg",["jpg","jpeg","jfif","pjpeg","pjp"]],["image/png",["png"]],["image/svg+xml",["svg"]],["image/webp",["webp"]],["image/apng",["apng"]],["image/avif",["avif"]],["image/bmp",["bmp"]],["image/x-icon",["ico","cur"]],["image/tiff",["tif","tiff"]],["application/xml",["xml"]],["application/zip",["zip"]],["application/pdf",["pdf"]],["application/json",["json"]],["application/yaml",["yaml","yml"]],["application/vnd.openxmlformats-officedocument.wordprocessingml.document",["doc","docx"]],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",["xls","xlsx"]],["audio/mp3",["mp3"]],["audio/wav",["wav"]],["audio/aac",["aac"]],["audio/flac",["flac"]],["video/mp4",["mp4"]],["video/ogg",["ogg"]],["video/webm",["webm"]],["video/quicktime",["mov"]]];var Zt="abcdefghijklmnopqrstuvwxyz",Wt={number:"0123456789",lower:Zt,upper:Zt.toUpperCase()},Ht=Wt.number+Wt.lower+Wt.upper;function Xt(e,t,n){for(void 0===n&&(n="");e-- >0;){return Xt(e,t,n+t[I(0,t.length-1)])}return n}function qt(e,t){var n=t.childrenField,r=void 0===n?"children":n,o=t.emptyChildrenValue,i=void 0===o?"none":o;e.forEach((function(e){e[r].length<=0?"null"===i?e[r]=null:delete e[r]:qt(e[r],t)}))}function Gt(e,t,n,r){void 0===r&&(r=[]);var o=[];return E(e)&&z(e,(function(e){if(r.push(e),t(e))return o=r,!1;if(A(e)){var i=e[n];if(E(i)&&i.length>0){var a=Gt(i,t,n,r);if(a.length>0)return o=a,!1}}r.pop()})),o}var Jt=function(){function e(){this.handlers={}}return e.prototype.eventNames=function(){var e,t=(null===(e=Object.getOwnPropertySymbols)||void 0===e?void 0:e.call(Object,this.handlers))||[];return Object.keys(this.handlers).concat(t)},e.prototype.rawListeners=function(e){var t=this.handlers[e];return t?t.map((function(e){return e.raw})):[]},e.prototype.listeners=function(e){var t=this.handlers[e];return t?t.map((function(e){return e.wrap})):[]},e.prototype.hasListener=function(e,t){return this.rawListeners(e).some((function(e){return e===t}))},e.prototype._on=function(e,t,n,r,o){void 0===r&&(r=null),void 0===o&&(o=1);var i={raw:t,wrap:n,context:r};if(this.handlers[e]){var a=1===o?"push":"unshift";this.handlers[e][a](i)}else this.handlers[e]=[i];return this},e.prototype.prependListener=function(e,t,n){return this._on(e,t,t,n,0)},e.prototype.on=function(e,t,n){return this._on(e,t,t,n)},e.prototype._wrapOnce=function(e,t,n){var r=this;void 0===n&&(n=null);var o=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];t.apply(n,i),r.off(e,o)};return o},e.prototype.once=function(e,t,n){var r=this._wrapOnce(e,t,n);return this._on(e,t,r,n)},e.prototype.prependOnceListener=function(e,t,n){var r=this._wrapOnce(e,t,n);return this._on(e,t,r,n,0)},e.prototype.off=function(e,t){var n=this.handlers[e];if(n)if(t){var r=n.findIndex((function(e){return e.wrap===t||e.raw===t}));-1!==r&&n.splice(r,1)}else delete this.handlers[e];return this},e.prototype.offAll=function(){return this.handlers={},this},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.handlers[e];return!!(r&&r.length>0)&&(r.forEach((function(e){e.wrap.apply(e.context,t)})),!0)},e}(),Qt={},Yt=function(){function e(e){void 0===e&&(e="default"),this.scope=e,Qt[this.scope]||(Qt[this.scope]={}),this.data=Qt[this.scope]}return e.prototype.getItem=function(e){return e in this.data?this.data[e]:null},e.prototype.setItem=function(e,t){this.data[e]=t},e.prototype.removeItem=function(e){delete this.data[e]},e.prototype.clear=function(){Qt[this.scope]={},this.data=Qt[this.scope]},e}();function en(e){try{var t="object"==typeof e&&null!==e&&!!e.setItem&&!!e.getItem&&!!e.removeItem;if(t){var n=Math.random().toString(16).substring(2,8)+(new Date).getTime();if(e.setItem(n,"1"),"1"!==e.getItem(n))return!1;e.removeItem(n)}return t}catch(t){return console.error("[cache2] ".concat(e," is not supported. The default memory cache will be used.")),!1}}var tn=function(){function e(e,t){void 0===t&&(t={});var n=!!e&&en(e);this.options=ae({needParsed:n,prefix:""},t),this.storage=n?e:new Yt(this.options.memoryScope)}return e.prototype.getKey=function(e){return this.options.prefix+e},e.prototype.get=function(e){var t=this.storage.getItem(this.getKey(e));return this.options.needParsed?function(e,t){try{return JSON.parse(e,t)}catch(t){return e}}(t,this.options.reviver):t},e.prototype.set=function(e,t){this.storage.setItem(this.getKey(e),this.options.needParsed?function(e,t){return JSON.stringify(e,t)}(t,this.options.replacer):t)},e.prototype.del=function(e){this.storage.removeItem(this.getKey(e))},e.prototype.clear=function(){"function"==typeof this.storage.clear&&this.storage.clear()},e}(),nn="default",rn=function(e){function t(t,n){var r,o=e.call(this)||this,i=nn;return"string"==typeof t?i=t||nn:"object"==typeof t&&(r=t),r||"object"!=typeof n||(r=n),o.options=ae({max:-1,stdTTL:0,maxStrategy:"limited",checkperiod:0,prefix:"cache2_"},r),o.storage=new tn(o.options.storage,ae({memoryScope:i},o.options)),o.cacheKey=i,o.startCheckperiod(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ie(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype._check=function(e,t){var n=!0;return 0!==t.t&&t.t<Date.now()&&(n=!1,this.del(e),this.emit("expired",e,t.v)),n},t.prototype._wrap=function(e,t){var n=Date.now(),r="number"==typeof t?t:this.options.stdTTL;return{v:e,t:r>0?n+r:0,n:n}},t.prototype._isLimited=function(e){return this.options.max>-1&&e>=this.options.max},t.prototype._getReplaceKey=function(e,t){var n=e[0];return e.forEach((function(e){(t[e].t<t[n].t||t[e].t===t[n].t&&t[e].n<t[n].n)&&(n=e)})),n},Object.defineProperty(t.prototype,"cacheValues",{get:function(){return this.storage.get(this.cacheKey)||{}},enumerable:!1,configurable:!0}),t.prototype.setCacheValues=function(e){this.storage.set(this.cacheKey,e)},t.prototype.get=function(e){var t=this.cacheValues[e];if(t&&this._check(e,t))return t.v},t.prototype.mget=function(e){var t=this,n={};if(!Array.isArray(e))return n;var r=this.cacheValues;return e.forEach((function(e){var o=r[e];o&&t._check(e,o)&&(n[e]=o.v)})),n},t.prototype.getAll=function(){var e=Object.keys(this.cacheValues);return this.mget(e)},t.prototype.set=function(e,t,n){if(0===this.options.max)return!1;var r=this.cacheValues,o=Object.keys(r);if(!r[e]&&this._isLimited(o.length)){var i=this.keys();if(this._isLimited(i.length)){if("replaced"!==this.options.maxStrategy)return!1;var a=this._getReplaceKey(i,r);this.del(a)}}return r[e]=this._wrap(t,n),this.setCacheValues(r),this.emit("set",e,r[e].v),!0},t.prototype.mset=function(e){var t=this,n=!0;return e.forEach((function(e){var r=t.set(e.key,e.value,e.ttl);n&&!r&&(n=!1)})),n},t.prototype.del=function(e){var t=this,n=this.cacheValues,r=0;return(Array.isArray(e)?e:[e]).forEach((function(e){if(n[e]){r++;var o=n[e];delete n[e],t.emit("del",e,o.v)}})),r>0&&this.setCacheValues(n),r},t.prototype.clear=function(){this.storage.del(this.cacheKey)},t.prototype.keys=function(){var e=this,t=this.cacheValues;return Object.keys(t).filter((function(n){return e._check(n,t[n])}))},t.prototype.has=function(e){var t=this.cacheValues[e];return!(!t||!this._check(e,t))},t.prototype.take=function(e){var t,n=this.cacheValues[e];return n&&this._check(e,n)&&(t=n.v,this.del(e)),t},t.prototype.ttl=function(e,t){var n=this.cacheValues,r=n[e];return!(!r||!this._check(e,r))&&(n[e]=this._wrap(r.v,t),!0)},t.prototype.getTtl=function(e){var t=this.cacheValues,n=t[e];if(n&&this._check(e,n))return t[e].t},t.prototype.getLastModified=function(e){var t=this.cacheValues,n=t[e];if(n&&this._check(e,n))return t[e].n},t.prototype.startCheckperiod=function(){var e=this;this.keys(),this.options.checkperiod>0&&(clearTimeout(this._checkTimeout),this._checkTimeout=setTimeout((function(){e.startCheckperiod()}),this.options.checkperiod))},t.prototype.stopCheckperiod=function(){clearTimeout(this._checkTimeout)},t}(Jt),on=function(){function e(e){this.promiseCache={},this.cache=new rn(""+"uh_async_memo"+ ++de,e)}return e.prototype.run=function(e,t,n){var r=this;if(!t||!ne(t))return e();var o=ae({persisted:!0},n);if(o.persisted){var i=this.cache.get(t);if(i)return Promise.resolve(i)}return this.promiseCache[t]||(this.promiseCache[t]=e().then((function(e){return delete r.promiseCache[t],r.cache.set(t,e,o.ttl),e})).catch((function(e){return delete r.promiseCache[t],Promise.reject(e)}))),this.promiseCache[t]},e}();e.AsyncMemo=on,e.VERSION="5.5.0",e.ajax=Pt,e.bytesToSize=Et,e.calculateCursorPosition=function(e,t,n,r,o){void 0===o&&(o={});var i=o.placeholderChar,a=void 0===i?" ":i,c=o.maskReg,u=void 0===c?/\D/g:c,s=o.type,f=K(t),l=K(n),d=E(a)?a:[a],p=l.length-f.length,v=e;if(p>0){var h=l.substring(v-p,v).replace(u,"").length;v-=p-h;for(var m=0;h>0;)-1!==d.indexOf(r.charAt(v-h+m))?m++:h--;v+=m}return("mobile"===s&&(4===v||9===v)||"bankCard"===s&&v>0&&v%5==0)&&(v-=1),v},e.checkFileType=Rt,e.checkResult=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ce(void 0,fe([],se(e),!1),void 0,(function(e){var t,n,r,o;void 0===e&&(e=function(){return!0});var i=[];for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];return ue(this,(function(t){switch(t.label){case 0:return[4,le(e).apply(void 0,fe([],se(i),!1))];case 1:return n=se.apply(void 0,[t.sent(),2]),r=n[0],o=n[1],[2,!r&&!1!==o]}}))}))},e.compressImage=function(e,t){return void 0===t&&(t={}),new Promise((function(n,r){var o=t.width,i=t.height,a=t.rotate,c=t.offset,u=void 0===c?[0,0]:c,s=t.background,f=void 0===s?"#fff":s,l=t.canvasWidth,d=t.canvasHeight,p=t.format,v=void 0===p?"blob":p,h=t.type,m=void 0===h?"image/jpeg":h,g=t.quality,y=void 0===g?.8:g,b=t.beforeCompress,w=t.beforeDraw,x=t.afterDraw,j=t.ajaxOptions;$t(e,j).then((function(e){var c=e.image,s=e.blob,p=M(o),h=M(i),g=M(y);p&&(c.width=p),h&&(c.height=h),null==b||b({image:c,blob:s},t);var j=document.createElement("canvas"),O=j.getContext("2d"),N={image:c,blob:s,canvas:j,context:O},E=M("function"==typeof l?l(N,t):l),C=M("function"==typeof d?d(N,t):d);j.width=E||c.width,j.height=C||c.height;var A="none"===f||"transparent"===f;A?O.clearRect(0,0,j.width,j.height):(O.fillStyle=f,O.fillRect(0,0,j.width,j.height));var k=[0,0];a!==Be&&(O.translate(c.width/2,c.height/2),k=[-c.width/2,-c.height/2],O.rotate(a*Math.PI/180));var F="function"==typeof u?u(N,t):u;null==w||w(N,t);var T=k[0]+M(F[0]),S=k[1]+M(F[1]);O.drawImage(c,T,S,c.width,c.height),"image/png"===m&&A&&(O.globalCompositeOperation="destination-in",O.drawImage(c,T,S,c.width,c.height)),null==x||x(N,t),"blob"===v?function(e,t,n){return new Promise((function(r){e.toBlob((function(e){r(e)}),t,n)}))}(j,m,g).then(n).catch(r):n(j.toDataURL(m,g))})).catch(r)}))},e.dataURLToBlob=zt,e.divide=Tt,e.download=function e(t,n){return ce(this,void 0,void 0,(function(){var r,o,i,a,c,u,s,f,l,d,p,v,h;return ue(this,(function(m){switch(m.label){case 0:return r="object"==typeof n?n:{},"string"==typeof n&&(r.fileName=n),o=r.fileName,i=r.type,a=r.dataType,c=r.transformRequest,u=r.transformResponse,"string"!=typeof t?[3,8]:a||!/^blob:.*?\/.*/.test(t)?[3,1]:(Ut(t,o),[2,Promise.resolve()]);case 1:return a||!/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(t)?[3,2]:(s=zt(t),[3,7]);case 2:return"url"===a||!a&&nt(t)?(f=function(e){var t="function"==typeof u?u(e):e;return te(t)?t:Promise.resolve(t)},[4,function(e){var t="function"==typeof c?c(e):e;return te(t)?t:Promise.resolve(t)}({responseType:"blob"})]):[3,6];case 3:return l=m.sent(),[4,Pt(t,l)];case 4:return d=m.sent(),[4,f(d.target.response)];case 5:return p=m.sent(),v=o||t.split("?")[0].split("#")[0].split("/").pop(),[2,e(p,{fileName:v,type:i||(W(p)?p.type:Be)})];case 6:s=new Blob([t],{type:i||"text/plain"}),m.label=7;case 7:return[3,9];case 8:t instanceof Blob&&(s=t),m.label=9;case 9:return s||(s=new Blob([t],{type:i})),navigator.msSaveBlob?navigator.msSaveBlob(s,o||"download"):(Ut(h=$e(s),o),ze(h)),[2,Promise.resolve()]}}))}))},e.fileReader=function(e,t){void 0===t&&(t="dataURL");var n=Vt[t];return n||(n=Vt.dataURL),new Promise((function(t,r){var o=new FileReader;o[n](e),o.onload=function(){return t(o.result)},o.onerror=function(e){return r(e)}}))},e.filterTree=function e(t,n,r,o){void 0===r&&(r="children"),void 0===o&&(o="spread");var i=[];return E(t)?(t.forEach((function(t){var a=t;if(A(t)&&(a="spread"===o?ae({},t):t),n(a)){if(A(a)){var c=a[r];E(c)&&c.length>0&&(a[r]=e(c,n,r,o))}i.push(a)}})),i):i},e.findTreeNode=function(e,t,n){void 0===n&&(n="children");var r,o=[];return E(e)&&z(e,(function(e){for(o.push(e);o.length;){var i=o.pop();if(t(i)){r=i;break}if(A(i)){var a=i[n];E(a)&&a.length>0&&a.forEach((function(e){o.push(e)}))}}if(r)return!1})),r},e.findTreeNodes=function(e,t,n){void 0===n&&(n="children");var r=[],o=[];return E(e)&&z(e,(function(e){for(r.push(e);r.length;){var i=r.pop();if(t(i)&&o.push(i),A(i)){var a=i[n];E(a)&&a.length>0&&a.forEach((function(e){r.push(e)}))}}})),o},e.findTreeSelect=function(e,t,n){return void 0===n&&(n="children"),Gt(e,t,n)},e.formatBankCard=function(e,t){void 0===e&&(e="");var n=t||{},r=n.spaceMark,o=void 0===r?" ":r,i=n.length,a=void 0===i?4:i,c=new RegExp("(.{".concat(a,"})"),"g"),u=new RegExp("".concat(o),"g"),s=K(e).replace(u,""),f=s.replace(c,"$1".concat(o));return s.length%a==0?f.substring(0,f.length-1):f},e.formatMobile=function(e,t){void 0===e&&(e="");var n=(t||{}).spaceMark,r=void 0===n?" ":n,o=new RegExp(r,"g"),i=K(e).replace(o,"").substring(0,11);return i.length>7?i.replace(/^(...)(....)/g,"$1".concat(r,"$2").concat(r)):i.length>3?i.replace(/^(...)/g,"$1".concat(r)):i},e.formatMoney=function(e,t){void 0===t&&(t={});var n=t.precision,r=void 0===n?2:n,o=t.symbol,i=t.thousand,a=void 0===i?",":i,c=t.decimal,u=void 0===c?".":c,s=t.strict,f=void 0===s||s;if(!function(e){return ut(e)?("number"==typeof e&&ht(e),!0):(Ce("".concat(e," invalid parameter.")),!1)}(e)||f&&(!ne(e)||""===e)&&!U(e))return"";if("number"==typeof e&&!isFinite(e))return e+"";"number"!=typeof r||ee(r)||r<0?r=2:r>10&&(r=10),o="string"==typeof o?o:"",a="string"==typeof a?a:",",u="string"==typeof u?u:".";var l=se((lt(e)+"").split("."),2),d=l[0],p=l[1];return o+function(e,t){var n,r,o="";e="+"===(e=(r=/^([+-])?(0+)([0-9.]+)$/.exec(n=e))?(r[1]||"")+("."===r[3][0]?"0"+r[3]:r[3]):n)[0]?e.substring(1):e;for(var i=Number(e)<0?"-":"",a=i?e.substring(1).split("").reverse():e.split("").reverse(),c=0;c<a.length;c++)o+=a[c]+((c+1)%3==0&&c+1!==a.length?t:"");return i+o.split("").reverse().join("")}(d,a)+function(e,t,n){if(0===t)return"";var r="";return r=e&&Number(e)>0?parseFloat("0."+e).toFixed(t).substring(2):(0).toFixed(t).substring(2),n+r}(p,r,u)},e.gcd=St,e.getExtname=_t,e.getFileBlob=It,e.getFileType=function(e){var t;return(W(e)||Mt(e))&&z(Dt,(function(n,r){if(Rt(e,n))return t=r,!1})),t},e.getImageInfo=function(e,t){return $t(e,t).then((function(e){var t,n,r,o=e.image,i=e.blob,a=o.width,c=o.height;return{width:a,height:c,contrast:(t=a,n=c,r=St(t,n),"".concat(Tt(oe(t),r),":").concat(Tt(oe(n),r))),measure:"".concat(a," × ").concat(c," px"),size:Et(i.size),bytes:i.size,image:o,blob:i}}))},e.getMimeType=function(e){var t,n=_t(e).slice(1).toLowerCase();return n?null===(t=Kt.find((function(e){return e[1].includes(n)})))||void 0===t?void 0:t[0]:Be},e.injectStyle=function(e,t){var n=t||{},r=n.container,o=void 0===r?document.head||document.getElementsByTagName("head")[0]||document.body:r,i=n.insertAt,a=void 0===i?"top":i,c=n.onBefore,u=document.createElement("style");u.styleSheet?u.styleSheet.cssText=e:u.appendChild(document.createTextNode(e)),"function"==typeof c&&c(u);var s="top"===a;return s&&o.prepend?o.prepend(u):s&&o.firstChild?o.insertBefore(u,o.firstChild):o.appendChild(u),u},e.isBankCard=function(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=t.luhn,i=void 0!==o&&o,a=K(e),c=r?je.test(a):xe.test(a);if(c&&i){var u=a.substring(0,a.length-1);return a[a.length-1]===String(function(e){for(var t=(e+"").replace(/\D/g,"").split("").reverse(),n=0,r=0;r<t.length;r++){var o=parseInt(t[r]);n+=r%2==0?2*o-(o>4?9:0):o}var i=n%10;return 0!==i?10-i:0}(u))}return c},e.isBusinessLicense=function(e,t){void 0===t&&(t={});var n=K(e),r=t.checkCode,o=void 0===r||r,i=rt.test(n);if(!o||!i)return i;var a=n.substring(0,14),c=n.substring(n.length-1),u=function(e){for(var t=10,n=0;n<14;n++){var r=(t+Number(e[n]))%10;t=2*(r=0===r?10:r)%11}return 1===t?0:11-t}(a);return c===String(u)},e.isChinese=function(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=t.useExtend,i=void 0!==o&&o,a=K(e),c=i&&He;return new RegExp(c?r?Ze:We:r?Ve:De,c?"u":Be).test(a)},e.isEmail=function(e){var t=K(e);return ge.test(t)},e.isHMCard=function(e){var t=K(e);return ot.test(t)},e.isIPv4=function(e){var t=K(e);return Xe.test(t)},e.isIPv6=function(e){var t=K(e);return qe.test(t)},e.isIdCard=function(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=t.checkCode,i=void 0===o||o,a=K(e);return 15===a.length&&r?me.test(a):!(18!==a.length||!me.test(a))&&(!i||function(e){var t,n;for(n=t=0;t<17;t++)n+=Math.pow(2,17-t)%11*Number(e[t]);var r=(12-n%11)%11;return r<10?r===Number(e[17]):"X"===e[17].toUpperCase()}(a))},e.isMobile=function(e){var t=K(e);return pe.test(t)},e.isPassport=function(e){var t=K(e);return Me.test(t)},e.isPassword=function(e,t){void 0===t&&(t={});var n=t.level,r=void 0===n?2:n,o=t.ignoreCase,i=void 0!==o&&o,a=t.special;return Pe(e,{level:r,ignoreCase:i,special:void 0===a?"\\x21-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\x7E":a}).validated},e.isPostcode=function(e){var t=K(e);return he.test(t)},e.isQQ=function(e){var t=K(e);return ye.test(t)},e.isSocialCreditCode=function(e,t){var n=K(e),r=(t||{}).checkCode,o=void 0===r||r,i=Oe.test(n);if(!o||!i)return i;var a=n.substring(0,17),c=n.substring(n.length-1),u=function(e){for(var t=0,n=function(n){var r=Ne.findIndex((function(t){return t===e[n]})),o=Math.pow(3,n)%31;t+=r*o},r=0;r<17;r++)n(r);var o=t%31;return Ne[0!==o?31-o:0]}(a);return c===u},e.isSwiftCode=function(e){var t=K(e);return ct.test(t)},e.isTWCard=function(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=K(e);return!!it.test(o)||!!r&&at.test(o)},e.isTelephone=function(e){var t=K(e);return ve.test(t)},e.isUrl=nt,e.isValidNumber=ut,e.isVehicle=function(e){var t=K(e);return we.test(t)},e.isWX=function(e){var t=K(e);return be.test(t)},e.lcm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map((function(e){return Math.abs(oe(e))}));return 1===n.length&&(n=n.concat([1])),Tt(n.indexOf(0)>-1?0:Ft.apply(void 0,fe([],se(n),!1)),St.apply(void 0,fe([],se(n),!1)))},e.listToTree=function(e,t){void 0===t&&(t={});var n=t.keyField,r=void 0===n?"id":n,o=t.parentField,i=void 0===o?"pid":o,a=t.childrenField,c=void 0===a?"children":a,u=t.emptyChildrenValue,s=void 0===u?"none":u,f=t.nodeAssign,l=void 0===f?"spread":f,d=[],p={};return E(e)?(e.forEach((function(e){if(A(e)){var t="spread"===l?ae({},e):e,n=t[r],o=t[i];p[n]?t[c]=p[n]:t[c]=p[n]=[],o?p[o]?p[o].push(t):p[o]=[t]:d.push(t)}})),"array"!==s&&qt(d,t),d):d},e.loadImage=Lt,e.loadImageWithBlob=$t,e.loadScript=function(e,t){return new Promise((function(n,r){var o=document.head||document.getElementsByTagName("head")[0]||document.body,i=document.createElement("script"),a=t||{},c=a.attrs,u=a.destroyOnError,s=void 0===u||u,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(a,["attrs","destroyOnError"]),l=ae(ae({async:!0,type:"text/javascript"},f),{src:e});for(var d in l)"onload"!==d&&"onerror"!==d&&(i[d]=l[d]);"object"==typeof c&&Ie(c).forEach((function(e){i.setAttribute(e,c[e])})),i.onload=function(e){var t;this.onerror=this.onload=null,null===(t=l.onload)||void 0===t||t.call(this,e),n(i)},i.onerror=function(e){var t;this.onerror=this.onload=null,null===(t=l.onerror)||void 0===t||t.call(this,e),s&&o.removeChild(i),r(new URIError("Failed to load "+this.src))},o.appendChild(i)}))},e.minus=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=void 0===t[1]?0:t[1],i=t.slice(2);if(i.length>0)return e.apply(void 0,[e(r,o)].concat(i));if(r=lt(r),o=lt(o),ee(r)||ee(o))return Number.NaN;var a=Math.pow(10,Math.max(pt(r),pt(o)));return(Ft(r,a)-Ft(o,a))/a},e.numberToChinese=function(e,t){void 0===t&&(t={});var n=t.big5,r=void 0!==n&&n,o=t.unit,i=void 0===o||o,a=t.zero,c=void 0===a?"":a,u=t.negative,s=void 0===u?"负":u,f=t.unitConfig,l=void 0===f?{}:f,d=t.decimal,p=void 0===d?"":d;if("number"!=typeof e||ee(e))return Ce("参数错误 ".concat(e,",请传入数字")),"";ht(e),r?(mt=xt.slice(),gt=jt.slice(),p=p||"點"):(mt=bt.slice(),gt=wt.slice(),p=p||"点");var v=l.w||"万",h=l.y||"亿";yt=["",v,h,v+h],c&&(mt[0]=c);var m,g=e<0?s:"",y=Math.abs(e);m=i?function(e){var t=Math.floor(e),n=0,r="",o="",i=!1;if(0===t)return mt[0];for(;t>0;){var a=t%1e4;i&&(o=mt[0]+o),r=Ot(a),o=(r+=0!==a?yt[n]:yt[0])+o,i=a<1e3&&a>0,t=Math.floor(t/1e4),n++}return o}(y):Nt(Math.floor(y));var b=function(e){var t=e+"",n=t.indexOf("."),r="";return n>-1&&(r=Nt(t.slice(n+1))),r}(y);return b?"".concat(g).concat(m).concat(p).concat(b):"".concat(g).concat(m)},e.padZero=function(e,t){void 0===t&&(t=2);var n=K(e),r=n.length;return("number"!=typeof t||t<0)&&(t=0),r<t?"0".repeat(t-r)+n:n},e.parseIdCard=function(e){var t=Ct.exec(e);if(!t)return null;var n={province:t[1],city:t[2],area:t[3],year:t[4],month:t[5],day:t[6],gender:t[7]},r=At.find((function(e){return e[0]===n.province}));if(!r)return null;var o="".concat(n.year,"-").concat(n.month,"-").concat(n.day),i=Number(n.gender)%2==0?"女":"男";return{province:r[1],birthday:o,gender:i,origin:n}},e.plus=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=void 0===t[1]?0:t[1],i=t.slice(2);if(i.length>0)return e.apply(void 0,[e(r,o)].concat(i));if(r=lt(r),o=lt(o),ee(r)||ee(o))return Number.NaN;var a=Math.pow(10,Math.max(pt(r),pt(o)));return(Ft(r,a)+Ft(o,a))/a},e.randomString=function(e,t){var n;return void 0===e&&(e=0),n="string"!=typeof t?Ht:Wt[t]?Wt[t]:t,Xt(M(e),n)},e.replaceChar=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=t.char,r=void 0===n?"*":n,o=t.exclude,i=t.start,a=void 0===i?3:i,c=t.end,u=void 0===c?-4:c,s=t.repeat,f=K(e),l=f.length;if(Math.abs(a)>=l)return f;if((a=a>=0?a:l+a)>=(u=u>=0?u:l+u))return f;var d=f.substring(a,u);if(o){var p=new RegExp("[^".concat(o,"]"),"g");d=d.replace(p,r)}else s="number"==typeof s&&s>=0?s:d.length,d=r.repeat(s);return f.substring(0,a)+d+f.substring(u)},e.round=function(e,t){return void 0===t&&(t=0),oe(e,t)},e.safeDate=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r="string"==typeof e?e.replace(/[\\.-]/g,"/"):e;return t&&t.length>0?new(Date.bind.apply(Date,fe([void 0,r],se(t),!1))):void 0===r?new Date:new Date(r)},e.setDataURLPrefix=function(e,t,n){return void 0===t&&(t="image/png"),void 0===n&&(n=!0),"data:".concat(t).concat(n?";base64":"",",").concat(e)},e.setDisableWarning=function(e){Ee.disableWarning=!!e},e.strlen=function(e){for(var t=K(e),n=0,r=0;r<t.length;r++){var o=t.charCodeAt(r);o>=1&&o<=126||65376<=o&&o<=65439?n++:n+=2}return n},e.times=Ft,e.transformFieldNames=function(e,t,n,r){return void 0===r&&(r="spread"),E(e)?e.length<=0?[]:function e(o){return o.map((function(o){if(!A(o))return o;var i="spread"===r?ae({},o):o,a=[];n&&E(i[n])&&i[n].length>0&&(i[n]=e(i[n].slice()));var c=Ie(t);return c.forEach((function(e){var n=t[e];n in i&&(i[e]=i[n],-1===c.indexOf(n)&&a.push(n))})),a.length>0&&a.forEach((function(e){delete i[e]})),i}))}(e.slice()):e},e.transformObjectValue=kt,e.treeToList=function(e,t){var n=[];return E(e)?(function e(r){r.forEach((function(r){if(A(r)){var o=ae({},r);n.push(o),o[t]&&(E(o[t])&&o[t].length>0&&e(o[t]),delete o[t])}else n.push(r)}))}(e),n):n},e.validatePassword=Pe}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).utilHelpers={})}(this,(function(e){"use strict";var t=void 0,n="undefined",r="object",o=Object.prototype,i=o.toString,a=o.hasOwnProperty,c=o.propertyIsEnumerable,u=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,f=Object.keys,l=Function.prototype.toString,d=typeof Symbol!==n?Symbol.prototype:t,p=Math.min,v=Math.max,h=Math.random,m=Math.floor,g=Math.ceil,y=Number.isFinite,b=typeof globalThis===r&&globalThis,w=typeof global===r&&global,x=typeof self===r&&self,j=Number.MAX_SAFE_INTEGER||9007199254740991,O=Number.MIN_SAFE_INTEGER||-9007199254740991,C=["Function","AsyncFunction","GeneratorFunction","Proxy"].map((function(e){return"[object "+e+"]"}));function N(e){return Array.isArray(e)}function E(e){return null!==e&&"object"==typeof e}function A(e){return"function"==typeof e||E(e)}function k(e){return i.call(e)}function F(e){return"symbol"==typeof e||"[object Symbol]"===k(e)}var T=/^0b[01]+$/i,S=/^0o[0-7]+$/i,P=/^[-+]0x[0-9a-f]+$/i;function M(e){if("number"==typeof e)return e;if(F(e))return NaN;if(A(e)&&(e=Number(e)),"string"!=typeof e)return 0===e?e:+e;e=e.trim();var t=T.test(e);return t||S.test(e)?parseInt(e.slice(2),t?2:8):P.test(e)?NaN:+e}function _(e){return e}function R(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=j}(e.length)&&!function(e){if("function"==typeof e)return!0;var t=k(e);return C.some((function(e){return e===t}))}(e)}function B(e){return e?(e=M(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function I(e,t){void 0===e&&(e=0),void 0===t&&(t=1),e=B(e),t=B(t);var n=g(p(e,t)||0),r=m(v(e,t)||0);if(n>r){var o=n;n=r,r=o}return m(n+h()*(r-n+1))}function L(e){return A(e)?f(e).concat(function(e){return u&&null!==e?u(e).filter((function(t){return c.call(e,t)})):[]}(e)):[]}var $,z=($=1,function(e,t){void 0===t&&(t=_);for(var n=!R(e)&&L(e),r=(n||e).length,o=0;o>=0&&o<r;){var i=n?n[o]:o;if(!1===t(e[i],i,e))break;o+=$}return e});function U(e){return"number"==typeof e||"[object Number]"===k(e)}var V=d?d.toString:t;function D(e){if("string"==typeof e)return e;if(N(e))return""+e.map(D);if(F(e))return V?V.call(e):"";var t=""+e;return"0"===t&&1/e==-1/0?"-0":t}function K(e){return function(e){return null==e}(e)?"":D(e)}var Z=typeof Blob!==n;function W(e){return!!(Z&&e instanceof Blob)||"[object Blob]"===k(e)}var H=l.call(Object);function X(e){if(!E(e)||"[object Object]"!==k(e))return!1;var t=s(Object(e));if(null===t)return!0;var n=a.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)===H}var q=typeof File!==n;var G=b&&globalThis.Object===Object&&globalThis,J=w&&global.Object===Object&&global,Q=x&&self.Object===Object&&self,Y=G||J||Q||Function("return this")();function ee(e){return U(e)&&Y.isNaN(e)}function te(e){return A(e)&&"function"==typeof e.then}function ne(e){return"string"==typeof e||"[object String]"===k(e)}function re(e,t,n){void 0===n&&(n=0);var r=Math[e];if(t=M(t),n=p(function(e){var t=M(e);if(!t||t===1/0||t===-1/0)return t==t?t:0;var n=t%1;return n?t-n:t}(n),292),0===n||!function(e){return y?y(e):"number"==typeof e&&Y.isFinite(e)}(t))return r(t);var o=K(t).split("e");return+((o=K(t=r(+(o[0]+"e"+(o[1]?+o[1]+n:n)))).split("e"))[0]+"e"+(o[1]?+o[1]-n:-n))}function oe(e,t){return re("round",e,t)}var ie=function(e,t){return ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},ie(e,t)};var ae=function(){return ae=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ae.apply(this,arguments)};function ce(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function c(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}u((r=r.apply(e,t||[])).next())}))}function ue(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=c(0),a.throw=c(1),a.return=c(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function c(c){return function(u){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function se(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function fe(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var le=function(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{var o=e.apply(void 0,fe([],se(n),!1));return te(o)?o.then((function(e){return[null,e]})).catch((function(e){return[e,t]})):[null,o]}catch(e){return[e,t]}}},de=0;h().toString(36).substring(2,4);var pe=/^1[3456789]\d{9}$/;var ve=/^(0\d{2,3}-)?([2-9]\d{6,7})(-\d{1,6})?$/;var he=/^\d{6}$/;var me=/^[1-9]\d{5}(19|20)?\d{2}((0[1-9])|(1[012]))(([0-2][1-9])|10|20|30|31)\d{3}(\d|X)?$/i;var ge=/^[\da-z]+([-._]?[\da-z]+)*@[\da-z]+([-.]?[\da-z]+)*(\.[a-z]{2,})+$/i;var ye=/^[1-9]\d{4,10}$/;var be=/^[a-z]([-_a-z0-9]{5,19})+$/i;var we=/^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([A-Z0-9]{4}[A-Z0-9挂学警港澳]{1})|([A-Z0-9]{5}[DF])|([DF][A-Z0-9]{5}))$/;var xe=/^[1-9]\d{9,20}$/,je=/^\d{8,30}$/;function Oe(e){for(var t=(e+"").replace(/\D/g,"").split("").reverse(),n=0,r=0;r<t.length;r++){var o=parseInt(t[r]);n+=r%2==0?2*o-(o>4?9:0):o}var i=n%10;return 0!==i?10-i:0}function Ce(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=t.luhn,i=void 0!==o&&o,a=K(e),c=r?je.test(a):xe.test(a);if(c&&i){var u=a.substring(0,a.length-1);return a[a.length-1]===String(Oe(u))}return c}Ce.sumCheckCode=Oe;var Ne=/^[\dA-HJ-NPQRTUWXY]{2}\d{6}[\dA-HJ-NPQRTUWXY]{10}$/,Ee="0123456789ABCDEFGHJKLMNPQRTUWXY".split("");function Ae(e){for(var t=0,n=function(n){var r=Ee.findIndex((function(t){return t===e[n]})),o=Math.pow(3,n)%31;t+=r*o},r=0;r<17;r++)n(r);var o=t%31;return Ee[0!==o?31-o:0]}function ke(e,t){var n=K(e),r=(t||{}).checkCode,o=void 0===r||r,i=Ne.test(n);if(!o||!i)return i;var a=n.substring(0,17);return n.substring(n.length-1)===Ae(a)}ke.sumCheckCode=Ae;var Fe={disableWarning:!0};function Te(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];Fe.disableWarning||console.warn.apply(void 0,e)}var Se=/\d/,Pe=/[a-z]/,Me=/[A-Z]/,_e=/[\d|a-z]/gi;function Re(e){return e.indexOf("\\x")>-1||e.indexOf("\\u")>-1}function Be(e,t){void 0===t&&(t={});var n=t.level,r=void 0===n?2:n,o=t.ignoreCase,i=void 0!==o&&o,a=t.special,c=void 0===a?"\\x21-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\x7E":a,u=e;"string"!=typeof e&&(Te("[validatePassword] value must be a string."),u="");var s=0,f=Se.test(u),l=Pe.test(u),d=Me.test(u),p=function(e,t){if(!t||!e)return!1;var n=e.replace(_e,"");if(!n)return!1;var r=Re(t)?new RegExp("[".concat(t,"]")):null;if(r)return r.test(n);var o=!1;return n.split("").some((function(e){return t.indexOf(e)>-1&&(o=!0),o})),o}(u,c),v=function(e,t){if(!e)return!1;var n=e.replace(_e,"");if(!n)return!1;if(!t)return!0;var r=Re(t)?new RegExp("[^".concat(t,"]")):null;if(r)return r.test(n);var o=!1;return n.split("").some((function(e){return-1===t.indexOf(e)&&(o=!0),o})),o}(u,c);return f&&(s+=1),i?(l||d)&&(s+=1):(l&&(s+=1),d&&(s+=1)),p&&(s+=1),{validated:s>=r&&!v,level:s,containes:{number:f,lowerCaseLetter:l,upperCaseLetter:d,specialCharacter:p,unallowableCharacter:v}}}var Ie=/^((e[\da-z])|(de)|(se)|(pe)|([khm][\da-z]))[\da-z]{7}$/i;var Le,$e="undefined"!=typeof URL,ze=void 0,Ue=Object.keys,Ve=Object.values,De=$e?URL.createObjectURL:(Le="",function(){return Le}),Ke=$e?URL.revokeObjectURL:function(){},Ze={chineseBasic:"[一-龥]",chineseExtend:"[麦-鿿]",chineseExtend2:"[豈-龎]",chineseExtendA:"[㐀-䶿]",chineseExtendB:"[𠀀-𪛟]",chineseExtendC:"[𪜀-𫜸]",chineseExtendD:"[𫝀-𫠝]",chineseExtendE:"[𫠠-𬺡]",chineseExtendF:"[𬺰-𮯠]",chineseExtendG:"[𰀀-𱍊]",chineseExtendH:"[𱍐-𲎯]",chineseExtendI:"[𮯰-𮹝]"},We=Ze.chineseBasic+"+",He="^"+Ze.chineseBasic+"+$",Xe="(?:"+Ve(Ze).join("|")+")",qe=Xe+"+",Ge="^"+Xe+"+$",Je=RegExp.prototype.hasOwnProperty("unicode");var Qe=/^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;var Ye=/^((([0-9A-F]{1,4}:){7}([0-9A-F]{1,4}|:))|(([0-9A-F]{1,4}:){6}(:[0-9A-F]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3})|:))|(([0-9A-F]{1,4}:){5}(((:[0-9A-F]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3})|:))|(([0-9A-F]{1,4}:){4}(((:[0-9A-F]{1,4}){1,3})|((:[0-9A-F]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(([0-9A-F]{1,4}:){3}(((:[0-9A-F]{1,4}){1,4})|((:[0-9A-F]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(([0-9A-F]{1,4}:){2}(((:[0-9A-F]{1,4}){1,5})|((:[0-9A-F]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(([0-9A-F]{1,4}:){1}(((:[0-9A-F]{1,4}){1,6})|((:[0-9A-F]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:))|(:(((:[0-9A-F]{1,4}){1,7})|((:[0-9A-F]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|\d{1,2})(\.(25[0-5]|2[0-4]\d|1\d\d|\d{1,2})){3}))|:)))(%.+)?$/i;var et="localhost|(([^\\s:\\/]+?\\.)+?[^\\s:\\/]+)",tt=":\\d+",nt="\\/.*",rt="\\?.*",ot=new RegExp("^".concat("[\\w-.]+:\\/\\/","(?:").concat("[-;:&=\\+\\$,\\w]+@",")?(?:").concat(et,")(?:").concat(tt,")?(?:").concat(nt,")*(?:").concat(rt,")?(?:").concat("#.*",")?$")),it=new RegExp("^(?:".concat(et,")(?:").concat(tt,")?(?:").concat(nt,")*(?:").concat(rt,")?(?:").concat("#.*",")?$"));function at(e){var t=K(e);return ot.test(t)||it.test(t)}var ct=/^\d{15}$/;function ut(e){for(var t=10,n=0;n<14;n++){var r=(t+Number(e[n]))%10;t=2*(r=0===r?10:r)%11}return 1===t?0:11-t}function st(e,t){void 0===t&&(t={});var n=K(e),r=t.checkCode,o=void 0===r||r,i=ct.test(n);if(!o||!i)return i;var a=n.substring(0,14),c=n.substring(n.length-1),u=ut(a);return c===String(u)}st.sumCheckCode=ut;var ft=/^[hm]{1}([0-9]{10}|[0-9]{8})$/i;var lt=/^\d{8}$/i,dt=/^[\da-z]{10,12}$/i;var pt=/^[A-Z]{6}[A-Z\d]{2}(?:[A-Z\d]{3})?$/;function vt(e,t){var n;return void 0===t&&(t=!1),"number"==typeof(n=t?"string"==typeof e&&""!==e?Number(e):e:"number"==typeof e?e:F(e)?Number.NaN:Number(e))&&!ee(n)}var ht=/^[-+]?0[b|o|x]\d+/i,mt=/^\.\d+/;function gt(e){var t;return ne(e)?""===(t=e.trim())?t=Number(t):ht.test(t)||mt.test(t)?t=M(t):ee(Number(t))&&(t=Number.NaN):t=F(e)?Number.NaN:U(e)?e:Number(e),ee(t)?Number.NaN:t}function yt(e,t){return void 0===t&&(t=12),+parseFloat(e.toPrecision(t))}function bt(e){var t=e.toString().split(/e/i),n=(t[0].split(".")[1]||"").length-+(t[1]||0);return n>0?n:0}function wt(e){var t=String(e);if(!function(e){return/\d+\.?\d*e[+-]*\d+/i.test(e)}(t))return Number(t.replace(".",""));var n=bt(e);return n>0?yt(+e*Math.pow(10,n)):+e}function xt(e){(+e>j||+e<O)&&Te("".concat(e," is beyond boundary when transfer to integer, the results may not be accurate"))}var jt,Ot,Ct,Nt=["零","一","二","三","四","五","六","七","八","九"],Et=["","十","百","千"],At=["零","壹","贰","叁","肆","伍","陆","柒","捌","玖"],kt=["","拾","佰","仟"];function Ft(e){for(var t="",n="",r=!1,o=0;e>0;){var i=e%10;0==i?r&&(r=!1,n=jt[i]+n):(r=!0,t=jt[i],n=(t+=Ot[o])+n),o++,e=Math.floor(e/10)}return n}function Tt(e){for(var t=e+"",n="",r=0,o=t.length;r<o;r++)n+=jt[parseInt(t[r])];return n}function St(e,t){void 0===t&&(t={});var n=t.spaceMark,r=void 0===n?" ":n,o=t.precision,i=void 0===o?2:o,a="number"!=typeof e?Number(e):e;if(0===a||ee(a))return"0".concat(r,"B");var c=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],u=Math.floor(Math.log(a)/Math.log(1024));return c[u]?"".concat(Number((a/Math.pow(1024,u)).toFixed(i))).concat(r).concat(c[u]):a+""}var Pt=/^(\d{2})(\d{2})(\d{2})((?:\d{2})?\d{2})(\d{2})(\d{2})\d{2}(\d)(?:\d|X)?$/i,Mt=[["11","北京市"],["12","天津市"],["13","河北省"],["14","山西省"],["15","内蒙古自治区"],["21","辽宁省"],["22","吉林省"],["23","黑龙江省"],["31","上海市"],["32","江苏省"],["33","浙江省"],["34","安徽省"],["35","福建省"],["36","江西省"],["37","山东省"],["41","河南省"],["42","湖北省"],["43","湖南省"],["44","广东省"],["45","广西壮族自治区"],["46","海南省"],["50","重庆市"],["51","四川省"],["52","贵州省"],["53","云南省"],["54","西藏自治区"],["61","陕西省"],["62","甘肃省"],["63","青海省"],["64","宁夏回族自治区"],["65","新疆维吾尔自治区"],["71","台湾省"],["83","台湾省"],["81","香港特别行政区"],["82","澳门特别行政区"]];var _t=function(e,t,n){if(void 0===n&&(n=!0),X(e)){var r={};return z(e,(function(e,o){var i=n&&(X(e)||N(e))?_t(e,t):t(e,o);r[o]=i})),r}if(N(e)){var o=[];return z(e,(function(e,r){var i=n&&(X(e)||N(e))?_t(e,t):t(e,r);o.push(i)})),o}return e};function Rt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=void 0===e[1]?1:e[1],o=e.slice(2);if(o.length>0)return Rt.apply(void 0,[Rt(n,r)].concat(o));if(n=gt(n),r=gt(r),ee(n)||ee(r))return Number.NaN;var i=wt(n),a=wt(r),c=bt(n)+bt(r),u=i*a;return xt(u),u/Math.pow(10,c)}function Bt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=void 0===e[1]?1:e[1],o=e.slice(2);if(o.length>0)return Bt.apply(void 0,[Bt(n,r)].concat(o));if(n=gt(n),r=gt(r),ee(n)||ee(r))return Number.NaN;var i=wt(n),a=wt(r);return xt(i),xt(a),Rt(i/a,yt(Math.pow(10,bt(r)-bt(n))))}function It(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e[0],r=void 0===e[1]?0:e[1],o=e.slice(2);if(o.length>0)return It.apply(void 0,[It(n,r)].concat(o));if(n=Math.abs(oe(n)),r=Math.abs(oe(r)),ee(n)||ee(r))return Number.NaN;if(0===n&&0===r)return 0;if(0===n)return r;if(0===r)return n;var i=r;for(n<r&&(i=n,n=r,r=i);i;)i=n%r,n=r,r=i;return M(n)}function Lt(e,t){var n=t||{},r=n.method,o=void 0===r?"get":r,i=n.data,a=void 0===i?null:i,c=n.timeout,u=n.headers,s=n.withCredentials,f=void 0!==s&&s,l=n.async,d=void 0===l||l,p=n.user,v=void 0===p?null:p,h=n.password,m=void 0===h?null:h,g=n.responseType,y=n.onReadyStateChange,b=n.onLoadStart,w=n.onProgress,x=n.onAbort,j=n.onTimeout,O=n.onError,C=n.onLoad,N=n.onLoadEnd;return new Promise((function(t,n){var r=new XMLHttpRequest;r.open(o.toLowerCase(),e,d,v,m),y&&(r.onreadystatechange=y),"number"==typeof c&&c>0&&(r.timeout=c),r.withCredentials=f,g&&(r.responseType=g),"object"==typeof u&&Ue(u).map((function(e){r.setRequestHeader(e,u[e])}));var i,s=function(e){return function(t){n(t),null==e||e.call(r,t)}},l={loadstart:b,progress:w,abort:s(x),timeout:s(j),error:s(O),load:(i=C,function(e){t(e),null==i||i.call(r,e)}),loadend:N};Ue(l).map((function(e){var t=l[e];t&&r.addEventListener(e,t)})),r.send(a)}))}function $t(e){return!(!E(e)||!ne(e.name))}function zt(e){return ne(e)&&e.indexOf(".")>0?"."+(n=e.split("."),void 0===(r=-1)&&(r=0),R(n)?n[r+=r<0?n.length:0]:t):"";var n,r}function Ut(e,t){var n,r,o=function(e){return!!(q&&e instanceof File)||"[object File]"===k(e)}(e);if(!o&&!$t(e))return!1;if(ne(t)||(t=K(t)),!(t=t.trim())||"*"===t)return!0;var i=!1,a=t.toLowerCase().split(/,(?:\s+)?/),c=(e.name||!o&&(e.fileName||(null===(n=e.originFileObj)||void 0===n?void 0:n.name))||"").toLowerCase(),u=e.type||!o&&(null===(r=e.originFileObj)||void 0===r?void 0:r.type)||"",s=!o&&e.url||"";return a.some((function(e){if("*"===e||u===e||0===e.indexOf(".")&&(zt(c)===e||zt(s)===e))i=!0;else if(e.includes("/*")&&u.includes("/")){var t=e.match(/(.*)\/\*/),n=u.split("/")[0];t&&t[1]===n&&(i=!0)}return i})),i}var Vt=[200,304];function Dt(e,t){return new Promise((function(n,r){W(e)?n(e):Lt(e,ae({responseType:"blob"},t)).then((function(t){var o=t.target.status;if(-1!==Vt.indexOf(o))n(t.target.response);else{var i=new Error("The file does not support get requests, responseStatus ".concat(o,", '").concat(e,"'."));console.error(i),r(i)}})).catch((function(e){console.error(new Error("Failed to request file. ".concat(e))),r(e)}))}))}function Kt(e){return new Promise((function(t,n){var r=W(e),o=r?De(e):e,i=new Image;r||(i.crossOrigin="anonymous"),i.onload=function(){t(i)},i.onerror=function(t){r&&Ke(o),console.error("[loadImage] The image load failed, '".concat(e,"'.")),n(t)},i.src=o}))}function Zt(e,t){return Dt(e,t).then((function(e){return Kt(e).then((function(t){return{blob:e,image:t}}))}))}function Wt(e){for(var t=e.split(","),n=t[0].substring(5).split(";"),r=n[0],o=(-1!==n.indexOf("base64")?atob:decodeURIComponent)(t[1]),i=o.length,a=new Uint8Array(i);i--;)a[i]=o.charCodeAt(i);return new Blob([a],{type:r})}function Ht(e,t){void 0===t&&(t="");var n=document.createElement("a");n.href=e,n.style.display="none",n.setAttribute("download",t),n.addEventListener("click",(function e(t){t.stopPropagation(),n.removeEventListener("click",e)})),document.body.appendChild(n),n.click(),document.body.removeChild(n)}var Xt={arrayBuffer:"readAsArrayBuffer",binaryString:"readAsBinaryString",dataURL:"readAsDataURL",text:"readAsText"},qt={image:"image/*,.jpeg,.jpg,.gif,.bmp,.png,.webp,.svg,.apng,.avif,.ico,.tif,.tiff",audio:"audio/*,.mp3,.wav,.aac,.flac",video:"video/*,.mp4,.webm,.ogg,.mov",pdf:"application/pdf,.pdf",word:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,.doc,.docx",excel:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,.xls,.xlsx"};var Gt=[["text/plain",["txt"]],["text/css",["css"]],["text/html",["htm","html"]],["text/javascript",["js","mjs"]],["text/csv",["csv"]],["text/markdown",["md","markdown"]],["image/gif",["gif"]],["image/jpeg",["jpg","jpeg","jfif","pjpeg","pjp"]],["image/png",["png"]],["image/svg+xml",["svg"]],["image/webp",["webp"]],["image/apng",["apng"]],["image/avif",["avif"]],["image/bmp",["bmp"]],["image/x-icon",["ico","cur"]],["image/tiff",["tif","tiff"]],["application/xml",["xml"]],["application/zip",["zip"]],["application/pdf",["pdf"]],["application/json",["json"]],["application/yaml",["yaml","yml"]],["application/vnd.openxmlformats-officedocument.wordprocessingml.document",["doc","docx"]],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",["xls","xlsx"]],["audio/mp3",["mp3"]],["audio/wav",["wav"]],["audio/aac",["aac"]],["audio/flac",["flac"]],["video/mp4",["mp4"]],["video/ogg",["ogg"]],["video/webm",["webm"]],["video/quicktime",["mov"]]];var Jt="abcdefghijklmnopqrstuvwxyz",Qt={number:"0123456789",lower:Jt,upper:Jt.toUpperCase()},Yt=Qt.number+Qt.lower+Qt.upper;function en(e,t,n){for(void 0===n&&(n="");e-- >0;){return en(e,t,n+t[I(0,t.length-1)])}return n}function tn(e,t){var n=t.childrenField,r=void 0===n?"children":n,o=t.emptyChildrenValue,i=void 0===o?"none":o;e.forEach((function(e){e[r].length<=0?"null"===i?e[r]=null:delete e[r]:tn(e[r],t)}))}function nn(e,t,n,r){void 0===r&&(r=[]);var o=[];return N(e)&&z(e,(function(e){if(r.push(e),t(e))return o=r,!1;if(A(e)){var i=e[n];if(N(i)&&i.length>0){var a=nn(i,t,n,r);if(a.length>0)return o=a,!1}}r.pop()})),o}var rn=function(){function e(){this.handlers={}}return e.prototype.eventNames=function(){var e,t=(null===(e=Object.getOwnPropertySymbols)||void 0===e?void 0:e.call(Object,this.handlers))||[];return Object.keys(this.handlers).concat(t)},e.prototype.rawListeners=function(e){var t=this.handlers[e];return t?t.map((function(e){return e.raw})):[]},e.prototype.listeners=function(e){var t=this.handlers[e];return t?t.map((function(e){return e.wrap})):[]},e.prototype.hasListener=function(e,t){return this.rawListeners(e).some((function(e){return e===t}))},e.prototype._on=function(e,t,n,r,o){void 0===r&&(r=null),void 0===o&&(o=1);var i={raw:t,wrap:n,context:r};if(this.handlers[e]){var a=1===o?"push":"unshift";this.handlers[e][a](i)}else this.handlers[e]=[i];return this},e.prototype.prependListener=function(e,t,n){return this._on(e,t,t,n,0)},e.prototype.on=function(e,t,n){return this._on(e,t,t,n)},e.prototype._wrapOnce=function(e,t,n){var r=this;void 0===n&&(n=null);var o=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];t.apply(n,i),r.off(e,o)};return o},e.prototype.once=function(e,t,n){var r=this._wrapOnce(e,t,n);return this._on(e,t,r,n)},e.prototype.prependOnceListener=function(e,t,n){var r=this._wrapOnce(e,t,n);return this._on(e,t,r,n,0)},e.prototype.off=function(e,t){var n=this.handlers[e];if(n)if(t){var r=n.findIndex((function(e){return e.wrap===t||e.raw===t}));-1!==r&&n.splice(r,1)}else delete this.handlers[e];return this},e.prototype.offAll=function(){return this.handlers={},this},e.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=this.handlers[e];return!!(r&&r.length>0)&&(r.forEach((function(e){e.wrap.apply(e.context,t)})),!0)},e}(),on={},an=function(){function e(e){void 0===e&&(e="default"),this.scope=e,on[this.scope]||(on[this.scope]={}),this.data=on[this.scope]}return e.prototype.getItem=function(e){return e in this.data?this.data[e]:null},e.prototype.setItem=function(e,t){this.data[e]=t},e.prototype.removeItem=function(e){delete this.data[e]},e.prototype.clear=function(){on[this.scope]={},this.data=on[this.scope]},e}();function cn(e){try{var t="object"==typeof e&&null!==e&&!!e.setItem&&!!e.getItem&&!!e.removeItem;if(t){var n=Math.random().toString(16).substring(2,8)+(new Date).getTime();if(e.setItem(n,"1"),"1"!==e.getItem(n))return!1;e.removeItem(n)}return t}catch(t){return console.error("[cache2] ".concat(e," is not supported. The default memory cache will be used.")),!1}}var un=function(){function e(e,t){void 0===t&&(t={});var n=!!e&&cn(e);this.options=ae({needParsed:n,prefix:""},t),this.storage=n?e:new an(this.options.memoryScope)}return e.prototype.getKey=function(e){return this.options.prefix+e},e.prototype.get=function(e){var t=this.storage.getItem(this.getKey(e));return this.options.needParsed?function(e,t){try{return JSON.parse(e,t)}catch(t){return e}}(t,this.options.reviver):t},e.prototype.set=function(e,t){this.storage.setItem(this.getKey(e),this.options.needParsed?function(e,t){return JSON.stringify(e,t)}(t,this.options.replacer):t)},e.prototype.del=function(e){this.storage.removeItem(this.getKey(e))},e.prototype.clear=function(){"function"==typeof this.storage.clear&&this.storage.clear()},e}(),sn="default",fn=function(e){function t(t,n){var r,o=e.call(this)||this,i=sn;return"string"==typeof t?i=t||sn:"object"==typeof t&&(r=t),r||"object"!=typeof n||(r=n),o.options=ae({max:-1,stdTTL:0,maxStrategy:"limited",checkperiod:0,prefix:"cache2_"},r),o.storage=new un(o.options.storage,ae({memoryScope:i},o.options)),o.cacheKey=i,o.startCheckperiod(),o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ie(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype._check=function(e,t){var n=!0;return 0!==t.t&&t.t<Date.now()&&(n=!1,this.del(e),this.emit("expired",e,t.v)),n},t.prototype._wrap=function(e,t){var n=Date.now(),r="number"==typeof t?t:this.options.stdTTL;return{v:e,t:r>0?n+r:0,n:n}},t.prototype._isLimited=function(e){return this.options.max>-1&&e>=this.options.max},t.prototype._getReplaceKey=function(e,t){var n=e[0];return e.forEach((function(e){(t[e].t<t[n].t||t[e].t===t[n].t&&t[e].n<t[n].n)&&(n=e)})),n},Object.defineProperty(t.prototype,"cacheValues",{get:function(){return this.storage.get(this.cacheKey)||{}},enumerable:!1,configurable:!0}),t.prototype.setCacheValues=function(e){this.storage.set(this.cacheKey,e)},t.prototype.get=function(e){var t=this.cacheValues[e];if(t&&this._check(e,t))return t.v},t.prototype.mget=function(e){var t=this,n={};if(!Array.isArray(e))return n;var r=this.cacheValues;return e.forEach((function(e){var o=r[e];o&&t._check(e,o)&&(n[e]=o.v)})),n},t.prototype.getAll=function(){var e=Object.keys(this.cacheValues);return this.mget(e)},t.prototype.set=function(e,t,n){if(0===this.options.max)return!1;var r=this.cacheValues,o=Object.keys(r);if(!r[e]&&this._isLimited(o.length)){var i=this.keys();if(this._isLimited(i.length)){if("replaced"!==this.options.maxStrategy)return!1;var a=this._getReplaceKey(i,r);this.del(a)}}return r[e]=this._wrap(t,n),this.setCacheValues(r),this.emit("set",e,r[e].v),!0},t.prototype.mset=function(e){var t=this,n=!0;return e.forEach((function(e){var r=t.set(e.key,e.value,e.ttl);n&&!r&&(n=!1)})),n},t.prototype.del=function(e){var t=this,n=this.cacheValues,r=0;return(Array.isArray(e)?e:[e]).forEach((function(e){if(n[e]){r++;var o=n[e];delete n[e],t.emit("del",e,o.v)}})),r>0&&this.setCacheValues(n),r},t.prototype.clear=function(){this.storage.del(this.cacheKey)},t.prototype.keys=function(){var e=this,t=this.cacheValues;return Object.keys(t).filter((function(n){return e._check(n,t[n])}))},t.prototype.has=function(e){var t=this.cacheValues[e];return!(!t||!this._check(e,t))},t.prototype.take=function(e){var t,n=this.cacheValues[e];return n&&this._check(e,n)&&(t=n.v,this.del(e)),t},t.prototype.ttl=function(e,t){var n=this.cacheValues,r=n[e];return!(!r||!this._check(e,r))&&(n[e]=this._wrap(r.v,t),!0)},t.prototype.getTtl=function(e){var t=this.cacheValues,n=t[e];if(n&&this._check(e,n))return t[e].t},t.prototype.getLastModified=function(e){var t=this.cacheValues,n=t[e];if(n&&this._check(e,n))return t[e].n},t.prototype.startCheckperiod=function(){var e=this;this.keys(),this.options.checkperiod>0&&(clearTimeout(this._checkTimeout),this._checkTimeout=setTimeout((function(){e.startCheckperiod()}),this.options.checkperiod))},t.prototype.stopCheckperiod=function(){clearTimeout(this._checkTimeout)},t}(rn),ln=function(){function e(e){this.promiseCache={},this.cache=new fn(""+"uh_async_memo"+ ++de,e)}return e.prototype.run=function(e,t,n){var r=this;if(!t||!ne(t))return e();var o=ae({persisted:!0},n);if(o.persisted){var i=this.cache.get(t);if(i)return Promise.resolve(i)}return this.promiseCache[t]||(this.promiseCache[t]=e().then((function(e){return delete r.promiseCache[t],r.cache.set(t,e,o.ttl),e})).catch((function(e){return delete r.promiseCache[t],Promise.reject(e)}))),this.promiseCache[t]},e}();e.AsyncMemo=ln,e.VERSION="5.5.1",e.ajax=Lt,e.bytesToSize=St,e.calculateCursorPosition=function(e,t,n,r,o){void 0===o&&(o={});var i=o.placeholderChar,a=void 0===i?" ":i,c=o.maskReg,u=void 0===c?/\D/g:c,s=o.type,f=K(t),l=K(n),d=N(a)?a:[a],p=l.length-f.length,v=e;if(p>0){var h=l.substring(v-p,v).replace(u,"").length;v-=p-h;for(var m=0;h>0;)-1!==d.indexOf(r.charAt(v-h+m))?m++:h--;v+=m}return("mobile"===s&&(4===v||9===v)||"bankCard"===s&&v>0&&v%5==0)&&(v-=1),v},e.checkFileType=Ut,e.checkResult=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ce(void 0,fe([],se(e),!1),void 0,(function(e){var t,n,r,o;void 0===e&&(e=function(){return!0});var i=[];for(t=1;t<arguments.length;t++)i[t-1]=arguments[t];return ue(this,(function(t){switch(t.label){case 0:return[4,le(e).apply(void 0,fe([],se(i),!1))];case 1:return n=se.apply(void 0,[t.sent(),2]),r=n[0],o=n[1],[2,!r&&!1!==o]}}))}))},e.compressImage=function(e,t){return void 0===t&&(t={}),new Promise((function(n,r){var o=t.width,i=t.height,a=t.rotate,c=t.offset,u=void 0===c?[0,0]:c,s=t.background,f=void 0===s?"#fff":s,l=t.canvasWidth,d=t.canvasHeight,p=t.format,v=void 0===p?"blob":p,h=t.type,m=void 0===h?"image/jpeg":h,g=t.quality,y=void 0===g?.8:g,b=t.beforeCompress,w=t.beforeDraw,x=t.afterDraw,j=t.ajaxOptions;Zt(e,j).then((function(e){var c=e.image,s=e.blob,p=M(o),h=M(i),g=M(y);p&&(c.width=p),h&&(c.height=h),null==b||b({image:c,blob:s},t);var j=document.createElement("canvas"),O=j.getContext("2d"),C={image:c,blob:s,canvas:j,context:O},N=M("function"==typeof l?l(C,t):l),E=M("function"==typeof d?d(C,t):d);j.width=N||c.width,j.height=E||c.height;var A="none"===f||"transparent"===f;A?O.clearRect(0,0,j.width,j.height):(O.fillStyle=f,O.fillRect(0,0,j.width,j.height));var k=[0,0];a!==ze&&(O.translate(c.width/2,c.height/2),k=[-c.width/2,-c.height/2],O.rotate(a*Math.PI/180));var F="function"==typeof u?u(C,t):u;null==w||w(C,t);var T=k[0]+M(F[0]),S=k[1]+M(F[1]);O.drawImage(c,T,S,c.width,c.height),"image/png"===m&&A&&(O.globalCompositeOperation="destination-in",O.drawImage(c,T,S,c.width,c.height)),null==x||x(C,t),"blob"===v?function(e,t,n){return new Promise((function(r){e.toBlob((function(e){r(e)}),t,n)}))}(j,m,g).then(n).catch(r):n(j.toDataURL(m,g))})).catch(r)}))},e.dataURLToBlob=Wt,e.divide=Bt,e.download=function e(t,n){return ce(this,void 0,void 0,(function(){var r,o,i,a,c,u,s,f,l,d,p,v,h;return ue(this,(function(m){switch(m.label){case 0:return r="object"==typeof n?n:{},"string"==typeof n&&(r.fileName=n),o=r.fileName,i=r.type,a=r.dataType,c=r.transformRequest,u=r.transformResponse,"string"!=typeof t?[3,8]:a||!/^blob:.*?\/.*/.test(t)?[3,1]:(Ht(t,o),[2,Promise.resolve()]);case 1:return a||!/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(t)?[3,2]:(s=Wt(t),[3,7]);case 2:return"url"===a||!a&&at(t)?(f=function(e){var t="function"==typeof u?u(e):e;return te(t)?t:Promise.resolve(t)},[4,function(e){var t="function"==typeof c?c(e):e;return te(t)?t:Promise.resolve(t)}({responseType:"blob"})]):[3,6];case 3:return l=m.sent(),[4,Lt(t,l)];case 4:return d=m.sent(),[4,f(d.target.response)];case 5:return p=m.sent(),v=o||t.split("?")[0].split("#")[0].split("/").pop(),[2,e(p,{fileName:v,type:i||(W(p)?p.type:ze)})];case 6:s=new Blob([t],{type:i||"text/plain"}),m.label=7;case 7:return[3,9];case 8:t instanceof Blob&&(s=t),m.label=9;case 9:return s||(s=new Blob([t],{type:i})),navigator.msSaveBlob?navigator.msSaveBlob(s,o||"download"):(Ht(h=De(s),o),Ke(h)),[2,Promise.resolve()]}}))}))},e.fileReader=function(e,t){void 0===t&&(t="dataURL");var n=Xt[t];return n||(n=Xt.dataURL),new Promise((function(t,r){var o=new FileReader;o[n](e),o.onload=function(){return t(o.result)},o.onerror=function(e){return r(e)}}))},e.filterTree=function e(t,n,r,o){void 0===r&&(r="children"),void 0===o&&(o="spread");var i=[];return N(t)?(t.forEach((function(t){var a=t;if(A(t)&&(a="spread"===o?ae({},t):t),n(a)){if(A(a)){var c=a[r];N(c)&&c.length>0&&(a[r]=e(c,n,r,o))}i.push(a)}})),i):i},e.findTreeNode=function(e,t,n){void 0===n&&(n="children");var r,o=[];return N(e)&&z(e,(function(e){for(o.push(e);o.length;){var i=o.pop();if(t(i)){r=i;break}if(A(i)){var a=i[n];N(a)&&a.length>0&&a.forEach((function(e){o.push(e)}))}}if(r)return!1})),r},e.findTreeNodes=function(e,t,n){void 0===n&&(n="children");var r=[],o=[];return N(e)&&z(e,(function(e){for(r.push(e);r.length;){var i=r.pop();if(t(i)&&o.push(i),A(i)){var a=i[n];N(a)&&a.length>0&&a.forEach((function(e){r.push(e)}))}}})),o},e.findTreeSelect=function(e,t,n){return void 0===n&&(n="children"),nn(e,t,n)},e.formatBankCard=function(e,t){void 0===e&&(e="");var n=t||{},r=n.spaceMark,o=void 0===r?" ":r,i=n.length,a=void 0===i?4:i,c=new RegExp("(.{".concat(a,"})"),"g"),u=new RegExp("".concat(o),"g"),s=K(e).replace(u,""),f=s.replace(c,"$1".concat(o));return s.length%a==0?f.substring(0,f.length-1):f},e.formatMobile=function(e,t){void 0===e&&(e="");var n=(t||{}).spaceMark,r=void 0===n?" ":n,o=new RegExp(r,"g"),i=K(e).replace(o,"").substring(0,11);return i.length>7?i.replace(/^(...)(....)/g,"$1".concat(r,"$2").concat(r)):i.length>3?i.replace(/^(...)/g,"$1".concat(r)):i},e.formatMoney=function(e,t){void 0===t&&(t={});var n=t.precision,r=void 0===n?2:n,o=t.symbol,i=t.thousand,a=void 0===i?",":i,c=t.decimal,u=void 0===c?".":c,s=t.strict,f=void 0===s||s;if(!function(e){return vt(e)?("number"==typeof e&&xt(e),!0):(Te("".concat(e," invalid parameter.")),!1)}(e)||f&&(!ne(e)||""===e)&&!U(e))return"";if("number"==typeof e&&!isFinite(e))return e+"";"number"!=typeof r||ee(r)||r<0?r=2:r>10&&(r=10),o="string"==typeof o?o:"",a="string"==typeof a?a:",",u="string"==typeof u?u:".";var l=se((gt(e)+"").split("."),2),d=l[0],p=l[1];return o+function(e,t){var n,r,o="";e="+"===(e=(r=/^([+-])?(0+)([0-9.]+)$/.exec(n=e))?(r[1]||"")+("."===r[3][0]?"0"+r[3]:r[3]):n)[0]?e.substring(1):e;for(var i=Number(e)<0?"-":"",a=i?e.substring(1).split("").reverse():e.split("").reverse(),c=0;c<a.length;c++)o+=a[c]+((c+1)%3==0&&c+1!==a.length?t:"");return i+o.split("").reverse().join("")}(d,a)+function(e,t,n){if(0===t)return"";var r="";return r=e&&Number(e)>0?parseFloat("0."+e).toFixed(t).substring(2):(0).toFixed(t).substring(2),n+r}(p,r,u)},e.gcd=It,e.getExtname=zt,e.getFileBlob=Dt,e.getFileType=function(e){var t;return(W(e)||$t(e))&&z(qt,(function(n,r){if(Ut(e,n))return t=r,!1})),t},e.getImageInfo=function(e,t){return Zt(e,t).then((function(e){var t,n,r,o=e.image,i=e.blob,a=o.width,c=o.height;return{width:a,height:c,contrast:(t=a,n=c,r=It(t,n),"".concat(Bt(oe(t),r),":").concat(Bt(oe(n),r))),measure:"".concat(a," × ").concat(c," px"),size:St(i.size),bytes:i.size,image:o,blob:i}}))},e.getMimeType=function(e){var t,n=zt(e).slice(1).toLowerCase();return n?null===(t=Gt.find((function(e){return e[1].includes(n)})))||void 0===t?void 0:t[0]:ze},e.injectStyle=function(e,t){var n=t||{},r=n.container,o=void 0===r?document.head||document.getElementsByTagName("head")[0]||document.body:r,i=n.insertAt,a=void 0===i?"top":i,c=n.onBefore,u=document.createElement("style");u.styleSheet?u.styleSheet.cssText=e:u.appendChild(document.createTextNode(e)),"function"==typeof c&&c(u);var s="top"===a;return s&&o.prepend?o.prepend(u):s&&o.firstChild?o.insertBefore(u,o.firstChild):o.appendChild(u),u},e.isBankCard=Ce,e.isBusinessLicense=st,e.isChinese=function(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=t.useExtend,i=void 0!==o&&o,a=K(e),c=i&&Je;return new RegExp(c?r?qe:Ge:r?We:He,c?"u":ze).test(a)},e.isEmail=function(e){var t=K(e);return ge.test(t)},e.isHMCard=function(e){var t=K(e);return ft.test(t)},e.isIPv4=function(e){var t=K(e);return Qe.test(t)},e.isIPv6=function(e){var t=K(e);return Ye.test(t)},e.isIdCard=function(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=t.checkCode,i=void 0===o||o,a=K(e);return 15===a.length&&r?me.test(a):!(18!==a.length||!me.test(a))&&(!i||function(e){var t,n;for(n=t=0;t<17;t++)n+=Math.pow(2,17-t)%11*Number(e[t]);var r=(12-n%11)%11;return r<10?r===Number(e[17]):"X"===e[17].toUpperCase()}(a))},e.isMobile=function(e){var t=K(e);return pe.test(t)},e.isPassport=function(e){var t=K(e);return Ie.test(t)},e.isPassword=function(e,t){void 0===t&&(t={});var n=t.level,r=void 0===n?2:n,o=t.ignoreCase,i=void 0!==o&&o,a=t.special;return Be(e,{level:r,ignoreCase:i,special:void 0===a?"\\x21-\\x2F\\x3A-\\x40\\x5B-\\x60\\x7B-\\x7E":a}).validated},e.isPostcode=function(e){var t=K(e);return he.test(t)},e.isQQ=function(e){var t=K(e);return ye.test(t)},e.isSocialCreditCode=ke,e.isSwiftCode=function(e){var t=K(e);return pt.test(t)},e.isTWCard=function(e,t){void 0===t&&(t={});var n=t.loose,r=void 0!==n&&n,o=K(e);return!!lt.test(o)||!!r&&dt.test(o)},e.isTelephone=function(e){var t=K(e);return ve.test(t)},e.isUrl=at,e.isValidNumber=vt,e.isVehicle=function(e){var t=K(e);return we.test(t)},e.isWX=function(e){var t=K(e);return be.test(t)},e.lcm=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.map((function(e){return Math.abs(oe(e))}));return 1===n.length&&(n=n.concat([1])),Bt(n.indexOf(0)>-1?0:Rt.apply(void 0,fe([],se(n),!1)),It.apply(void 0,fe([],se(n),!1)))},e.listToTree=function(e,t){void 0===t&&(t={});var n=t.keyField,r=void 0===n?"id":n,o=t.parentField,i=void 0===o?"pid":o,a=t.childrenField,c=void 0===a?"children":a,u=t.emptyChildrenValue,s=void 0===u?"none":u,f=t.nodeAssign,l=void 0===f?"spread":f,d=[],p={};return N(e)?(e.forEach((function(e){if(A(e)){var t="spread"===l?ae({},e):e,n=t[r],o=t[i];p[n]?t[c]=p[n]:t[c]=p[n]=[],o?p[o]?p[o].push(t):p[o]=[t]:d.push(t)}})),"array"!==s&&tn(d,t),d):d},e.loadImage=Kt,e.loadImageWithBlob=Zt,e.loadScript=function(e,t){return new Promise((function(n,r){var o=document.head||document.getElementsByTagName("head")[0]||document.body,i=document.createElement("script"),a=t||{},c=a.attrs,u=a.destroyOnError,s=void 0===u||u,f=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(a,["attrs","destroyOnError"]),l=ae(ae({async:!0,type:"text/javascript"},f),{src:e});for(var d in l)"onload"!==d&&"onerror"!==d&&(i[d]=l[d]);"object"==typeof c&&Ue(c).forEach((function(e){i.setAttribute(e,c[e])})),i.onload=function(e){var t;this.onerror=this.onload=null,null===(t=l.onload)||void 0===t||t.call(this,e),n(i)},i.onerror=function(e){var t;this.onerror=this.onload=null,null===(t=l.onerror)||void 0===t||t.call(this,e),s&&o.removeChild(i),r(new URIError("Failed to load "+this.src))},o.appendChild(i)}))},e.minus=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=void 0===t[1]?0:t[1],i=t.slice(2);if(i.length>0)return e.apply(void 0,[e(r,o)].concat(i));if(r=gt(r),o=gt(o),ee(r)||ee(o))return Number.NaN;var a=Math.pow(10,Math.max(bt(r),bt(o)));return(Rt(r,a)-Rt(o,a))/a},e.numberToChinese=function(e,t){void 0===t&&(t={});var n=t.big5,r=void 0!==n&&n,o=t.unit,i=void 0===o||o,a=t.zero,c=void 0===a?"":a,u=t.negative,s=void 0===u?"负":u,f=t.unitConfig,l=void 0===f?{}:f,d=t.decimal,p=void 0===d?"":d;if("number"!=typeof e||ee(e))return Te("参数错误 ".concat(e,",请传入数字")),"";xt(e),r?(jt=At.slice(),Ot=kt.slice(),p=p||"點"):(jt=Nt.slice(),Ot=Et.slice(),p=p||"点");var v=l.w||"万",h=l.y||"亿";Ct=["",v,h,v+h],c&&(jt[0]=c);var m,g=e<0?s:"",y=Math.abs(e);m=i?function(e){var t=Math.floor(e),n=0,r="",o="",i=!1;if(0===t)return jt[0];for(;t>0;){var a=t%1e4;i&&(o=jt[0]+o),r=Ft(a),o=(r+=0!==a?Ct[n]:Ct[0])+o,i=a<1e3&&a>0,t=Math.floor(t/1e4),n++}return o}(y):Tt(Math.floor(y));var b=function(e){var t=e+"",n=t.indexOf("."),r="";return n>-1&&(r=Tt(t.slice(n+1))),r}(y);return b?"".concat(g).concat(m).concat(p).concat(b):"".concat(g).concat(m)},e.padZero=function(e,t){void 0===t&&(t=2);var n=K(e),r=n.length;return("number"!=typeof t||t<0)&&(t=0),r<t?"0".repeat(t-r)+n:n},e.parseIdCard=function(e){var t=Pt.exec(e);if(!t)return null;var n={province:t[1],city:t[2],area:t[3],year:t[4],month:t[5],day:t[6],gender:t[7]},r=Mt.find((function(e){return e[0]===n.province}));if(!r)return null;var o="".concat(n.year,"-").concat(n.month,"-").concat(n.day),i=Number(n.gender)%2==0?"女":"男";return{province:r[1],birthday:o,gender:i,origin:n}},e.plus=function e(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0],o=void 0===t[1]?0:t[1],i=t.slice(2);if(i.length>0)return e.apply(void 0,[e(r,o)].concat(i));if(r=gt(r),o=gt(o),ee(r)||ee(o))return Number.NaN;var a=Math.pow(10,Math.max(bt(r),bt(o)));return(Rt(r,a)+Rt(o,a))/a},e.randomString=function(e,t){var n;return void 0===e&&(e=0),n="string"!=typeof t?Yt:Qt[t]?Qt[t]:t,en(M(e),n)},e.replaceChar=function(e,t){void 0===e&&(e=""),void 0===t&&(t={});var n=t.char,r=void 0===n?"*":n,o=t.exclude,i=t.start,a=void 0===i?3:i,c=t.end,u=void 0===c?-4:c,s=t.repeat,f=K(e),l=f.length;if(Math.abs(a)>=l)return f;if((a=a>=0?a:l+a)>=(u=u>=0?u:l+u))return f;var d=f.substring(a,u);if(o){var p=new RegExp("[^".concat(o,"]"),"g");d=d.replace(p,r)}else s="number"==typeof s&&s>=0?s:d.length,d=r.repeat(s);return f.substring(0,a)+d+f.substring(u)},e.round=function(e,t){return void 0===t&&(t=0),oe(e,t)},e.safeDate=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r="string"==typeof e?e.replace(/[\\.-]/g,"/"):e;return t&&t.length>0?new(Date.bind.apply(Date,fe([void 0,r],se(t),!1))):void 0===r?new Date:new Date(r)},e.setDataURLPrefix=function(e,t,n){return void 0===t&&(t="image/png"),void 0===n&&(n=!0),"data:".concat(t).concat(n?";base64":"",",").concat(e)},e.setDisableWarning=function(e){Fe.disableWarning=!!e},e.strlen=function(e){for(var t=K(e),n=0,r=0;r<t.length;r++){var o=t.charCodeAt(r);o>=1&&o<=126||65376<=o&&o<=65439?n++:n+=2}return n},e.times=Rt,e.transformFieldNames=function(e,t,n,r){return void 0===r&&(r="spread"),N(e)?e.length<=0?[]:function e(o){return o.map((function(o){if(!A(o))return o;var i="spread"===r?ae({},o):o,a=[];n&&N(i[n])&&i[n].length>0&&(i[n]=e(i[n].slice()));var c=Ue(t);return c.forEach((function(e){var n=t[e];n in i&&(i[e]=i[n],-1===c.indexOf(n)&&a.push(n))})),a.length>0&&a.forEach((function(e){delete i[e]})),i}))}(e.slice()):e},e.transformObjectValue=_t,e.treeToList=function(e,t){var n=[];return N(e)?(function e(r){r.forEach((function(r){if(A(r)){var o=ae({},r);n.push(o),o[t]&&(N(o[t])&&o[t].length>0&&e(o[t]),delete o[t])}else n.push(r)}))}(e),n):n},e.validatePassword=Be}));
2
2
  //# sourceMappingURL=util-helpers.min.js.map