mazey 4.8.3 → 4.9.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.
- package/README.md +1 -1
- package/lib/browser.d.ts.map +1 -1
- package/lib/debug.d.ts +3 -1
- package/lib/debug.d.ts.map +1 -1
- package/lib/index.cjs.js +2 -2
- package/lib/index.esm.js +2 -2
- package/lib/mazey.min.js +2 -2
- package/lib/url.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -976,7 +976,7 @@ npm run docs
|
|
|
976
976
|
| :-------- | :--------------------------------------- | :------ |
|
|
977
977
|
| ok | The operation was successful. | string |
|
|
978
978
|
| loaded | Some assets have been loaded. | string |
|
|
979
|
-
|
|
|
979
|
+
| failed | An error occurred. | string |
|
|
980
980
|
| defined | The value is defined. | string |
|
|
981
981
|
| undefined | The value is undefined. | string |
|
|
982
982
|
| timeout | The operation timed out. | string |
|
package/lib/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACZ,MAAM,UAAU,CAAC;AAKlB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,IAAI,OAAO,CA4CtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,cAAc,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACZ,MAAM,UAAU,CAAC;AAKlB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,IAAI,OAAO,CA4CtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAiN5C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,eAAe,CAAC,MAAM,SAAK,EAAE,SAAS,SAAM,GAAG,MAAM,EAAE,CAetE;AAID;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAkBhD"}
|
package/lib/debug.d.ts
CHANGED
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
*
|
|
27
27
|
* @param {string} prefix The prefix string.
|
|
28
28
|
* @param {object} options The options object.
|
|
29
|
-
* @param {boolean} options.
|
|
29
|
+
* @param {boolean} options.enabled Whether logging is enabled.
|
|
30
|
+
* @param {boolean} options.isClosed @deprecated Use `enabled` instead.
|
|
30
31
|
* @param {boolean} options.showWrap Whether to show the wrap.
|
|
31
32
|
* @param {boolean} options.showDate Whether to show the date.
|
|
32
33
|
* @param {string} options.locales A locale string.
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
* @category Debug
|
|
38
39
|
*/
|
|
39
40
|
export declare function genCustomConsole(prefix?: string, options?: {
|
|
41
|
+
enabled?: boolean;
|
|
40
42
|
isClosed?: boolean;
|
|
41
43
|
showWrap?: boolean;
|
|
42
44
|
showDate?: boolean;
|
package/lib/debug.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../src/debug.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,SAAK,EACX,OAAO,GAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACjB,GACL,OAAO,CAoFT;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,SAA8B,CAAC;AAEpD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,OAAO,SAAsF,CAAC"}
|
package/lib/index.cjs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Mazey v4.
|
|
2
|
+
* Mazey v4.9.1 https://github.com/chengchuu/mazey
|
|
3
3
|
* (c) 2018-2026 Cheng
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
"use strict";var e=function(){return e=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},e.apply(this,arguments)};function t(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function n(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=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function r(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 o(t){if("object"!=typeof t)return t;var n=["string","number","boolean","undefined"];return Object.values(t).every(function(e){return n.includes(typeof e)})?e({},t):JSON.parse(JSON.stringify(t))}function i(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function a(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function s(e){return a(e)}function c(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function u(e){void 0===e&&(e=5);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function f(e){return void 0===e&&(e=5),u(e)}function l(e){void 0===e&&(e=3);var t=[d(),f(e||3)];return t[0]+t[1]}function d(){return Date.now?Date.now():(new Date).getTime()}"function"==typeof SuppressedError&&SuppressedError;var p={type:"d"};function g(e,t){void 0===t&&(t={});var n=t.isNaNAsNumber,r=void 0!==n&&n,o=t.isInfinityAsNumber,i=void 0!==o&&o,a=t.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,t)),r}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return v.apply(void 0,r([e],t,!1))}function h(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function w(e){var t=Boolean(e),n="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return t&&n&&r}function y(e){return"boolean"==typeof e}function x(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function b(e,t){void 0===t&&(t={});var n=t.removeNewLine,r=void 0!==n&&n,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function S(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return t[e]})}function E(e,t,n){if(void 0===n&&(n={hasDot:!1,dotText:"..."}),n=Object.assign({hasDot:!1,dotText:"..."},n),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",s=e.replace(i,"**").length,c=0;c<s&&(null!=(a=e.charAt(c).toString()).match(i)?r+=2:r++,!(r>t));c++)o+=a;return n.hasDot&&s>t&&(o+=n.dotText),o}return""}function A(e,t,n){return void 0===n&&(n=!1),E(e,t,{hasDot:n})}function T(e){return t(this,void 0,void 0,function(){return n(this,function(t){return[2,new Promise(function(t){setTimeout(function(){t(e)},e)})]})})}var O="";function C(e,t){for(var n=e.length,r=t.length,i=o(new Array(n).fill(new Array(r).fill(0))),a=0;a<n;++a)for(var s=0;s<r;++s)if(e[a]===t[s]){var c=0;a>0&&s>0&&(c=i[a-1][s-1]),i[a][s]=c+1}var u=Array.prototype.concat.apply([],i);return Math.max.apply(Math,u)}function P(e,t){for(var n=e.length,r=t.length,i=o(new Array(n).fill(new Array(r).fill(0))),a=0;a<n;++a)for(var s=0;s<r;++s)if(e[a]===t[s]){var c=0;a>0&&s>0&&(c=i[a-1][s-1]),i[a][s]=c+1}else{var u=[0,0],f=u[0],l=u[1];s>0&&(f=i[a][s-1]),a>0&&(l=i[a-1][s]),i[a][s]=Math.max(f,l)}var d=Array.prototype.concat.apply([],i);return Math.max.apply(Math,d)}function M(e){return Math.random()<e}function k(e,t){void 0===t&&(t={strict:!0});var n=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return t.strict||(n=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),n.test(e)}function N(e){return e.replace(/^http:/,"https:")}function j(e){void 0===e&&(e="");var t=window.URL;if(!t)return!1;if(!t.canParse)return!1;if("function"!=typeof t.canParse)return!1;try{var n=new t("b","http://a");return n.pathname="c d","http://a/c%20d"===n.href&&Boolean(n.searchParams)&&t.canParse(e)}catch(e){return!1}}var _={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function R(t,n){void 0===t&&(t=""),void 0===n&&(n=e({},_));var o=Object.assign(e({},_),n),i=o.isClosed,a=o.showWrap,s=o.showDate,c=o.locales,u=o.isStringifyObject,f=o.logFn,l=o.errorFn,d=Object.create(null),p=function(){return(new Date).toLocaleDateString(c,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(e){d[e]=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(i)return!1;var c=t,d=t;if("string"==typeof t&&t.length>=2){var g=t.length;c=":"===t[g-1]?t.substring(0,g-1):t}a&&console.log("--- ".concat(c," - begin ---")),s&&(d=t?"".concat(p()," ").concat(t):"".concat(p())),u&&(n=n.map(function(e){return w(e)?JSON.stringify(e):e})),t||s?console[e].apply(console,r([d],n,!1)):console[e].apply(console,n),"log"===e&&f(),"error"===e&&l(),a&&console.log("--- ".concat(c," - end ---"))}}),d}var B=R("[Mazey]"),L=R("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function U(e,t){if(e)if(Array.isArray(t))t.forEach(function(t){e.classList.add(t)});else{for(var n=e.className,r=n.split(/\s+/),o=0;o<r.length;o++)if(r[o]===t)return;var i,a="";""!==n&&(a=" "),i=n+a+t,e.className=i}else B.error("The element is not exist.")}function F(){var e,t=window.jQuery||window.$;return t?!(!(e=t("img"))||!e.length)&&(e.each(function(){var e=t(this);if(e){var n=e.attr("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/width=([0-9]+[a-z%]*)/),o=n.match(/height=([0-9]+[a-z%]*)/);r&&h(r)&&r[1]&&e.width(r[1]),o&&h(o)&&o[1]&&e.height(o[1])}}}),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach(function(e){var t=e;if(t){var n=t.getAttribute("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/width=([0-9]+[a-z%]*)/),o=n.match(/height=([0-9]+[a-z%]*)/);r&&h(r)&&r[1]&&(t.style.width=r[1]),o&&h(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function I(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function D(e,t){var n=I()[e];if(n instanceof Array)for(var r=0,o=n.length;r<o;r++)"function"==typeof n[r]&&(void 0===t?n[r]():n[r](t))}function z(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function q(e){for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var r=t[n].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function H(e,t){void 0===t&&(t={id:""});var n,r=t.id,o=function(){},i=new Promise(function(e,t){var r;n=(r=[e,t])[0],o=r[1]}),a=function(){n("loaded")},s=document.createElement("link");s||o(new Error("Not support create link element"));var c="onload"in s,u=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(s.rel="stylesheet",s.type="text/css",s.href=e,void 0!==r&&(s.id=r),document.getElementsByTagName("head")[0].appendChild(s),u||!c)return setTimeout(function(){l(s,a,0)},1),i;function f(){s&&(s.onload=s.onerror=s.onreadystatechange=null),s=null,a()}function l(e,t,n){if(e){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e&&(e=null),void t();if(u)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout(function(){r?t():l(e,t,n)},20)}}return c?(s.onload=f,s.onerror=function(){f()}):s.onreadystatechange=function(){s&&/loaded|complete/.test(s.readyState)&&f()},i}var Z={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function V(t,n){void 0===n&&(n=e({},Z));var r,o,i=Object.assign(e({},Z),n),a=i.id,s=i.callback,c=i.timeout,u=i.isDefer,f=i.isAsync,l=i.isCrossOrigin,d=i.attributes,p=i.cssUrl,g=document.createElement("script");if(g||Promise.reject("Not support create script element"),p){var v=function(e,t){if(!t)return"";if(k(t))return t;var n=e.split("/");n.pop();var r=n.join("/");return"".concat(r,"/").concat(t)}(t,p);v&&H(v).catch(function(e){console.error("Failed to load CSS from ".concat(v,": ").concat(null==e?void 0:e.message))})}var h=document.getElementsByTagName("script")[0];return g.type="text/javascript",u&&(g.defer=!0),f&&(g.async=!0),l&&(g.crossOrigin="anonymous"),a&&(g.id=a),d&&Object.keys(d).forEach(function(e){g.setAttribute(e,d[e])}),g.readyState?g.onreadystatechange=function(){"loaded"!==g.readyState&&"complete"!==g.readyState||(g.onreadystatechange=null,m(s),m(r,"loaded"))}:g.onload=function(){m(s),m(r,"loaded")},g.src=t,h&&h.parentNode.insertBefore(g,h),new Promise(function(e,t){var n;r=(n=[e,t])[0],o=n[1],c&&setTimeout(o.bind(null,"timeout"),c)})}function W(e){var t=[],n=window.PerformanceObserver;return!!n&&(h(n.supportedEntryTypes)&&(t=n.supportedEntryTypes),t.includes(e))}function $(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("paint")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})})]:[2,0]})})}function J(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("paint")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})})]:[2,0]})})}var Q="";function Y(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var t={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var n=navigator.userAgent.toLowerCase();if(!n)return t;var r=function(e){return e.test(n)},o=function(e){var t="",r=n.match(e);return r&&h(r)&&(t=(t=(t=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),t},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),t=e(e({},t),{system:i,appleType:a});var s="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?s="2000":r(/windows nt 5.1|windows xp/g)?s="xp":r(/windows nt 5.2|windows 2003/g)?s="2003":r(/windows nt 6.0|windows vista/g)?s="vista":r(/windows nt 6.1|windows 7/g)?s="7":r(/windows nt 6.2|windows 8/g)?s="8":r(/windows nt 6.3|windows 8.1/g)?s="8.1":r(/windows nt 10.0|windows 10/g)&&(s="10"):"macos"===i?s=o(/os x [\d._]+/g):"android"===i?s=o(/android [\d._]+/g):"ios"===i&&(s=o(/os [\d._]+/g)),t=e(e({},t),{systemVs:s});var c="";"windows"===i||"macos"===i||"linux"===i?c="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(c="mobile"),t=e(e({},t),{platform:c});var u="",f="";r(/applewebkit/g)?(u="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(u="gecko",f="firefox"):r(/presto/g)?(u="presto",f="opera"):r(/trident|compatible|msie/g)&&(u="trident",f="iexplore"),t=e(e({},t),{engine:u,supporter:f});var l="";"webkit"===u?l=o(/applewebkit\/[\d._]+/g):"gecko"===u?l=o(/gecko\/[\d._]+/g):"presto"===u?l=o(/presto\/[\d._]+/g):"trident"===u&&(l=o(/trident\/[\d._]+/g)),t=e(e({},t),{engineVs:l});var d="";"chrome"===f?d=o(/chrome\/[\d._]+/g):"safari"===f?d=o(/version\/[\d._]+/g):"firefox"===f?d=o(/firefox\/[\d._]+/g):"opera"===f?d=o(/opr\/[\d._]+/g):"iexplore"===f?d=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(d=o(/edge\/[\d._]+/g)),t=e(e({},t),{supporterVs:d});var p="",g="";return r(/micromessenger/g)?(p="wechat",g=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",g=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",g=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",g=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",g=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),t=e(e({},t),{shell:p,shellVs:g}),window.MAZEY_BROWSER_INFO=t,t}catch(e){return B.warn(e),t}}var K="";exports.addClass=U,exports.addEvent=function(e,t){var n=I();void 0===n[e]&&(n[e]=[]),"function"==typeof t&&n[e].push(t)},exports.addStyle=function(e,t){if(void 0===t&&(t={id:""}),!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0},exports.calLongestCommonSubsequence=function(e,t){return P(e,t)},exports.calLongestCommonSubstring=function(e,t){return C(e,t)},exports.camelCase2Underscore=s,exports.camelCaseToKebabCase=function(e){return i(e)},exports.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},exports.clearHTML=function(e,t){return void 0===t&&(t={}),b(e,t)},exports.clearHtml=function(e,t){return void 0===t&&(t={}),b(e,t)},exports.convert10To26=function(e){for(var t="";e>0;){var n=e%26;0===n&&(n=26),t=String.fromCharCode(n+96)+t,e=(e-n)/26}return t},exports.convertCamelToKebab=i,exports.convertCamelToUnder=a,exports.convertHttpToHttps=N,exports.convertKebabToCamel=function(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t},exports.convertObjectToQuery=function(e){if(e&&0===Object.keys(e).length)return"";var t="?";for(var n in e)t+="".concat(n,"=").concat(e[n],"&");return t.slice(0,-1)},exports.convertToHtmlBreaks=x,exports.convertUnderToCamel=function(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})},exports.cutCHSString=function(e,t,n){return void 0===n&&(n=!1),A(e,t,n)},exports.cutZHString=E,exports.debounce=function(e,t,n){var r=null,o=null,i=null,a=null,s=null,c=function(){var u=d()-i;u<t&&u>=0?o=setTimeout(c,t-u):(o=null,n||(s=e.apply(r,a),o||(r=a=null)))};return function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];r=this,a=u,i=d();var l=n&&!o;return o||(o=setTimeout(c,t)),l&&(s=e.apply(r,a),r=a=null),s}},exports.deepCopy=o,exports.deepCopyObject=function(e){return o(e)},exports.delCookie=function(e){q(e)},exports.doFn=m,exports.fireEvent=D,exports.floatFixed=function(e,t){return void 0===t&&(t=0),parseFloat(e).toFixed(t)},exports.floatToPercent=function(e,t){void 0===t&&(t=0);var n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")},exports.formatDate=function(e,t){void 0===t&&(t="yyyy-MM-dd"),e||(e=new Date);var n=new Date(e),r=n.getHours(),o={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate()<10?"0"+n.getDate():n.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds(),a:r<12?"AM":"PM"},i=t||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var t=o[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),i=i.replace(e,String(t))}),i},exports.genBrowserAttrs=function(e,t){void 0===e&&(e=""),void 0===t&&(t="-");var n=Y(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=n[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(t)),r.push("".concat(a).concat(i))}}),r},exports.genCustomConsole=R,exports.genHashCode=function(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},exports.genRndNumString=u,exports.genStyleString=function(e,t){var n="";return t&&t.length>0&&(n=t.join(";")+";"),"".concat(e,"{").concat(n,"}")},exports.genUniqueNumString=l,exports.generateRndNum=f,exports.generateUniqueNum=function(e){return void 0===e&&(e=3),l(e)},exports.getAllQueryParams=function(e){void 0===e&&(e=""),""===e&&(e=location.search);var t={};return e.replace(/\??(\w+)=([^&]*)&?/g,function(e,n,r){return void 0===t[n]&&(t[n]=decodeURIComponent(r)),""}),t},exports.getBrowserInfo=Y,exports.getCLS=function(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("layout-shift")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().reduce(function(e,t){var n=0;return g(t.value)&&(n=t.value),e+n},0);t.disconnect(),e(r)});t.observe({type:"layout-shift",buffered:!0})})]:[2,0]})})},exports.getCookie=z,exports.getCurrentVersion=function(){return"v4"},exports.getDefineListeners=I,exports.getDomain=function(e,t){if(void 0===t&&(t=["hostname"]),j(e)){var n=new window.URL(e);return t.reduce(function(e,t){return e+=n[t]},"")}var r=document.createElement("a");return r.href=e,t.reduce(function(e,t){return e+=r[t]},"")},exports.getFCP=$,exports.getFID=function(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("first-input")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-input"===e.entryType});if(r){t.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});t.observe({type:"first-input",buffered:!0})})]:[2,0]})})},exports.getFP=J,exports.getFileSize=function(e){var t=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"},exports.getFriendlyInterval=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=p);var r=(n=Object.assign(p,n)).type,o=decodeURIComponent;g(e)||(e=new Date(e).getTime()),g(t)||(t=new Date(t).getTime());var i=Number(t)-Number(e),a="",s=new Array(4).fill(0),c=s[0],u=(s[1],s[2],s[3]),f=o("%20%E5%A4%A9%20"),l=o("%20%E6%97%B6%20"),d=o("%20%E5%88%86%20"),v=o("%20%E7%A7%92");if(i>=0)switch(c=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),u=Math.floor(i/1e3),r){case"d":a=c;break;case"text":a=(c=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+l+Math.floor(i/1e3/60%60)+d+(u=Math.floor(i/1e3%60))+v;break;default:a=u}return a},exports.getHashQueryParam=function(e){var t=location.hash.split("?");if(1===t.length)return"";var n=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=t[1].match(n);return r?r[2]:""},exports.getLCP=function(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("largest-contentful-paint")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"largest-contentful-paint",buffered:!0})})]:[2,0]})})},exports.getLocalStorage=function(e){var t=null;if(e){var n=localStorage.getItem(e);n&&(t=JSON.parse(n))}return t},exports.getPageMeta=function(e){var t;return document.querySelector&&(null===(t=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===t?void 0:t.getAttribute("content"))||""},exports.getPerformance=function(e){return void 0===e&&(e=!1),t(this,void 0,void 0,function(){function t(){var t={source:F,os:r(),osVersion:o(),deviceType:i(),network:a(),screenDirection:c(),unloadTime:w-y,redirectTime:x-b,dnsTime:S-E,tcpTime:A-T,sslTime:u(A,O),responseTime:C-P,downloadTime:M-C,firstPaintTime:z,firstContentfulPaintTime:q,domReadyTime:k-I,onloadTime:N-I,whiteTime:C-I,renderTime:j-I,decodedBodySize:B,encodedBodySize:L};Object.keys(t).forEach(function(e){g(t[e])&&(t[e]<0?t[e]=0:t[e]=Math.round(t[e]))}),g(t.whiteTime)&&t.whiteTime>t.onloadTime&&(t.whiteTime=0);var n={};e||Object.keys(t).forEach(function(e){n[s(e)]=t[e]}),Object.keys(n).length?l(n):l(t)}function r(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",t=navigator.userAgent,n=t.indexOf("Android")>-1||t.indexOf("Linux")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(n&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,t=navigator.userAgent.toLowerCase(),n=t.match(/(ipad)/i)&&"ipad",r=t.match(/iphone os/i)&&"iphone os",o=t.match(/midp/i)&&"midp",i=t.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=t.match(/ucweb/i)&&"ucweb",s=t.match(/android/i)&&"android",c=t.match(/windows ce/i)&&"windows ce",u=t.match(/windows mobile/i)&&"windows mobile";return(e=n||r||o||i||a||s||c||u?r||o||i||a||s||c||u?"phone":n?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",t=window.navigator;if(t.connection&&t.connection.effectiveType)switch(t.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function c(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function u(e,t){var n=0;return t&&(n=e-t),n}var f,l,d,p,v,m,w,y,x,b,S,E,A,T,O,C,P,M,k,N,j,_,R,B,L,U,F,I,D,z,q;return n(this,function(e){switch(e.label){case 0:if(!W("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(f=window.performance)||"function"!=typeof f.getEntries||"function"!=typeof f.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(d=new Promise(function(e){l=[e][0]}),p=null,h(v=f.getEntriesByType("navigation"))&&(p=v[0]),m=new Array(19).fill(0),w=m[0],y=m[1],x=m[2],b=m[3],S=m[4],E=m[5],A=m[6],T=m[7],O=m[8],C=m[9],P=m[10],M=m[11],k=m[12],N=m[13],j=m[14],_=m[15],R=m[16],B=m[17],L=m[18],U=f.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,L=p.encodedBodySize,w=p.unloadEventEnd,y=p.unloadEventStart,x=p.redirectEnd,b=p.redirectStart,S=p.domainLookupEnd,E=p.domainLookupStart,A=p.connectEnd,T=p.connectStart,O=p.secureConnectionStart,C=p.responseStart,P=p.requestStart,M=p.responseEnd,k=p.domContentLoadedEventStart,N=p.loadEventStart,j=p.loadEventEnd,_=p.startTime,R=p.fetchStart;else{if(!U)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",w=U.unloadEventEnd,y=U.unloadEventStart,x=U.redirectEnd,b=U.redirectStart,S=U.domainLookupEnd,E=U.domainLookupStart,A=U.connectEnd,T=U.connectStart,O=U.secureConnectionStart,C=U.responseStart,P=U.requestStart,M=U.responseEnd,k=U.domContentLoadedEventStart,N=U.loadEventStart,j=U.loadEventEnd,_=U.navigationStart,R=U.fetchStart}if(I=0,g(_))I=_;else{if(!g(R))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=R}return[4,Promise.all([J(),$()])];case 1:return D=e.sent(),z=D[0],q=D[1],g(j)&&j>0?t():window.addEventListener("load",function(){window.setTimeout(function(){t()},0)}),[2,d]}})})},exports.getQueryParam=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=location.search.substring(1).match(t);return null!==n?decodeURIComponent(n[2]):""},exports.getScriptQueryParam=function(e,t){void 0===t&&(t=""),t||(t=".js");for(var n=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(t,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(t)){var a=i.match(n);if(a)return decodeURIComponent(a[1])}}return""},exports.getSessionStorage=function(e){var t=null;if(e){var n=sessionStorage.getItem(e);n&&(t=JSON.parse(n))}return t},exports.getTTFB=function(){return t(this,void 0,void 0,function(){var e,t;return n(this,function(n){return W("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(t=e.responseStart-e.requestStart,[2,Math.round(t)]):[2,0]):[2,0]})})},exports.getUrlFileType=function(e){var t="";if("string"!=typeof e||""==e)return t;var n=/\.[^/?#]+$/.exec(e);return n?(n[0].length>1&&(t=n[0].substring(1)),t):t},exports.getUrlHost=function(e){var t="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),j(e)&&(t=new URL(e).host),t},exports.getUrlParam=function(e,t,n){void 0===n&&(n={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(t)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,function(e,t,n){return void 0!==o[t]?o[t].push(n):o[t]=[n],""}),r=o[t]||[]}return n.returnArray?r:r.length?r[0]:null},exports.getUrlPath=function(e){var t="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),j(e)&&(t=new URL(e).pathname),t},exports.hasClass=function(e,t){if(!e)return B.error("The element is not exist."),!1;for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},exports.inRate=function(e){return M(e)},exports.invokeEvent=function(e){D(e)},exports.invokeFn=v,exports.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},exports.isBool=y,exports.isBoolean=function(e){return y(e)},exports.isBrowser=function(){if(O)return"browser"===O;var e="undefined"!=typeof window;return e&&(O="browser"),e},exports.isFunction=function(e){return"function"==typeof e},exports.isHit=M,exports.isJSONString=c,exports.isJsonString=function(e){return c(e)},exports.isNonEmptyArray=h,exports.isNonEmptyObject=function(e){return!!w(e)&&0!==Object.keys(e).length},exports.isNumber=g,exports.isPureObject=w,exports.isSafePWAEnv=function(){if(Q)return"pwa"===Q;var e=Y();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell&&"https:"===window.location.protocol?(Q="pwa",!0):(Q="no-pwa",!1)},exports.isString=function(e){return"string"==typeof e},exports.isSupportWebp=function(){return K?Promise.resolve("webp"===K):new Promise(function(e){var t=new Image;t.onload=function(){var n=t.width>0&&t.height>0;K=n?"webp":"no-webp",e(n)},t.onerror=function(){K="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})},exports.isSupportedEntryType=W,exports.isUdfOrNul=function(e){return null==e},exports.isValidData=function(e,t,n){var r=!1;return"object"!=typeof e||t.reduce(function(e,t){return void 0===e[t]?Object.create(null):e=e[t]},e)===n&&(r=!0),r},exports.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},exports.isValidHttpUrl=k,exports.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},exports.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)},exports.loadCSS=H,exports.loadImage=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e})},exports.loadScript=V,exports.loadScriptIfUndefined=function(e,t){return window[e]?Promise.resolve("defined"):V(t)},exports.longestComSubsequence=P,exports.longestComSubstring=C,exports.mNow=d,exports.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)},exports.mazeyCon=B,exports.newLine=function(e){return x(e)},exports.removeClass=function(e,t){var n;e?(n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n):B.error("The element is not exist.")},exports.removeCookie=q,exports.removeEvent=function(e,t){var n=I(),r=n[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof t){for(var o=0,i=r.length;o<i;o++)if(r[o]===t){n[e].splice(o,1);break}}else delete n[e]},exports.removeHTML=b,exports.removeHtml=function(e,t){return void 0===t&&(t={}),b(e,t)},exports.repeatUntilConditionMet=function(e,r,o){var i=this;void 0===r&&(r={}),void 0===o&&(o=function(e){return!0===e});var a=r.interval,s=void 0===a?1e3:a,c=r.times,u=void 0===c?10:c,f=r.context,l=r.args,d=0,p=function(){setTimeout(function(){return t(i,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,e.apply(f,l)];case 1:return t=n.sent(),o(t)||++d>=u?[2]:(p(),[2])}})})},s)};"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof u||u<0)&&console.error("Expected a non-negative number for times."),p()},exports.replaceHttp=function(e){return N(e)},exports.sanitizeInput=function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return t[e]})},exports.setClass=function(e,t){U(e,t)},exports.setCookie=function(e,t,n,r){var o,i;if(n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var s=location.host;1===s.split(".").length?document.cookie=e+"="+t+i+"; path=/":((o=s.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+t+i+"; path=/; domain="+r,null!==z(e)&&z(e)===t||(r=r||"."+s,document.cookie=e+"="+t+i+"; path=/; domain="+r))},exports.setImgSizeBySrc=F,exports.setImgWidHeiBySrc=function(){return F()},exports.setLocalStorage=function(e,t){void 0===t&&(t=null),e&&localStorage.setItem(e,JSON.stringify(t))},exports.setSessionStorage=function(e,t){void 0===t&&(t=null),e&&sessionStorage.setItem(e,JSON.stringify(t))},exports.sleep=function(e){return t(this,void 0,void 0,function(){return n(this,function(t){return[2,T(e)]})})},exports.throttle=function(e,t,n){void 0===n&&(n={}),n=Object.assign({},n);var r=null,o=null,i=null,a=[null,0],s=a[0],c=a[1],u=function(){c=!1===n.leading?0:d(),i=null,s=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var l=d();c||!1!==n.leading||(c=l);var p=t-(l-c);return r=this,o=a,p<=0||p>t?(i&&(clearTimeout(i),i=null),c=l,s=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u.bind(r),p)),s}},exports.timeCon=L,exports.truncateZHString=A,exports.unsanitize=function(e){return S(e)},exports.unsanitizeInput=S,exports.updateQueryParam=function(e,t,n){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(t,n),r.toString()}var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+n+"$2"):e+i+t+"="+n},exports.waitTime=T,exports.windowLoaded=function(e){void 0===e&&(e=3e4);var t,n=function(){},r=new Promise(function(e,r){n=e,t=r});return"complete"===document.readyState?n("complete"):window.addEventListener("load",function(){return n("load")}),setTimeout(function(){return t(Error("timeout"))},e),r},exports.zAxiosIsValidRes=function(e,t){void 0===t&&(t={validStatusRange:[200,300],validCode:[0]});var n=Object.assign({validStatusRange:[200,300],validCode:[0]},t),r=n.validStatusRange,o=n.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i};
|
|
6
|
+
"use strict";var e=function(){return e=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},e.apply(this,arguments)};function t(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function n(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=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}function r(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 o(t){if("object"!=typeof t)return t;var n=["string","number","boolean","undefined"];return Object.values(t).every(function(e){return n.includes(typeof e)})?e({},t):JSON.parse(JSON.stringify(t))}function i(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substring(1):t}function a(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substring(1):t}function s(e){return a(e)}function c(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function u(e){void 0===e&&(e=5);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function f(e){return void 0===e&&(e=5),u(e)}function l(e){void 0===e&&(e=3);var t=[d(),f(e||3)];return t[0]+t[1]}function d(){return Date.now?Date.now():(new Date).getTime()}"function"==typeof SuppressedError&&SuppressedError;var p={type:"d"};function g(e,t){void 0===t&&(t={});var n=t.isNaNAsNumber,r=void 0!==n&&n,o=t.isInfinityAsNumber,i=void 0!==o&&o,a=t.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,t)),r}function m(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return v.apply(void 0,r([e],t,!1))}function h(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t}function w(e){var t=Boolean(e),n="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return t&&n&&r}function y(e){return"boolean"==typeof e}function x(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")}function b(e,t){void 0===t&&(t={});var n=t.removeNewLine,r=void 0!==n&&n,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function S(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return t[e]})}function E(e,t,n){if(void 0===n&&(n={hasDot:!1,dotText:"..."}),n=Object.assign({hasDot:!1,dotText:"..."},n),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",s=e.replace(i,"**").length,c=0;c<s&&(null!=(a=e.charAt(c).toString()).match(i)?r+=2:r++,!(r>t));c++)o+=a;return n.hasDot&&s>t&&(o+=n.dotText),o}return""}function T(e,t,n){return void 0===n&&(n=!1),E(e,t,{hasDot:n})}function A(e){return t(this,void 0,void 0,function(){return n(this,function(t){return[2,new Promise(function(t){setTimeout(function(){t(e)},e)})]})})}var O="";function C(e,t){for(var n=e.length,r=t.length,i=o(new Array(n).fill(new Array(r).fill(0))),a=0;a<n;++a)for(var s=0;s<r;++s)if(e[a]===t[s]){var c=0;a>0&&s>0&&(c=i[a-1][s-1]),i[a][s]=c+1}var u=Array.prototype.concat.apply([],i);return Math.max.apply(Math,u)}function P(e,t){for(var n=e.length,r=t.length,i=o(new Array(n).fill(new Array(r).fill(0))),a=0;a<n;++a)for(var s=0;s<r;++s)if(e[a]===t[s]){var c=0;a>0&&s>0&&(c=i[a-1][s-1]),i[a][s]=c+1}else{var u=[0,0],f=u[0],l=u[1];s>0&&(f=i[a][s-1]),a>0&&(l=i[a-1][s]),i[a][s]=Math.max(f,l)}var d=Array.prototype.concat.apply([],i);return Math.max.apply(Math,d)}function M(e){return Math.random()<e}function k(e,t){void 0===t&&(t={strict:!0});var n=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return t.strict||(n=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),n.test(e)}function N(e){return e.replace(/^http:/,"https:")}function j(e){void 0===e&&(e="");var t=window.URL;if(!t)return!1;if(!t.canParse)return!1;if("function"!=typeof t.canParse)return!1;try{var n=new t("b","http://a");return n.pathname="c d","http://a/c%20d"===n.href&&Boolean(n.searchParams)&&t.canParse(e)}catch(e){return!1}}var _={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function R(t,n){void 0===t&&(t=""),void 0===n&&(n={});var o=Object.assign(e({},_),n),i=o.enabled,a=o.isClosed,s=o.showWrap,c=o.showDate,u=o.locales,f=o.isStringifyObject,l=o.logFn,d=o.errorFn;!0===a&&(B.warn("The options.isClosed is deprecated. Please use options.enabled instead."),i=!1);var p=Object.create(null),g=function(){return(new Date).toLocaleDateString(u,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(e){p[e]=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(i){var a=t,u=t;if("string"==typeof t&&t.length>=2){var p=t.length;a=":"===t[p-1]?t.substring(0,p-1):t}s&&console.log("--- ".concat(a," - begin ---")),c&&(u=t?"".concat(g()," ").concat(t):"".concat(g())),f&&(n=n.map(function(e){return w(e)?JSON.stringify(e):e})),t||c?console[e].apply(console,r([u],n,!1)):console[e].apply(console,n),"log"===e&&l(),"error"===e&&d(),s&&console.log("--- ".concat(a," - end ---"))}}}),p}var B=R("[Mazey]"),L=R("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function U(e,t){if(e)if(Array.isArray(t))t.forEach(function(t){e.classList.add(t)});else{for(var n=e.className,r=n.split(/\s+/),o=0;o<r.length;o++)if(r[o]===t)return;var i,a="";""!==n&&(a=" "),i=n+a+t,e.className=i}else B.error("The element is not exist.")}function F(){var e,t=window.jQuery||window.$;return t?!(!(e=t("img"))||!e.length)&&(e.each(function(){var e=t(this);if(e){var n=e.attr("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/width=([0-9]+[a-z%]*)/),o=n.match(/height=([0-9]+[a-z%]*)/);r&&h(r)&&r[1]&&e.width(r[1]),o&&h(o)&&o[1]&&e.height(o[1])}}}),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach(function(e){var t=e;if(t){var n=t.getAttribute("src");if(n&&"string"==typeof n&&n.length){var r=n.match(/width=([0-9]+[a-z%]*)/),o=n.match(/height=([0-9]+[a-z%]*)/);r&&h(r)&&r[1]&&(t.style.width=r[1]),o&&h(o)&&o[1]&&(t.style.height=o[1])}}}),!0)}function I(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function D(e,t){var n=I()[e];if(n instanceof Array)for(var r=0,o=n.length;r<o;r++)"function"==typeof n[r]&&(void 0===t?n[r]():n[r](t))}function z(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function q(e){for(var t=document.cookie.split(";"),n=0;n<t.length;n++){var r=t[n].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function H(e,t){void 0===t&&(t={id:""});var n,r=t.id,o=function(){},i=new Promise(function(e,t){var r;n=(r=[e,t])[0],o=r[1]}),a=function(){n("loaded")},s=document.createElement("link");s||o(new Error("Not support create link element"));var c="onload"in s,u=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(s.rel="stylesheet",s.type="text/css",s.href=e,void 0!==r&&(s.id=r),document.getElementsByTagName("head")[0].appendChild(s),u||!c)return setTimeout(function(){l(s,a,0)},1),i;function f(){s&&(s.onload=s.onerror=s.onreadystatechange=null),s=null,a()}function l(e,t,n){if(e){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e&&(e=null),void t();if(u)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout(function(){r?t():l(e,t,n)},20)}}return c?(s.onload=f,s.onerror=function(){f()}):s.onreadystatechange=function(){s&&/loaded|complete/.test(s.readyState)&&f()},i}var Z={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function V(t,n){void 0===n&&(n=e({},Z));var r,o,i=Object.assign(e({},Z),n),a=i.id,s=i.callback,c=i.timeout,u=i.isDefer,f=i.isAsync,l=i.isCrossOrigin,d=i.attributes,p=i.cssUrl,g=document.createElement("script");if(g||Promise.reject("Not support create script element"),p){var v=function(e,t){if(!t)return"";if(k(t))return t;var n=e.split("/");n.pop();var r=n.join("/");return"".concat(r,"/").concat(t)}(t,p);v&&H(v).catch(function(e){console.error("Failed to load CSS from ".concat(v,": ").concat(null==e?void 0:e.message))})}var h=document.getElementsByTagName("script")[0];return g.type="text/javascript",u&&(g.defer=!0),f&&(g.async=!0),l&&(g.crossOrigin="anonymous"),a&&(g.id=a),d&&Object.keys(d).forEach(function(e){g.setAttribute(e,d[e])}),g.readyState?g.onreadystatechange=function(){"loaded"!==g.readyState&&"complete"!==g.readyState||(g.onreadystatechange=null,m(s),m(r,"loaded"))}:g.onload=function(){m(s),m(r,"loaded")},g.src=t,h&&h.parentNode.insertBefore(g,h),new Promise(function(e,t){var n;r=(n=[e,t])[0],o=n[1],c&&setTimeout(o.bind(null,"timeout"),c)})}function W(e){var t=[],n=window.PerformanceObserver;return!!n&&(h(n.supportedEntryTypes)&&(t=n.supportedEntryTypes),t.includes(e))}function $(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("paint")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})})]:[2,0]})})}function J(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("paint")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-paint"===e.name});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"paint",buffered:!0})})]:[2,0]})})}var Q="";function Y(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var t={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var n=navigator.userAgent.toLowerCase();if(!n)return t;var r=function(e){return e.test(n)},o=function(e){var t="",r=n.match(e);return r&&h(r)&&(t=(t=(t=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),t},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),t=e(e({},t),{system:i,appleType:a});var s="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?s="2000":r(/windows nt 5.1|windows xp/g)?s="xp":r(/windows nt 5.2|windows 2003/g)?s="2003":r(/windows nt 6.0|windows vista/g)?s="vista":r(/windows nt 6.1|windows 7/g)?s="7":r(/windows nt 6.2|windows 8/g)?s="8":r(/windows nt 6.3|windows 8.1/g)?s="8.1":r(/windows nt 10.0|windows 10/g)&&(s="10"):"macos"===i?s=o(/os x [\d._]+/g):"android"===i?s=o(/android [\d._]+/g):"ios"===i&&(s=o(/os [\d._]+/g)),t=e(e({},t),{systemVs:s});var c="";"windows"===i||"macos"===i||"linux"===i?c="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(c="mobile"),t=e(e({},t),{platform:c});var u="",f="";r(/applewebkit/g)?(u="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(u="gecko",f="firefox"):r(/presto/g)?(u="presto",f="opera"):r(/trident|compatible|msie/g)&&(u="trident",f="iexplore"),t=e(e({},t),{engine:u,supporter:f});var l="";"webkit"===u?l=o(/applewebkit\/[\d._]+/g):"gecko"===u?l=o(/gecko\/[\d._]+/g):"presto"===u?l=o(/presto\/[\d._]+/g):"trident"===u&&(l=o(/trident\/[\d._]+/g)),t=e(e({},t),{engineVs:l});var d="";"chrome"===f?d=o(/chrome\/[\d._]+/g):"safari"===f?d=o(/version\/[\d._]+/g):"firefox"===f?d=o(/firefox\/[\d._]+/g):"opera"===f?d=o(/opr\/[\d._]+/g):"iexplore"===f?d=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(d=o(/edge\/[\d._]+/g)),t=e(e({},t),{supporterVs:d});var p="",g="";return r(/micromessenger/g)?(p="wechat",g=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",g=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",g=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",g=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",g=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),t=e(e({},t),{shell:p,shellVs:g}),window.MAZEY_BROWSER_INFO=t,t}catch(e){return B.warn(e),t}}var K="";exports.addClass=U,exports.addEvent=function(e,t){var n=I();void 0===n[e]&&(n[e]=[]),"function"==typeof t&&n[e].push(t)},exports.addStyle=function(e,t){if(void 0===t&&(t={id:""}),!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0},exports.calLongestCommonSubsequence=function(e,t){return P(e,t)},exports.calLongestCommonSubstring=function(e,t){return C(e,t)},exports.camelCase2Underscore=s,exports.camelCaseToKebabCase=function(e){return i(e)},exports.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},exports.clearHTML=function(e,t){return void 0===t&&(t={}),b(e,t)},exports.clearHtml=function(e,t){return void 0===t&&(t={}),b(e,t)},exports.convert10To26=function(e){for(var t="";e>0;){var n=e%26;0===n&&(n=26),t=String.fromCharCode(n+96)+t,e=(e-n)/26}return t},exports.convertCamelToKebab=i,exports.convertCamelToUnder=a,exports.convertHttpToHttps=N,exports.convertKebabToCamel=function(e){var t=e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()});return t.endsWith("-")?t.slice(0,-1):t},exports.convertObjectToQuery=function(e){if(e&&0===Object.keys(e).length)return"";var t="?";for(var n in e)t+="".concat(n,"=").concat(e[n],"&");return t.slice(0,-1)},exports.convertToHtmlBreaks=x,exports.convertUnderToCamel=function(e){return e.replace(/_([a-z])/g,function(e,t){return t.toUpperCase()})},exports.cutCHSString=function(e,t,n){return void 0===n&&(n=!1),T(e,t,n)},exports.cutZHString=E,exports.debounce=function(e,t,n){var r=null,o=null,i=null,a=null,s=null,c=function(){var u=d()-i;u<t&&u>=0?o=setTimeout(c,t-u):(o=null,n||(s=e.apply(r,a),o||(r=a=null)))};return function(){for(var u=[],f=0;f<arguments.length;f++)u[f]=arguments[f];r=this,a=u,i=d();var l=n&&!o;return o||(o=setTimeout(c,t)),l&&(s=e.apply(r,a),r=a=null),s}},exports.deepCopy=o,exports.deepCopyObject=function(e){return o(e)},exports.delCookie=function(e){q(e)},exports.doFn=m,exports.fireEvent=D,exports.floatFixed=function(e,t){return void 0===t&&(t=0),parseFloat(e).toFixed(t)},exports.floatToPercent=function(e,t){void 0===t&&(t=0);var n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")},exports.formatDate=function(e,t){void 0===t&&(t="yyyy-MM-dd"),e||(e=new Date);var n=new Date(e),r=n.getHours(),o={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate()<10?"0"+n.getDate():n.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds(),a:r<12?"AM":"PM"},i=t||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var t=o[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),i=i.replace(e,String(t))}),i},exports.genBrowserAttrs=function(e,t){void 0===e&&(e=""),void 0===t&&(t="-");var n=Y(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=n[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(t)),r.push("".concat(a).concat(i))}}),r},exports.genCustomConsole=R,exports.genHashCode=function(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},exports.genRndNumString=u,exports.genStyleString=function(e,t){var n="";return t&&t.length>0&&(n=t.join(";")+";"),"".concat(e,"{").concat(n,"}")},exports.genUniqueNumString=l,exports.generateRndNum=f,exports.generateUniqueNum=function(e){return void 0===e&&(e=3),l(e)},exports.getAllQueryParams=function(e){void 0===e&&(e=""),""===e&&(e=location.search);var t={};return e.replace(/\??(\w+)=([^&]*)&?/g,function(e,n,r){return void 0===t[n]&&(t[n]=decodeURIComponent(r)),""}),t},exports.getBrowserInfo=Y,exports.getCLS=function(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("layout-shift")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().reduce(function(e,t){var n=0;return g(t.value)&&(n=t.value),e+n},0);t.disconnect(),e(r)});t.observe({type:"layout-shift",buffered:!0})})]:[2,0]})})},exports.getCookie=z,exports.getCurrentVersion=function(){return"v4"},exports.getDefineListeners=I,exports.getDomain=function(e,t){if(void 0===t&&(t=["hostname"]),j(e)){var n=new window.URL(e);return t.reduce(function(e,t){return e+=n[t]},"")}var r=document.createElement("a");return r.href=e,t.reduce(function(e,t){return e+=r[t]},"")},exports.getFCP=$,exports.getFID=function(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("first-input")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"first-input"===e.entryType});if(r){t.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});t.observe({type:"first-input",buffered:!0})})]:[2,0]})})},exports.getFP=J,exports.getFileSize=function(e){var t=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"},exports.getFriendlyInterval=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=p);var r=(n=Object.assign(p,n)).type,o=decodeURIComponent;g(e)||(e=new Date(e).getTime()),g(t)||(t=new Date(t).getTime());var i=Number(t)-Number(e),a="",s=new Array(4).fill(0),c=s[0],u=(s[1],s[2],s[3]),f=o("%20%E5%A4%A9%20"),l=o("%20%E6%97%B6%20"),d=o("%20%E5%88%86%20"),v=o("%20%E7%A7%92");if(i>=0)switch(c=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),u=Math.floor(i/1e3),r){case"d":a=c;break;case"text":a=(c=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+l+Math.floor(i/1e3/60%60)+d+(u=Math.floor(i/1e3%60))+v;break;default:a=u}return a},exports.getHashQueryParam=function(e){var t=location.hash.split("?");if(1===t.length)return"";var n=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=t[1].match(n);return r?r[2]:""},exports.getLCP=function(){return t(this,void 0,void 0,function(){return n(this,function(e){return W("largest-contentful-paint")?[2,new Promise(function(e){var t=new PerformanceObserver(function(n){var r=n.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(t.disconnect(),e(Math.round(r.startTime)))});t.observe({type:"largest-contentful-paint",buffered:!0})})]:[2,0]})})},exports.getLocalStorage=function(e){var t=null;if(e){var n=localStorage.getItem(e);n&&(t=JSON.parse(n))}return t},exports.getPageMeta=function(e){var t;return document.querySelector&&(null===(t=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===t?void 0:t.getAttribute("content"))||""},exports.getPerformance=function(e){return void 0===e&&(e=!1),t(this,void 0,void 0,function(){function t(){var t={source:F,os:r(),osVersion:o(),deviceType:i(),network:a(),screenDirection:c(),unloadTime:w-y,redirectTime:x-b,dnsTime:S-E,tcpTime:T-A,sslTime:u(T,O),responseTime:C-P,downloadTime:M-C,firstPaintTime:z,firstContentfulPaintTime:q,domReadyTime:k-I,onloadTime:N-I,whiteTime:C-I,renderTime:j-I,decodedBodySize:B,encodedBodySize:L};Object.keys(t).forEach(function(e){g(t[e])&&(t[e]<0?t[e]=0:t[e]=Math.round(t[e]))}),g(t.whiteTime)&&t.whiteTime>t.onloadTime&&(t.whiteTime=0);var n={};e||Object.keys(t).forEach(function(e){n[s(e)]=t[e]}),Object.keys(n).length?l(n):l(t)}function r(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",t=navigator.userAgent,n=t.indexOf("Android")>-1||t.indexOf("Linux")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(n&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,t=navigator.userAgent.toLowerCase(),n=t.match(/(ipad)/i)&&"ipad",r=t.match(/iphone os/i)&&"iphone os",o=t.match(/midp/i)&&"midp",i=t.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=t.match(/ucweb/i)&&"ucweb",s=t.match(/android/i)&&"android",c=t.match(/windows ce/i)&&"windows ce",u=t.match(/windows mobile/i)&&"windows mobile";return(e=n||r||o||i||a||s||c||u?r||o||i||a||s||c||u?"phone":n?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",t=window.navigator;if(t.connection&&t.connection.effectiveType)switch(t.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function c(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function u(e,t){var n=0;return t&&(n=e-t),n}var f,l,d,p,v,m,w,y,x,b,S,E,T,A,O,C,P,M,k,N,j,_,R,B,L,U,F,I,D,z,q;return n(this,function(e){switch(e.label){case 0:if(!W("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(f=window.performance)||"function"!=typeof f.getEntries||"function"!=typeof f.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(d=new Promise(function(e){l=[e][0]}),p=null,h(v=f.getEntriesByType("navigation"))&&(p=v[0]),m=new Array(19).fill(0),w=m[0],y=m[1],x=m[2],b=m[3],S=m[4],E=m[5],T=m[6],A=m[7],O=m[8],C=m[9],P=m[10],M=m[11],k=m[12],N=m[13],j=m[14],_=m[15],R=m[16],B=m[17],L=m[18],U=f.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,L=p.encodedBodySize,w=p.unloadEventEnd,y=p.unloadEventStart,x=p.redirectEnd,b=p.redirectStart,S=p.domainLookupEnd,E=p.domainLookupStart,T=p.connectEnd,A=p.connectStart,O=p.secureConnectionStart,C=p.responseStart,P=p.requestStart,M=p.responseEnd,k=p.domContentLoadedEventStart,N=p.loadEventStart,j=p.loadEventEnd,_=p.startTime,R=p.fetchStart;else{if(!U)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",w=U.unloadEventEnd,y=U.unloadEventStart,x=U.redirectEnd,b=U.redirectStart,S=U.domainLookupEnd,E=U.domainLookupStart,T=U.connectEnd,A=U.connectStart,O=U.secureConnectionStart,C=U.responseStart,P=U.requestStart,M=U.responseEnd,k=U.domContentLoadedEventStart,N=U.loadEventStart,j=U.loadEventEnd,_=U.navigationStart,R=U.fetchStart}if(I=0,g(_))I=_;else{if(!g(R))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=R}return[4,Promise.all([J(),$()])];case 1:return D=e.sent(),z=D[0],q=D[1],g(j)&&j>0?t():window.addEventListener("load",function(){window.setTimeout(function(){t()},0)}),[2,d]}})})},exports.getQueryParam=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=location.search.substring(1).match(t);return null!==n?decodeURIComponent(n[2]):""},exports.getScriptQueryParam=function(e,t){void 0===t&&(t=""),t||(t=".js");for(var n=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(t,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(t)){var a=i.match(n);if(a)return decodeURIComponent(a[1])}}return""},exports.getSessionStorage=function(e){var t=null;if(e){var n=sessionStorage.getItem(e);n&&(t=JSON.parse(n))}return t},exports.getTTFB=function(){return t(this,void 0,void 0,function(){var e,t;return n(this,function(n){return W("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(t=e.responseStart-e.requestStart,[2,Math.round(t)]):[2,0]):[2,0]})})},exports.getUrlFileType=function(e){var t="";if("string"!=typeof e||""==e)return t;var n=/\.[^/?#]+$/.exec(e);return n?(n[0].length>1&&(t=n[0].substring(1)),t):t},exports.getUrlHost=function(e){var t="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),j(e)&&(t=new URL(e).host),t},exports.getUrlParam=function(e,t,n){void 0===n&&(n={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(t)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,function(e,t,n){return void 0!==o[t]?o[t].push(n):o[t]=[n],""}),r=o[t]||[]}return n.returnArray?r:r.length?r[0]:null},exports.getUrlPath=function(e){var t="";return!k(e)&&k(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),j(e)&&(t=new URL(e).pathname),t},exports.hasClass=function(e,t){if(!e)return B.error("The element is not exist."),!1;for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},exports.inRate=function(e){return M(e)},exports.invokeEvent=function(e){D(e)},exports.invokeFn=v,exports.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},exports.isBool=y,exports.isBoolean=function(e){return y(e)},exports.isBrowser=function(){if(O)return"browser"===O;var e="undefined"!=typeof window;return e&&(O="browser"),e},exports.isFunction=function(e){return"function"==typeof e},exports.isHit=M,exports.isJSONString=c,exports.isJsonString=function(e){return c(e)},exports.isNonEmptyArray=h,exports.isNonEmptyObject=function(e){return!!w(e)&&0!==Object.keys(e).length},exports.isNumber=g,exports.isPureObject=w,exports.isSafePWAEnv=function(){if(Q)return"pwa"===Q;var e=Y();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell&&"https:"===window.location.protocol?(Q="pwa",!0):(Q="no-pwa",!1)},exports.isString=function(e){return"string"==typeof e},exports.isSupportWebp=function(){return K?Promise.resolve("webp"===K):new Promise(function(e){var t=new Image;t.onload=function(){var n=t.width>0&&t.height>0;K=n?"webp":"no-webp",e(n)},t.onerror=function(){K="no-webp",e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})},exports.isSupportedEntryType=W,exports.isUdfOrNul=function(e){return null==e},exports.isValidData=function(e,t,n){var r=!1;return"object"!=typeof e||t.reduce(function(e,t){return void 0===e[t]?Object.create(null):e=e[t]},e)===n&&(r=!0),r},exports.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},exports.isValidHttpUrl=k,exports.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},exports.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)},exports.loadCSS=H,exports.loadImage=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=function(e){n(e)},r.src=e})},exports.loadScript=V,exports.loadScriptIfUndefined=function(e,t){return window[e]?Promise.resolve("defined"):V(t)},exports.longestComSubsequence=P,exports.longestComSubstring=C,exports.mNow=d,exports.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)},exports.mazeyCon=B,exports.newLine=function(e){return x(e)},exports.removeClass=function(e,t){var n;e?(n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n):B.error("The element is not exist.")},exports.removeCookie=q,exports.removeEvent=function(e,t){var n=I(),r=n[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof t){for(var o=0,i=r.length;o<i;o++)if(r[o]===t){n[e].splice(o,1);break}}else delete n[e]},exports.removeHTML=b,exports.removeHtml=function(e,t){return void 0===t&&(t={}),b(e,t)},exports.repeatUntilConditionMet=function(e,r,o){var i=this;void 0===r&&(r={}),void 0===o&&(o=function(e){return!0===e});var a=r.interval,s=void 0===a?1e3:a,c=r.times,u=void 0===c?10:c,f=r.context,l=r.args,d=0,p=function(){setTimeout(function(){return t(i,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,e.apply(f,l)];case 1:return t=n.sent(),o(t)||++d>=u?[2]:(p(),[2])}})})},s)};"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof u||u<0)&&console.error("Expected a non-negative number for times."),p()},exports.replaceHttp=function(e){return N(e)},exports.sanitizeInput=function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return t[e]})},exports.setClass=function(e,t){U(e,t)},exports.setCookie=function(e,t,n,r){var o,i;if(n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var s=location.host;1===s.split(".").length?document.cookie=e+"="+t+i+"; path=/":((o=s.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+t+i+"; path=/; domain="+r,null!==z(e)&&z(e)===t||(r=r||"."+s,document.cookie=e+"="+t+i+"; path=/; domain="+r))},exports.setImgSizeBySrc=F,exports.setImgWidHeiBySrc=function(){return F()},exports.setLocalStorage=function(e,t){void 0===t&&(t=null),e&&localStorage.setItem(e,JSON.stringify(t))},exports.setSessionStorage=function(e,t){void 0===t&&(t=null),e&&sessionStorage.setItem(e,JSON.stringify(t))},exports.sleep=function(e){return t(this,void 0,void 0,function(){return n(this,function(t){return[2,A(e)]})})},exports.throttle=function(e,t,n){void 0===n&&(n={}),n=Object.assign({},n);var r=null,o=null,i=null,a=[null,0],s=a[0],c=a[1],u=function(){c=!1===n.leading?0:d(),i=null,s=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var l=d();c||!1!==n.leading||(c=l);var p=t-(l-c);return r=this,o=a,p<=0||p>t?(i&&(clearTimeout(i),i=null),c=l,s=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(u.bind(r),p)),s}},exports.timeCon=L,exports.truncateZHString=T,exports.unsanitize=function(e){return S(e)},exports.unsanitizeInput=S,exports.updateQueryParam=function(e,t,n){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(t,n),r.toString()}var o=new RegExp("([?&])"+t+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+t+"="+n+"$2"):e+i+t+"="+n},exports.waitTime=A,exports.windowLoaded=function(e){void 0===e&&(e=3e4);var t,n=function(){},r=new Promise(function(e,r){n=e,t=r});return"complete"===document.readyState?n("complete"):window.addEventListener("load",function(){return n("load")}),setTimeout(function(){return t(Error("timeout"))},e),r},exports.zAxiosIsValidRes=function(e,t){void 0===t&&(t={validStatusRange:[200,300],validCode:[0]});var n=Object.assign({validStatusRange:[200,300],validCode:[0]},t),r=n.validStatusRange,o=n.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i};
|
package/lib/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Mazey v4.
|
|
2
|
+
* Mazey v4.9.1 https://github.com/chengchuu/mazey
|
|
3
3
|
* (c) 2018-2026 Cheng
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var n=function(){return n=Object.assign||function(n){for(var e,t=1,r=arguments.length;t<r;t++)for(var o in e=arguments[t])Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n},n.apply(this,arguments)};function e(n,e,t,r){return new(t||(t=Promise))(function(o,i){function a(n){try{c(r.next(n))}catch(n){i(n)}}function u(n){try{c(r.throw(n))}catch(n){i(n)}}function c(n){var e;n.done?o(n.value):(e=n.value,e instanceof t?e:new t(function(n){n(e)})).then(a,u)}c((r=r.apply(n,e||[])).next())})}function t(n,e){var t,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=u(0),a.throw=u(1),a.return=u(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function u(u){return function(c){return function(u){if(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&u[0]?r.return:u[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,u[1])).done)return o;switch(r=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,r=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){i=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){i.label=u[1];break}if(6===u[0]&&i.label<o[1]){i.label=o[1],o=u;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(u);break}o[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(n,i)}catch(n){u=[6,n],r=0}finally{t=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function r(n,e,t){if(t||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return n.concat(r||Array.prototype.slice.call(e))}function o(e){if("object"!=typeof e)return e;var t=["string","number","boolean","undefined"];return Object.values(e).every(function(n){return t.includes(typeof n)})?n({},e):JSON.parse(JSON.stringify(e))}function i(n){return o(n)}function a(n){var e=n.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===e[0]?e.substring(1):e}function u(n){var e=n.replace(/-([a-z])/g,function(n,e){return e.toUpperCase()});return e.endsWith("-")?e.slice(0,-1):e}function c(n){return a(n)}function s(n){var e=n.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===e[0]?e.substring(1):e}function f(n){return n.replace(/_([a-z])/g,function(n,e){return e.toUpperCase()})}function d(n){return s(n)}function l(n){for(var e=(n=n.replace(/^\s+/,"")).length-1,t=/\s/;t.test(n.charAt(e));)e--;return n.slice(0,e+1)}function p(n){try{if("object"==typeof JSON.parse(n))return!0}catch(n){}return!1}function v(n){return p(n)}function g(n){void 0===n&&(n=5);for(var e="";n--;)e+=Math.floor(10*Math.random());return e}function h(n){return void 0===n&&(n=5),g(n)}function m(n){void 0===n&&(n=3);var e=[y(),h(n||3)];return e[0]+e[1]}function w(n){return void 0===n&&(n=3),m(n)}function y(){return Date.now?Date.now():(new Date).getTime()}function b(n,e){void 0===e&&(e=0);var t="";return t=e?(100*n).toFixed(e):String(Math.floor(100*n)),"".concat(t,"%")}function E(n,e){return void 0===e&&(e=0),parseFloat(n).toFixed(e)}function S(n,e,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],u=a[0],c=a[1],s=function(){c=!1===t.leading?0:y(),i=null,u=n.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var d=y();c||!1!==t.leading||(c=d);var l=e-(d-c);return r=this,o=a,l<=0||l>e?(i&&(clearTimeout(i),i=null),c=d,u=n.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),l)),u}}function A(n,e,t){var r=null,o=null,i=null,a=null,u=null,c=function(){var s=y()-i;s<e&&s>=0?o=setTimeout(c,e-s):(o=null,t||(u=n.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];r=this,a=s,i=y();var d=t&&!o;return o||(o=setTimeout(c,e)),d&&(u=n.apply(r,a),r=a=null),u}}"function"==typeof SuppressedError&&SuppressedError;var T={type:"d"};function x(n,e,t){void 0===n&&(n=0),void 0===e&&(e=0),void 0===t&&(t=T);var r=(t=Object.assign(T,t)).type,o=decodeURIComponent;O(n)||(n=new Date(n).getTime()),O(e)||(e=new Date(e).getTime());var i=Number(e)-Number(n),a="",u=new Array(4).fill(0),c=u[0],s=(u[1],u[2],u[3]),f=o("%20%E5%A4%A9%20"),d=o("%20%E6%97%B6%20"),l=o("%20%E5%88%86%20"),p=o("%20%E7%A7%92");if(i>=0)switch(c=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),r){case"d":a=c;break;case"text":a=(c=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+d+Math.floor(i/1e3/60%60)+l+(s=Math.floor(i/1e3%60))+p;break;default:a=s}return a}function O(n,e){void 0===e&&(e={});var t=e.isNaNAsNumber,r=void 0!==t&&t,o=e.isInfinityAsNumber,i=void 0!==o&&o,a=e.isUnFiniteAsNumber;return"number"==typeof n&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(n))&&!(!r&&isNaN(n)))}function M(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];var r=null;return n&&"function"==typeof n&&(r=n.apply(void 0,e)),r}function _(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return M.apply(void 0,r([n],e,!1))}function P(n){var e=!1;return Array.isArray(n)&&n.length&&(e=!0),e}function j(n){var e=Boolean(n),t="object"==typeof n,r="[object Object]"===Object.prototype.toString.call(n);return e&&t&&r}function k(n){return"function"==typeof n}function N(n){return"string"==typeof n}function R(n){return"boolean"==typeof n}function C(n){return R(n)}function B(n){return null==n}function D(n){return"[object Array]"===Object.prototype.toString.call(n)}function L(n){return!!j(n)&&0!==Object.keys(n).length}function F(n){if(!n)return"";var e=new RegExp("\\n","g");return n.replace(e,"<br />")}function I(n){return F(n)}function z(n,e){void 0===e&&(e={});var t=e.removeNewLine,r=void 0!==t&&t,o="";return n&&(o=n.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function U(n,e){return void 0===e&&(e={}),z(n,e)}function q(n,e){return void 0===e&&(e={}),z(n,e)}function Z(n,e){return void 0===e&&(e={}),z(n,e)}function $(n){var e={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof n)throw new Error("Input must be a string");return n.replace(/[&<>"'/]/g,function(n){return e[n]})}function W(n){var e={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof n)throw new Error("Input must be a string");return n.replace(/(&|<|>|"|'|/)/g,function(n){return e[n]})}function V(n){return W(n)}function J(n,e,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=n&&n){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",u=n.replace(i,"**").length,c=0;c<u&&(null!=(a=n.charAt(c).toString()).match(i)?r+=2:r++,!(r>e));c++)o+=a;return t.hasDot&&u>e&&(o+=t.dotText),o}return""}function Y(n,e,t){return void 0===t&&(t=!1),J(n,e,{hasDot:t})}function H(n,e,t){return void 0===t&&(t=!1),Y(n,e,t)}function G(n,e){void 0===e&&(e={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},e),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(n&&n.status&&2===r.length&&n.status>=r[0]&&n.status<r[1]){var a=n.data;a&&o.includes(a.code)&&(i=!0)}return i}function K(n,e,t){var r=!1;return"object"!=typeof n||e.reduce(function(n,e){return void 0===n[e]?Object.create(null):n=n[e]},n)===t&&(r=!0),r}function Q(n){var e=function(n){return String(Math.ceil(n))};if(!n||n<0)return"";var t=1024;return n<t?n+" B":n<Math.pow(t,2)?e(n/t)+" KB":n<Math.pow(t,3)?e(n/Math.pow(t,2))+" MB":n<Math.pow(t,4)?e(n/Math.pow(t,3))+" G":e(n/Math.pow(t,4))+" T"}function X(n){var e,t=0;for(e=0;e<n.length;e++)t=(t<<5)-t+n.charCodeAt(e),t|=0;return t}function nn(n,e){void 0===e&&(e="yyyy-MM-dd"),n||(n=new Date);var t=new Date(n),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=e||"yyyy-MM-dd";return Object.keys(o).forEach(function(n){var e=o[n];"MM"===n&&Number(e)<=9&&(e="0".concat(e)),i=i.replace(n,String(e))}),i}function en(n){return/^1\d{10}$/.test(n)}function tn(n){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(n)}function rn(n){for(var e="";n>0;){var t=n%26;0===t&&(t=26),e=String.fromCharCode(t+96)+e,n=(n-t)/26}return e}function on(){return"v4"}function an(n,r,o){var i=this;void 0===r&&(r={}),void 0===o&&(o=function(n){return!0===n});var a=r.interval,u=void 0===a?1e3:a,c=r.times,s=void 0===c?10:c,f=r.context,d=r.args,l=0,p=function(){setTimeout(function(){return e(i,void 0,void 0,function(){var e;return t(this,function(t){switch(t.label){case 0:return[4,n.apply(f,d)];case 1:return e=t.sent(),o(e)||++l>=s?[2]:(p(),[2])}})})},u)};"function"!=typeof n&&console.error("Expected a function."),("number"!=typeof u||u<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),p()}function un(n){return e(this,void 0,void 0,function(){return t(this,function(e){return[2,new Promise(function(e){setTimeout(function(){e(n)},n)})]})})}function cn(n){return e(this,void 0,void 0,function(){return t(this,function(e){return[2,un(n)]})})}var sn="";function fn(){if(sn)return"browser"===sn;var n="undefined"!=typeof window;return n&&(sn="browser"),n}function dn(n,e){for(var t=n.length,r=e.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var u=0;u<r;++u)if(n[a]===e[u]){var c=0;a>0&&u>0&&(c=i[a-1][u-1]),i[a][u]=c+1}var s=Array.prototype.concat.apply([],i);return Math.max.apply(Math,s)}function ln(n,e){return dn(n,e)}function pn(n,e){for(var t=n.length,r=e.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var u=0;u<r;++u)if(n[a]===e[u]){var c=0;a>0&&u>0&&(c=i[a-1][u-1]),i[a][u]=c+1}else{var s=[0,0],f=s[0],d=s[1];u>0&&(f=i[a][u-1]),a>0&&(d=i[a-1][u]),i[a][u]=Math.max(f,d)}var l=Array.prototype.concat.apply([],i);return Math.max.apply(Math,l)}function vn(n,e){return pn(n,e)}function gn(n){return Math.random()<n}function hn(n){return gn(n)}function mn(n){var e=new RegExp("(^|&)"+n+"=([^&]*)(&|$)"),t=location.search.substring(1).match(e);return null!==t?decodeURIComponent(t[2]):""}function wn(n){void 0===n&&(n=""),""===n&&(n=location.search);var e={};return n.replace(/\??(\w+)=([^&]*)&?/g,function(n,t,r){return void 0===e[t]&&(e[t]=decodeURIComponent(r)),""}),e}function yn(n,e,t){void 0===t&&(t={});var r=null;if(n.includes("#")){r=new URL(n).searchParams.getAll(e)}else{var o={};n.replace(/\??(\w+)=([^&]*)&?/g,function(n,e,t){return void 0!==o[e]?o[e].push(t):o[e]=[t],""}),r=o[e]||[]}return t.returnArray?r:r.length?r[0]:null}function bn(n,e,t){if(n.includes("#")){var r=new URL(n);return r.searchParams.set(e,t),r.toString()}var o=new RegExp("([?&])"+e+"=.*?(&|$)","i"),i=-1!==n.indexOf("?")?"&":"?";return n.match(o)?n.replace(o,"$1"+e+"="+t+"$2"):n+i+e+"="+t}function En(n){var e=location.hash.split("?");if(1===e.length)return"";var t=new RegExp("(^|&)".concat(n,"=([^&]*)(&|$)")),r=e[1].match(t);return r?r[2]:""}function Sn(n,e){if(void 0===e&&(e=["hostname"]),jn(n)){var t=new window.URL(n);return e.reduce(function(n,e){return n+=t[e]},"")}var r=document.createElement("a");return r.href=n,e.reduce(function(n,e){return n+=r[e]},"")}function An(n){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(n)}function Tn(n,e){void 0===e&&(e={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return e.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(n)}function xn(n){var e="";if("string"!=typeof n||""==n)return e;var t=/\.[^/?#]+$/.exec(n);return t?(t[0].length>1&&(e=t[0].substring(1)),e):e}function On(n,e){void 0===e&&(e=""),e||(e=".js");for(var t=new RegExp("[?&]".concat(n,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(e,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(e)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""}function Mn(n){if(n&&0===Object.keys(n).length)return"";var e="?";for(var t in n)e+="".concat(t,"=").concat(n[t],"&");return e.slice(0,-1)}function _n(n){return n.replace(/^http:/,"https:")}function Pn(n){return _n(n)}function jn(n){void 0===n&&(n="");var e=window.URL;if(!e)return!1;if(!e.canParse)return!1;if("function"!=typeof e.canParse)return!1;try{var t=new e("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&e.canParse(n)}catch(n){return!1}}function kn(n){var e="";(!Tn(n)&&Tn(n,{strict:!1})&&0===n.indexOf("//")&&(n="https:"+n),jn(n))&&(e=new URL(n).host);return e}function Nn(n){var e="";(!Tn(n)&&Tn(n,{strict:!1})&&0===n.indexOf("//")&&(n="https:"+n),jn(n))&&(e=new URL(n).pathname);return e}var Rn={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function Cn(e,t){void 0===e&&(e=""),void 0===t&&(t=n({},Rn));var o=Object.assign(n({},Rn),t),i=o.isClosed,a=o.showWrap,u=o.showDate,c=o.locales,s=o.isStringifyObject,f=o.logFn,d=o.errorFn,l=Object.create(null),p=function(){return(new Date).toLocaleDateString(c,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(n){l[n]=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(i)return!1;var c=e,l=e;if("string"==typeof e&&e.length>=2){var v=e.length;c=":"===e[v-1]?e.substring(0,v-1):e}a&&console.log("--- ".concat(c," - begin ---")),u&&(l=e?"".concat(p()," ").concat(e):"".concat(p())),s&&(t=t.map(function(n){return j(n)?JSON.stringify(n):n})),e||u?console[n].apply(console,r([l],t,!1)):console[n].apply(console,t),"log"===n&&f(),"error"===n&&d(),a&&console.log("--- ".concat(c," - end ---"))}}),l}var Bn=Cn("[Mazey]"),Dn=Cn("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function Ln(n,e){if(!n)return Bn.error("The element is not exist."),!1;for(var t=n.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===e)return!0;return!1}function Fn(n,e){if(n)if(Array.isArray(e))e.forEach(function(e){n.classList.add(e)});else{for(var t=n.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===e)return;var i,a="";""!==t&&(a=" "),i=t+a+e,n.className=i}else Bn.error("The element is not exist.")}function In(n,e){Fn(n,e)}function zn(n,e){var t;n?(t=(t=(t=(t=" "+n.className+" ").replace(/(\s+)/gi," ")).replace(" "+e+" "," ")).replace(/(^\s+)|(\s+$)/g,""),n.className=t):Bn.error("The element is not exist.")}function Un(n,e){if(void 0===e&&(e={id:""}),!n)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return e.id?(o="".concat(e.id),(r=document.getElementById(o))?r.innerHTML=n:(i.setAttribute("id",e.id),i.innerHTML=n,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=n,t.appendChild(i),document.head.appendChild(t)),!0}function qn(){var n,e=window.jQuery||window.$;return e?!(!(n=e("img"))||!n.length)&&(n.each(function(){var n=e(this);if(n){var t=n.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&P(r)&&r[1]&&n.width(r[1]),o&&P(o)&&o[1]&&n.height(o[1])}}}),!0):(n=document.getElementsByTagName("img")).length>0&&(Array.from(n).forEach(function(n){var e=n;if(e){var t=e.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&P(r)&&r[1]&&(e.style.width=r[1]),o&&P(o)&&o[1]&&(e.style.height=o[1])}}}),!0)}function Zn(){return qn()}function $n(n,e){var t="";return e&&e.length>0&&(t=e.join(";")+";"),"".concat(n,"{").concat(t,"}")}function Wn(n){var e;return document.querySelector&&(null===(e=document.querySelector('meta[name="'.concat(n,'"]')))||void 0===e?void 0:e.getAttribute("content"))||""}function Vn(n){var e=n||window.event;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Jn(){var n=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof n&&(n={},window.MAZEY_DEFINE_LISTENERS=n),n}function Yn(n,e){var t=Jn();void 0===t[n]&&(t[n]=[]),"function"==typeof e&&t[n].push(e)}function Hn(n,e){var t=Jn()[n];if(t instanceof Array)for(var r=0,o=t.length;r<o;r++)"function"==typeof t[r]&&(void 0===e?t[r]():t[r](e))}function Gn(n){Hn(n)}function Kn(n,e){var t=Jn(),r=t[n];if("string"==typeof n&&r instanceof Array)if("function"==typeof e){for(var o=0,i=r.length;o<i;o++)if(r[o]===e){t[n].splice(o,1);break}}else delete t[n]}function Qn(n,e){void 0===e&&(e=null),n&&sessionStorage.setItem(n,JSON.stringify(e))}function Xn(n){var e=null;if(n){var t=sessionStorage.getItem(n);t&&(e=JSON.parse(t))}return e}function ne(n,e){void 0===e&&(e=null),n&&localStorage.setItem(n,JSON.stringify(e))}function ee(n){var e=null;if(n){var t=localStorage.getItem(n);t&&(e=JSON.parse(t))}return e}function te(n){for(var e=n+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(e))return o.substring(e.length,o.length)}return""}function re(n,e,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var u=location.host;1===u.split(".").length?document.cookie=n+"="+e+i+"; path=/":((o=u.split(".")).shift(),r=r||"."+o.join("."),document.cookie=n+"="+e+i+"; path=/; domain="+r,null!==te(n)&&te(n)===e||(r=r||"."+u,document.cookie=n+"="+e+i+"; path=/; domain="+r))}function oe(n){for(var e=document.cookie.split(";"),t=0;t<e.length;t++){var r=e[t].trim();if(r.startsWith("".concat(n,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function ie(n){oe(n)}function ae(n,e){void 0===e&&(e={id:""});var t,r=e.id,o=function(){},i=new Promise(function(n,e){var r;t=(r=[n,e])[0],o=r[1]}),a=function(){t("loaded")},u=document.createElement("link");u||o(new Error("Not support create link element"));var c="onload"in u,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(u.rel="stylesheet",u.type="text/css",u.href=n,void 0!==r&&(u.id=r),document.getElementsByTagName("head")[0].appendChild(u),s||!c)return setTimeout(function(){d(u,a,0)},1),i;function f(){u&&(u.onload=u.onerror=u.onreadystatechange=null),u=null,a()}function d(n,e,t){if(n){var r,o=n.sheet;if((t+=1)>3e5)return r=!0,n&&(n=null),void e();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(n){var i=n;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout(function(){r?e():d(n,e,t)},20)}}return c?(u.onload=f,u.onerror=function(){f()}):u.onreadystatechange=function(){u&&/loaded|complete/.test(u.readyState)&&f()},i}var ue={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function ce(e,t){void 0===t&&(t=n({},ue));var r,o,i=Object.assign(n({},ue),t),a=i.id,u=i.callback,c=i.timeout,s=i.isDefer,f=i.isAsync,d=i.isCrossOrigin,l=i.attributes,p=i.cssUrl,v=document.createElement("script");if(v||Promise.reject("Not support create script element"),p){var g=function(n,e){if(!e)return"";if(Tn(e))return e;var t=n.split("/");t.pop();var r=t.join("/");return"".concat(r,"/").concat(e)}(e,p);g&&ae(g).catch(function(n){console.error("Failed to load CSS from ".concat(g,": ").concat(null==n?void 0:n.message))})}var h=document.getElementsByTagName("script")[0];return v.type="text/javascript",s&&(v.defer=!0),f&&(v.async=!0),d&&(v.crossOrigin="anonymous"),a&&(v.id=a),l&&Object.keys(l).forEach(function(n){v.setAttribute(n,l[n])}),v.readyState?v.onreadystatechange=function(){"loaded"!==v.readyState&&"complete"!==v.readyState||(v.onreadystatechange=null,_(u),_(r,"loaded"))}:v.onload=function(){_(u),_(r,"loaded")},v.src=e,h&&h.parentNode.insertBefore(v,h),new Promise(function(n,e){var t;r=(t=[n,e])[0],o=t[1],c&&setTimeout(o.bind(null,"timeout"),c)})}function se(n){void 0===n&&(n=3e4);var e,t=function(){},r=new Promise(function(n,r){t=n,e=r});return"complete"===document.readyState?t("complete"):window.addEventListener("load",function(){return t("load")}),setTimeout(function(){return e(Error("timeout"))},n),r}function fe(n){return new Promise(function(e,t){var r=new Image;r.onload=function(){e(r)},r.onerror=function(n){t(n)},r.src=n})}function de(n,e){return window[n]?Promise.resolve("defined"):ce(e)}function le(n){var e=[],t=window.PerformanceObserver;return!!t&&(P(t.supportedEntryTypes)&&(e=t.supportedEntryTypes),e.includes(n))}function pe(){return e(this,void 0,void 0,function(){return t(this,function(n){return le("paint")?[2,new Promise(function(n){var e=new PerformanceObserver(function(t){var r=t.getEntries().find(function(n){return"first-contentful-paint"===n.name});r&&(e.disconnect(),n(Math.round(r.startTime)))});e.observe({type:"paint",buffered:!0})})]:[2,0]})})}function ve(){return e(this,void 0,void 0,function(){return t(this,function(n){return le("paint")?[2,new Promise(function(n){var e=new PerformanceObserver(function(t){var r=t.getEntries().find(function(n){return"first-paint"===n.name});r&&(e.disconnect(),n(Math.round(r.startTime)))});e.observe({type:"paint",buffered:!0})})]:[2,0]})})}function ge(){return e(this,void 0,void 0,function(){return t(this,function(n){return le("largest-contentful-paint")?[2,new Promise(function(n){var e=new PerformanceObserver(function(t){var r=t.getEntries().find(function(n){return"largest-contentful-paint"===n.entryType});r&&(e.disconnect(),n(Math.round(r.startTime)))});e.observe({type:"largest-contentful-paint",buffered:!0})})]:[2,0]})})}function he(){return e(this,void 0,void 0,function(){return t(this,function(n){return le("first-input")?[2,new Promise(function(n){var e=new PerformanceObserver(function(t){var r=t.getEntries().find(function(n){return"first-input"===n.entryType});if(r){e.disconnect();var o=r.processingStart;n(o?Math.round(r.processingStart-r.startTime):0)}});e.observe({type:"first-input",buffered:!0})})]:[2,0]})})}function me(){return e(this,void 0,void 0,function(){return t(this,function(n){return le("layout-shift")?[2,new Promise(function(n){var e=new PerformanceObserver(function(t){var r=t.getEntries().reduce(function(n,e){var t=0;return O(e.value)&&(t=e.value),n+t},0);e.disconnect(),n(r)});e.observe({type:"layout-shift",buffered:!0})})]:[2,0]})})}function we(){return e(this,void 0,void 0,function(){var n,e;return t(this,function(t){return le("navigation")&&window.performance&&window.performance.getEntriesByType?(n=performance.getEntriesByType("navigation")[0],0,n?(e=n.responseStart-n.requestStart,[2,Math.round(e)]):[2,0]):[2,0]})})}function ye(n){return void 0===n&&(n=!1),e(this,void 0,void 0,function(){function e(){var e={source:F,os:r(),osVersion:o(),deviceType:i(),network:a(),screenDirection:u(),unloadTime:h-m,redirectTime:w-y,dnsTime:b-E,tcpTime:S-A,sslTime:c(S,T),responseTime:x-M,downloadTime:_-x,firstPaintTime:U,firstContentfulPaintTime:q,domReadyTime:j-I,onloadTime:k-I,whiteTime:x-I,renderTime:N-I,decodedBodySize:B,encodedBodySize:D};Object.keys(e).forEach(function(n){O(e[n])&&(e[n]<0?e[n]=0:e[n]=Math.round(e[n]))}),O(e.whiteTime)&&e.whiteTime>e.onloadTime&&(e.whiteTime=0);var t={};n||Object.keys(e).forEach(function(n){t[d(n)]=e[n]}),Object.keys(t).length?f(t):f(e)}function r(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var n="",e=navigator.userAgent,t=e.indexOf("Android")>-1||e.indexOf("Linux")>-1,r=!!e.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return n;var i=o[1];return i?(t&&(n=(i.match(/\d+\.\d+/g)||[])[0]),r&&(n=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),n||(n=""),n):n}function i(){var n,e=navigator.userAgent.toLowerCase(),t=e.match(/(ipad)/i)&&"ipad",r=e.match(/iphone os/i)&&"iphone os",o=e.match(/midp/i)&&"midp",i=e.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=e.match(/ucweb/i)&&"ucweb",u=e.match(/android/i)&&"android",c=e.match(/windows ce/i)&&"windows ce",s=e.match(/windows mobile/i)&&"windows mobile";return(n=t||r||o||i||a||u||c||s?r||o||i||a||u||c||s?"phone":t?"ipad":void 0:"pc")||(n=""),n}function a(){var n="",e=window.navigator;if(e.connection&&e.connection.effectiveType)switch(e.connection.effectiveType){case"wifi":n="wifi";break;case"4g":n="4g";break;case"2g":n="2g";break;case"3g":n="3g";break;case"ethernet":n="ethernet";break;case"default":n=void 0}return n||(n=""),n}function u(){var n="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(n="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(n="-")),n}function c(n,e){var t=0;return e&&(t=n-e),t}var s,f,l,p,v,g,h,m,w,y,b,E,S,A,T,x,M,_,j,k,N,R,C,B,D,L,F,I,z,U,q;return t(this,function(n){switch(n.label){case 0:if(!le("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(s=window.performance)||"function"!=typeof s.getEntries||"function"!=typeof s.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(l=new Promise(function(n){f=[n][0]}),p=null,P(v=s.getEntriesByType("navigation"))&&(p=v[0]),g=new Array(19).fill(0),h=g[0],m=g[1],w=g[2],y=g[3],b=g[4],E=g[5],S=g[6],A=g[7],T=g[8],x=g[9],M=g[10],_=g[11],j=g[12],k=g[13],N=g[14],R=g[15],C=g[16],B=g[17],D=g[18],L=s.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,D=p.encodedBodySize,h=p.unloadEventEnd,m=p.unloadEventStart,w=p.redirectEnd,y=p.redirectStart,b=p.domainLookupEnd,E=p.domainLookupStart,S=p.connectEnd,A=p.connectStart,T=p.secureConnectionStart,x=p.responseStart,M=p.requestStart,_=p.responseEnd,j=p.domContentLoadedEventStart,k=p.loadEventStart,N=p.loadEventEnd,R=p.startTime,C=p.fetchStart;else{if(!L)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",h=L.unloadEventEnd,m=L.unloadEventStart,w=L.redirectEnd,y=L.redirectStart,b=L.domainLookupEnd,E=L.domainLookupStart,S=L.connectEnd,A=L.connectStart,T=L.secureConnectionStart,x=L.responseStart,M=L.requestStart,_=L.responseEnd,j=L.domContentLoadedEventStart,k=L.loadEventStart,N=L.loadEventEnd,R=L.navigationStart,C=L.fetchStart}if(I=0,O(R))I=R;else{if(!O(C))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=C}return[4,Promise.all([ve(),pe()])];case 1:return z=n.sent(),U=z[0],q=z[1],O(N)&&N>0?e():window.addEventListener("load",function(){window.setTimeout(function(){e()},0)}),[2,l]}})})}var be="";function Ee(){if(be)return"pwa"===be;var n=Se();return"serviceWorker"in navigator&&function(){var n;try{return n=new Function("return async function(){};")(),null!=Object.getPrototypeOf(n).constructor}catch(n){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!n.shell&&"https:"===window.location.protocol?(be="pwa",!0):(be="no-pwa",!1)}function Se(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var r=function(n){return n.test(t)},o=function(n){var e="",r=t.match(n);return r&&P(r)&&(e=(e=(e=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),e},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),e=n(n({},e),{system:i,appleType:a});var u="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?u="2000":r(/windows nt 5.1|windows xp/g)?u="xp":r(/windows nt 5.2|windows 2003/g)?u="2003":r(/windows nt 6.0|windows vista/g)?u="vista":r(/windows nt 6.1|windows 7/g)?u="7":r(/windows nt 6.2|windows 8/g)?u="8":r(/windows nt 6.3|windows 8.1/g)?u="8.1":r(/windows nt 10.0|windows 10/g)&&(u="10"):"macos"===i?u=o(/os x [\d._]+/g):"android"===i?u=o(/android [\d._]+/g):"ios"===i&&(u=o(/os [\d._]+/g)),e=n(n({},e),{systemVs:u});var c="";"windows"===i||"macos"===i||"linux"===i?c="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(c="mobile"),e=n(n({},e),{platform:c});var s="",f="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",f="firefox"):r(/presto/g)?(s="presto",f="opera"):r(/trident|compatible|msie/g)&&(s="trident",f="iexplore"),e=n(n({},e),{engine:s,supporter:f});var d="";"webkit"===s?d=o(/applewebkit\/[\d._]+/g):"gecko"===s?d=o(/gecko\/[\d._]+/g):"presto"===s?d=o(/presto\/[\d._]+/g):"trident"===s&&(d=o(/trident\/[\d._]+/g)),e=n(n({},e),{engineVs:d});var l="";"chrome"===f?l=o(/chrome\/[\d._]+/g):"safari"===f?l=o(/version\/[\d._]+/g):"firefox"===f?l=o(/firefox\/[\d._]+/g):"opera"===f?l=o(/opr\/[\d._]+/g):"iexplore"===f?l=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(l=o(/edge\/[\d._]+/g)),e=n(n({},e),{supporterVs:l});var p="",v="";return r(/micromessenger/g)?(p="wechat",v=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",v=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",v=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",v=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",v=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),e=n(n({},e),{shell:p,shellVs:v}),window.MAZEY_BROWSER_INFO=e,e}catch(n){return Bn.warn(n),e}}function Ae(n,e){void 0===n&&(n=""),void 0===e&&(e="-");var t=Se(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=t[o];if(i){var a="";n&&n.length>0&&(a="".concat(n).concat(e)),r.push("".concat(a).concat(i))}}),r}var Te="";function xe(){if(Te)return Promise.resolve("webp"===Te);return new Promise(function(n){var e=new Image;e.onload=function(){var t=e.width>0&&e.height>0;Te=t?"webp":"no-webp",n(t)},e.onerror=function(){Te="no-webp",n(!1)},e.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})}export{Fn as addClass,Yn as addEvent,Un as addStyle,vn as calLongestCommonSubsequence,ln as calLongestCommonSubstring,d as camelCase2Underscore,c as camelCaseToKebabCase,Vn as cancelBubble,q as clearHTML,Z as clearHtml,rn as convert10To26,a as convertCamelToKebab,s as convertCamelToUnder,_n as convertHttpToHttps,u as convertKebabToCamel,Mn as convertObjectToQuery,F as convertToHtmlBreaks,f as convertUnderToCamel,H as cutCHSString,J as cutZHString,A as debounce,o as deepCopy,i as deepCopyObject,ie as delCookie,_ as doFn,Hn as fireEvent,E as floatFixed,b as floatToPercent,nn as formatDate,Ae as genBrowserAttrs,Cn as genCustomConsole,X as genHashCode,g as genRndNumString,$n as genStyleString,m as genUniqueNumString,h as generateRndNum,w as generateUniqueNum,wn as getAllQueryParams,Se as getBrowserInfo,me as getCLS,te as getCookie,on as getCurrentVersion,Jn as getDefineListeners,Sn as getDomain,pe as getFCP,he as getFID,ve as getFP,Q as getFileSize,x as getFriendlyInterval,En as getHashQueryParam,ge as getLCP,ee as getLocalStorage,Wn as getPageMeta,ye as getPerformance,mn as getQueryParam,On as getScriptQueryParam,Xn as getSessionStorage,we as getTTFB,xn as getUrlFileType,kn as getUrlHost,yn as getUrlParam,Nn as getUrlPath,Ln as hasClass,hn as inRate,Gn as invokeEvent,M as invokeFn,D as isArray,R as isBool,C as isBoolean,fn as isBrowser,k as isFunction,gn as isHit,p as isJSONString,v as isJsonString,P as isNonEmptyArray,L as isNonEmptyObject,O as isNumber,j as isPureObject,Ee as isSafePWAEnv,N as isString,xe as isSupportWebp,le as isSupportedEntryType,B as isUdfOrNul,K as isValidData,tn as isValidEmail,Tn as isValidHttpUrl,en as isValidPhoneNumber,An as isValidUrl,ae as loadCSS,fe as loadImage,ce as loadScript,de as loadScriptIfUndefined,pn as longestComSubsequence,dn as longestComSubstring,y as mNow,l as mTrim,Bn as mazeyCon,I as newLine,zn as removeClass,oe as removeCookie,Kn as removeEvent,z as removeHTML,U as removeHtml,an as repeatUntilConditionMet,Pn as replaceHttp,$ as sanitizeInput,In as setClass,re as setCookie,qn as setImgSizeBySrc,Zn as setImgWidHeiBySrc,ne as setLocalStorage,Qn as setSessionStorage,cn as sleep,S as throttle,Dn as timeCon,Y as truncateZHString,V as unsanitize,W as unsanitizeInput,bn as updateQueryParam,un as waitTime,se as windowLoaded,G as zAxiosIsValidRes};
|
|
6
|
+
var e=function(){return e=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},e.apply(this,arguments)};function n(e,n,t,r){return new(t||(t=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 n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,c)}u((r=r.apply(e,n||[])).next())})}function t(e,n){var t,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(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=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=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function r(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function o(n){if("object"!=typeof n)return n;var t=["string","number","boolean","undefined"];return Object.values(n).every(function(e){return t.includes(typeof e)})?e({},n):JSON.parse(JSON.stringify(n))}function i(e){return o(e)}function a(e){var n=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===n[0]?n.substring(1):n}function c(e){var n=e.replace(/-([a-z])/g,function(e,n){return n.toUpperCase()});return n.endsWith("-")?n.slice(0,-1):n}function u(e){return a(e)}function s(e){var n=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===n[0]?n.substring(1):n}function f(e){return e.replace(/_([a-z])/g,function(e,n){return n.toUpperCase()})}function d(e){return s(e)}function l(e){for(var n=(e=e.replace(/^\s+/,"")).length-1,t=/\s/;t.test(e.charAt(n));)n--;return e.slice(0,n+1)}function p(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function v(e){return p(e)}function g(e){void 0===e&&(e=5);for(var n="";e--;)n+=Math.floor(10*Math.random());return n}function h(e){return void 0===e&&(e=5),g(e)}function m(e){void 0===e&&(e=3);var n=[y(),h(e||3)];return n[0]+n[1]}function w(e){return void 0===e&&(e=3),m(e)}function y(){return Date.now?Date.now():(new Date).getTime()}function b(e,n){void 0===n&&(n=0);var t="";return t=n?(100*e).toFixed(n):String(Math.floor(100*e)),"".concat(t,"%")}function E(e,n){return void 0===n&&(n=0),parseFloat(e).toFixed(n)}function S(e,n,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],s=function(){u=!1===t.leading?0:y(),i=null,c=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var d=y();u||!1!==t.leading||(u=d);var l=n-(d-u);return r=this,o=a,l<=0||l>n?(i&&(clearTimeout(i),i=null),u=d,c=e.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),l)),c}}function A(e,n,t){var r=null,o=null,i=null,a=null,c=null,u=function(){var s=y()-i;s<n&&s>=0?o=setTimeout(u,n-s):(o=null,t||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];r=this,a=s,i=y();var d=t&&!o;return o||(o=setTimeout(u,n)),d&&(c=e.apply(r,a),r=a=null),c}}"function"==typeof SuppressedError&&SuppressedError;var T={type:"d"};function x(e,n,t){void 0===e&&(e=0),void 0===n&&(n=0),void 0===t&&(t=T);var r=(t=Object.assign(T,t)).type,o=decodeURIComponent;O(e)||(e=new Date(e).getTime()),O(n)||(n=new Date(n).getTime());var i=Number(n)-Number(e),a="",c=new Array(4).fill(0),u=c[0],s=(c[1],c[2],c[3]),f=o("%20%E5%A4%A9%20"),d=o("%20%E6%97%B6%20"),l=o("%20%E5%88%86%20"),p=o("%20%E7%A7%92");if(i>=0)switch(u=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),r){case"d":a=u;break;case"text":a=(u=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+d+Math.floor(i/1e3/60%60)+l+(s=Math.floor(i/1e3%60))+p;break;default:a=s}return a}function O(e,n){void 0===n&&(n={});var t=n.isNaNAsNumber,r=void 0!==t&&t,o=n.isInfinityAsNumber,i=void 0!==o&&o,a=n.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function M(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,n)),r}function _(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return M.apply(void 0,r([e],n,!1))}function P(e){var n=!1;return Array.isArray(e)&&e.length&&(n=!0),n}function j(e){var n=Boolean(e),t="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return n&&t&&r}function k(e){return"function"==typeof e}function N(e){return"string"==typeof e}function R(e){return"boolean"==typeof e}function C(e){return R(e)}function B(e){return null==e}function D(e){return"[object Array]"===Object.prototype.toString.call(e)}function L(e){return!!j(e)&&0!==Object.keys(e).length}function F(e){if(!e)return"";var n=new RegExp("\\n","g");return e.replace(n,"<br />")}function I(e){return F(e)}function z(e,n){void 0===n&&(n={});var t=n.removeNewLine,r=void 0!==t&&t,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function U(e,n){return void 0===n&&(n={}),z(e,n)}function q(e,n){return void 0===n&&(n={}),z(e,n)}function Z(e,n){return void 0===n&&(n={}),z(e,n)}function $(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return n[e]})}function W(e){var n={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return n[e]})}function V(e){return W(e)}function J(e,n,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>n));u++)o+=a;return t.hasDot&&c>n&&(o+=t.dotText),o}return""}function Y(e,n,t){return void 0===t&&(t=!1),J(e,n,{hasDot:t})}function H(e,n,t){return void 0===t&&(t=!1),Y(e,n,t)}function G(e,n){void 0===n&&(n={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},n),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i}function K(e,n,t){var r=!1;return"object"!=typeof e||n.reduce(function(e,n){return void 0===e[n]?Object.create(null):e=e[n]},e)===t&&(r=!0),r}function Q(e){var n=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var t=1024;return e<t?e+" B":e<Math.pow(t,2)?n(e/t)+" KB":e<Math.pow(t,3)?n(e/Math.pow(t,2))+" MB":e<Math.pow(t,4)?n(e/Math.pow(t,3))+" G":n(e/Math.pow(t,4))+" T"}function X(e){var n,t=0;for(n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}function ee(e,n){void 0===n&&(n="yyyy-MM-dd"),e||(e=new Date);var t=new Date(e),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=n||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var n=o[e];"MM"===e&&Number(n)<=9&&(n="0".concat(n)),i=i.replace(e,String(n))}),i}function ne(e){return/^1\d{10}$/.test(e)}function te(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)}function re(e){for(var n="";e>0;){var t=e%26;0===t&&(t=26),n=String.fromCharCode(t+96)+n,e=(e-t)/26}return n}function oe(){return"v4"}function ie(e,r,o){var i=this;void 0===r&&(r={}),void 0===o&&(o=function(e){return!0===e});var a=r.interval,c=void 0===a?1e3:a,u=r.times,s=void 0===u?10:u,f=r.context,d=r.args,l=0,p=function(){setTimeout(function(){return n(i,void 0,void 0,function(){var n;return t(this,function(t){switch(t.label){case 0:return[4,e.apply(f,d)];case 1:return n=t.sent(),o(n)||++l>=s?[2]:(p(),[2])}})})},c)};"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof c||c<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),p()}function ae(e){return n(this,void 0,void 0,function(){return t(this,function(n){return[2,new Promise(function(n){setTimeout(function(){n(e)},e)})]})})}function ce(e){return n(this,void 0,void 0,function(){return t(this,function(n){return[2,ae(e)]})})}var ue="";function se(){if(ue)return"browser"===ue;var e="undefined"!=typeof window;return e&&(ue="browser"),e}function fe(e,n){for(var t=e.length,r=n.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=i[a-1][c-1]),i[a][c]=u+1}var s=Array.prototype.concat.apply([],i);return Math.max.apply(Math,s)}function de(e,n){return fe(e,n)}function le(e,n){for(var t=e.length,r=n.length,i=o(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=i[a-1][c-1]),i[a][c]=u+1}else{var s=[0,0],f=s[0],d=s[1];c>0&&(f=i[a][c-1]),a>0&&(d=i[a-1][c]),i[a][c]=Math.max(f,d)}var l=Array.prototype.concat.apply([],i);return Math.max.apply(Math,l)}function pe(e,n){return le(e,n)}function ve(e){return Math.random()<e}function ge(e){return ve(e)}function he(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),t=location.search.substring(1).match(n);return null!==t?decodeURIComponent(t[2]):""}function me(e){void 0===e&&(e=""),""===e&&(e=location.search);var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,function(e,t,r){return void 0===n[t]&&(n[t]=decodeURIComponent(r)),""}),n}function we(e,n,t){void 0===t&&(t={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(n)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,function(e,n,t){return void 0!==o[n]?o[n].push(t):o[n]=[t],""}),r=o[n]||[]}return t.returnArray?r:r.length?r[0]:null}function ye(e,n,t){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(n,t),r.toString()}var o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+t+"$2"):e+i+n+"="+t}function be(e){var n=location.hash.split("?");if(1===n.length)return"";var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=n[1].match(t);return r?r[2]:""}function Ee(e,n){if(void 0===n&&(n=["hostname"]),Pe(e)){var t=new window.URL(e);return n.reduce(function(e,n){return e+=t[n]},"")}var r=document.createElement("a");return r.href=e,n.reduce(function(e,n){return e+=r[n]},"")}function Se(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)}function Ae(e,n){void 0===n&&(n={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return n.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function Te(e){var n="";if("string"!=typeof e||""==e)return n;var t=/\.[^/?#]+$/.exec(e);return t?(t[0].length>1&&(n=t[0].substring(1)),n):n}function xe(e,n){void 0===n&&(n=""),n||(n=".js");for(var t=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(n,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(n)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""}function Oe(e){if(e&&0===Object.keys(e).length)return"";var n="?";for(var t in e)n+="".concat(t,"=").concat(e[t],"&");return n.slice(0,-1)}function Me(e){return e.replace(/^http:/,"https:")}function _e(e){return Me(e)}function Pe(e){void 0===e&&(e="");var n=window.URL;if(!n)return!1;if(!n.canParse)return!1;if("function"!=typeof n.canParse)return!1;try{var t=new n("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&n.canParse(e)}catch(e){return!1}}function je(e){var n="";(!Ae(e)&&Ae(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),Pe(e))&&(n=new URL(e).host);return n}function ke(e){var n="";(!Ae(e)&&Ae(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),Pe(e))&&(n=new URL(e).pathname);return n}var Ne={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function Re(n,t){void 0===n&&(n=""),void 0===t&&(t={});var o=Object.assign(e({},Ne),t),i=o.enabled,a=o.isClosed,c=o.showWrap,u=o.showDate,s=o.locales,f=o.isStringifyObject,d=o.logFn,l=o.errorFn;!0===a&&(Ce.warn("The options.isClosed is deprecated. Please use options.enabled instead."),i=!1);var p=Object.create(null),v=function(){return(new Date).toLocaleDateString(s,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(e){p[e]=function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];if(i){var a=n,s=n;if("string"==typeof n&&n.length>=2){var p=n.length;a=":"===n[p-1]?n.substring(0,p-1):n}c&&console.log("--- ".concat(a," - begin ---")),u&&(s=n?"".concat(v()," ").concat(n):"".concat(v())),f&&(t=t.map(function(e){return j(e)?JSON.stringify(e):e})),n||u?console[e].apply(console,r([s],t,!1)):console[e].apply(console,t),"log"===e&&d(),"error"===e&&l(),c&&console.log("--- ".concat(a," - end ---"))}}}),p}var Ce=Re("[Mazey]"),Be=Re("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function De(e,n){if(!e)return Ce.error("The element is not exist."),!1;for(var t=e.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===n)return!0;return!1}function Le(e,n){if(e)if(Array.isArray(n))n.forEach(function(n){e.classList.add(n)});else{for(var t=e.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===n)return;var i,a="";""!==t&&(a=" "),i=t+a+n,e.className=i}else Ce.error("The element is not exist.")}function Fe(e,n){Le(e,n)}function Ie(e,n){var t;e?(t=(t=(t=(t=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+n+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=t):Ce.error("The element is not exist.")}function ze(e,n){if(void 0===n&&(n={id:""}),!e)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return n.id?(o="".concat(n.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",n.id),i.innerHTML=e,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=e,t.appendChild(i),document.head.appendChild(t)),!0}function Ue(){var e,n=window.jQuery||window.$;return n?!(!(e=n("img"))||!e.length)&&(e.each(function(){var e=n(this);if(e){var t=e.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&P(r)&&r[1]&&e.width(r[1]),o&&P(o)&&o[1]&&e.height(o[1])}}}),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach(function(e){var n=e;if(n){var t=n.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&P(r)&&r[1]&&(n.style.width=r[1]),o&&P(o)&&o[1]&&(n.style.height=o[1])}}}),!0)}function qe(){return Ue()}function Ze(e,n){var t="";return n&&n.length>0&&(t=n.join(";")+";"),"".concat(e,"{").concat(t,"}")}function $e(e){var n;return document.querySelector&&(null===(n=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===n?void 0:n.getAttribute("content"))||""}function We(e){var n=e||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0}function Ve(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function Je(e,n){var t=Ve();void 0===t[e]&&(t[e]=[]),"function"==typeof n&&t[e].push(n)}function Ye(e,n){var t=Ve()[e];if(t instanceof Array)for(var r=0,o=t.length;r<o;r++)"function"==typeof t[r]&&(void 0===n?t[r]():t[r](n))}function He(e){Ye(e)}function Ge(e,n){var t=Ve(),r=t[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof n){for(var o=0,i=r.length;o<i;o++)if(r[o]===n){t[e].splice(o,1);break}}else delete t[e]}function Ke(e,n){void 0===n&&(n=null),e&&sessionStorage.setItem(e,JSON.stringify(n))}function Qe(e){var n=null;if(e){var t=sessionStorage.getItem(e);t&&(n=JSON.parse(t))}return n}function Xe(e,n){void 0===n&&(n=null),e&&localStorage.setItem(e,JSON.stringify(n))}function en(e){var n=null;if(e){var t=localStorage.getItem(e);t&&(n=JSON.parse(t))}return n}function nn(e){for(var n=e+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return""}function tn(e,n,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+n+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+n+i+"; path=/; domain="+r,null!==nn(e)&&nn(e)===n||(r=r||"."+c,document.cookie=e+"="+n+i+"; path=/; domain="+r))}function rn(e){for(var n=document.cookie.split(";"),t=0;t<n.length;t++){var r=n[t].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function on(e){rn(e)}function an(e,n){void 0===n&&(n={id:""});var t,r=n.id,o=function(){},i=new Promise(function(e,n){var r;t=(r=[e,n])[0],o=r[1]}),a=function(){t("loaded")},c=document.createElement("link");c||o(new Error("Not support create link element"));var u="onload"in c,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(c.rel="stylesheet",c.type="text/css",c.href=e,void 0!==r&&(c.id=r),document.getElementsByTagName("head")[0].appendChild(c),s||!u)return setTimeout(function(){d(c,a,0)},1),i;function f(){c&&(c.onload=c.onerror=c.onreadystatechange=null),c=null,a()}function d(e,n,t){if(e){var r,o=e.sheet;if((t+=1)>3e5)return r=!0,e&&(e=null),void n();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout(function(){r?n():d(e,n,t)},20)}}return u?(c.onload=f,c.onerror=function(){f()}):c.onreadystatechange=function(){c&&/loaded|complete/.test(c.readyState)&&f()},i}var cn={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function un(n,t){void 0===t&&(t=e({},cn));var r,o,i=Object.assign(e({},cn),t),a=i.id,c=i.callback,u=i.timeout,s=i.isDefer,f=i.isAsync,d=i.isCrossOrigin,l=i.attributes,p=i.cssUrl,v=document.createElement("script");if(v||Promise.reject("Not support create script element"),p){var g=function(e,n){if(!n)return"";if(Ae(n))return n;var t=e.split("/");t.pop();var r=t.join("/");return"".concat(r,"/").concat(n)}(n,p);g&&an(g).catch(function(e){console.error("Failed to load CSS from ".concat(g,": ").concat(null==e?void 0:e.message))})}var h=document.getElementsByTagName("script")[0];return v.type="text/javascript",s&&(v.defer=!0),f&&(v.async=!0),d&&(v.crossOrigin="anonymous"),a&&(v.id=a),l&&Object.keys(l).forEach(function(e){v.setAttribute(e,l[e])}),v.readyState?v.onreadystatechange=function(){"loaded"!==v.readyState&&"complete"!==v.readyState||(v.onreadystatechange=null,_(c),_(r,"loaded"))}:v.onload=function(){_(c),_(r,"loaded")},v.src=n,h&&h.parentNode.insertBefore(v,h),new Promise(function(e,n){var t;r=(t=[e,n])[0],o=t[1],u&&setTimeout(o.bind(null,"timeout"),u)})}function sn(e){void 0===e&&(e=3e4);var n,t=function(){},r=new Promise(function(e,r){t=e,n=r});return"complete"===document.readyState?t("complete"):window.addEventListener("load",function(){return t("load")}),setTimeout(function(){return n(Error("timeout"))},e),r}function fn(e){return new Promise(function(n,t){var r=new Image;r.onload=function(){n(r)},r.onerror=function(e){t(e)},r.src=e})}function dn(e,n){return window[e]?Promise.resolve("defined"):un(n)}function ln(e){var n=[],t=window.PerformanceObserver;return!!t&&(P(t.supportedEntryTypes)&&(n=t.supportedEntryTypes),n.includes(e))}function pn(){return n(this,void 0,void 0,function(){return t(this,function(e){return ln("paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"paint",buffered:!0})})]:[2,0]})})}function vn(){return n(this,void 0,void 0,function(){return t(this,function(e){return ln("paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-paint"===e.name});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"paint",buffered:!0})})]:[2,0]})})}function gn(){return n(this,void 0,void 0,function(){return t(this,function(e){return ln("largest-contentful-paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"largest-contentful-paint",buffered:!0})})]:[2,0]})})}function hn(){return n(this,void 0,void 0,function(){return t(this,function(e){return ln("first-input")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-input"===e.entryType});if(r){n.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});n.observe({type:"first-input",buffered:!0})})]:[2,0]})})}function mn(){return n(this,void 0,void 0,function(){return t(this,function(e){return ln("layout-shift")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().reduce(function(e,n){var t=0;return O(n.value)&&(t=n.value),e+t},0);n.disconnect(),e(r)});n.observe({type:"layout-shift",buffered:!0})})]:[2,0]})})}function wn(){return n(this,void 0,void 0,function(){var e,n;return t(this,function(t){return ln("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(n=e.responseStart-e.requestStart,[2,Math.round(n)]):[2,0]):[2,0]})})}function yn(e){return void 0===e&&(e=!1),n(this,void 0,void 0,function(){function n(){var n={source:F,os:r(),osVersion:o(),deviceType:i(),network:a(),screenDirection:c(),unloadTime:h-m,redirectTime:w-y,dnsTime:b-E,tcpTime:S-A,sslTime:u(S,T),responseTime:x-M,downloadTime:_-x,firstPaintTime:U,firstContentfulPaintTime:q,domReadyTime:j-I,onloadTime:k-I,whiteTime:x-I,renderTime:N-I,decodedBodySize:B,encodedBodySize:D};Object.keys(n).forEach(function(e){O(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))}),O(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var t={};e||Object.keys(n).forEach(function(e){t[d(e)]=n[e]}),Object.keys(t).length?f(t):f(n)}function r(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",n=navigator.userAgent,t=n.indexOf("Android")>-1||n.indexOf("Linux")>-1,r=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(t&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,n=navigator.userAgent.toLowerCase(),t=n.match(/(ipad)/i)&&"ipad",r=n.match(/iphone os/i)&&"iphone os",o=n.match(/midp/i)&&"midp",i=n.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=n.match(/ucweb/i)&&"ucweb",c=n.match(/android/i)&&"android",u=n.match(/windows ce/i)&&"windows ce",s=n.match(/windows mobile/i)&&"windows mobile";return(e=t||r||o||i||a||c||u||s?r||o||i||a||c||u||s?"phone":t?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",n=window.navigator;if(n.connection&&n.connection.effectiveType)switch(n.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function c(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function u(e,n){var t=0;return n&&(t=e-n),t}var s,f,l,p,v,g,h,m,w,y,b,E,S,A,T,x,M,_,j,k,N,R,C,B,D,L,F,I,z,U,q;return t(this,function(e){switch(e.label){case 0:if(!ln("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(s=window.performance)||"function"!=typeof s.getEntries||"function"!=typeof s.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(l=new Promise(function(e){f=[e][0]}),p=null,P(v=s.getEntriesByType("navigation"))&&(p=v[0]),g=new Array(19).fill(0),h=g[0],m=g[1],w=g[2],y=g[3],b=g[4],E=g[5],S=g[6],A=g[7],T=g[8],x=g[9],M=g[10],_=g[11],j=g[12],k=g[13],N=g[14],R=g[15],C=g[16],B=g[17],D=g[18],L=s.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,D=p.encodedBodySize,h=p.unloadEventEnd,m=p.unloadEventStart,w=p.redirectEnd,y=p.redirectStart,b=p.domainLookupEnd,E=p.domainLookupStart,S=p.connectEnd,A=p.connectStart,T=p.secureConnectionStart,x=p.responseStart,M=p.requestStart,_=p.responseEnd,j=p.domContentLoadedEventStart,k=p.loadEventStart,N=p.loadEventEnd,R=p.startTime,C=p.fetchStart;else{if(!L)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",h=L.unloadEventEnd,m=L.unloadEventStart,w=L.redirectEnd,y=L.redirectStart,b=L.domainLookupEnd,E=L.domainLookupStart,S=L.connectEnd,A=L.connectStart,T=L.secureConnectionStart,x=L.responseStart,M=L.requestStart,_=L.responseEnd,j=L.domContentLoadedEventStart,k=L.loadEventStart,N=L.loadEventEnd,R=L.navigationStart,C=L.fetchStart}if(I=0,O(R))I=R;else{if(!O(C))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=C}return[4,Promise.all([vn(),pn()])];case 1:return z=e.sent(),U=z[0],q=z[1],O(N)&&N>0?n():window.addEventListener("load",function(){window.setTimeout(function(){n()},0)}),[2,l]}})})}var bn="";function En(){if(bn)return"pwa"===bn;var e=Sn();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell&&"https:"===window.location.protocol?(bn="pwa",!0):(bn="no-pwa",!1)}function Sn(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var n={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return n;var r=function(e){return e.test(t)},o=function(e){var n="",r=t.match(e);return r&&P(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),n=e(e({},n),{system:i,appleType:a});var c="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?c="2000":r(/windows nt 5.1|windows xp/g)?c="xp":r(/windows nt 5.2|windows 2003/g)?c="2003":r(/windows nt 6.0|windows vista/g)?c="vista":r(/windows nt 6.1|windows 7/g)?c="7":r(/windows nt 6.2|windows 8/g)?c="8":r(/windows nt 6.3|windows 8.1/g)?c="8.1":r(/windows nt 10.0|windows 10/g)&&(c="10"):"macos"===i?c=o(/os x [\d._]+/g):"android"===i?c=o(/android [\d._]+/g):"ios"===i&&(c=o(/os [\d._]+/g)),n=e(e({},n),{systemVs:c});var u="";"windows"===i||"macos"===i||"linux"===i?u="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(u="mobile"),n=e(e({},n),{platform:u});var s="",f="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",f="firefox"):r(/presto/g)?(s="presto",f="opera"):r(/trident|compatible|msie/g)&&(s="trident",f="iexplore"),n=e(e({},n),{engine:s,supporter:f});var d="";"webkit"===s?d=o(/applewebkit\/[\d._]+/g):"gecko"===s?d=o(/gecko\/[\d._]+/g):"presto"===s?d=o(/presto\/[\d._]+/g):"trident"===s&&(d=o(/trident\/[\d._]+/g)),n=e(e({},n),{engineVs:d});var l="";"chrome"===f?l=o(/chrome\/[\d._]+/g):"safari"===f?l=o(/version\/[\d._]+/g):"firefox"===f?l=o(/firefox\/[\d._]+/g):"opera"===f?l=o(/opr\/[\d._]+/g):"iexplore"===f?l=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(l=o(/edge\/[\d._]+/g)),n=e(e({},n),{supporterVs:l});var p="",v="";return r(/micromessenger/g)?(p="wechat",v=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",v=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",v=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",v=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",v=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),n=e(e({},n),{shell:p,shellVs:v}),window.MAZEY_BROWSER_INFO=n,n}catch(e){return Ce.warn(e),n}}function An(e,n){void 0===e&&(e=""),void 0===n&&(n="-");var t=Sn(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=t[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(n)),r.push("".concat(a).concat(i))}}),r}var Tn="";function xn(){if(Tn)return Promise.resolve("webp"===Tn);return new Promise(function(e){var n=new Image;n.onload=function(){var t=n.width>0&&n.height>0;Tn=t?"webp":"no-webp",e(t)},n.onerror=function(){Tn="no-webp",e(!1)},n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})}export{Le as addClass,Je as addEvent,ze as addStyle,pe as calLongestCommonSubsequence,de as calLongestCommonSubstring,d as camelCase2Underscore,u as camelCaseToKebabCase,We as cancelBubble,q as clearHTML,Z as clearHtml,re as convert10To26,a as convertCamelToKebab,s as convertCamelToUnder,Me as convertHttpToHttps,c as convertKebabToCamel,Oe as convertObjectToQuery,F as convertToHtmlBreaks,f as convertUnderToCamel,H as cutCHSString,J as cutZHString,A as debounce,o as deepCopy,i as deepCopyObject,on as delCookie,_ as doFn,Ye as fireEvent,E as floatFixed,b as floatToPercent,ee as formatDate,An as genBrowserAttrs,Re as genCustomConsole,X as genHashCode,g as genRndNumString,Ze as genStyleString,m as genUniqueNumString,h as generateRndNum,w as generateUniqueNum,me as getAllQueryParams,Sn as getBrowserInfo,mn as getCLS,nn as getCookie,oe as getCurrentVersion,Ve as getDefineListeners,Ee as getDomain,pn as getFCP,hn as getFID,vn as getFP,Q as getFileSize,x as getFriendlyInterval,be as getHashQueryParam,gn as getLCP,en as getLocalStorage,$e as getPageMeta,yn as getPerformance,he as getQueryParam,xe as getScriptQueryParam,Qe as getSessionStorage,wn as getTTFB,Te as getUrlFileType,je as getUrlHost,we as getUrlParam,ke as getUrlPath,De as hasClass,ge as inRate,He as invokeEvent,M as invokeFn,D as isArray,R as isBool,C as isBoolean,se as isBrowser,k as isFunction,ve as isHit,p as isJSONString,v as isJsonString,P as isNonEmptyArray,L as isNonEmptyObject,O as isNumber,j as isPureObject,En as isSafePWAEnv,N as isString,xn as isSupportWebp,ln as isSupportedEntryType,B as isUdfOrNul,K as isValidData,te as isValidEmail,Ae as isValidHttpUrl,ne as isValidPhoneNumber,Se as isValidUrl,an as loadCSS,fn as loadImage,un as loadScript,dn as loadScriptIfUndefined,le as longestComSubsequence,fe as longestComSubstring,y as mNow,l as mTrim,Ce as mazeyCon,I as newLine,Ie as removeClass,rn as removeCookie,Ge as removeEvent,z as removeHTML,U as removeHtml,ie as repeatUntilConditionMet,_e as replaceHttp,$ as sanitizeInput,Fe as setClass,tn as setCookie,Ue as setImgSizeBySrc,qe as setImgWidHeiBySrc,Xe as setLocalStorage,Ke as setSessionStorage,ce as sleep,S as throttle,Be as timeCon,Y as truncateZHString,V as unsanitize,W as unsanitizeInput,ye as updateQueryParam,ae as waitTime,sn as windowLoaded,G as zAxiosIsValidRes};
|
package/lib/mazey.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Mazey v4.
|
|
2
|
+
* Mazey v4.9.1 https://github.com/chengchuu/mazey
|
|
3
3
|
* (c) 2018-2026 Cheng
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var mazey=function(e){"use strict";var n=function(){return n=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},n.apply(this,arguments)};function t(e,n,t,r){return new(t||(t=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 n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,c)}u((r=r.apply(e,n||[])).next())})}function r(e,n){var t,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(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=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=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function o(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function i(e){if("object"!=typeof e)return e;var t=["string","number","boolean","undefined"];return Object.values(e).every(function(e){return t.includes(typeof e)})?n({},e):JSON.parse(JSON.stringify(e))}function a(e){var n=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===n[0]?n.substring(1):n}function c(e){var n=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===n[0]?n.substring(1):n}function u(e){return c(e)}function s(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function f(e){void 0===e&&(e=5);for(var n="";e--;)n+=Math.floor(10*Math.random());return n}function l(e){return void 0===e&&(e=5),f(e)}function d(e){void 0===e&&(e=3);var n=[p(),l(e||3)];return n[0]+n[1]}function p(){return Date.now?Date.now():(new Date).getTime()}"function"==typeof SuppressedError&&SuppressedError;var g={type:"d"};function v(e,n){void 0===n&&(n={});var t=n.isNaNAsNumber,r=void 0!==t&&t,o=n.isInfinityAsNumber,i=void 0!==o&&o,a=n.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function m(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,n)),r}function h(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return m.apply(void 0,o([e],n,!1))}function w(e){var n=!1;return Array.isArray(e)&&e.length&&(n=!0),n}function y(e){var n=Boolean(e),t="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return n&&t&&r}function b(e){return"boolean"==typeof e}function S(e){if(!e)return"";var n=new RegExp("\\n","g");return e.replace(n,"<br />")}function E(e,n){void 0===n&&(n={});var t=n.removeNewLine,r=void 0!==t&&t,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function A(e){var n={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return n[e]})}function T(e,n,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>n));u++)o+=a;return t.hasDot&&c>n&&(o+=t.dotText),o}return""}function O(e,n,t){return void 0===t&&(t=!1),T(e,n,{hasDot:t})}function x(e){return t(this,void 0,void 0,function(){return r(this,function(n){return[2,new Promise(function(n){setTimeout(function(){n(e)},e)})]})})}var C="";function P(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=o[a-1][c-1]),o[a][c]=u+1}var s=Array.prototype.concat.apply([],o);return Math.max.apply(Math,s)}function M(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=o[a-1][c-1]),o[a][c]=u+1}else{var s=[0,0],f=s[0],l=s[1];c>0&&(f=o[a][c-1]),a>0&&(l=o[a-1][c]),o[a][c]=Math.max(f,l)}var d=Array.prototype.concat.apply([],o);return Math.max.apply(Math,d)}function k(e){return Math.random()<e}function N(e,n){void 0===n&&(n={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return n.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function j(e){return e.replace(/^http:/,"https:")}function _(e){void 0===e&&(e="");var n=window.URL;if(!n)return!1;if(!n.canParse)return!1;if("function"!=typeof n.canParse)return!1;try{var t=new n("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&n.canParse(e)}catch(e){return!1}}var R={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function B(e,t){void 0===e&&(e=""),void 0===t&&(t=n({},R));var r=Object.assign(n({},R),t),i=r.isClosed,a=r.showWrap,c=r.showDate,u=r.locales,s=r.isStringifyObject,f=r.logFn,l=r.errorFn,d=Object.create(null),p=function(){return(new Date).toLocaleDateString(u,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(n){d[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(i)return!1;var u=e,d=e;if("string"==typeof e&&e.length>=2){var g=e.length;u=":"===e[g-1]?e.substring(0,g-1):e}a&&console.log("--- ".concat(u," - begin ---")),c&&(d=e?"".concat(p()," ").concat(e):"".concat(p())),s&&(t=t.map(function(e){return y(e)?JSON.stringify(e):e})),e||c?console[n].apply(console,o([d],t,!1)):console[n].apply(console,t),"log"===n&&f(),"error"===n&&l(),a&&console.log("--- ".concat(u," - end ---"))}}),d}var L=B("[Mazey]"),U=B("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function F(e,n){if(e)if(Array.isArray(n))n.forEach(function(n){e.classList.add(n)});else{for(var t=e.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===n)return;var i,a="";""!==t&&(a=" "),i=t+a+n,e.className=i}else L.error("The element is not exist.")}function I(){var e,n=window.jQuery||window.$;return n?!(!(e=n("img"))||!e.length)&&(e.each(function(){var e=n(this);if(e){var t=e.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&e.width(r[1]),o&&w(o)&&o[1]&&e.height(o[1])}}}),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach(function(e){var n=e;if(n){var t=n.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&(n.style.width=r[1]),o&&w(o)&&o[1]&&(n.style.height=o[1])}}}),!0)}function D(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function z(e,n){var t=D()[e];if(t instanceof Array)for(var r=0,o=t.length;r<o;r++)"function"==typeof t[r]&&(void 0===n?t[r]():t[r](n))}function q(e){for(var n=e+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return""}function H(e){for(var n=document.cookie.split(";"),t=0;t<n.length;t++){var r=n[t].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function Z(e,n){void 0===n&&(n={id:""});var t,r=n.id,o=function(){},i=new Promise(function(e,n){var r;t=(r=[e,n])[0],o=r[1]}),a=function(){t("loaded")},c=document.createElement("link");c||o(new Error("Not support create link element"));var u="onload"in c,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(c.rel="stylesheet",c.type="text/css",c.href=e,void 0!==r&&(c.id=r),document.getElementsByTagName("head")[0].appendChild(c),s||!u)return setTimeout(function(){l(c,a,0)},1),i;function f(){c&&(c.onload=c.onerror=c.onreadystatechange=null),c=null,a()}function l(e,n,t){if(e){var r,o=e.sheet;if((t+=1)>3e5)return r=!0,e&&(e=null),void n();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout(function(){r?n():l(e,n,t)},20)}}return u?(c.onload=f,c.onerror=function(){f()}):c.onreadystatechange=function(){c&&/loaded|complete/.test(c.readyState)&&f()},i}var V={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function W(e,t){void 0===t&&(t=n({},V));var r,o,i=Object.assign(n({},V),t),a=i.id,c=i.callback,u=i.timeout,s=i.isDefer,f=i.isAsync,l=i.isCrossOrigin,d=i.attributes,p=i.cssUrl,g=document.createElement("script");if(g||Promise.reject("Not support create script element"),p){var v=function(e,n){if(!n)return"";if(N(n))return n;var t=e.split("/");t.pop();var r=t.join("/");return"".concat(r,"/").concat(n)}(e,p);v&&Z(v).catch(function(e){console.error("Failed to load CSS from ".concat(v,": ").concat(null==e?void 0:e.message))})}var m=document.getElementsByTagName("script")[0];return g.type="text/javascript",s&&(g.defer=!0),f&&(g.async=!0),l&&(g.crossOrigin="anonymous"),a&&(g.id=a),d&&Object.keys(d).forEach(function(e){g.setAttribute(e,d[e])}),g.readyState?g.onreadystatechange=function(){"loaded"!==g.readyState&&"complete"!==g.readyState||(g.onreadystatechange=null,h(c),h(r,"loaded"))}:g.onload=function(){h(c),h(r,"loaded")},g.src=e,m&&m.parentNode.insertBefore(g,m),new Promise(function(e,n){var t;r=(t=[e,n])[0],o=t[1],u&&setTimeout(o.bind(null,"timeout"),u)})}function $(e){var n=[],t=window.PerformanceObserver;return!!t&&(w(t.supportedEntryTypes)&&(n=t.supportedEntryTypes),n.includes(e))}function J(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"paint",buffered:!0})})]:[2,0]})})}function Q(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-paint"===e.name});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"paint",buffered:!0})})]:[2,0]})})}var Y="";function K(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var r=function(e){return e.test(t)},o=function(e){var n="",r=t.match(e);return r&&w(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),e=n(n({},e),{system:i,appleType:a});var c="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?c="2000":r(/windows nt 5.1|windows xp/g)?c="xp":r(/windows nt 5.2|windows 2003/g)?c="2003":r(/windows nt 6.0|windows vista/g)?c="vista":r(/windows nt 6.1|windows 7/g)?c="7":r(/windows nt 6.2|windows 8/g)?c="8":r(/windows nt 6.3|windows 8.1/g)?c="8.1":r(/windows nt 10.0|windows 10/g)&&(c="10"):"macos"===i?c=o(/os x [\d._]+/g):"android"===i?c=o(/android [\d._]+/g):"ios"===i&&(c=o(/os [\d._]+/g)),e=n(n({},e),{systemVs:c});var u="";"windows"===i||"macos"===i||"linux"===i?u="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(u="mobile"),e=n(n({},e),{platform:u});var s="",f="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",f="firefox"):r(/presto/g)?(s="presto",f="opera"):r(/trident|compatible|msie/g)&&(s="trident",f="iexplore"),e=n(n({},e),{engine:s,supporter:f});var l="";"webkit"===s?l=o(/applewebkit\/[\d._]+/g):"gecko"===s?l=o(/gecko\/[\d._]+/g):"presto"===s?l=o(/presto\/[\d._]+/g):"trident"===s&&(l=o(/trident\/[\d._]+/g)),e=n(n({},e),{engineVs:l});var d="";"chrome"===f?d=o(/chrome\/[\d._]+/g):"safari"===f?d=o(/version\/[\d._]+/g):"firefox"===f?d=o(/firefox\/[\d._]+/g):"opera"===f?d=o(/opr\/[\d._]+/g):"iexplore"===f?d=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(d=o(/edge\/[\d._]+/g)),e=n(n({},e),{supporterVs:d});var p="",g="";return r(/micromessenger/g)?(p="wechat",g=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",g=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",g=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",g=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",g=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),e=n(n({},e),{shell:p,shellVs:g}),window.MAZEY_BROWSER_INFO=e,e}catch(n){return L.warn(n),e}}var G="";return e.addClass=F,e.addEvent=function(e,n){var t=D();void 0===t[e]&&(t[e]=[]),"function"==typeof n&&t[e].push(n)},e.addStyle=function(e,n){if(void 0===n&&(n={id:""}),!e)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return n.id?(o="".concat(n.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",n.id),i.innerHTML=e,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=e,t.appendChild(i),document.head.appendChild(t)),!0},e.calLongestCommonSubsequence=function(e,n){return M(e,n)},e.calLongestCommonSubstring=function(e,n){return P(e,n)},e.camelCase2Underscore=u,e.camelCaseToKebabCase=function(e){return a(e)},e.cancelBubble=function(e){var n=e||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},e.clearHTML=function(e,n){return void 0===n&&(n={}),E(e,n)},e.clearHtml=function(e,n){return void 0===n&&(n={}),E(e,n)},e.convert10To26=function(e){for(var n="";e>0;){var t=e%26;0===t&&(t=26),n=String.fromCharCode(t+96)+n,e=(e-t)/26}return n},e.convertCamelToKebab=a,e.convertCamelToUnder=c,e.convertHttpToHttps=j,e.convertKebabToCamel=function(e){var n=e.replace(/-([a-z])/g,function(e,n){return n.toUpperCase()});return n.endsWith("-")?n.slice(0,-1):n},e.convertObjectToQuery=function(e){if(e&&0===Object.keys(e).length)return"";var n="?";for(var t in e)n+="".concat(t,"=").concat(e[t],"&");return n.slice(0,-1)},e.convertToHtmlBreaks=S,e.convertUnderToCamel=function(e){return e.replace(/_([a-z])/g,function(e,n){return n.toUpperCase()})},e.cutCHSString=function(e,n,t){return void 0===t&&(t=!1),O(e,n,t)},e.cutZHString=T,e.debounce=function(e,n,t){var r=null,o=null,i=null,a=null,c=null,u=function(){var s=p()-i;s<n&&s>=0?o=setTimeout(u,n-s):(o=null,t||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];r=this,a=s,i=p();var l=t&&!o;return o||(o=setTimeout(u,n)),l&&(c=e.apply(r,a),r=a=null),c}},e.deepCopy=i,e.deepCopyObject=function(e){return i(e)},e.delCookie=function(e){H(e)},e.doFn=h,e.fireEvent=z,e.floatFixed=function(e,n){return void 0===n&&(n=0),parseFloat(e).toFixed(n)},e.floatToPercent=function(e,n){void 0===n&&(n=0);var t="";return t=n?(100*e).toFixed(n):String(Math.floor(100*e)),"".concat(t,"%")},e.formatDate=function(e,n){void 0===n&&(n="yyyy-MM-dd"),e||(e=new Date);var t=new Date(e),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=n||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var n=o[e];"MM"===e&&Number(n)<=9&&(n="0".concat(n)),i=i.replace(e,String(n))}),i},e.genBrowserAttrs=function(e,n){void 0===e&&(e=""),void 0===n&&(n="-");var t=K(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=t[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(n)),r.push("".concat(a).concat(i))}}),r},e.genCustomConsole=B,e.genHashCode=function(e){var n,t=0;for(n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t},e.genRndNumString=f,e.genStyleString=function(e,n){var t="";return n&&n.length>0&&(t=n.join(";")+";"),"".concat(e,"{").concat(t,"}")},e.genUniqueNumString=d,e.generateRndNum=l,e.generateUniqueNum=function(e){return void 0===e&&(e=3),d(e)},e.getAllQueryParams=function(e){void 0===e&&(e=""),""===e&&(e=location.search);var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,function(e,t,r){return void 0===n[t]&&(n[t]=decodeURIComponent(r)),""}),n},e.getBrowserInfo=K,e.getCLS=function(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("layout-shift")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().reduce(function(e,n){var t=0;return v(n.value)&&(t=n.value),e+t},0);n.disconnect(),e(r)});n.observe({type:"layout-shift",buffered:!0})})]:[2,0]})})},e.getCookie=q,e.getCurrentVersion=function(){return"v4"},e.getDefineListeners=D,e.getDomain=function(e,n){if(void 0===n&&(n=["hostname"]),_(e)){var t=new window.URL(e);return n.reduce(function(e,n){return e+=t[n]},"")}var r=document.createElement("a");return r.href=e,n.reduce(function(e,n){return e+=r[n]},"")},e.getFCP=J,e.getFID=function(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("first-input")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-input"===e.entryType});if(r){n.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});n.observe({type:"first-input",buffered:!0})})]:[2,0]})})},e.getFP=Q,e.getFileSize=function(e){var n=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var t=1024;return e<t?e+" B":e<Math.pow(t,2)?n(e/t)+" KB":e<Math.pow(t,3)?n(e/Math.pow(t,2))+" MB":e<Math.pow(t,4)?n(e/Math.pow(t,3))+" G":n(e/Math.pow(t,4))+" T"},e.getFriendlyInterval=function(e,n,t){void 0===e&&(e=0),void 0===n&&(n=0),void 0===t&&(t=g);var r=(t=Object.assign(g,t)).type,o=decodeURIComponent;v(e)||(e=new Date(e).getTime()),v(n)||(n=new Date(n).getTime());var i=Number(n)-Number(e),a="",c=new Array(4).fill(0),u=c[0],s=(c[1],c[2],c[3]),f=o("%20%E5%A4%A9%20"),l=o("%20%E6%97%B6%20"),d=o("%20%E5%88%86%20"),p=o("%20%E7%A7%92");if(i>=0)switch(u=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),r){case"d":a=u;break;case"text":a=(u=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+l+Math.floor(i/1e3/60%60)+d+(s=Math.floor(i/1e3%60))+p;break;default:a=s}return a},e.getHashQueryParam=function(e){var n=location.hash.split("?");if(1===n.length)return"";var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=n[1].match(t);return r?r[2]:""},e.getLCP=function(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("largest-contentful-paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"largest-contentful-paint",buffered:!0})})]:[2,0]})})},e.getLocalStorage=function(e){var n=null;if(e){var t=localStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getPageMeta=function(e){var n;return document.querySelector&&(null===(n=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===n?void 0:n.getAttribute("content"))||""},e.getPerformance=function(e){return void 0===e&&(e=!1),t(this,void 0,void 0,function(){function n(){var n={source:F,os:t(),osVersion:o(),deviceType:i(),network:a(),screenDirection:c(),unloadTime:h-y,redirectTime:b-S,dnsTime:E-A,tcpTime:T-O,sslTime:s(T,x),responseTime:C-P,downloadTime:M-C,firstPaintTime:z,firstContentfulPaintTime:q,domReadyTime:k-I,onloadTime:N-I,whiteTime:C-I,renderTime:j-I,decodedBodySize:B,encodedBodySize:L};Object.keys(n).forEach(function(e){v(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))}),v(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var r={};e||Object.keys(n).forEach(function(e){r[u(e)]=n[e]}),Object.keys(r).length?l(r):l(n)}function t(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",n=navigator.userAgent,t=n.indexOf("Android")>-1||n.indexOf("Linux")>-1,r=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(t&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,n=navigator.userAgent.toLowerCase(),t=n.match(/(ipad)/i)&&"ipad",r=n.match(/iphone os/i)&&"iphone os",o=n.match(/midp/i)&&"midp",i=n.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=n.match(/ucweb/i)&&"ucweb",c=n.match(/android/i)&&"android",u=n.match(/windows ce/i)&&"windows ce",s=n.match(/windows mobile/i)&&"windows mobile";return(e=t||r||o||i||a||c||u||s?r||o||i||a||c||u||s?"phone":t?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",n=window.navigator;if(n.connection&&n.connection.effectiveType)switch(n.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function c(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function s(e,n){var t=0;return n&&(t=e-n),t}var f,l,d,p,g,m,h,y,b,S,E,A,T,O,x,C,P,M,k,N,j,_,R,B,L,U,F,I,D,z,q;return r(this,function(e){switch(e.label){case 0:if(!$("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(f=window.performance)||"function"!=typeof f.getEntries||"function"!=typeof f.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(d=new Promise(function(e){l=[e][0]}),p=null,w(g=f.getEntriesByType("navigation"))&&(p=g[0]),m=new Array(19).fill(0),h=m[0],y=m[1],b=m[2],S=m[3],E=m[4],A=m[5],T=m[6],O=m[7],x=m[8],C=m[9],P=m[10],M=m[11],k=m[12],N=m[13],j=m[14],_=m[15],R=m[16],B=m[17],L=m[18],U=f.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,L=p.encodedBodySize,h=p.unloadEventEnd,y=p.unloadEventStart,b=p.redirectEnd,S=p.redirectStart,E=p.domainLookupEnd,A=p.domainLookupStart,T=p.connectEnd,O=p.connectStart,x=p.secureConnectionStart,C=p.responseStart,P=p.requestStart,M=p.responseEnd,k=p.domContentLoadedEventStart,N=p.loadEventStart,j=p.loadEventEnd,_=p.startTime,R=p.fetchStart;else{if(!U)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",h=U.unloadEventEnd,y=U.unloadEventStart,b=U.redirectEnd,S=U.redirectStart,E=U.domainLookupEnd,A=U.domainLookupStart,T=U.connectEnd,O=U.connectStart,x=U.secureConnectionStart,C=U.responseStart,P=U.requestStart,M=U.responseEnd,k=U.domContentLoadedEventStart,N=U.loadEventStart,j=U.loadEventEnd,_=U.navigationStart,R=U.fetchStart}if(I=0,v(_))I=_;else{if(!v(R))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=R}return[4,Promise.all([Q(),J()])];case 1:return D=e.sent(),z=D[0],q=D[1],v(j)&&j>0?n():window.addEventListener("load",function(){window.setTimeout(function(){n()},0)}),[2,d]}})})},e.getQueryParam=function(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),t=location.search.substring(1).match(n);return null!==t?decodeURIComponent(t[2]):""},e.getScriptQueryParam=function(e,n){void 0===n&&(n=""),n||(n=".js");for(var t=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(n,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(n)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""},e.getSessionStorage=function(e){var n=null;if(e){var t=sessionStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getTTFB=function(){return t(this,void 0,void 0,function(){var e,n;return r(this,function(t){return $("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(n=e.responseStart-e.requestStart,[2,Math.round(n)]):[2,0]):[2,0]})})},e.getUrlFileType=function(e){var n="";if("string"!=typeof e||""==e)return n;var t=/\.[^/?#]+$/.exec(e);return t?(t[0].length>1&&(n=t[0].substring(1)),n):n},e.getUrlHost=function(e){var n="";return!N(e)&&N(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).host),n},e.getUrlParam=function(e,n,t){void 0===t&&(t={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(n)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,function(e,n,t){return void 0!==o[n]?o[n].push(t):o[n]=[t],""}),r=o[n]||[]}return t.returnArray?r:r.length?r[0]:null},e.getUrlPath=function(e){var n="";return!N(e)&&N(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).pathname),n},e.hasClass=function(e,n){if(!e)return L.error("The element is not exist."),!1;for(var t=e.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===n)return!0;return!1},e.inRate=function(e){return k(e)},e.invokeEvent=function(e){z(e)},e.invokeFn=m,e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isBool=b,e.isBoolean=function(e){return b(e)},e.isBrowser=function(){if(C)return"browser"===C;var e="undefined"!=typeof window;return e&&(C="browser"),e},e.isFunction=function(e){return"function"==typeof e},e.isHit=k,e.isJSONString=s,e.isJsonString=function(e){return s(e)},e.isNonEmptyArray=w,e.isNonEmptyObject=function(e){return!!y(e)&&0!==Object.keys(e).length},e.isNumber=v,e.isPureObject=y,e.isSafePWAEnv=function(){if(Y)return"pwa"===Y;var e=K();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell&&"https:"===window.location.protocol?(Y="pwa",!0):(Y="no-pwa",!1)},e.isString=function(e){return"string"==typeof e},e.isSupportWebp=function(){return G?Promise.resolve("webp"===G):new Promise(function(e){var n=new Image;n.onload=function(){var t=n.width>0&&n.height>0;G=t?"webp":"no-webp",e(t)},n.onerror=function(){G="no-webp",e(!1)},n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})},e.isSupportedEntryType=$,e.isUdfOrNul=function(e){return null==e},e.isValidData=function(e,n,t){var r=!1;return"object"!=typeof e||n.reduce(function(e,n){return void 0===e[n]?Object.create(null):e=e[n]},e)===t&&(r=!0),r},e.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},e.isValidHttpUrl=N,e.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},e.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)},e.loadCSS=Z,e.loadImage=function(e){return new Promise(function(n,t){var r=new Image;r.onload=function(){n(r)},r.onerror=function(e){t(e)},r.src=e})},e.loadScript=W,e.loadScriptIfUndefined=function(e,n){return window[e]?Promise.resolve("defined"):W(n)},e.longestComSubsequence=M,e.longestComSubstring=P,e.mNow=p,e.mTrim=function(e){for(var n=(e=e.replace(/^\s+/,"")).length-1,t=/\s/;t.test(e.charAt(n));)n--;return e.slice(0,n+1)},e.mazeyCon=L,e.newLine=function(e){return S(e)},e.removeClass=function(e,n){var t;e?(t=(t=(t=(t=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+n+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=t):L.error("The element is not exist.")},e.removeCookie=H,e.removeEvent=function(e,n){var t=D(),r=t[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof n){for(var o=0,i=r.length;o<i;o++)if(r[o]===n){t[e].splice(o,1);break}}else delete t[e]},e.removeHTML=E,e.removeHtml=function(e,n){return void 0===n&&(n={}),E(e,n)},e.repeatUntilConditionMet=function(e,n,o){var i=this;void 0===n&&(n={}),void 0===o&&(o=function(e){return!0===e});var a=n.interval,c=void 0===a?1e3:a,u=n.times,s=void 0===u?10:u,f=n.context,l=n.args,d=0,p=function(){setTimeout(function(){return t(i,void 0,void 0,function(){var n;return r(this,function(t){switch(t.label){case 0:return[4,e.apply(f,l)];case 1:return n=t.sent(),o(n)||++d>=s?[2]:(p(),[2])}})})},c)};"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof c||c<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),p()},e.replaceHttp=function(e){return j(e)},e.sanitizeInput=function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return n[e]})},e.setClass=function(e,n){F(e,n)},e.setCookie=function(e,n,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+n+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+n+i+"; path=/; domain="+r,null!==q(e)&&q(e)===n||(r=r||"."+c,document.cookie=e+"="+n+i+"; path=/; domain="+r))},e.setImgSizeBySrc=I,e.setImgWidHeiBySrc=function(){return I()},e.setLocalStorage=function(e,n){void 0===n&&(n=null),e&&localStorage.setItem(e,JSON.stringify(n))},e.setSessionStorage=function(e,n){void 0===n&&(n=null),e&&sessionStorage.setItem(e,JSON.stringify(n))},e.sleep=function(e){return t(this,void 0,void 0,function(){return r(this,function(n){return[2,x(e)]})})},e.throttle=function(e,n,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],s=function(){u=!1===t.leading?0:p(),i=null,c=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var l=p();u||!1!==t.leading||(u=l);var d=n-(l-u);return r=this,o=a,d<=0||d>n?(i&&(clearTimeout(i),i=null),u=l,c=e.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),d)),c}},e.timeCon=U,e.truncateZHString=O,e.unsanitize=function(e){return A(e)},e.unsanitizeInput=A,e.updateQueryParam=function(e,n,t){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(n,t),r.toString()}var o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+t+"$2"):e+i+n+"="+t},e.waitTime=x,e.windowLoaded=function(e){void 0===e&&(e=3e4);var n,t=function(){},r=new Promise(function(e,r){t=e,n=r});return"complete"===document.readyState?t("complete"):window.addEventListener("load",function(){return t("load")}),setTimeout(function(){return n(Error("timeout"))},e),r},e.zAxiosIsValidRes=function(e,n){void 0===n&&(n={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},n),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},e}({});
|
|
6
|
+
var mazey=function(e){"use strict";var n=function(){return n=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},n.apply(this,arguments)};function t(e,n,t,r){return new(t||(t=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 n;e.done?o(e.value):(n=e.value,n instanceof t?n:new t(function(e){e(n)})).then(a,c)}u((r=r.apply(e,n||[])).next())})}function r(e,n){var t,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(t)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=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=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}function o(e,n,t){if(t||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return e.concat(r||Array.prototype.slice.call(n))}function i(e){if("object"!=typeof e)return e;var t=["string","number","boolean","undefined"];return Object.values(e).every(function(e){return t.includes(typeof e)})?n({},e):JSON.parse(JSON.stringify(e))}function a(e){var n=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===n[0]?n.substring(1):n}function c(e){var n=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===n[0]?n.substring(1):n}function u(e){return c(e)}function s(e){try{if("object"==typeof JSON.parse(e))return!0}catch(e){}return!1}function f(e){void 0===e&&(e=5);for(var n="";e--;)n+=Math.floor(10*Math.random());return n}function l(e){return void 0===e&&(e=5),f(e)}function d(e){void 0===e&&(e=3);var n=[p(),l(e||3)];return n[0]+n[1]}function p(){return Date.now?Date.now():(new Date).getTime()}"function"==typeof SuppressedError&&SuppressedError;var g={type:"d"};function v(e,n){void 0===n&&(n={});var t=n.isNaNAsNumber,r=void 0!==t&&t,o=n.isInfinityAsNumber,i=void 0!==o&&o,a=n.isUnFiniteAsNumber;return"number"==typeof e&&(!(!0!==i&&!0!==(void 0!==a&&a)&&!isFinite(e))&&!(!r&&isNaN(e)))}function m(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,n)),r}function h(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];return m.apply(void 0,o([e],n,!1))}function w(e){var n=!1;return Array.isArray(e)&&e.length&&(n=!0),n}function y(e){var n=Boolean(e),t="object"==typeof e,r="[object Object]"===Object.prototype.toString.call(e);return n&&t&&r}function b(e){return"boolean"==typeof e}function S(e){if(!e)return"";var n=new RegExp("\\n","g");return e.replace(n,"<br />")}function E(e,n){void 0===n&&(n={});var t=n.removeNewLine,r=void 0!==t&&t,o="";return e&&(o=e.replace(/<\/?.+?>/g,""),r&&(o=o.replace(/[\r\n]/g,""))),o}function T(e){var n={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/(&|<|>|"|'|/)/g,function(e){return n[e]})}function A(e,n,t){if(void 0===t&&(t={hasDot:!1,dotText:"..."}),t=Object.assign({hasDot:!1,dotText:"..."},t),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>n));u++)o+=a;return t.hasDot&&c>n&&(o+=t.dotText),o}return""}function O(e,n,t){return void 0===t&&(t=!1),A(e,n,{hasDot:t})}function x(e){return t(this,void 0,void 0,function(){return r(this,function(n){return[2,new Promise(function(n){setTimeout(function(){n(e)},e)})]})})}var C="";function P(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=o[a-1][c-1]),o[a][c]=u+1}var s=Array.prototype.concat.apply([],o);return Math.max.apply(Math,s)}function M(e,n){for(var t=e.length,r=n.length,o=i(new Array(t).fill(new Array(r).fill(0))),a=0;a<t;++a)for(var c=0;c<r;++c)if(e[a]===n[c]){var u=0;a>0&&c>0&&(u=o[a-1][c-1]),o[a][c]=u+1}else{var s=[0,0],f=s[0],l=s[1];c>0&&(f=o[a][c-1]),a>0&&(l=o[a-1][c]),o[a][c]=Math.max(f,l)}var d=Array.prototype.concat.apply([],o);return Math.max.apply(Math,d)}function k(e){return Math.random()<e}function N(e,n){void 0===n&&(n={strict:!0});var t=/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/;return n.strict||(t=/^(https?:)?\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9\u4E00-\u9FA5()!@:%_+.~#?&//=]*)/),t.test(e)}function j(e){return e.replace(/^http:/,"https:")}function _(e){void 0===e&&(e="");var n=window.URL;if(!n)return!1;if(!n.canParse)return!1;if("function"!=typeof n.canParse)return!1;try{var t=new n("b","http://a");return t.pathname="c d","http://a/c%20d"===t.href&&Boolean(t.searchParams)&&n.canParse(e)}catch(e){return!1}}var R={enabled:!0,isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",isStringifyObject:!1,logFn:function(){},errorFn:function(){}};function B(e,t){void 0===e&&(e=""),void 0===t&&(t={});var r=Object.assign(n({},R),t),i=r.enabled,a=r.isClosed,c=r.showWrap,u=r.showDate,s=r.locales,f=r.isStringifyObject,l=r.logFn,d=r.errorFn;!0===a&&(L.warn("The options.isClosed is deprecated. Please use options.enabled instead."),i=!1);var p=Object.create(null),g=function(){return(new Date).toLocaleDateString(s,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach(function(n){p[n]=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(i){var a=e,s=e;if("string"==typeof e&&e.length>=2){var p=e.length;a=":"===e[p-1]?e.substring(0,p-1):e}c&&console.log("--- ".concat(a," - begin ---")),u&&(s=e?"".concat(g()," ").concat(e):"".concat(g())),f&&(t=t.map(function(e){return y(e)?JSON.stringify(e):e})),e||u?console[n].apply(console,o([s],t,!1)):console[n].apply(console,t),"log"===n&&l(),"error"===n&&d(),c&&console.log("--- ".concat(a," - end ---"))}}}),p}var L=B("[Mazey]"),U=B("",{showDate:!0,locales:"zh-CN",isStringifyObject:!0});function F(e,n){if(e)if(Array.isArray(n))n.forEach(function(n){e.classList.add(n)});else{for(var t=e.className,r=t.split(/\s+/),o=0;o<r.length;o++)if(r[o]===n)return;var i,a="";""!==t&&(a=" "),i=t+a+n,e.className=i}else L.error("The element is not exist.")}function I(){var e,n=window.jQuery||window.$;return n?!(!(e=n("img"))||!e.length)&&(e.each(function(){var e=n(this);if(e){var t=e.attr("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&e.width(r[1]),o&&w(o)&&o[1]&&e.height(o[1])}}}),!0):(e=document.getElementsByTagName("img")).length>0&&(Array.from(e).forEach(function(e){var n=e;if(n){var t=n.getAttribute("src");if(t&&"string"==typeof t&&t.length){var r=t.match(/width=([0-9]+[a-z%]*)/),o=t.match(/height=([0-9]+[a-z%]*)/);r&&w(r)&&r[1]&&(n.style.width=r[1]),o&&w(o)&&o[1]&&(n.style.height=o[1])}}}),!0)}function D(){var e=window.MAZEY_DEFINE_LISTENERS;return"object"!=typeof e&&(e={},window.MAZEY_DEFINE_LISTENERS=e),e}function z(e,n){var t=D()[e];if(t instanceof Array)for(var r=0,o=t.length;r<o;r++)"function"==typeof t[r]&&(void 0===n?t[r]():t[r](n))}function q(e){for(var n=e+"=",t=document.cookie.split(";"),r=0;r<t.length;r++){for(var o=t[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(n))return o.substring(n.length,o.length)}return""}function H(e){for(var n=document.cookie.split(";"),t=0;t<n.length;t++){var r=n[t].trim();if(r.startsWith("".concat(e,"="))){var o=r.split("=")[0],i=new Date;return i.setTime(i.getTime()-1),document.cookie="".concat(o,"=;expires=").concat(i.toUTCString()),!0}}return!1}function Z(e,n){void 0===n&&(n={id:""});var t,r=n.id,o=function(){},i=new Promise(function(e,n){var r;t=(r=[e,n])[0],o=r[1]}),a=function(){t("loaded")},c=document.createElement("link");c||o(new Error("Not support create link element"));var u="onload"in c,s=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(c.rel="stylesheet",c.type="text/css",c.href=e,void 0!==r&&(c.id=r),document.getElementsByTagName("head")[0].appendChild(c),s||!u)return setTimeout(function(){l(c,a,0)},1),i;function f(){c&&(c.onload=c.onerror=c.onreadystatechange=null),c=null,a()}function l(e,n,t){if(e){var r,o=e.sheet;if((t+=1)>3e5)return r=!0,e&&(e=null),void n();if(s)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){var i=e;if(!i.name)return;"NS_ERROR_DOM_SECURITY_ERR"===i.name&&(r=!0)}setTimeout(function(){r?n():l(e,n,t)},20)}}return u?(c.onload=f,c.onerror=function(){f()}):c.onreadystatechange=function(){c&&/loaded|complete/.test(c.readyState)&&f()},i}var V={id:"",callback:function(){},timeout:5e3,isDefer:!1,isAsync:!1,isCrossOrigin:!1,attributes:null,cssUrl:""};function W(e,t){void 0===t&&(t=n({},V));var r,o,i=Object.assign(n({},V),t),a=i.id,c=i.callback,u=i.timeout,s=i.isDefer,f=i.isAsync,l=i.isCrossOrigin,d=i.attributes,p=i.cssUrl,g=document.createElement("script");if(g||Promise.reject("Not support create script element"),p){var v=function(e,n){if(!n)return"";if(N(n))return n;var t=e.split("/");t.pop();var r=t.join("/");return"".concat(r,"/").concat(n)}(e,p);v&&Z(v).catch(function(e){console.error("Failed to load CSS from ".concat(v,": ").concat(null==e?void 0:e.message))})}var m=document.getElementsByTagName("script")[0];return g.type="text/javascript",s&&(g.defer=!0),f&&(g.async=!0),l&&(g.crossOrigin="anonymous"),a&&(g.id=a),d&&Object.keys(d).forEach(function(e){g.setAttribute(e,d[e])}),g.readyState?g.onreadystatechange=function(){"loaded"!==g.readyState&&"complete"!==g.readyState||(g.onreadystatechange=null,h(c),h(r,"loaded"))}:g.onload=function(){h(c),h(r,"loaded")},g.src=e,m&&m.parentNode.insertBefore(g,m),new Promise(function(e,n){var t;r=(t=[e,n])[0],o=t[1],u&&setTimeout(o.bind(null,"timeout"),u)})}function $(e){var n=[],t=window.PerformanceObserver;return!!t&&(w(t.supportedEntryTypes)&&(n=t.supportedEntryTypes),n.includes(e))}function J(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-contentful-paint"===e.name});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"paint",buffered:!0})})]:[2,0]})})}function Q(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-paint"===e.name});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"paint",buffered:!0})})]:[2,0]})})}var Y="";function K(){if(window.MAZEY_BROWSER_INFO&&"object"==typeof window.MAZEY_BROWSER_INFO)return window.MAZEY_BROWSER_INFO;var e={engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:"",shell:"",shellVs:"",appleType:""};try{var t=navigator.userAgent.toLowerCase();if(!t)return e;var r=function(e){return e.test(t)},o=function(e){var n="",r=t.match(e);return r&&w(r)&&(n=(n=(n=r.toString()).replace(/[^0-9|_.]/g,"")).replace(/_/g,".")),n},i="",a="";r(/windows|win32|win64|wow32|wow64/g)?i="windows":r(/macintosh|macintel/g)?i="macos":r(/x11/g)?i="linux":r(/android|adr/g)?i="android":r(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios",r(/ipad/g)?a="ipad":r(/iphone/g)?a="iphone":r(/iwatch/g)?a="iwatch":r(/ipod/g)&&(a="ipod")),e=n(n({},e),{system:i,appleType:a});var c="";"windows"===i?r(/windows nt 5.0|windows 2000/g)?c="2000":r(/windows nt 5.1|windows xp/g)?c="xp":r(/windows nt 5.2|windows 2003/g)?c="2003":r(/windows nt 6.0|windows vista/g)?c="vista":r(/windows nt 6.1|windows 7/g)?c="7":r(/windows nt 6.2|windows 8/g)?c="8":r(/windows nt 6.3|windows 8.1/g)?c="8.1":r(/windows nt 10.0|windows 10/g)&&(c="10"):"macos"===i?c=o(/os x [\d._]+/g):"android"===i?c=o(/android [\d._]+/g):"ios"===i&&(c=o(/os [\d._]+/g)),e=n(n({},e),{systemVs:c});var u="";"windows"===i||"macos"===i||"linux"===i?u="desktop":("android"===i||"ios"===i||r(/mobile/g))&&(u="mobile"),e=n(n({},e),{platform:u});var s="",f="";r(/applewebkit/g)?(s="webkit",r(/edge/g)?f="edge":r(/opr/g)?f="opera":r(/chrome/g)?f="chrome":r(/safari/g)&&(f="safari")):r(/gecko/g)&&r(/firefox/g)?(s="gecko",f="firefox"):r(/presto/g)?(s="presto",f="opera"):r(/trident|compatible|msie/g)&&(s="trident",f="iexplore"),e=n(n({},e),{engine:s,supporter:f});var l="";"webkit"===s?l=o(/applewebkit\/[\d._]+/g):"gecko"===s?l=o(/gecko\/[\d._]+/g):"presto"===s?l=o(/presto\/[\d._]+/g):"trident"===s&&(l=o(/trident\/[\d._]+/g)),e=n(n({},e),{engineVs:l});var d="";"chrome"===f?d=o(/chrome\/[\d._]+/g):"safari"===f?d=o(/version\/[\d._]+/g):"firefox"===f?d=o(/firefox\/[\d._]+/g):"opera"===f?d=o(/opr\/[\d._]+/g):"iexplore"===f?d=o(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===f&&(d=o(/edge\/[\d._]+/g)),e=n(n({},e),{supporterVs:d});var p="",g="";return r(/micromessenger/g)?(p="wechat",g=o(/micromessenger\/[\d._]+/g)):r(/qqbrowser/g)?(p="qq_browser",g=o(/qqbrowser\/[\d._]+/g)):r(/\sqq/g)?p="qq_app":r(/ucbrowser/g)?(p="uc",g=o(/ucbrowser\/[\d._]+/g)):r(/qihu 360se/g)?p="360":r(/2345explorer/g)?(p="2345",g=o(/2345explorer\/[\d._]+/g)):r(/metasr/g)?p="sougou":r(/lbbrowser/g)?p="liebao":r(/maxthon/g)?(p="maxthon",g=o(/maxthon\/[\d._]+/g)):r(/biliapp/g)&&(p="bilibili"),e=n(n({},e),{shell:p,shellVs:g}),window.MAZEY_BROWSER_INFO=e,e}catch(n){return L.warn(n),e}}var G="";return e.addClass=F,e.addEvent=function(e,n){var t=D();void 0===t[e]&&(t[e]=[]),"function"==typeof n&&t[e].push(n)},e.addStyle=function(e,n){if(void 0===n&&(n={id:""}),!e)return!1;var t=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return n.id?(o="".concat(n.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",n.id),i.innerHTML=e,t.appendChild(i),document.head.appendChild(t))):(i.innerHTML=e,t.appendChild(i),document.head.appendChild(t)),!0},e.calLongestCommonSubsequence=function(e,n){return M(e,n)},e.calLongestCommonSubstring=function(e,n){return P(e,n)},e.camelCase2Underscore=u,e.camelCaseToKebabCase=function(e){return a(e)},e.cancelBubble=function(e){var n=e||window.event;n.stopPropagation?n.stopPropagation():n.cancelBubble=!0},e.clearHTML=function(e,n){return void 0===n&&(n={}),E(e,n)},e.clearHtml=function(e,n){return void 0===n&&(n={}),E(e,n)},e.convert10To26=function(e){for(var n="";e>0;){var t=e%26;0===t&&(t=26),n=String.fromCharCode(t+96)+n,e=(e-t)/26}return n},e.convertCamelToKebab=a,e.convertCamelToUnder=c,e.convertHttpToHttps=j,e.convertKebabToCamel=function(e){var n=e.replace(/-([a-z])/g,function(e,n){return n.toUpperCase()});return n.endsWith("-")?n.slice(0,-1):n},e.convertObjectToQuery=function(e){if(e&&0===Object.keys(e).length)return"";var n="?";for(var t in e)n+="".concat(t,"=").concat(e[t],"&");return n.slice(0,-1)},e.convertToHtmlBreaks=S,e.convertUnderToCamel=function(e){return e.replace(/_([a-z])/g,function(e,n){return n.toUpperCase()})},e.cutCHSString=function(e,n,t){return void 0===t&&(t=!1),O(e,n,t)},e.cutZHString=A,e.debounce=function(e,n,t){var r=null,o=null,i=null,a=null,c=null,u=function(){var s=p()-i;s<n&&s>=0?o=setTimeout(u,n-s):(o=null,t||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];r=this,a=s,i=p();var l=t&&!o;return o||(o=setTimeout(u,n)),l&&(c=e.apply(r,a),r=a=null),c}},e.deepCopy=i,e.deepCopyObject=function(e){return i(e)},e.delCookie=function(e){H(e)},e.doFn=h,e.fireEvent=z,e.floatFixed=function(e,n){return void 0===n&&(n=0),parseFloat(e).toFixed(n)},e.floatToPercent=function(e,n){void 0===n&&(n=0);var t="";return t=n?(100*e).toFixed(n):String(Math.floor(100*e)),"".concat(t,"%")},e.formatDate=function(e,n){void 0===n&&(n="yyyy-MM-dd"),e||(e=new Date);var t=new Date(e),r=t.getHours(),o={yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate()<10?"0"+t.getDate():t.getDate(),HH:r<10?"0"+r:r,hh:(r%12||12)<10?"0"+(r%12||12):r%12||12,mm:t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),ss:t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),a:r<12?"AM":"PM"},i=n||"yyyy-MM-dd";return Object.keys(o).forEach(function(e){var n=o[e];"MM"===e&&Number(n)<=9&&(n="0".concat(n)),i=i.replace(e,String(n))}),i},e.genBrowserAttrs=function(e,n){void 0===e&&(e=""),void 0===n&&(n="-");var t=K(),r=[];return["system","platform","engine","supporter","shell","appleType"].forEach(function(o){var i=t[o];if(i){var a="";e&&e.length>0&&(a="".concat(e).concat(n)),r.push("".concat(a).concat(i))}}),r},e.genCustomConsole=B,e.genHashCode=function(e){var n,t=0;for(n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t},e.genRndNumString=f,e.genStyleString=function(e,n){var t="";return n&&n.length>0&&(t=n.join(";")+";"),"".concat(e,"{").concat(t,"}")},e.genUniqueNumString=d,e.generateRndNum=l,e.generateUniqueNum=function(e){return void 0===e&&(e=3),d(e)},e.getAllQueryParams=function(e){void 0===e&&(e=""),""===e&&(e=location.search);var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,function(e,t,r){return void 0===n[t]&&(n[t]=decodeURIComponent(r)),""}),n},e.getBrowserInfo=K,e.getCLS=function(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("layout-shift")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().reduce(function(e,n){var t=0;return v(n.value)&&(t=n.value),e+t},0);n.disconnect(),e(r)});n.observe({type:"layout-shift",buffered:!0})})]:[2,0]})})},e.getCookie=q,e.getCurrentVersion=function(){return"v4"},e.getDefineListeners=D,e.getDomain=function(e,n){if(void 0===n&&(n=["hostname"]),_(e)){var t=new window.URL(e);return n.reduce(function(e,n){return e+=t[n]},"")}var r=document.createElement("a");return r.href=e,n.reduce(function(e,n){return e+=r[n]},"")},e.getFCP=J,e.getFID=function(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("first-input")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"first-input"===e.entryType});if(r){n.disconnect();var o=r.processingStart;e(o?Math.round(r.processingStart-r.startTime):0)}});n.observe({type:"first-input",buffered:!0})})]:[2,0]})})},e.getFP=Q,e.getFileSize=function(e){var n=function(e){return String(Math.ceil(e))};if(!e||e<0)return"";var t=1024;return e<t?e+" B":e<Math.pow(t,2)?n(e/t)+" KB":e<Math.pow(t,3)?n(e/Math.pow(t,2))+" MB":e<Math.pow(t,4)?n(e/Math.pow(t,3))+" G":n(e/Math.pow(t,4))+" T"},e.getFriendlyInterval=function(e,n,t){void 0===e&&(e=0),void 0===n&&(n=0),void 0===t&&(t=g);var r=(t=Object.assign(g,t)).type,o=decodeURIComponent;v(e)||(e=new Date(e).getTime()),v(n)||(n=new Date(n).getTime());var i=Number(n)-Number(e),a="",c=new Array(4).fill(0),u=c[0],s=(c[1],c[2],c[3]),f=o("%20%E5%A4%A9%20"),l=o("%20%E6%97%B6%20"),d=o("%20%E5%88%86%20"),p=o("%20%E7%A7%92");if(i>=0)switch(u=Math.floor(i/1e3/60/60/24),Math.floor(i/1e3/60/60),Math.floor(i/1e3/60),s=Math.floor(i/1e3),r){case"d":a=u;break;case"text":a=(u=Math.floor(i/1e3/60/60/24))+f+Math.floor(i/1e3/60/60%24)+l+Math.floor(i/1e3/60%60)+d+(s=Math.floor(i/1e3%60))+p;break;default:a=s}return a},e.getHashQueryParam=function(e){var n=location.hash.split("?");if(1===n.length)return"";var t=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=n[1].match(t);return r?r[2]:""},e.getLCP=function(){return t(this,void 0,void 0,function(){return r(this,function(e){return $("largest-contentful-paint")?[2,new Promise(function(e){var n=new PerformanceObserver(function(t){var r=t.getEntries().find(function(e){return"largest-contentful-paint"===e.entryType});r&&(n.disconnect(),e(Math.round(r.startTime)))});n.observe({type:"largest-contentful-paint",buffered:!0})})]:[2,0]})})},e.getLocalStorage=function(e){var n=null;if(e){var t=localStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getPageMeta=function(e){var n;return document.querySelector&&(null===(n=document.querySelector('meta[name="'.concat(e,'"]')))||void 0===n?void 0:n.getAttribute("content"))||""},e.getPerformance=function(e){return void 0===e&&(e=!1),t(this,void 0,void 0,function(){function n(){var n={source:F,os:t(),osVersion:o(),deviceType:i(),network:a(),screenDirection:c(),unloadTime:h-y,redirectTime:b-S,dnsTime:E-T,tcpTime:A-O,sslTime:s(A,x),responseTime:C-P,downloadTime:M-C,firstPaintTime:z,firstContentfulPaintTime:q,domReadyTime:k-I,onloadTime:N-I,whiteTime:C-I,renderTime:j-I,decodedBodySize:B,encodedBodySize:L};Object.keys(n).forEach(function(e){v(n[e])&&(n[e]<0?n[e]=0:n[e]=Math.round(n[e]))}),v(n.whiteTime)&&n.whiteTime>n.onloadTime&&(n.whiteTime=0);var r={};e||Object.keys(n).forEach(function(e){r[u(e)]=n[e]}),Object.keys(r).length?l(r):l(n)}function t(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function o(){var e="",n=navigator.userAgent,t=n.indexOf("Android")>-1||n.indexOf("Linux")>-1,r=!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),o=navigator.userAgent.split(";");if(o.length<2)return e;var i=o[1];return i?(t&&(e=(i.match(/\d+\.\d+/g)||[])[0]),r&&(e=(i.match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e||(e=""),e):e}function i(){var e,n=navigator.userAgent.toLowerCase(),t=n.match(/(ipad)/i)&&"ipad",r=n.match(/iphone os/i)&&"iphone os",o=n.match(/midp/i)&&"midp",i=n.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",a=n.match(/ucweb/i)&&"ucweb",c=n.match(/android/i)&&"android",u=n.match(/windows ce/i)&&"windows ce",s=n.match(/windows mobile/i)&&"windows mobile";return(e=t||r||o||i||a||c||u||s?r||o||i||a||c||u||s?"phone":t?"ipad":void 0:"pc")||(e=""),e}function a(){var e="",n=window.navigator;if(n.connection&&n.connection.effectiveType)switch(n.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e||(e=""),e}function c(){var e="";return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function s(e,n){var t=0;return n&&(t=e-n),t}var f,l,d,p,g,m,h,y,b,S,E,T,A,O,x,C,P,M,k,N,j,_,R,B,L,U,F,I,D,z,q;return r(this,function(e){switch(e.label){case 0:if(!$("navigation"))return[2,Promise.reject(new Error("navigation is not supported"))];if(!(f=window.performance)||"function"!=typeof f.getEntries||"function"!=typeof f.getEntriesByType)return[2,Promise.reject(new Error("performance is not supported"))];if(d=new Promise(function(e){l=[e][0]}),p=null,w(g=f.getEntriesByType("navigation"))&&(p=g[0]),m=new Array(19).fill(0),h=m[0],y=m[1],b=m[2],S=m[3],E=m[4],T=m[5],A=m[6],O=m[7],x=m[8],C=m[9],P=m[10],M=m[11],k=m[12],N=m[13],j=m[14],_=m[15],R=m[16],B=m[17],L=m[18],U=f.timing,F="",p)F="PerformanceNavigationTiming",B=p.decodedBodySize,L=p.encodedBodySize,h=p.unloadEventEnd,y=p.unloadEventStart,b=p.redirectEnd,S=p.redirectStart,E=p.domainLookupEnd,T=p.domainLookupStart,A=p.connectEnd,O=p.connectStart,x=p.secureConnectionStart,C=p.responseStart,P=p.requestStart,M=p.responseEnd,k=p.domContentLoadedEventStart,N=p.loadEventStart,j=p.loadEventEnd,_=p.startTime,R=p.fetchStart;else{if(!U)return[2,Promise.reject(new Error("NavigationTiming and Timing are not supported"))];F="PerformanceTiming",h=U.unloadEventEnd,y=U.unloadEventStart,b=U.redirectEnd,S=U.redirectStart,E=U.domainLookupEnd,T=U.domainLookupStart,A=U.connectEnd,O=U.connectStart,x=U.secureConnectionStart,C=U.responseStart,P=U.requestStart,M=U.responseEnd,k=U.domContentLoadedEventStart,N=U.loadEventStart,j=U.loadEventEnd,_=U.navigationStart,R=U.fetchStart}if(I=0,v(_))I=_;else{if(!v(R))return[2,Promise.reject(new Error("startTime, navigationStart or fetchStart are required"))];I=R}return[4,Promise.all([Q(),J()])];case 1:return D=e.sent(),z=D[0],q=D[1],v(j)&&j>0?n():window.addEventListener("load",function(){window.setTimeout(function(){n()},0)}),[2,d]}})})},e.getQueryParam=function(e){var n=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),t=location.search.substring(1).match(n);return null!==t?decodeURIComponent(t[2]):""},e.getScriptQueryParam=function(e,n){void 0===n&&(n=""),n||(n=".js");for(var t=new RegExp("[?&]".concat(e,"=([^&]*)")),r=document.querySelectorAll('script[src*="'.concat(n,'"]')),o=0;o<r.length;o++){var i=r[o].getAttribute("src");if(i&&-1!==i.indexOf(n)){var a=i.match(t);if(a)return decodeURIComponent(a[1])}}return""},e.getSessionStorage=function(e){var n=null;if(e){var t=sessionStorage.getItem(e);t&&(n=JSON.parse(t))}return n},e.getTTFB=function(){return t(this,void 0,void 0,function(){var e,n;return r(this,function(t){return $("navigation")&&window.performance&&window.performance.getEntriesByType?(e=performance.getEntriesByType("navigation")[0],0,e?(n=e.responseStart-e.requestStart,[2,Math.round(n)]):[2,0]):[2,0]})})},e.getUrlFileType=function(e){var n="";if("string"!=typeof e||""==e)return n;var t=/\.[^/?#]+$/.exec(e);return t?(t[0].length>1&&(n=t[0].substring(1)),n):n},e.getUrlHost=function(e){var n="";return!N(e)&&N(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).host),n},e.getUrlParam=function(e,n,t){void 0===t&&(t={});var r=null;if(e.includes("#")){r=new URL(e).searchParams.getAll(n)}else{var o={};e.replace(/\??(\w+)=([^&]*)&?/g,function(e,n,t){return void 0!==o[n]?o[n].push(t):o[n]=[t],""}),r=o[n]||[]}return t.returnArray?r:r.length?r[0]:null},e.getUrlPath=function(e){var n="";return!N(e)&&N(e,{strict:!1})&&0===e.indexOf("//")&&(e="https:"+e),_(e)&&(n=new URL(e).pathname),n},e.hasClass=function(e,n){if(!e)return L.error("The element is not exist."),!1;for(var t=e.className.split(/\s+/),r=0;r<t.length;r++)if(t[r]===n)return!0;return!1},e.inRate=function(e){return k(e)},e.invokeEvent=function(e){z(e)},e.invokeFn=m,e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isBool=b,e.isBoolean=function(e){return b(e)},e.isBrowser=function(){if(C)return"browser"===C;var e="undefined"!=typeof window;return e&&(C="browser"),e},e.isFunction=function(e){return"function"==typeof e},e.isHit=k,e.isJSONString=s,e.isJsonString=function(e){return s(e)},e.isNonEmptyArray=w,e.isNonEmptyObject=function(e){return!!y(e)&&0!==Object.keys(e).length},e.isNumber=v,e.isPureObject=y,e.isSafePWAEnv=function(){if(Y)return"pwa"===Y;var e=K();return"serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches)&&!e.shell&&"https:"===window.location.protocol?(Y="pwa",!0):(Y="no-pwa",!1)},e.isString=function(e){return"string"==typeof e},e.isSupportWebp=function(){return G?Promise.resolve("webp"===G):new Promise(function(e){var n=new Image;n.onload=function(){var t=n.width>0&&n.height>0;G=t?"webp":"no-webp",e(t)},n.onerror=function(){G="no-webp",e(!1)},n.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="})},e.isSupportedEntryType=$,e.isUdfOrNul=function(e){return null==e},e.isValidData=function(e,n,t){var r=!1;return"object"!=typeof e||n.reduce(function(e,n){return void 0===e[n]?Object.create(null):e=e[n]},e)===t&&(r=!0),r},e.isValidEmail=function(e){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},e.isValidHttpUrl=N,e.isValidPhoneNumber=function(e){return/^1\d{10}$/.test(e)},e.isValidUrl=function(e){return/^[a-zA-Z0-9]+:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\b([-a-zA-Z0-9\u4E00-\u9FA5\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b()!@:%_+.~#?&//=]*)$/.test(e)},e.loadCSS=Z,e.loadImage=function(e){return new Promise(function(n,t){var r=new Image;r.onload=function(){n(r)},r.onerror=function(e){t(e)},r.src=e})},e.loadScript=W,e.loadScriptIfUndefined=function(e,n){return window[e]?Promise.resolve("defined"):W(n)},e.longestComSubsequence=M,e.longestComSubstring=P,e.mNow=p,e.mTrim=function(e){for(var n=(e=e.replace(/^\s+/,"")).length-1,t=/\s/;t.test(e.charAt(n));)n--;return e.slice(0,n+1)},e.mazeyCon=L,e.newLine=function(e){return S(e)},e.removeClass=function(e,n){var t;e?(t=(t=(t=(t=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+n+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=t):L.error("The element is not exist.")},e.removeCookie=H,e.removeEvent=function(e,n){var t=D(),r=t[e];if("string"==typeof e&&r instanceof Array)if("function"==typeof n){for(var o=0,i=r.length;o<i;o++)if(r[o]===n){t[e].splice(o,1);break}}else delete t[e]},e.removeHTML=E,e.removeHtml=function(e,n){return void 0===n&&(n={}),E(e,n)},e.repeatUntilConditionMet=function(e,n,o){var i=this;void 0===n&&(n={}),void 0===o&&(o=function(e){return!0===e});var a=n.interval,c=void 0===a?1e3:a,u=n.times,s=void 0===u?10:u,f=n.context,l=n.args,d=0,p=function(){setTimeout(function(){return t(i,void 0,void 0,function(){var n;return r(this,function(t){switch(t.label){case 0:return[4,e.apply(f,l)];case 1:return n=t.sent(),o(n)||++d>=s?[2]:(p(),[2])}})})},c)};"function"!=typeof e&&console.error("Expected a function."),("number"!=typeof c||c<0)&&console.error("Expected a non-negative number for interval."),("number"!=typeof s||s<0)&&console.error("Expected a non-negative number for times."),p()},e.replaceHttp=function(e){return j(e)},e.sanitizeInput=function(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};if("string"!=typeof e)throw new Error("Input must be a string");return e.replace(/[&<>"'/]/g,function(e){return n[e]})},e.setClass=function(e,n){F(e,n)},e.setCookie=function(e,n,t,r){var o,i;if(t){var a=new Date;a.setTime(a.getTime()+24*t*60*60*1e3),i="; expires="+a.toUTCString()}else i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+n+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+n+i+"; path=/; domain="+r,null!==q(e)&&q(e)===n||(r=r||"."+c,document.cookie=e+"="+n+i+"; path=/; domain="+r))},e.setImgSizeBySrc=I,e.setImgWidHeiBySrc=function(){return I()},e.setLocalStorage=function(e,n){void 0===n&&(n=null),e&&localStorage.setItem(e,JSON.stringify(n))},e.setSessionStorage=function(e,n){void 0===n&&(n=null),e&&sessionStorage.setItem(e,JSON.stringify(n))},e.sleep=function(e){return t(this,void 0,void 0,function(){return r(this,function(n){return[2,x(e)]})})},e.throttle=function(e,n,t){void 0===t&&(t={}),t=Object.assign({},t);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],s=function(){u=!1===t.leading?0:p(),i=null,c=e.apply(this,o),i||(r=o=null)};return function(){for(var a=[],f=0;f<arguments.length;f++)a[f]=arguments[f];var l=p();u||!1!==t.leading||(u=l);var d=n-(l-u);return r=this,o=a,d<=0||d>n?(i&&(clearTimeout(i),i=null),u=l,c=e.apply(r,o),i||(r=o=null)):i||!1===t.trailing||(i=setTimeout(s.bind(r),d)),c}},e.timeCon=U,e.truncateZHString=O,e.unsanitize=function(e){return T(e)},e.unsanitizeInput=T,e.updateQueryParam=function(e,n,t){if(e.includes("#")){var r=new URL(e);return r.searchParams.set(n,t),r.toString()}var o=new RegExp("([?&])"+n+"=.*?(&|$)","i"),i=-1!==e.indexOf("?")?"&":"?";return e.match(o)?e.replace(o,"$1"+n+"="+t+"$2"):e+i+n+"="+t},e.waitTime=x,e.windowLoaded=function(e){void 0===e&&(e=3e4);var n,t=function(){},r=new Promise(function(e,r){t=e,n=r});return"complete"===document.readyState?t("complete"):window.addEventListener("load",function(){return t("load")}),setTimeout(function(){return n(Error("timeout"))},e),r},e.zAxiosIsValidRes=function(e,n){void 0===n&&(n={validStatusRange:[200,300],validCode:[0]});var t=Object.assign({validStatusRange:[200,300],validCode:[0]},n),r=t.validStatusRange,o=t.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},e}({});
|
package/lib/url.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../src/url.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAW,GAAG,oBAAoB,CAYxE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CA0BzH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAclF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,WAAiB,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../src/url.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,GAAE,MAAW,GAAG,oBAAoB,CAYxE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,WAAW,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CA0BzH;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAclF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,WAAiB,GAAG,MAAM,CAerE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAG/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAqB,GAAG,OAAO,CAMpG;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAa5D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,SAAK,GAAG,MAAM,CAgB3E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,GAAG,MAAM,CAS3E;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE/C;AAmCD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU9C;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU9C"}
|