bw-frontend-sdk 1.0.26 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
1
1
  function e(e,t){this.v=e,this.k=t}function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function r(e){if(Array.isArray(e))return e}function n(t){var r={},n=!1;function i(r,i){return n=!0,i=new Promise(function(e){e(t[r](i))}),{done:!1,value:new e(i,1)}}return r["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return n?(n=!1,e):i("next",e)},"function"==typeof t.throw&&(r.throw=function(e){if(n)throw n=!1,e;return i("throw",e)}),"function"==typeof t.return&&(r.return=function(e){return n?(n=!1,e):i("return",e)}),r}function i(e){var t,r,n,i=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);i--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new o(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function o(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return o=function(e){this.s=e,this.n=e.next},o.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var r=this.s.return;return void 0===r?Promise.resolve({value:e,done:!0}):t(r.apply(this.s,arguments))},throw:function(e){var r=this.s.return;return void 0===r?Promise.reject(e):t(r.apply(this.s,arguments))}},new o(e)}function a(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function s(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function s(e){a(o,n,i,s,u,"next",e)}function u(e){a(o,n,i,s,u,"throw",e)}s(void 0)})}}function u(t){return new e(t,0)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,S(n.key),n)}}function f(e,t,r){return t&&l(e.prototype,t),r&&l(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=P(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function d(e,t,r){return(t=S(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function w(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return y(c,"_invoke",function(r,n,i){var o,s,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return o=t,s=0,u=e,h.n=r,a}};function d(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,p=o[2];r>3?(i=p===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=r<2&&d<o[1])?(s=0,h.v=n,h.n=o[1]):d<p&&(i=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,h.n=p,s=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),s=l,u=p;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=h.n<0)?u:r.call(n,h))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(y(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,y(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,y(f,"constructor",c),y(c,"constructor",u),u.displayName="GeneratorFunction",y(c,i,"GeneratorFunction"),y(f),y(f,i,"Generator"),y(f,n,function(){return this}),y(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:h}})()}function y(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}y=function(e,t,r,n){function o(t,r){y(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},y(e,t,r,n)}function b(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function k(e,t){return r(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||P(e,t)||g()}function T(e){return function(e){if(Array.isArray(e))return t(e)}(e)||p(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function P(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}function x(e){return function(){return new R(e.apply(this,arguments))}}function R(t){var r,n;function i(r,n){try{var a=t[r](n),s=a.value,u=s instanceof e;Promise.resolve(u?s.v:s).then(function(e){if(u){var n="return"===r?"return":"next";if(!s.k||e.done)return i(n,e);e=t[n](e).value}o(a.done?"return":"normal",e)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?i(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise(function(o,a){var s={key:e,arg:t,resolve:o,reject:a,next:null};n?n=n.next=s:(r=n=s,i(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}function C(e,t){return function(){return e.apply(t,arguments)}}R.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},R.prototype.next=function(e){return this._invoke("next",e)},R.prototype.throw=function(e){return this._invoke("throw",e)},R.prototype.return=function(e){return this._invoke("return",e)};var O,I=Object.prototype.toString,A=Object.getPrototypeOf,D=Symbol.iterator,_=Symbol.toStringTag,N=(O=Object.create(null),function(e){var t=I.call(e);return O[t]||(O[t]=t.slice(8,-1).toLowerCase())}),L=function(e){return e=e.toLowerCase(),function(t){return N(t)===e}},j=function(e){return function(t){return E(t)===e}},U=Array.isArray,F=j("undefined");function B(e){return null!==e&&!F(e)&&null!==e.constructor&&!F(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var M=L("ArrayBuffer");var z=j("string"),H=j("function"),V=j("number"),q=function(e){return null!==e&&"object"===E(e)},K=function(e){if("object"!==N(e))return!1;var t=A(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||_ in e||D in e)},Q=L("Date"),W=L("File"),J=L("Blob"),G=L("FileList"),X=L("URLSearchParams"),$=k(["ReadableStream","Request","Response","Headers"].map(L),4),Y=$[0],Z=$[1],ee=$[2],te=$[3];function re(e,t){var r,n,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,o=void 0!==i&&i;if(null!=e)if("object"!==E(e)&&(e=[e]),U(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(B(e))return;var a,s=o?Object.getOwnPropertyNames(e):Object.keys(e),u=s.length;for(r=0;r<u;r++)a=s[r],t.call(null,e[a],a,e)}}function ne(e,t){if(B(e))return null;t=t.toLowerCase();for(var r,n=Object.keys(e),i=n.length;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}var ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,oe=function(e){return!F(e)&&e!==ie};var ae,se=(ae="undefined"!=typeof Uint8Array&&A(Uint8Array),function(e){return ae&&e instanceof ae}),ue=L("HTMLFormElement"),ce=function(){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),le=L("RegExp"),fe=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};re(r,function(r,i){var o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};var he,de,pe,ge,ve=L("AsyncFunction"),me=(he="function"==typeof setImmediate,de=H(ie.postMessage),he?setImmediate:de?(pe="axios@".concat(Math.random()),ge=[],ie.addEventListener("message",function(e){var t=e.source,r=e.data;t===ie&&r===pe&&ge.length&&ge.shift()()},!1),function(e){ge.push(e),ie.postMessage(pe,"*")}):function(e){return setTimeout(e)}),we="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ie):"undefined"!=typeof process&&process.nextTick||me,ye={isArray:U,isArrayBuffer:M,isBuffer:B,isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||H(e.append)&&("formdata"===(t=N(e))||"object"===t&&H(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&M(e.buffer)},isString:z,isNumber:V,isBoolean:function(e){return!0===e||!1===e},isObject:q,isPlainObject:K,isEmptyObject:function(e){if(!q(e)||B(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Y,isRequest:Z,isResponse:ee,isHeaders:te,isUndefined:F,isDate:Q,isFile:W,isBlob:J,isRegExp:le,isFunction:H,isStream:function(e){return q(e)&&H(e.pipe)},isURLSearchParams:X,isTypedArray:se,isFileList:G,forEach:re,merge:function e(){for(var t=(oe(this)&&this||{}).caseless,r={},n=function(n,i){var o=t&&ne(r,i)||i;K(r[o])&&K(n)?r[o]=e(r[o],n):K(n)?r[o]=e({},n):U(n)?r[o]=n.slice():r[o]=n},i=0,o=arguments.length;i<o;i++)arguments[i]&&re(arguments[i],n);return r},extend:function(e,t,r){return re(t,function(t,n){r&&H(t)?e[n]=C(t,r):e[n]=t},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&A(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:N,kindOfTest:L,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(U(e))return e;var t=e.length;if(!V(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[D]).call(e);(r=n.next())&&!r.done;){var i=r.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ue,hasOwnProperty:ce,hasOwnProp:ce,reduceDescriptors:fe,freezeMethods:function(e){fe(e,function(t,r){if(H(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];H(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:function(e,t){var r={},n=function(e){e.forEach(function(e){r[e]=!0})};return U(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:ne,global:ie,isContextDefined:oe,isSpecCompliantForm:function(e){return!!(e&&H(e.append)&&"FormData"===e[_]&&e[D])},toJSONObject:function(e){var t=new Array(10),r=function(e,n){if(q(e)){if(t.indexOf(e)>=0)return;if(B(e))return e;if(!("toJSON"in e)){t[n]=e;var i=U(e)?[]:{};return re(e,function(e,t){var o=r(e,n+1);!F(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:ve,isThenable:function(e){return e&&(q(e)||H(e))&&H(e.then)&&H(e.catch)},setImmediate:me,asap:we,isIterable:function(e){return null!=e&&H(e[D])}};function be(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ye.inherits(be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}});var ke=be.prototype,Te={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){Te[e]={value:e}}),Object.defineProperties(be,Te),Object.defineProperty(ke,"isAxiosError",{value:!0}),be.from=function(e,t,r,n,i,o){var a=Object.create(ke);return ye.toFlatObject(e,a,function(e){return e!==Error.prototype},function(e){return"isAxiosError"!==e}),be.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};function Se(e){return ye.isPlainObject(e)||ye.isArray(e)}function Ee(e){return ye.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,r){return e?e.concat(t).map(function(e,t){return e=Ee(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}var xe=ye.toFlatObject(ye,{},null,function(e){return/^is[A-Z]/.test(e)});function Re(e,t,r){if(!ye.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=ye.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ye.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(t);if(!ye.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(ye.isDate(e))return e.toISOString();if(ye.isBoolean(e))return e.toString();if(!s&&ye.isBlob(e))throw new be("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(e)||ye.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){var s=e;if(e&&!i&&"object"===E(e))if(ye.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ye.isArray(e)&&function(e){return ye.isArray(e)&&!e.some(Se)}(e)||(ye.isFileList(e)||ye.endsWith(r,"[]"))&&(s=ye.toArray(e)))return r=Ee(r),s.forEach(function(e,n){!ye.isUndefined(e)&&null!==e&&t.append(!0===a?Pe([r],n,o):null===a?r:r+"[]",u(e))}),!1;return!!Se(e)||(t.append(Pe(i,r,o),u(e)),!1)}var l=[],f=Object.assign(xe,{defaultVisitor:c,convertValue:u,isVisitable:Se});if(!ye.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ye.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ye.forEach(r,function(r,o){!0===(!(ye.isUndefined(r)||null===r)&&i.call(t,r,ye.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])}),l.pop()}}(e),t}function Ce(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Oe(e,t){this._pairs=[],e&&Re(e,this,t)}var Ie=Oe.prototype;function Ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function De(e,t,r){if(!t)return e;var n=r&&r.encode||Ae;ye.isFunction(r)&&(r={serialize:r});var i,o=r&&r.serialize;if(i=o?o(t,r):ye.isURLSearchParams(t)?t.toString():new Oe(t,r).toString(n)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ie.append=function(e,t){this._pairs.push([e,t])},Ie.toString=function(e){var t=e?function(t){return e.call(this,t,Ce)}:Ce;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var _e=function(){return f(function e(){c(this,e),this.handlers=[]},[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ye.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),Ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},je="undefined"!=typeof window&&"undefined"!=typeof document,Ue="object"===("undefined"==typeof navigator?"undefined":E(navigator))&&navigator||void 0,Fe=je&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),Be="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Me=je&&window.location.href||"http://localhost",ze=m(m({},Object.freeze({__proto__:null,hasBrowserEnv:je,hasStandardBrowserWebWorkerEnv:Be,hasStandardBrowserEnv:Fe,navigator:Ue,origin:Me})),Le);function He(e){function t(e,r,n,i){var o=e[i++];if("__proto__"===o)return!0;var a=Number.isFinite(+o),s=i>=e.length;return o=!o&&ye.isArray(n)?n.length:o,s?(ye.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a):(n[o]&&ye.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&ye.isArray(n[o])&&(n[o]=function(e){var t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(n[o])),!a)}if(ye.isFormData(e)&&ye.isFunction(e.entries)){var r={};return ye.forEachEntry(e,function(e,n){t(function(e){return ye.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),n,r,0)}),r}return null}var Ve={transitional:Ne,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=ye.isObject(e);if(o&&ye.isHTMLForm(e)&&(e=new FormData(e)),ye.isFormData(e))return i?JSON.stringify(He(e)):e;if(ye.isArrayBuffer(e)||ye.isBuffer(e)||ye.isStream(e)||ye.isFile(e)||ye.isBlob(e)||ye.isReadableStream(e))return e;if(ye.isArrayBufferView(e))return e.buffer;if(ye.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Re(e,new ze.classes.URLSearchParams,m({visitor:function(e,t,r,n){return ze.isNode&&ye.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=ye.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Re(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(ye.isString(e))try{return(t||JSON.parse)(e),ye.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ve.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ye.isResponse(e)||ye.isReadableStream(e))return e;if(e&&ye.isString(e)&&(r&&!this.responseType||n)){var i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw be.from(e,be.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ze.classes.FormData,Blob:ze.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],function(e){Ve.headers[e]={}});var qe=Ve,Ke=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qe=Symbol("internals");function We(e){return e&&String(e).trim().toLowerCase()}function Je(e){return!1===e||null==e?e:ye.isArray(e)?e.map(Je):String(e)}function Ge(e,t,r,n,i){return ye.isFunction(n)?n.call(this,t,r):(i&&(t=r),ye.isString(t)?ye.isString(n)?-1!==t.indexOf(n):ye.isRegExp(n)?n.test(t):void 0:void 0)}var Xe=function(){return f(function e(t){c(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,r){var n=this;function i(e,t,r){var i=We(t);if(!i)throw new Error("header name must be a non-empty string");var o=ye.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Je(e))}var o=function(e,t){return ye.forEach(e,function(e,r){return i(e,r,t)})};if(ye.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ye.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(function(e){var t,r,n,i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&Ke[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i}(e),t);else if(ye.isObject(e)&&ye.isIterable(e)){var a,s,u,c={},l=h(e);try{for(l.s();!(u=l.n()).done;){var f=u.value;if(!ye.isArray(f))throw TypeError("Object iterator must return a key-value pair");c[s=f[0]]=(a=c[s])?ye.isArray(a)?[].concat(T(a),[f[1]]):[a,f[1]]:f[1]}}catch(e){l.e(e)}finally{l.f()}o(c,t)}else null!=e&&i(t,e,r);return this}},{key:"get",value:function(e,t){if(e=We(e)){var r=ye.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(ye.isFunction(t))return t.call(this,n,r);if(ye.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=We(e)){var r=ye.findKey(this,e);return!(!r||void 0===this[r]||t&&!Ge(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function i(e){if(e=We(e)){var i=ye.findKey(r,e);!i||t&&!Ge(0,r[i],i,t)||(delete r[i],n=!0)}}return ye.isArray(e)?e.forEach(i):i(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var i=t[r];e&&!Ge(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return ye.forEach(this,function(n,i){var o=ye.findKey(r,i);if(o)return t[o]=Je(n),void delete t[i];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})}(i):String(i).trim();a!==i&&delete t[i],t[a]=Je(n),r[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=this.constructor).concat.apply(e,[this].concat(r))}},{key:"toJSON",value:function(e){var t=Object.create(null);return ye.forEach(this,function(r,n){null!=r&&!1!==r&&(t[n]=e&&ye.isArray(r)?r.join(", "):r)}),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map(function(e){var t=k(e,2);return t[0]+": "+t[1]}).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.forEach(function(e){return t.set(e)}),t}},{key:"accessor",value:function(e){var t=(this[Qe]=this[Qe]={accessors:{}}).accessors,r=this.prototype;function n(e){var n=We(e);t[n]||(!function(e,t){var r=ye.toCamelCase(" "+t);["get","set","has"].forEach(function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return ye.isArray(e)?e.forEach(n):n(e),this}}])}();Xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Xe.prototype,function(e,t){var r=e.value,n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}),ye.freezeMethods(Xe);var $e=Xe;function Ye(e,t){var r=this||qe,n=t||r,i=$e.from(n.headers),o=n.data;return ye.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ze(e){return!(!e||!e.__CANCEL__)}function et(e,t,r){be.call(this,null==e?"canceled":e,be.ERR_CANCELED,t,r),this.name="CanceledError"}function tt(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new be("Request failed with status code "+r.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}ye.inherits(et,be,{__CANCEL__:!0});var rt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,i=function(e,t){e=e||10;var r,n=new Array(e),i=new Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=i[a];r||(r=u),n[o]=s,i[o]=u;for(var l=a,f=0;l!==o;)f+=n[l++],l%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),!(u-r<t)){var h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}}(50,250);return function(e,t){var r,n,i=0,o=1e3/t,a=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(void 0,T(t))};return[function(){for(var e=Date.now(),t=e-i,s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];t>=o?a(u,e):(r=u,n||(n=setTimeout(function(){n=null,a(r)},o-t)))},function(){return r&&a(r)}]}(function(r){var o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,u=i(s);n=o;var c=d({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)},r)},nt=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},it=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ye.asap(function(){return e.apply(void 0,r)})}},ot=ze.hasStandardBrowserEnv?function(e,t){return function(r){return r=new URL(r,ze.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)}}(new URL(ze.origin),ze.navigator&&/(msie|trident)/i.test(ze.navigator.userAgent)):function(){return!0},at=ze.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];ye.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ye.isString(n)&&a.push("path="+n),ye.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function st(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ut=function(e){return e instanceof $e?m({},e):e};function ct(e,t){t=t||{};var r={};function n(e,t,r,n){return ye.isPlainObject(e)&&ye.isPlainObject(t)?ye.merge.call({caseless:n},e,t):ye.isPlainObject(t)?ye.merge({},t):ye.isArray(t)?t.slice():t}function i(e,t,r,i){return ye.isUndefined(t)?ye.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!ye.isUndefined(t))return n(void 0,t)}function a(e,t){return ye.isUndefined(t)?ye.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t,r){return i(ut(e),ut(t),0,!0)}};return ye.forEach(Object.keys(m(m({},e),t)),function(n){var o=u[n]||i,a=o(e[n],t[n],n);ye.isUndefined(a)&&o!==s||(r[n]=a)}),r}var lt,ft,ht=function(e){var n,i,o=ct({},e),a=o.data,s=o.withXSRFToken,u=o.xsrfHeaderName,c=o.xsrfCookieName,l=o.headers,f=o.auth;if(o.headers=l=$e.from(l),o.url=De(st(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&l.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),ye.isFormData(a))if(ze.hasStandardBrowserEnv||ze.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(n=l.getContentType())){var h=n?n.split(";").map(function(e){return e.trim()}).filter(Boolean):[],d=r(i=h)||p(i)||P(i)||g(),v=d[0],m=t(d).slice(1);l.setContentType([v||"multipart/form-data"].concat(T(m)).join("; "))}if(ze.hasStandardBrowserEnv&&(s&&ye.isFunction(s)&&(s=s(o)),s||!1!==s&&ot(o.url))){var w=u&&c&&at.read(c);w&&l.set(u,w)}return o},dt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n,i,o,a,s,u=ht(e),c=u.data,l=$e.from(u.headers).normalize(),f=u.responseType,h=u.onUploadProgress,d=u.onDownloadProgress;function p(){a&&a(),s&&s(),u.cancelToken&&u.cancelToken.unsubscribe(n),u.signal&&u.signal.removeEventListener("abort",n)}var g=new XMLHttpRequest;function v(){if(g){var n=$e.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());tt(function(e){t(e),p()},function(e){r(e),p()},{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}}if(g.open(u.method.toUpperCase(),u.url,!0),g.timeout=u.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(r(new be("Request aborted",be.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new be("Network Error",be.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){var t=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",n=u.transitional||Ne;u.timeoutErrorMessage&&(t=u.timeoutErrorMessage),r(new be(t,n.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,g)),g=null},void 0===c&&l.setContentType(null),"setRequestHeader"in g&&ye.forEach(l.toJSON(),function(e,t){g.setRequestHeader(t,e)}),ye.isUndefined(u.withCredentials)||(g.withCredentials=!!u.withCredentials),f&&"json"!==f&&(g.responseType=u.responseType),d){var m=k(rt(d,!0),2);o=m[0],s=m[1],g.addEventListener("progress",o)}if(h&&g.upload){var w=k(rt(h),2);i=w[0],a=w[1],g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",a)}(u.cancelToken||u.signal)&&(n=function(t){g&&(r(!t||t.type?new et(null,e,g):t),g.abort(),g=null)},u.cancelToken&&u.cancelToken.subscribe(n),u.signal&&(u.signal.aborted?n():u.signal.addEventListener("abort",n)));var y,b,T=(y=u.url,(b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y))&&b[1]||"");T&&-1===ze.protocols.indexOf(T)?r(new be("Unsupported protocol "+T+":",be.ERR_BAD_REQUEST,e)):g.send(c||null)})},pt=function(e,t){var r=(e=e?e.filter(Boolean):[]).length;if(t||r){var n,i=new AbortController,o=function(e){if(!n){n=!0,s();var t=e instanceof Error?e:this.reason;i.abort(t instanceof be?t:new et(t instanceof Error?t.message:t))}},a=t&&setTimeout(function(){a=null,o(new be("timeout ".concat(t," of ms exceeded"),be.ETIMEDOUT))},t),s=function(){e&&(a&&clearTimeout(a),a=null,e.forEach(function(e){e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(function(e){return e.addEventListener("abort",o)});var u=i.signal;return u.unsubscribe=function(){return ye.asap(s)},u}},gt=w().m(function e(t,r){var n,i,o;return w().w(function(e){for(;;)switch(e.n){case 0:if(n=t.byteLength,r&&!(n<r)){e.n=2;break}return e.n=1,t;case 1:return e.a(2);case 2:i=0;case 3:if(!(i<n)){e.n=5;break}return o=i+r,e.n=4,t.slice(i,o);case 4:i=o,e.n=3;break;case 5:return e.a(2)}},e)}),vt=function(){var e=x(w().m(function e(t,r){var o,a,s,c,l,f,h;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:o=!1,a=!1,e.p=1,c=i(mt(t));case 2:return e.n=3,u(c.next());case 3:if(!(o=!(l=e.v).done)){e.n=5;break}return f=l.value,e.d(b(n(i(gt(f,r)))),4);case 4:o=!1,e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,h=e.v,a=!0,s=h;case 7:if(e.p=7,e.p=8,!o||null==c.return){e.n=9;break}return e.n=9,u(c.return());case 9:if(e.p=9,!a){e.n=10;break}throw s;case 10:return e.f(9);case 11:return e.f(7);case 12:return e.a(2)}},e,null,[[8,,9,11],[1,6,7,12]])}));return function(t,r){return e.apply(this,arguments)}}(),mt=function(){var e=x(w().m(function e(t){var r,o,a,s;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!t[Symbol.asyncIterator]){e.n=2;break}return e.d(b(n(i(t))),1);case 1:return e.a(2);case 2:r=t.getReader(),e.p=3;case 4:return e.n=5,u(r.read());case 5:if(o=e.v,a=o.done,s=o.value,!a){e.n=6;break}return e.a(3,8);case 6:return e.n=7,s;case 7:e.n=4;break;case 8:return e.p=8,e.n=9,u(r.cancel());case 9:return e.f(8);case 10:return e.a(2)}},e,null,[[3,,8,10]])}));return function(t){return e.apply(this,arguments)}}(),wt=function(e,t,r,n){var i,o=vt(e,t),a=0,u=function(e){i||(i=!0,n&&n(e))};return new ReadableStream({pull:function(e){return s(w().m(function t(){var n,i,s,c,l,f;return w().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,o.next();case 1:if(n=t.v,i=n.done,s=n.value,!i){t.n=2;break}return u(),e.close(),t.a(2);case 2:c=s.byteLength,r&&(l=a+=c,r(l)),e.enqueue(new Uint8Array(s)),t.n=4;break;case 3:throw t.p=3,f=t.v,u(f),f;case 4:return t.a(2)}},t,null,[[0,3]])}))()},cancel:function(e){return u(e),o.return()}},{highWaterMark:2})},yt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,bt=yt&&"function"==typeof ReadableStream,kt=yt&&("function"==typeof TextEncoder?(lt=new TextEncoder,function(e){return lt.encode(e)}):function(){var e=s(w().m(function e(t){var r,n;return w().w(function(e){for(;;)switch(e.n){case 0:return r=Uint8Array,e.n=1,new Response(t).arrayBuffer();case 1:return n=e.v,e.a(2,new r(n))}},e)}));return function(t){return e.apply(this,arguments)}}()),Tt=function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return!!e.apply(void 0,r)}catch(e){return!1}},St=bt&&Tt(function(){var e=!1,t=new Request(ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Et=bt&&Tt(function(){return ye.isReadableStream(new Response("").body)}),Pt={stream:Et&&function(e){return e.body}};yt&&(ft=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(function(e){!Pt[e]&&(Pt[e]=ye.isFunction(ft[e])?function(t){return t[e]()}:function(t,r){throw new be("Response type '".concat(e,"' is not supported"),be.ERR_NOT_SUPPORT,r)})}));var xt=function(){var e=s(w().m(function e(t){var r;return w().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,0);case 1:if(!ye.isBlob(t)){e.n=2;break}return e.a(2,t.size);case 2:if(!ye.isSpecCompliantForm(t)){e.n=4;break}return r=new Request(ze.origin,{method:"POST",body:t}),e.n=3,r.arrayBuffer();case 3:case 6:return e.a(2,e.v.byteLength);case 4:if(!ye.isArrayBufferView(t)&&!ye.isArrayBuffer(t)){e.n=5;break}return e.a(2,t.byteLength);case 5:if(ye.isURLSearchParams(t)&&(t+=""),!ye.isString(t)){e.n=7;break}return e.n=6,kt(t);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Rt=function(){var e=s(w().m(function e(t,r){var n;return w().w(function(e){for(;;)if(0===e.n)return n=ye.toFiniteNumber(t.getContentLength()),e.a(2,null==n?xt(r):n)},e)}));return function(t,r){return e.apply(this,arguments)}}(),Ct={http:null,xhr:dt,fetch:yt&&function(){var e=s(w().m(function e(t){var r,n,i,o,a,s,u,c,l,f,h,d,p,g,v,y,b,T,S,E,P,x,R,C,O,I,A,D,_,N,L,j,U,F,B,M,z;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=ht(t),n=r.url,i=r.method,o=r.data,a=r.signal,s=r.cancelToken,u=r.timeout,c=r.onDownloadProgress,l=r.onUploadProgress,f=r.responseType,h=r.headers,d=r.withCredentials,p=void 0===d?"same-origin":d,g=r.fetchOptions,f=f?(f+"").toLowerCase():"text",v=pt([a,s&&s.toAbortSignal()],u),b=v&&v.unsubscribe&&function(){v.unsubscribe()},e.p=1,!(B=l&&St&&"get"!==i&&"head"!==i)){e.n=3;break}return e.n=2,Rt(h,o);case 2:M=T=e.v,B=0!==M;case 3:if(!B){e.n=4;break}S=new Request(n,{method:"POST",body:o,duplex:"half"}),ye.isFormData(o)&&(E=S.headers.get("content-type"))&&h.setContentType(E),S.body&&(P=nt(T,rt(it(l))),x=k(P,2),R=x[0],C=x[1],o=wt(S.body,65536,R,C));case 4:return ye.isString(p)||(p=p?"include":"omit"),O="credentials"in Request.prototype,y=new Request(n,m(m({},g),{},{signal:v,method:i.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:O?p:void 0})),e.n=5,fetch(y,g);case 5:return I=e.v,A=Et&&("stream"===f||"response"===f),Et&&(c||A&&b)&&(D={},["status","statusText","headers"].forEach(function(e){D[e]=I[e]}),_=ye.toFiniteNumber(I.headers.get("content-length")),N=c&&nt(_,rt(it(c),!0))||[],L=k(N,2),j=L[0],U=L[1],I=new Response(wt(I.body,65536,j,function(){U&&U(),b&&b()}),D)),f=f||"text",e.n=6,Pt[ye.findKey(Pt,f)||"text"](I,t);case 6:return F=e.v,!A&&b&&b(),e.n=7,new Promise(function(e,r){tt(e,r,{data:F,headers:$e.from(I.headers),status:I.status,statusText:I.statusText,config:t,request:y})});case 7:return e.a(2,e.v);case 8:if(e.p=8,z=e.v,b&&b(),!z||"TypeError"!==z.name||!/Load failed|fetch/i.test(z.message)){e.n=9;break}throw Object.assign(new be("Network Error",be.ERR_NETWORK,t,y),{cause:z.cause||z});case 9:throw be.from(z,z&&z.code,t,y);case 10:return e.a(2)}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}()};ye.forEach(Ct,function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var Ot=function(e){return"- ".concat(e)},It=function(e){return ye.isFunction(e)||null===e||!1===e},At=function(e){for(var t,r,n=(e=ye.isArray(e)?e:[e]).length,i={},o=0;o<n;o++){var a=void 0;if(r=t=e[o],!It(t)&&void 0===(r=Ct[(a=String(t)).toLowerCase()]))throw new be("Unknown adapter '".concat(a,"'"));if(r)break;i[a||"#"+o]=r}if(!r){var s=Object.entries(i).map(function(e){var t=k(e,2),r=t[0],n=t[1];return"adapter ".concat(r," ")+(!1===n?"is not supported by the environment":"is not available in the build")});throw new be("There is no suitable adapter to dispatch the request "+(n?s.length>1?"since :\n"+s.map(Ot).join("\n"):" "+Ot(s[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new et(null,e)}function _t(e){return Dt(e),e.headers=$e.from(e.headers),e.data=Ye.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),At(e.adapter||qe.adapter)(e).then(function(t){return Dt(e),t.data=Ye.call(e,e.transformResponse,t),t.headers=$e.from(t.headers),t},function(t){return Ze(t)||(Dt(e),t&&t.response&&(t.response.data=Ye.call(e,e.transformResponse,t.response),t.response.headers=$e.from(t.response.headers))),Promise.reject(t)})}var Nt="1.11.0",Lt={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Lt[e]=function(r){return E(r)===e||"a"+(t<1?"n ":" ")+e}});var jt={};Lt.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Nt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,o){if(!1===e)throw new be(n(i," has been removed"+(t?" in "+t:"")),be.ERR_DEPRECATED);return t&&!jt[i]&&(jt[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},Lt.spelling=function(e){return function(t,r){return console.warn("".concat(r," is likely a misspelling of ").concat(e)),!0}};var Ut={assertOptions:function(e,t,r){if("object"!==E(e))throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new be("option "+o+" must be "+u,be.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new be("Unknown option "+o,be.ERR_BAD_OPTION)}},validators:Lt},Ft=Ut.validators,Bt=function(){return f(function e(t){c(this,e),this.defaults=t||{},this.interceptors={request:new _e,response:new _e}},[{key:"request",value:(e=s(w().m(function e(t,r){var n,i,o;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,r);case 1:return e.a(2,e.v);case 2:if(e.p=2,(o=e.v)instanceof Error){n={},Error.captureStackTrace?Error.captureStackTrace(n):n=new Error,i=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+="\n"+i):o.stack=i}catch(e){}}throw o;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,r){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=ct(this.defaults,t),n=r.transitional,i=r.paramsSerializer,o=r.headers;void 0!==n&&Ut.assertOptions(n,{silentJSONParsing:Ft.transitional(Ft.boolean),forcedJSONParsing:Ft.transitional(Ft.boolean),clarifyTimeoutError:Ft.transitional(Ft.boolean)},!1),null!=i&&(ye.isFunction(i)?t.paramsSerializer={serialize:i}:Ut.assertOptions(i,{encode:Ft.function,serialize:Ft.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ut.assertOptions(t,{baseUrl:Ft.spelling("baseURL"),withXsrfToken:Ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=o&&ye.merge(o.common,o[t.method]);o&&ye.forEach(["delete","get","head","post","put","patch","common"],function(e){delete o[e]}),t.headers=$e.concat(a,o);var s=[],u=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});var c,l=[];this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});var f,h=0;if(!u){var d=[_t.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,l),f=d.length,c=Promise.resolve(t);h<f;)c=c.then(d[h++],d[h++]);return c}f=s.length;var p=t;for(h=0;h<f;){var g=s[h++],v=s[h++];try{p=g(p)}catch(e){v.call(this,e);break}}try{c=_t.call(this,p)}catch(e){return Promise.reject(e)}for(h=0,f=l.length;h<f;)c=c.then(l[h++],l[h++]);return c}},{key:"getUri",value:function(e){return De(st((e=ct(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]);var e}();ye.forEach(["delete","get","head","options"],function(e){Bt.prototype[e]=function(t,r){return this.request(ct(r||{},{method:e,url:t,data:(r||{}).data}))}}),ye.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(ct(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Bt.prototype[e]=t(),Bt.prototype[e+"Form"]=t(!0)});var Mt=Bt,zt=function(){function e(t){if(c(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(e){r=e});var n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t(function(e,t,i){n.reason||(n.reason=new et(e,t,i),r(n.reason))})}return f(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}(),Ht=zt;var Vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vt).forEach(function(e){var t=k(e,2),r=t[0],n=t[1];Vt[n]=r});var qt=Vt;var Kt=function e(t){var r=new Mt(t),n=C(Mt.prototype.request,r);return ye.extend(n,Mt.prototype,r,{allOwnKeys:!0}),ye.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ct(t,r))},n}(qe);Kt.Axios=Mt,Kt.CanceledError=et,Kt.CancelToken=Ht,Kt.isCancel=Ze,Kt.VERSION=Nt,Kt.toFormData=Re,Kt.AxiosError=be,Kt.Cancel=Kt.CanceledError,Kt.all=function(e){return Promise.all(e)},Kt.spread=function(e){return function(t){return e.apply(null,t)}},Kt.isAxiosError=function(e){return ye.isObject(e)&&!0===e.isAxiosError},Kt.mergeConfig=ct,Kt.AxiosHeaders=$e,Kt.formToJSON=function(e){return He(ye.isHTMLForm(e)?new FormData(e):e)},Kt.getAdapter=At,Kt.HttpStatusCode=qt,Kt.default=Kt;var Qt=Kt;Qt.Axios,Qt.AxiosError,Qt.CanceledError,Qt.isCancel,Qt.CancelToken,Qt.VERSION,Qt.all,Qt.Cancel,Qt.isAxiosError,Qt.spread,Qt.toFormData,Qt.AxiosHeaders,Qt.HttpStatusCode,Qt.formToJSON,Qt.getAdapter,Qt.mergeConfig;var Wt=Qt.create({timeout:1e4,headers:{"Content-Type":"multipart/form-data"}});Wt.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),Wt.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});var Jt,Gt="user-agent",Xt="",$t="function",Yt="object",Zt="string",er="undefined",tr="browser",rr="cpu",nr="device",ir="engine",or="os",ar="result",sr="name",ur="type",cr="vendor",lr="version",fr="architecture",hr="major",dr="model",pr="console",gr="mobile",vr="tablet",mr="smarttv",wr="wearable",yr="xr",br="embedded",kr="inapp",Tr="brands",Sr="formFactors",Er="fullVersionList",Pr="platform",xr="platformVersion",Rr="bitness",Cr="sec-ch-ua",Or=Cr+"-full-version-list",Ir=Cr+"-arch",Ar=Cr+"-"+Rr,Dr=Cr+"-form-factors",_r=Cr+"-"+gr,Nr=Cr+"-"+dr,Lr=Cr+"-"+Pr,jr=Lr+"-version",Ur=[Tr,Er,gr,dr,Pr,xr,fr,Sr,Rr],Fr="Amazon",Br="Apple",Mr="ASUS",zr="BlackBerry",Hr="Google",Vr="Huawei",qr="Lenovo",Kr="Honor",Qr="LG",Wr="Microsoft",Jr="Motorola",Gr="Nvidia",Xr="OnePlus",$r="OPPO",Yr="Samsung",Zr="Sharp",en="Sony",tn="Xiaomi",rn="Zebra",nn="Chrome",on="Chromium",an="Chromecast",sn="Edge",un="Firefox",cn="Opera",ln="Facebook",fn="Sogou",hn="Mobile ",dn=" Browser",pn="Windows",gn=("undefined"==typeof window?"undefined":E(window))!==er&&window.navigator?window.navigator:void 0,vn=gn&&gn.userAgentData?gn.userAgentData:void 0,mn=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},wn=function(e,t){if(E(e)===Yt&&e.length>0){for(var r in e)if(Tn(t)==Tn(e[r]))return!0;return!1}return!!bn(e)&&Tn(t)==Tn(e)},yn=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&yn(e[r])},bn=function(e){return E(e)===Zt},kn=function(e){if(e){for(var t=[],r=Pn(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=Rn(r[n]).split(";v=");t[n]={brand:i[0],version:i[1]}}else t[n]=Rn(r[n]);return t}},Tn=function(e){return bn(e)?e.toLowerCase():e},Sn=function(e){return bn(e)?Pn(/[^\d\.]/g,e).split(".")[0]:void 0},En=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];E(r)==Yt&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},Pn=function(e,t){return bn(t)?t.replace(e,Xt):t},xn=function(e){return Pn(/\\?\"/g,e)},Rn=function(e,t){return e=Pn(/^\s\s*/,String(e)),E(t)===er?e:e.substring(0,t)},Cn=function(e,t){if(e&&t)for(var r,n,i,o,a,s,u=0;u<t.length&&!a;){var c=t[u],l=t[u+1];for(r=n=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(i=0;i<l.length;i++)s=a[++n],E(o=l[i])===Yt&&o.length>0?2===o.length?E(o[1])==$t?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:o.length>=3&&(E(o[1])!==$t||o[1].exec&&o[1].test?3==o.length?this[o[0]]=s?s.replace(o[1],o[2]):void 0:4==o.length?this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=s?o[3].apply(this,[s.replace(o[1],o[2])].concat(o.slice(4))):void 0):o.length>3?this[o[0]]=s?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0):this[o]=s||void 0;u+=2}},On=function(e,t){for(var r in t)if(E(t[r])===Yt&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(wn(t[r][n],e))return"?"===r?void 0:r}else if(wn(t[r],e))return"?"===r?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},In={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},An={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Dn={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},_n={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[lr,[sr,hn+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[lr,[sr,sn+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[lr,[sr,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[sr,lr],[/opios[\/ ]+([\w\.]+)/i],[lr,[sr,cn+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[lr,[sr,cn+" GX"]],[/\bopr\/([\w\.]+)/i],[lr,[sr,cn]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[lr,[sr,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[lr,[sr,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[sr,lr],[/quark(?:pc)?\/([-\w\.]+)/i],[lr,[sr,"Quark"]],[/\bddg\/([\w\.]+)/i],[lr,[sr,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[lr,[sr,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[lr,[sr,"WeChat"]],[/konqueror\/([\w\.]+)/i],[lr,[sr,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[lr,[sr,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[lr,[sr,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[lr,[sr,"Smart "+qr+dn]],[/(avast|avg)\/([\w\.]+)/i],[[sr,/(.+)/,"$1 Secure"+dn],lr],[/\bfocus\/([\w\.]+)/i],[lr,[sr,un+" Focus"]],[/\bopt\/([\w\.]+)/i],[lr,[sr,cn+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[lr,[sr,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[lr,[sr,"Dolphin"]],[/coast\/([\w\.]+)/i],[lr,[sr,cn+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[lr,[sr,"MIUI"+dn]],[/fxios\/([\w\.-]+)/i],[lr,[sr,hn+un]],[/\bqihoobrowser\/?([\w\.]*)/i],[lr,[sr,"360"]],[/\b(qq)\/([\w\.]+)/i],[[sr,/(.+)/,"$1Browser"],lr],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[sr,/(.+)/,"$1"+dn],lr],[/samsungbrowser\/([\w\.]+)/i],[lr,[sr,Yr+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[lr,[sr,fn+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[sr,fn+" Mobile"],lr],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[sr,lr],[/(lbbrowser|rekonq)/i],[sr],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[lr,sr],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[sr,ln],lr,[ur,kr]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[sr,lr,[ur,kr]],[/\bgsa\/([\w\.]+) .*safari\//i],[lr,[sr,"GSA"],[ur,kr]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[lr,[sr,"TikTok"],[ur,kr]],[/\[(linkedin)app\]/i],[sr,[ur,kr]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[sr,/(.+)/,"Zalo"],lr,[ur,kr]],[/(chromium)[\/ ]([-\w\.]+)/i],[sr,lr],[/headlesschrome(?:\/([\w\.]+)| )/i],[lr,[sr,nn+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[lr,[sr,sn+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[sr,nn+" WebView"],lr],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[lr,[sr,"Android"+dn]],[/chrome\/([\w\.]+) mobile/i],[lr,[sr,hn+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[sr,lr],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[lr,[sr,hn+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[sr,hn+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[lr,sr],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[sr,[lr,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[sr,lr],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[sr,hn+un],lr],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[sr,"Netscape"],lr],[/(wolvic|librewolf)\/([\w\.]+)/i],[sr,lr],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[lr,[sr,un+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[sr,[lr,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[sr,[lr,/[^\d\.]+./,Xt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[fr,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[fr,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[fr,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[fr,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[fr,"arm"]],[/ sun4\w[;\)]/i],[[fr,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[fr,/ower/,Xt,Tn]],[/mc680.0/i],[[fr,"68k"]],[/winnt.+\[axp/i],[[fr,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[dr,[cr,Yr],[ur,vr]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[dr,[cr,Yr],[ur,gr]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[dr,[cr,Br],[ur,gr]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[dr,[cr,Br],[ur,vr]],[/(macintosh);/i],[dr,[cr,Br]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[dr,[cr,Zr],[ur,gr]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[dr,[cr,Kr],[ur,vr]],[/honor([-\w ]+)[;\)]/i],[dr,[cr,Kr],[ur,gr]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[dr,[cr,Vr],[ur,vr]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[dr,[cr,Vr],[ur,gr]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[dr,/_/g," "],[cr,tn],[ur,vr]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[dr,/_/g," "],[cr,tn],[ur,gr]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[dr,[cr,Xr],[ur,gr]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[dr,[cr,$r],[ur,gr]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[dr,[cr,On,{OnePlus:["203","304","403","404","413","415"],"*":$r}],[ur,vr]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[dr,[cr,"BLU"],[ur,gr]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[dr,[cr,"Vivo"],[ur,gr]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[dr,[cr,"Realme"],[ur,gr]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[dr,[cr,qr],[ur,vr]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[dr,[cr,qr],[ur,gr]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[dr,[cr,Jr],[ur,gr]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[dr,[cr,Jr],[ur,vr]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[dr,[cr,Qr],[ur,vr]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[dr,[cr,Qr],[ur,gr]],[/(nokia) (t[12][01])/i],[cr,dr,[ur,vr]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[dr,/_/g," "],[ur,gr],[cr,"Nokia"]],[/(pixel (c|tablet))\b/i],[dr,[cr,Hr],[ur,vr]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[dr,[cr,Hr],[ur,gr]],[/(google) (pixelbook( go)?)/i],[cr,dr],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[dr,[cr,en],[ur,gr]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[dr,"Xperia Tablet"],[cr,en],[ur,vr]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[dr,[cr,Fr],[ur,vr]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[dr,/(.+)/g,"Fire Phone $1"],[cr,Fr],[ur,gr]],[/(playbook);[-\w\),; ]+(rim)/i],[dr,cr,[ur,vr]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[dr,[cr,zr],[ur,gr]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[dr,[cr,Mr],[ur,vr]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[dr,[cr,Mr],[ur,gr]],[/(nexus 9)/i],[dr,[cr,"HTC"],[ur,vr]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[cr,[dr,/_/g," "],[ur,gr]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[dr,[cr,"TCL"],[ur,vr]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[dr,[cr,"TCL"],[ur,gr]],[/(itel) ((\w+))/i],[[cr,Tn],dr,[ur,On,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[dr,[cr,"Acer"],[ur,vr]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[dr,[cr,"Meizu"],[ur,gr]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[dr,[cr,"Ulefone"],[ur,gr]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[dr,[cr,"Energizer"],[ur,gr]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[dr,[cr,"Cat"],[ur,gr]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[dr,[cr,"Smartfren"],[ur,gr]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[dr,[cr,"Nothing"],[ur,gr]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[dr,[cr,"Archos"],[ur,vr]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[dr,[cr,"Archos"],[ur,gr]],[/; (n159v)/i],[dr,[cr,"HMD"],[ur,gr]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[cr,dr,[ur,vr]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[cr,dr,[ur,gr]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[cr,dr,[ur,vr]],[/(surface duo)/i],[dr,[cr,Wr],[ur,vr]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[dr,[cr,"Fairphone"],[ur,gr]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[dr,[cr,Gr],[ur,vr]],[/(sprint) (\w+)/i],[cr,dr,[ur,gr]],[/(kin\.[onetw]{3})/i],[[dr,/\./g," "],[cr,Wr],[ur,gr]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[dr,[cr,rn],[ur,vr]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[dr,[cr,rn],[ur,gr]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[cr,[ur,mr]],[/hbbtv.+maple;(\d+)/i],[[dr,/^/,"SmartTV"],[cr,Yr],[ur,mr]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[cr,dr,[ur,mr]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[cr,Qr],[ur,mr]],[/(apple) ?tv/i],[cr,[dr,Br+" TV"],[ur,mr]],[/crkey.*devicetype\/chromecast/i],[[dr,an+" Third Generation"],[cr,Hr],[ur,mr]],[/crkey.*devicetype\/([^/]*)/i],[[dr,/^/,"Chromecast "],[cr,Hr],[ur,mr]],[/fuchsia.*crkey/i],[[dr,an+" Nest Hub"],[cr,Hr],[ur,mr]],[/crkey/i],[[dr,an],[cr,Hr],[ur,mr]],[/(portaltv)/i],[dr,[cr,ln],[ur,mr]],[/droid.+aft(\w+)( bui|\))/i],[dr,[cr,Fr],[ur,mr]],[/(shield \w+ tv)/i],[dr,[cr,Gr],[ur,mr]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[dr,[cr,Zr],[ur,mr]],[/(bravia[\w ]+)( bui|\))/i],[dr,[cr,en],[ur,mr]],[/(mi(tv|box)-?\w+) bui/i],[dr,[cr,tn],[ur,mr]],[/Hbbtv.*(technisat) (.*);/i],[cr,dr,[ur,mr]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[cr,/.+\/(\w+)/,"$1",On,{LG:"lge"}],[dr,Rn],[ur,mr]],[/(playstation \w+)/i],[dr,[cr,en],[ur,pr]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[dr,[cr,Wr],[ur,pr]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[cr,dr,[ur,pr]],[/droid.+; (shield)( bui|\))/i],[dr,[cr,Gr],[ur,pr]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[dr,[cr,Yr],[ur,wr]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[cr,dr,[ur,wr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[dr,[cr,$r],[ur,wr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[dr,[cr,Br],[ur,wr]],[/(opwwe\d{3})/i],[dr,[cr,Xr],[ur,wr]],[/(moto 360)/i],[dr,[cr,Jr],[ur,wr]],[/(smartwatch 3)/i],[dr,[cr,en],[ur,wr]],[/(g watch r)/i],[dr,[cr,Qr],[ur,wr]],[/droid.+; (wt63?0{2,3})\)/i],[dr,[cr,rn],[ur,wr]],[/droid.+; (glass) \d/i],[dr,[cr,Hr],[ur,yr]],[/(pico) ([\w ]+) os\d/i],[cr,dr,[ur,yr]],[/(quest( \d| pro)?s?).+vr/i],[dr,[cr,ln],[ur,yr]],[/mobile vr; rv.+firefox/i],[[ur,yr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[cr,[ur,br]],[/(aeobc)\b/i],[dr,[cr,Fr],[ur,br]],[/(homepod).+mac os/i],[dr,[cr,Br],[ur,br]],[/windows iot/i],[[ur,br]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[dr,[ur,mr]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[ur,mr]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[dr,[ur,On,{mobile:"Mobile",xr:"VR","*":vr}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[ur,vr]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[ur,gr]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[dr,[cr,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[lr,[sr,sn+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[sr,lr],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[lr,[sr,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[sr,lr],[/ladybird\//i],[[sr,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[lr,sr]],os:[[/(windows nt) (6\.[23]); arm/i],[[sr,/N/,"R"],[lr,On,In]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[sr,lr],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[lr,/(;|\))/g,"",On,In],[sr,pn]],[/(windows ce)\/?([\d\.]*)/i],[sr,lr],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[lr,/_/g,"."],[sr,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[sr,"macOS"],[lr,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[lr,[sr,an+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[lr,[sr,an+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[lr,[sr,an+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[lr,[sr,an+" Linux"]],[/crkey\/([\d\.]+)/i],[lr,[sr,an]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[lr,sr],[/(ubuntu) ([\w\.]+) like android/i],[[sr,/(.+)/,"$1 Touch"],lr],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[sr,lr],[/\(bb(10);/i],[lr,[sr,zr]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[lr,[sr,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[lr,[sr,un+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[lr,[sr,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[lr,On,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[sr,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[lr,[sr,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[sr,"Chrome OS"],lr],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[sr,lr],[/(sunos) ?([\d\.]*)/i],[[sr,"Solaris"],lr],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[sr,lr]]},Nn=(En.call((Jt={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[tr,[sr,lr,hr,ur]],[rr,[fr]],[nr,[ur,dr,cr]],[ir,[sr,lr]],[or,[sr,lr]]]),En.call(Jt.isIgnore,[[tr,[lr,hr]],[ir,[lr]],[or,[lr]]]),En.call(Jt.isIgnoreRgx,[[tr,/ ?browser$/i],[or,/ ?os$/i]]),En.call(Jt.toString,[[tr,[sr,lr]],[rr,[fr]],[nr,[cr,dr]],[ir,[sr,lr]],[or,[sr,lr]]]),Jt),Ln=function(e,t){var r=Nn.init[t],n=Nn.isIgnore[t]||0,i=Nn.isIgnoreRgx[t]||0,o=Nn.toString[t]||0;function a(){En.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return vn?vn.getHighEntropyValues(Ur).then(function(t){return e.setCH(new jn(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=ar&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!wn(n,r)&&Tn(i?Pn(i,this[r]):this[r])==Tn(i?Pn(i,e):e)){if(t=!0,e!=er)break}else if(e==er&&t){t=!t;break}return t},a.prototype.toString=function(){var e=Xt;for(var t in o)E(this[o[t]])!==er&&(e+=(e?" ":Xt)+this[o[t]]);return e||er}),vn||(a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var n=new r;return e(n),n}),new a};function jn(e,t){if(e=e||{},En.call(this,Ur),t)En.call(this,[[Tr,kn(e[Cr])],[Er,kn(e[Or])],[gr,/\?1/.test(e[_r])],[dr,xn(e[Nr])],[Pr,xn(e[Lr])],[xr,xn(e[jr])],[fr,xn(e[Ir])],[Sr,kn(e[Dr])],[Rr,xn(e[Ar])]]);else for(var r in e)this.hasOwnProperty(r)&&E(e[r])!==er&&(this[r]=e[r])}function Un(e,t,r,n){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(gn&&gn.userAgent==this.ua)switch(this.itemType){case tr:gn.brave&&E(gn.brave.isBrave)==$t&&this.set(sr,"Brave");break;case nr:!this.get(ur)&&vn&&vn[gr]&&this.set(ur,gr),"Macintosh"==this.get(dr)&&gn&&E(gn.standalone)!==er&&gn.maxTouchPoints&&gn.maxTouchPoints>2&&this.set(dr,"iPad").set(ur,vr);break;case or:!this.get(sr)&&vn&&vn[Pr]&&this.set(sr,vn[Pr]);break;case ar:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(tr,t(tr)).set(rr,t(rr)).set(nr,t(nr)).set(ir,t(ir)).set(or,t(or))}return this},this.parseUA=function(){switch(this.itemType!=ar&&Cn.call(this.data,this.ua,this.rgxMap),this.itemType){case tr:this.set(hr,Sn(this.get(lr)));break;case or:if("iOS"==this.get(sr)&&"18.6"==this.get(lr)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(lr,e[1])}}return this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case tr:case ir:var r,n=e[Er]||e[Tr];if(n)for(var i=0;i<n.length;i++){var o=n[i].brand||n[i],a=n[i].version;this.itemType==tr&&!/not.a.brand/i.test(o)&&(!r||/Chrom/.test(r)&&o!=on||r==sn&&/WebView2/.test(o))&&(o=On(o,Dn),(r=this.get(sr))&&!/Chrom/.test(r)&&/Chrom/.test(o)||this.set(sr,o).set(lr,a).set(hr,Sn(a)),r=o),this.itemType==ir&&o==on&&this.set(lr,a)}break;case rr:var s=e[fr];s&&(s&&"64"==e[Rr]&&(s+="64"),Cn.call(this.data,s+";",t));break;case nr:if(e[gr]&&this.set(ur,gr),e[dr]&&(this.set(dr,e[dr]),!this.get(ur)||!this.get(cr))){var u={};Cn.call(u,"droid 9; "+e[dr]+")",t),!this.get(ur)&&u.type&&this.set(ur,u.type),!this.get(cr)&&u.vendor&&this.set(cr,u.vendor)}if(e[Sr]){var c;if("string"!=typeof e[Sr])for(var l=0;!c&&l<e[Sr].length;)c=On(e[Sr][l++],An);else c=On(e[Sr],An);this.set(ur,c)}break;case or:var f=e[Pr];if(f){var h=e[xr];f==pn&&(h=parseInt(Sn(h),10)>=13?"11":"10"),this.set(sr,f).set(lr,h)}this.get(sr)==pn&&"Xbox"==e[dr]&&this.set(sr,"Xbox").set(lr,void 0);break;case ar:var d=this.data,p=function(t){return d[t].getItem().setCH(e).parseCH().get()};this.set(tr,p(tr)).set(rr,p(rr)).set(nr,p(nr)).set(ir,p(ir)).set(or,p(or))}return this},En.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",Ln(this,e)]]),this}function Fn(e,t,r){if(E(e)===Yt?(yn(e,!0)?(E(t)===Yt&&(r=t),t=e):(r=e,t=void 0),e=void 0):E(e)!==Zt||yn(t,!0)||(r=t,t=void 0),r)if(E(r.append)===$t){var n={};r.forEach(function(e,t){n[String(t).toLowerCase()]=e}),r=n}else{var i={};for(var o in r)r.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=r[o]);r=i}if(!(this instanceof Fn))return new Fn(e,t,r).getResult();var a=E(e)===Zt?e:r&&r[Gt]?r[Gt]:gn&&gn.userAgent?gn.userAgent:Xt,s=new jn(r,!0),u=t?function(e,t){var r={},n=t;if(!yn(t))for(var i in n={},t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[]);for(var a in e)r[a]=n[a]&&n[a].length%2==0?n[a].concat(e[a]):e[a];return r}(_n,t):_n,c=function(e){return e==ar?function(){return new Un(e,a,u,s).set("ua",a).set(tr,this.getBrowser()).set(rr,this.getCPU()).set(nr,this.getDevice()).set(ir,this.getEngine()).set(or,this.getOS()).get()}:function(){return new Un(e,a,u[e],s).parseUA().get()}};return En.call(this,[["getBrowser",c(tr)],["getCPU",c(rr)],["getDevice",c(nr)],["getEngine",c(ir)],["getOS",c(or)],["getResult",c(ar)],["getUA",function(){return a}],["setUA",function(e){return bn(e)&&(a=Rn(e,500)),this}]]).setUA(a),this}Fn.VERSION="2.0.6",Fn.BROWSER=mn([sr,lr,hr,ur]),Fn.CPU=mn([fr]),Fn.DEVICE=mn([dr,cr,ur,pr,gr,mr,vr,wr,br]),Fn.ENGINE=Fn.OS=mn([sr,lr]);var Bn="undefined"!=typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Mn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",n=String(e);if(n.length<t){for(var i=n,o=0;o<t-n.length;o+=1)i=r+i;return i}return n}function zn(){for(var e=new Date,t=parseInt("".concat(e.getFullYear()).concat(Mn(e.getMonth()+1,2)).concat(Mn(e.getDate(),2)),10).toString(16),r=parseInt("".concat(Mn(e.getHours(),2)).concat(Mn(e.getMinutes(),2)).concat(Mn(e.getSeconds(),2)).concat(Mn(e.getMilliseconds(),3)),10).toString(16),n=t+r.length+r;n.length<32;)n+=Math.floor(16*Math.random()).toString(16);return"".concat(n.slice(0,8),"-").concat(n.slice(8,16),"-").concat(n.slice(16))}var Hn=0;function Vn(){var e=Date.now().toString(36).slice(-8).padStart(8,"0");Hn=(Hn+1)%46656;var t=Math.floor(36*Math.random());return e+(Hn.toString(36).padStart(2,"0")+t.toString(36)).padStart(4,"0").slice(-4)}var qn,Kn=function(){return function(){if("undefined"!=typeof WeixinJSBridge)return!0;var e=navigator.userAgent.toLowerCase();return!(-1===e.indexOf("micromessenger")&&"micromessenger"!=e.match(/MicroMessenger/i))}()?"WECHAT":-1!==(e=navigator.userAgent.toLowerCase()).indexOf("alipay")||"alipay"==e.match(/Alipay/i)?"ALIPAY":"OTHER";var e},Qn=function(e){var t=e.indexOf("#");return-1===t?"":e.slice(t+1).replace(/^\//,"").split("?")[0]},Wn=function(e,t){return["HONGSHUN"].includes(t)&&"chargeMoney"===e&&window.location.href.indexOf("showMoney=false")>-1?"EQUITY":{login:"LOGIN",buyPkgListNew:"BUY_LIST",cardDetailInfo:"CARD_DETAIL",flowSettle:"SETTLEMENT",chargeMoney:"WALLET",payOrderDetail:"ORDER_DETAIL"}[e]||e},Jn=function(){var e=navigator.userAgent.toLowerCase();return/android|adr/.test(e)?"Android":/iphone|ipad|ipod|ios/.test(e)?"iOS":"其他"},Gn=function(e){try{return new Fn(e||("undefined"!=typeof navigator?navigator.userAgent:"")).getResult()}catch(e){return console.warn("UAParser 解析失败:",e),{ua:"undefined"!=typeof navigator?navigator.userAgent:"",browser:{},engine:{},os:{name:Jn()},device:{},cpu:{}}}},Xn=function(e){try{var t,r=Gn(e);if(null!=r&&null!==(t=r.os)&&void 0!==t&&t.version)return r.os.version;var n=e||("undefined"!=typeof navigator?navigator.userAgent:""),i=n.match(/OS\s+(\d+)[_.](\d+)/i);if(i)return"".concat(i[1],".").concat(i[2]);var o=n.match(/Android\s+([\d.]+)/i);return o?o[1]:null}catch(e){return console.warn("获取系统版本失败:",e),null}},$n=function(){return f(function e(t){c(this,e),this.config=t,this.isReporting=!1},[{key:"report",value:(h=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(this.config.getConfig().debugSwitch&&console.log("report----------",t,r),e.p=1,n=this.formatReportData(t,r),!this.config.getConfig().customReport){e.n=3;break}return e.n=2,this.config.getConfig().customReport(t,n);case 2:e.n=4;break;case 3:return e.n=4,this.defaultReport(t,n);case 4:e.n=6;break;case 5:e.p=5,i=e.v,console.error("上报失败:",i),this.config.getConfig().debugSwitch&&console.error("上报失败详情:",{type:t,error:i.message,stack:i.stack});case 6:return e.a(2)}},e,this,[[1,5]])})),function(e,t){return h.apply(this,arguments)})},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"formatReportData",value:function(e,t){var r,n,i,o,a={sessionId:this.config.getConfig().sessionId||"",channel:Kn(),uiVer:this.config.getConfig().uiVersion,osType:(o=Gn(),function(e){return null===e}(n=null==o?void 0:o.os)||function(e){return void 0===e}(n)||""===n?Jn():["iOS","Android"].includes(null==o||null===(r=o.os)||void 0===r?void 0:r.name)?(console.log("parseagernt--",null==o?void 0:o.os),null==o||null===(i=o.os)||void 0===i?void 0:i.name):"其他"),osVersion:Xn(),screenWidth:screen.width,screenHeight:screen.height,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,netType:navigator.connection?navigator.connection.effectiveType:"",tags:{customerId:this.config.getConfig().customerId,deviceId:this.config.getConfig().deviceId,deviceNo:this.config.getConfig().deviceNo,userId:this.config.getConfig().userId}},s=Array.isArray(t)?t:[t];return s.forEach(function(e){var t=Object.assign({},a.tags||{},e&&e.tags||{});Object.assign(e,a),Object.keys(t).length>0&&(e.tags=t)}),s}},{key:"defaultReport",value:(l=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.n){case 0:if(n=this.config.getReportUrl(),i=this.config.getThirdPartyConfig(),!n){e.n=1;break}return e.n=1,this.reportToBackend(n,r);case 1:if(!(i&&Object.keys(i).length>0)){e.n=2;break}return e.n=2,this.reportToThirdParty(i,r);case 2:return e.a(2)}},e,this)})),function(e,t){return l.apply(this,arguments)})},{key:"reportToBackend",value:(u=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.n){case 0:if(!navigator.sendBeacon||this.isObjectOverSizeLimit(r,60)){e.n=3;break}if((n=new FormData).append("events",JSON.stringify(r)),i=navigator.sendBeacon(t,n),this.config.getConfig().debugSwitch&&console.log("上报数据:",t,r),i){e.n=2;break}return e.n=1,this.reportViaAxios(t,n);case 1:case 4:return e.a(2,e.v);case 2:e.n=5;break;case 3:return this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 sendBeacon,使用 axios"),e.n=4,this.reportViaAxios(t,r);case 5:return e.a(2)}},e,this)})),function(e,t){return u.apply(this,arguments)})},{key:"reportViaAxios",value:(a=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Wt.post(t,r);case 1:return n=e.v,e.a(2,n.data);case 2:e.p=2,i=e.v,console.error("后端上报失败:",i);case 3:return e.a(2)}},e,null,[[0,2]])})),function(e,t){return a.apply(this,arguments)})},{key:"reportToThirdParty",value:(o=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=[],t.baidu&&window._hmt&&n.push(this.reportToBaidu(t.baidu,r)),t.umeng&&window._um&&n.push(this.reportToUmeng(t.umeng,r)),t.sensors&&window.sensors&&n.push(this.reportToSensors(t.sensors,r)),t.tencent&&window.MTA&&n.push(this.reportToTencent(t.tencent,r)),t.custom&&n.push(this.reportToCustom(t.custom,r)),e.p=1,e.n=2,Promise.allSettled(n);case 2:e.n=4;break;case 3:e.p=3,i=e.v,console.error("第三方上报失败:",i);case 4:return e.a(2)}},e,this,[[1,3]])})),function(e,t){return o.apply(this,arguments)})},{key:"reportToBaidu",value:(i=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window._hmt&&window._hmt.push(["_trackEvent",r.type,JSON.stringify(r.data)]);case 1:return e.a(2)}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"reportToUmeng",value:(n=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window._um&&window._um.push(["track",r.type,r.data]);case 1:return e.a(2)}},e)})),function(e,t){return n.apply(this,arguments)})},{key:"reportToSensors",value:(r=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window.sensors&&window.sensors.track(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"reportToTencent",value:(t=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window.MTA&&window.MTA.Event.stat(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"reportToCustom",value:(e=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:if("function"!=typeof t.report){e.n=1;break}return e.n=1,t.report(r);case 1:return e.a(2)}},e)})),function(t,r){return e.apply(this,arguments)})},{key:"isObjectOverSizeLimit",value:function(e,t){var r=JSON.stringify(e);return(new TextEncoder).encode(r).length/1024>t}}]);var e,t,r,n,i,o,a,u,l,h}(),Yn=function(){return f(function e(t){c(this,e),this.config=t,this.reporter=new $n(t),this.errorQueue=[],this.isInitialized=!1,this.reportTimer=null,this.errorCache=new Map,this.errorCacheTimeout=5e3,this.maxCacheSize=100,this.errorFingerprint=this.createErrorFingerprint.bind(this),this.errorTimeout=null,this.resourceErrorTimeout=null,this.lastResourceError=null},[{key:"createErrorFingerprint",value:function(e,t){var r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,n=(null==e?void 0:e.stack)||t.stack,i=t.type||"unknown",o=window.location.href;return"".concat(i,":").concat(r,":").concat(o,":").concat(n?n.split("\n")[0]:"")}},{key:"isDuplicateError",value:function(e,t){var r=this.errorFingerprint(e,t),n=Date.now();if((this.cleanupErrorCache(n),this.errorCache.has(r))&&n-this.errorCache.get(r)<this.errorCacheTimeout)return!0;if(this.errorCache.set(r,n),this.errorCache.size>this.maxCacheSize){var i=this.errorCache.keys().next().value;this.errorCache.delete(i)}return!1}},{key:"cleanupErrorCache",value:function(e){var t,r=h(this.errorCache.entries());try{for(r.s();!(t=r.n()).done;){var n=k(t.value,2),i=n[0];e-n[1]>this.errorCacheTimeout&&this.errorCache.delete(i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();(e.enableErrorTracking||e.enableResourceError)&&this.setupErrorListener(),e.enableUnhandledRejection&&this.setupUnhandledRejectionListener(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushErrorQueue()},t))}},{key:"setupErrorListener",value:function(){var e=this;window.addEventListener("error",function(t){t.target&&t.target!==window?e.handleResourceError(t):e.handleJavaScriptError(t)},!0)}},{key:"handleJavaScriptError",value:function(e){var t=this;this.errorTimeout&&clearTimeout(this.errorTimeout),this.errorTimeout=setTimeout(function(){var r;t.handleError(e.error||e.message,{type:"javascript",filename:e.filename,lineno:e.lineno,colno:e.colno,stack:null===(r=e.error)||void 0===r?void 0:r.stack})},100)}},{key:"handleResourceError",value:function(e){var t=this,r="".concat(e.target.tagName,":").concat(e.target.src||e.target.href);this.lastResourceError!==r?(this.lastResourceError=r,this.resourceErrorTimeout&&clearTimeout(this.resourceErrorTimeout),this.resourceErrorTimeout=setTimeout(function(){t.handleError("Resource load failed: ".concat(e.target.src||e.target.href),{type:"resource",tagName:e.target.tagName,src:e.target.src,href:e.target.href}),setTimeout(function(){t.lastResourceError=null},2e3)},100)):this.config.getConfig().debugSwitch&&console.log("忽略重复的资源加载错误:",r)}},{key:"setupUnhandledRejectionListener",value:function(){var e=this,t=null,r=null;window.addEventListener("unhandledrejection",function(n){var i,o,a="".concat((null===(i=n.reason)||void 0===i?void 0:i.message)||n.reason,":").concat((null===(o=n.reason)||void 0===o?void 0:o.stack)||"");r!==a?(r=a,t&&clearTimeout(t),t=setTimeout(function(){var t;e.handleError(n.reason,{type:"unhandledrejection",stack:null===(t=n.reason)||void 0===t?void 0:t.stack}),setTimeout(function(){r=null},1e3)},100)):e.config.getConfig().debugSwitch&&console.log("忽略重复的 Promise 拒绝:",n.reason)})}},{key:"handleError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isDuplicateError(e,t))this.config.getConfig().debugSwitch&&console.log("忽略重复错误:",(null==e?void 0:e.message)||e);else{var r=this.parseStack(e),n=m({message:(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,stack:(null==e?void 0:e.stack)||t.stack,type:t.type||"unknown",timestamp:Date.now(),url:window.location.href,userAgent:navigator.userAgent,fileName:r.fileName,lineNumber:r.lineNumber,columnNumber:r.columnNumber,functionName:r.functionName,stackFrames:r.stackFrames},t);this.errorQueue.push(n),0===this.config.getConfig().reportInterval?this.reporter.report("error",[n]):this.errorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushErrorQueue()}}},{key:"parseStack",value:function(e){var t=(null==e?void 0:e.stack)||"",r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"",n={errMessage:r,errStack:t,fileName:"",lineNumber:"",columnNumber:"",functionName:"",stackFrames:[]};if(!t)return n;try{var i=/^\s*at\s+([^(]+?)\s+\((.+?):(\d+):(\d+)\)$/,o=/^\s*at\s+(.+?):(\d+):(\d+)$/,a=/^\s*([^@]*)@(.+?):(\d+):(\d+)$/,s=t;if(r&&t.startsWith(r))s=t.substring(r.length).replace(/^\n+/,"");else if(t.includes("\n")){var u=t.split("\n");!u[0]||u[0].trim().startsWith("at")||u[0].includes("@")||(s=u.slice(1).join("\n"))}var c,l=s.split("\n").filter(function(e){return e.trim()}),f=[],d=h(l);try{for(d.s();!(c=d.n()).done;){var p=c.value,g=null,v=p.match(i);v?g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}:(v=p.match(o))?g={functionName:"",fileName:v[1],lineNumber:parseInt(v[2]),columnNumber:parseInt(v[3])}:(v=p.match(a))&&(g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}),g&&f.push(g)}}catch(e){d.e(e)}finally{d.f()}if(f.length>0){var m=f[0];n.fileName=m.fileName,n.lineNumber=m.lineNumber,n.columnNumber=m.columnNumber,n.functionName=m.functionName}n.stackFrames=f}catch(e){var w;null!==(w=this.config)&&void 0!==w&&null!==(w=w.getConfig())&&void 0!==w&&w.debugSwitch&&console.warn("解析堆栈失败:",e)}return n}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.handleError(e,t)}},{key:"flushErrorQueue",value:function(){this.errorQueue.length>0&&(this.reporter.report("error",T(this.errorQueue)),this.errorQueue=[])}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushErrorQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),Zn=function(){return f(function e(t){c(this,e),this.config=t,this.reporter=new $n(t),this.eventQueue=[],this.isInitialized=!1,this.clickListener=null,this.pageViewListener=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.pageHistory=[],this.currentPage=null,this.currentPageStartTime=Date.now(),this.previousPage=null,this.previousPageStayTime=0},[{key:"init",value:function(){var e=this;if(!this.isInitialized){var t=this.config.getConfig();this.currentPage={url:window.location.href,title:document.title,enterTime:Date.now(),referrer:document.referrer},this.currentPageStartTime=Date.now(),t.enableClickTracking&&this.setupClickTracking(),t.enablePageViewTracking&&this.setupPageViewTracking(),window.addEventListener("beforeunload",function(){e.handlePageUnload()}),document.addEventListener("visibilitychange",function(){}),this.config.getConfig().reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"handlePageUnload",value:function(){if(this.currentPage){var e=Date.now()-this.currentPageStartTime;this.previousPage=m(m({},this.currentPage),{},{stayTime:e,leaveTime:Date.now()}),this.previousPageStayTime=e}}},{key:"setupClickTracking",value:function(){var e=this;this.clickListener=function(t){var r,n=t.target,i={type:"click",timestamp:Date.now(),url:window.location.href,element:{tagName:n.tagName,className:n.className,id:n.id,text:null===(r=n.textContent)||void 0===r?void 0:r.substring(0,50)},position:{x:t.clientX,y:t.clientY}};e.handleEvent("click",i)},document.addEventListener("click",this.clickListener,!0)}},{key:"setupPageViewTracking",value:function(){var e=this,t=this.config.getConfig().pageViewTracking||{},r=window.location.href,n=Date.now(),i=t.debounce||100;this.pageViewListener=function(){var t=window.location.href,o=Date.now();t===r&&o-n<i&&e.config.getConfig().debugSwitch?console.log("忽略重复的页面浏览事件:",t):(e.handlePageChange(t,o),r=t,n=o,e.handleEvent("pageview",{uuid:Vn(),timestamp:o,pageKey:Wn(Qn(t),e.config.getConfig().uiVersion),pageUri:Qn(t),eventType:"VIEW"}))},!1!==t.listenPopstate&&window.addEventListener("popstate",this.pageViewListener),!1!==t.listenHistoryAPI&&(this.originalPushState=history.pushState,this.originalReplaceState=history.replaceState,history.pushState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalPushState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this),history.replaceState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalReplaceState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this)),t.vueRouterMode&&(this.config.getConfig().debugSwitch&&console.log("Vue Router 模式:页面浏览追踪已优化"),this.pageViewListener())}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushEventQueue()},t))}},{key:"handlePageChange",value:function(e,t){if(this.currentPage){var r=t-this.currentPageStartTime;this.previousPage=m(m({},this.currentPage),{},{stayTime:r,leaveTime:t}),this.previousPageStayTime=r,this.pageHistory.push(m({},this.previousPage)),this.pageHistory.length>20&&this.pageHistory.shift(),this.config.getConfig().debugSwitch&&console.log("页面切换: ".concat(this.currentPage.url," → ").concat(e,",停留时间: ").concat(r,"ms"))}this.currentPage={url:e,title:document.title,enterTime:t,referrer:document.referrer},this.currentPageStartTime=t}},{key:"getPreviousPageInfo",value:function(){return{previousPage:this.previousPage?{url:this.previousPage.url,title:this.previousPage.title,stayTime:this.previousPageStayTime}:null,previousPageStayTime:this.previousPageStayTime}}},{key:"getCurrentPageStayTime",value:function(){return this.currentPageStartTime?Date.now()-this.currentPageStartTime:0}},{key:"handleEvent",value:function(e,t){var r,n=this.getPreviousPageInfo(),i=m(m({},t),{},{tags:{refer:Qn(null==n||null===(r=n.previousPage)||void 0===r?void 0:r.url),duration:null==n?void 0:n.previousPageStayTime}});this.eventQueue.push(i),this.config.getConfig().debugSwitch&&console.log("eventInfo----",i),0===this.config.getConfig().reportInterval?this.reporter.report("event",[i]):this.eventQueue.length>=this.config.getConfig().maxQueueSize&&this.flushEventQueue()}},{key:"reportEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d({uuid:Vn(),timestamp:Date.now(),pageKey:Wn(Qn(window.location.href),this.config.getConfig().uiVersion),pageUri:Qn(window.location.href),eventType:"CLICK",tags:t},"tags",{actionKey:e});this.handleEvent(e,r)}},{key:"flushEventQueue",value:function(){this.eventQueue.length>0&&(this.reporter.report("event",T(this.eventQueue)),this.eventQueue=[])}},{key:"destroy",value:function(){this.flushEventQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.clickListener&&(document.removeEventListener("click",this.clickListener,!0),this.clickListener=null),this.pageViewListener&&(window.removeEventListener("popstate",this.pageViewListener),this.pageViewListener=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),ei=function(){return f(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;c(this,e),this.config=t,this.reporter=new $n(t),this.eventTracker=r,this.isInitialized=!1,this.pageStartTime=Date.now(),this.performanceQueue=[],this.thirdPartySDKs={},this.reportTimer=null,this.currentRoute=null,this.routeStartTime=Date.now(),this.routeHistory=[],this.vueRouter=null,this.metrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0,domLoad:0,windowLoad:0,resourceLoad:[],apiRequests:[],pageStayTime:0,previousPageUrl:"",currentPageUrl:""}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enablePerformanceTracking&&this.setupPerformanceMonitoring(),e.enableResourceTracking&&this.setupResourceMonitoring(),e.enableApiTracking&&this.setupApiMonitoring(),e.enableInteractionTracking&&this.setupInteractionMonitoring(),this.initThirdPartySDKs(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushPerformanceQueue()},t))}},{key:"setupVueRouterMonitoring",value:function(e){var t=this;e&&!this.vueRouter&&(this.vueRouter=e,this.currentRoute=e.currentRoute.value,e.beforeEach(function(e,r,n){r.name&&t.handleRouteLeave(r,e),n()}),e.afterEach(function(e,r){t.handleRouteEnter(e,r)}),e.beforeResolve(function(e,r,n){r.name&&t.calculateRouteStayTime(r),n()}))}},{key:"handleRouteLeave",value:function(e,t){var r=Date.now()-this.routeStartTime;this.recordRouteStayTime(e,r),this.currentRoute=e,this.routeStartTime=Date.now()}},{key:"handleRouteEnter",value:function(e,t){this.routeStartTime=Date.now(),this.currentRoute=e,this.recordRouteEnter(e,t)}},{key:"recordRouteStayTime",value:function(e,t){var r,n={name:e.name||"unknown",path:e.path,fullPath:e.fullPath,stayTime:t,enterTime:this.routeStartTime,leaveTime:Date.now(),params:e.params,query:e.query,meta:e.meta};this.routeHistory.push(n),this.metrics.pageStayTime=t,this.metrics.previousPageUrl=e.name,this.reportRouteStayTime(n),null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("路由数据",n)}},{key:"recordRouteEnter",value:function(e,t){var r;e.name,e.path,e.fullPath,Date.now(),e.params,e.query,e.meta,t&&(t.name,t.path),this.metrics.currentPageUrl=e.name,null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("进入路由: ".concat(e.name||e.path))}},{key:"calculateRouteStayTime",value:function(e){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"reportRouteStayTime",value:function(e){var t={type:"route_stay_time",timestamp:Date.now(),route:e,user:this.config.getUser(),device:this.getDeviceInfo()};this.reporter.report("route_performance",[t])}},{key:"getCurrentRoute",value:function(){return this.currentRoute}},{key:"getRouteHistory",value:function(){return T(this.routeHistory)}},{key:"getCurrentPageStayTime",value:function(){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"getRoutePerformanceStats",value:function(){var e={totalRoutes:this.routeHistory.length,averageStayTime:0,routesByPath:new Map,totalStayTime:0};return this.routeHistory.length>0&&(this.routeHistory.forEach(function(t){e.totalStayTime+=t.stayTime,e.routesByPath.has(t.path)||e.routesByPath.set(t.path,{count:0,totalStayTime:0,averageStayTime:0});var r=e.routesByPath.get(t.path);r.count++,r.totalStayTime+=t.stayTime,r.averageStayTime=r.totalStayTime/r.count}),e.averageStayTime=e.totalStayTime/e.totalRoutes),e}},{key:"setupPerformanceMonitoring",value:function(){var e=this;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){e.captureDOMLoadTime()}):this.captureDOMLoadTime(),window.addEventListener("load",function(){e.captureWindowLoadTime(),e.captureWebVitals(),e.reportPerformanceMetrics()})}},{key:"setupResourceMonitoring",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window){var t=new PerformanceObserver(function(t){var r,n=h(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;"resource"===i.entryType&&e.handleResourceLoad(i)}}catch(e){n.e(e)}finally{n.f()}});try{t.observe({entryTypes:["resource"]})}catch(e){this.setupResourceFallback()}}}},{key:"setupApiMonitoring",value:function(){var e=this;void 0!==window.axios&&(window.axios.interceptors.request.use(function(e){return e._startTime=Bn(),e}),window.axios.interceptors.response.use(function(t){var r=Bn()-t.config._startTime;return e.handleApiRequest(t.config.url,r,t.status),t},function(t){if(t.config){var r=Bn()-t.config._startTime;e.handleApiRequest(t.config.url,r,"error")}throw t}))}},{key:"setupInteractionMonitoring",value:function(){var e=this,t=0,r=0,n=function(i){0===t&&(t=Bn(),r=t-e.metrics.fcp,e.metrics.fid=r,document.removeEventListener("click",n,!0),document.removeEventListener("keydown",n,!0),document.removeEventListener("touchstart",n,!0))};document.addEventListener("click",n,!0),document.addEventListener("keydown",n,!0),document.addEventListener("touchstart",n,!0)}},{key:"captureDOMLoadTime",value:function(){this.metrics.domLoad=Bn()}},{key:"captureWindowLoadTime",value:function(){this.metrics.windowLoad=Bn()}},{key:"captureWebVitals",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=h(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i,o=r.value;if("first-contentful-paint"===o.name)e.metrics.fcp=o.startTime,null!==(i=e.config)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.debugSwitch&&console.log("FCP:",o.startTime)}}catch(e){n.e(e)}finally{n.f()}}).observe({type:"paint",buffered:!0})}catch(e){console.warn("FCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=h(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;e.metrics.lcp=i.startTime}}catch(e){n.e(e)}finally{n.f()}}).observe({entryTypes:["largest-contentful-paint"]})}catch(e){console.warn("LCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{var t=0;new PerformanceObserver(function(r){var n,i=h(r.getEntries());try{for(i.s();!(n=i.n()).done;){var o=n.value;o.hadRecentInput||(t+=o.value)}}catch(e){i.e(e)}finally{i.f()}e.metrics.cls=t}).observe({entryTypes:["layout-shift"]})}catch(e){console.warn("CLS监控失败:",e)}}},{key:"handleResourceLoad",value:function(e){var t={name:e.name,type:e.initiatorType,duration:e.duration,size:e.transferSize,timestamp:Date.now()};this.metrics.resourceLoad.push(t),e.duration>3e3&&this.reportSlowResource(t)}},{key:"handleApiRequest",value:function(e,t,r){this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&this.eventTracker.getPreviousPageInfo();var n={interfaceUrl:"string"==typeof e?e:e.toString(),interfaceDuration:t,status:r,uuid:Vn(),timestamp:Date.now(),pageKey:Wn(this.metrics.currentPageUrl,this.config.getConfig().uiVersion),pageUri:this.metrics.currentPageUrl,eventType:"INTERFACEDURATION",refer:this.metrics.previousPageUrl,duration:this.metrics.previousPageStayTime||0,tags:{actionKey:""}};t>5e3||this.performanceQueue.push(n)}},{key:"handlePageHidden",value:function(){this.calculatePageStayTime()}},{key:"handlePageVisible",value:function(){this.pageStartTime=Date.now()}},{key:"calculatePageStayTime",value:function(){var e=Date.now()-this.pageStartTime;this.reportPageStayTime(e)}},{key:"reportPerformanceMetrics",value:function(){var e=this;setTimeout(function(){var t,r,n,i={};e.eventTracker&&"function"==typeof e.eventTracker.getPreviousPageInfo&&(i=e.eventTracker.getPreviousPageInfo());var o=Qn(window.location.href);e.metrics.currentPageUrl=o,e.metrics.previousPageUrl=Qn((null===(t=i)||void 0===t||null===(t=t.previousPage)||void 0===t?void 0:t.url)||"")||e.metrics.previousPageUrl;var a={eventType:"PERFORMANCE",uuid:Vn(),timestamp:Date.now(),pageKey:Wn(Qn(window.location.href),e.config.getConfig().uiVersion),pageUri:Qn(window.location.href),refer:Qn((null===(r=i)||void 0===r||null===(r=r.previousPage)||void 0===r?void 0:r.url)||""),duration:(null===(n=i)||void 0===n?void 0:n.previousPageStayTime)||0,metrics:e.metrics};e.performanceQueue.push(a),e.config.getConfig().debugSwitch&&console.log("Performance Data:",a),0===e.config.getConfig().reportInterval?e.reporter.report("performance",[a]):e.performanceQueue.length>=e.config.getConfig().maxQueueSize&&e.flushPerformanceQueue()},100)}},{key:"reportSlowResource",value:function(e){this.reporter.report("slow_resource",[e])}},{key:"reportSlowApi",value:function(e){this.reporter.report("slow_api",[e])}},{key:"reportPageStayTime",value:function(e){var t={type:"page_stay",url:window.location.href,stayTime:e,timestamp:Date.now()};this.reporter.report("page_stay",[t])}},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"initThirdPartySDKs",value:function(){var e=this.config.getThirdPartyConfig();e.baidu&&window._hmt&&(this.thirdPartySDKs.baidu=window._hmt),e.umeng&&window._um&&(this.thirdPartySDKs.umeng=window._um),e.sensors&&window.sensors&&(this.thirdPartySDKs.sensors=window.sensors),e.tencent&&window.MTA&&(this.thirdPartySDKs.tencent=window.MTA)}},{key:"flushPerformanceQueue",value:function(){this.performanceQueue.length>0&&(this.reporter.report("performance",T(this.performanceQueue)),this.performanceQueue=[])}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={type:"custom_performance",timestamp:Date.now(),url:window.location.href,metrics:e,user:this.config.getUser()};this.reporter.report("performance",[t])}},{key:"getCurrentMetrics",value:function(){return m({},this.metrics)}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushPerformanceQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),ti=function(){return f(function e(t){c(this,e),this.config=t,this.reporter=new $n(t),this.isInitialized=!1,this.behaviorQueue=[],this.sessionId=this.generateSessionId(),this.pageStartTime=Date.now(),this.scrollDepth=0,this.mouseMovements=[],this.keyStrokes=[],this.formInteractions=[],this.timeTracker=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.behaviors={pageViews:[],clicks:[],scrolls:[],formSubmissions:[],navigation:[],timeOnPage:0}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enableUserInteractionTracking&&this.setupUserInteractionTracking(),e.enableFormTracking&&this.setupFormTracking(),e.enableScrollTracking&&this.setupScrollTracking(),e.enableMouseTracking&&this.setupMouseTracking(),e.enableKeyboardTracking&&this.setupKeyboardTracking(),this.setupTimeTracking(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushBehaviorQueue()},t))}},{key:"setupUserInteractionTracking",value:function(){var e=this;document.addEventListener("click",function(t){e.trackClick(t)},!0),document.addEventListener("dblclick",function(t){e.trackDoubleClick(t)},!0),document.addEventListener("contextmenu",function(t){e.trackRightClick(t)},!0),"ontouchstart"in window&&document.addEventListener("touchstart",function(t){e.trackTouch(t)},!0)}},{key:"setupFormTracking",value:function(){var e=this;document.addEventListener("submit",function(t){e.trackFormSubmission(t)},!0),document.addEventListener("change",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldChange(t)},!0),document.addEventListener("focus",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldFocus(t)},!0),document.addEventListener("blur",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldBlur(t)},!0)}},{key:"setupScrollTracking",value:function(){var e,t=this;document.addEventListener("scroll",function(){clearTimeout(e),e=setTimeout(function(){var e=window.pageYOffset||document.documentElement.scrollTop,r=document.documentElement.scrollHeight,n=document.documentElement.clientHeight,i=Math.round(e/(r-n)*100);i>t.scrollDepth&&(t.scrollDepth=i,t.trackScroll(i,e))},100)},{passive:!0})}},{key:"setupMouseTracking",value:function(){var e,t=this,r=[];document.addEventListener("mousemove",function(n){clearTimeout(e),r.push({x:n.clientX,y:n.clientY,timestamp:Date.now()}),r.length>100&&r.shift(),e=setTimeout(function(){r.length>10&&(t.trackMouseMovement(r),r=[])},1e3)},{passive:!0})}},{key:"setupKeyboardTracking",value:function(){var e=this;document.addEventListener("keydown",function(t){"password"!==t.target.type&&e.trackKeyStroke(t)},!0)}},{key:"setupTimeTracking",value:function(){var e=this;this.timeTracker&&clearInterval(this.timeTracker),this.timeTracker=setInterval(function(){e.behaviors.timeOnPage+=1},1e3),window.addEventListener("beforeunload",function(){e.reportTimeOnPage()})}},{key:"trackReferrer",value:function(){var e=document.referrer;if(e){var t={type:"referrer",url:e,domain:this.extractDomain(e),timestamp:Date.now()};this.config.getConfig().debugSwitch&&console.log("referrerData----",t),this.behaviors.navigation.push(t),this.reportBehavior("referrer",t)}}},{key:"trackPageView",value:function(){var e={type:"pageview",url:window.location.href,title:document.title,timestamp:Date.now(),sessionId:this.sessionId,referrer:document.referrer};this.behaviors.pageViews.push(e),this.reportBehavior("pageview",e),this.pageStartTime=Date.now(),this.scrollDepth=0}},{key:"trackClick",value:function(e){var t,r={type:"click",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id,text:null===(t=e.target.textContent)||void 0===t?void 0:t.substring(0,50),href:e.target.href},position:{x:e.clientX,y:e.clientY,pageX:e.pageX,pageY:e.pageY},timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.clicks.push(r),this.reportBehavior("click",r)}},{key:"trackDoubleClick",value:function(e){var t={type:"doubleclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("doubleclick",t)}},{key:"trackRightClick",value:function(e){var t={type:"rightclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("rightclick",t)}},{key:"trackTouch",value:function(e){var t={type:"touch",touches:Array.from(e.touches).map(function(e){return{x:e.clientX,y:e.clientY,identifier:e.identifier}}),timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("touch",t)}},{key:"trackFormSubmission",value:function(e){var t={type:"form_submission",form:{action:e.target.action,method:e.target.method,id:e.target.id,className:e.target.className},fields:this.getFormFields(e.target),timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.formSubmissions.push(t),this.reportBehavior("form_submission",t)}},{key:"trackFormFieldChange",value:function(e){var t={type:"form_field_change",field:{name:e.target.name,type:e.target.type,value:"password"===e.target.type?"***":e.target.value,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_change",t)}},{key:"trackFormFieldFocus",value:function(e){var t={type:"form_field_focus",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_focus",t)}},{key:"trackFormFieldBlur",value:function(e){var t={type:"form_field_blur",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_blur",t)}},{key:"trackScroll",value:function(e,t){var r={type:"scroll",depth:e,scrollTop:t,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("scrollData---",r),this.reportBehavior("scroll",r)}},{key:"trackMouseMovement",value:function(e){var t={type:"mouse_movement",movements:e,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("mouse_movement---",t),this.reportBehavior("mouse_movement",t)}},{key:"trackKeyStroke",value:function(e){var t={type:"keystroke",key:e.key,code:e.code,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("keystroke---",t),this.reportBehavior("keystroke",t)}},{key:"reportBehavior",value:function(e,t){var r={type:e,data:t,user:this.config.getUser(),config:{appId:this.config.getConfig().appId,appVersion:this.config.getConfig().appVersion}};this.behaviorQueue.push(r),0===this.config.getConfig().reportInterval?this.reporter.report("behavior",[r]):this.behaviorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushBehaviorQueue()}},{key:"reportCustomBehavior",value:function(e){var t=m(m({type:"custom_behavior",eventName:e},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),{},{timestamp:Date.now(),sessionId:this.sessionId});this.reportBehavior("custom_behavior",t)}},{key:"flushBehaviorQueue",value:function(){this.behaviorQueue.length>0&&(this.reporter.report("behavior",T(this.behaviorQueue)),this.behaviorQueue=[])}},{key:"getFormFields",value:function(e){for(var t=[],r=e.elements,n=0;n<r.length;n++){var i=r[n];i.name&&t.push({name:i.name,type:i.type,value:"password"===i.type?"***":i.value})}return t}},{key:"extractDomain",value:function(e){try{return new URL(e).hostname}catch(t){return e}}},{key:"generateSessionId",value:function(){return"session_"+Date.now()+"_"+Math.random().toString(36).substr(2,9)}},{key:"getCurrentBehaviors",value:function(){return m({},this.behaviors)}},{key:"getSessionId",value:function(){return this.sessionId}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushBehaviorQueue(),this.reportTimeOnPage(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.timeTracker&&(clearInterval(this.timeTracker),this.timeTracker=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),ri=function(){return f(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;c(this,e),this.config=t,this.reporter=new $n(t),this.eventTracker=r,this.isInitialized=!1,this.observer=null,this.trackedElements=new Map,this.exposureQueue=[],this.reportTimer=null,this.scrollTimer=null,this.useFallback=!1,this.lastReportTime=new Map,this.debounceTime=500,this.defaultOptions={threshold:.5,rootMargin:"0px",scrollThrottle:100}},[{key:"init",value:function(){if(!this.isInitialized){this.isIntersectionObserverSupported()?(this.createObserver(),this.useFallback=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器初始化完成(使用 Intersection Observer API)")):(this.setupFallbackTracking(),this.useFallback=!0,this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 Intersection Observer,使用降级方案(滚动事件追踪)"));var e=this.config.getConfig();e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0,e.debugSwitch&&console.log("曝光追踪器初始化完成")}}},{key:"isIntersectionObserverSupported",value:function(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}},{key:"createObserver",value:function(){var e=this,t={root:null,rootMargin:this.defaultOptions.rootMargin,threshold:[0,.5,1]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){e.handleIntersection(t)})},t)}},{key:"handleIntersection",value:function(e){var t=e.target,r=this.getElementId(t),n=this.getElementConfig(t),i=n.threshold||this.defaultOptions.threshold,o=e.intersectionRatio;if(o>=i){this.trackedElements.has(r)||this.trackedElements.set(r,{element:t,config:n});var a=this.trackedElements.get(r),s=Date.now(),u=s-(this.lastReportTime.get(r)||0);u>=this.debounceTime?(this.lastReportTime.set(r,s),this.triggerExposure(t,r,a,o,0)):this.config.getConfig().debugSwitch&&console.log("元素 ".concat(r," 跳过上报(去重),距离上次上报 ").concat(u,"ms,需要间隔 ").concat(this.debounceTime,"ms"))}}},{key:"triggerExposure",value:function(e,t,r,n,i){var o,a,s=this,u=this.extractProductInfo(e,r.config),c={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(c=this.eventTracker.getPreviousPageInfo());var l=this.getElementConfig(e),f={uuid:Vn(),timestamp:Date.now(),pageKey:Wn(Qn(window.location.href),this.config.getConfig().uiVersion),pageUri:Qn(window.location.href),eventType:"EXPOSE",refer:Qn(null===(o=c)||void 0===o||null===(o=o.previousPage)||void 0===o?void 0:o.url),duration:null===(a=c)||void 0===a?void 0:a.previousPageStayTime,viewParam:m({},u),tags:m({actionKey:""},l)};this.exposureQueue.push(f),0===this.config.getConfig().reportInterval?Promise.resolve().then(function(){s.reporter.report("exposure",s.getReportData([f])).catch(function(e){console.error("曝光上报失败:",e),s.config.getConfig().debugSwitch&&console.error("曝光上报失败详情:",e)})}):this.exposureQueue.length>=this.config.getConfig().maxQueueSize&&this.flushExposureQueue()}},{key:"setupFallbackTracking",value:function(){var e=this;this.observer={observe:function(t){var r=e.getElementId(t);e.trackedElements.has(r)},unobserve:function(t){var r=e.getElementId(t);e.trackedElements.delete(r)},disconnect:function(){e.trackedElements.clear(),e.removeScrollListener()}},this.addScrollListener(),setTimeout(function(){e.checkAllElementsVisibility()},100)}},{key:"addScrollListener",value:function(){var e=this;if(!this.scrollHandler){var t=0,r=this.defaultOptions.scrollThrottle;this.scrollHandler=function(){var n=Date.now();n-t>=r&&(t=n,e.checkAllElementsVisibility())},window.addEventListener("scroll",this.scrollHandler,{passive:!0}),window.addEventListener("touchmove",this.scrollHandler,{passive:!0}),window.addEventListener("resize",this.scrollHandler,{passive:!0})}}},{key:"removeScrollListener",value:function(){this.scrollHandler&&(window.removeEventListener("scroll",this.scrollHandler),window.removeEventListener("touchmove",this.scrollHandler),window.removeEventListener("resize",this.scrollHandler),this.scrollHandler=null)}},{key:"checkAllElementsVisibility",value:function(){var e=this;if(this.useFallback){var t=window.innerHeight,r=window.innerWidth;this.trackedElements.forEach(function(n,i){var o=n.element;if(o&&document.contains(o)){var a=n.config.threshold||e.defaultOptions.threshold,s=e.calculateVisibleRatio(o,0,t,0,r);if(s>=a){var u=Date.now(),c=u-(e.lastReportTime.get(i)||0);c>=e.debounceTime?(e.lastReportTime.set(i,u),e.triggerExposure(o,i,n,s,0),e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 进入可视区域,可见比例: ").concat((100*s).toFixed(2),"%,立即触发曝光"))):e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 跳过上报(去重),距离上次上报 ").concat(c,"ms,需要间隔 ").concat(e.debounceTime,"ms"))}}else e.trackedElements.delete(i)})}}},{key:"calculateVisibleRatio",value:function(e,t,r,n,i){var o=e.getBoundingClientRect();if(o.bottom<t||o.top>r||o.right<n||o.left>i)return 0;var a=Math.max(o.top,t),s=Math.min(o.bottom,r),u=Math.max(o.left,n),c=Math.min(o.right,i),l=Math.max(0,c-u)*Math.max(0,s-a),f=o.width*o.height;return 0===f?0:l/f}},{key:"trackProduct",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized)if(e&&"object"===E(e)&&e.nodeType){var n=this.getElementId(e),i=m({},r);this.trackedElements.has(n)&&this.untrackProduct(e),e.setAttribute("data-exposure-tracked","true"),e.setAttribute("data-exposure-config",JSON.stringify(i)),this.trackedElements.set(n,{element:e,config:i}),this.observer&&this.observer.observe(e),this.useFallback&&setTimeout(function(){t.checkAllElementsVisibility()},0),this.config.getConfig().debugSwitch}else console.warn("无效的元素,无法追踪");else console.warn("曝光追踪器未初始化")}},{key:"trackProducts",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized&&this.observer){var n=[];if("string"==typeof e)n=Array.from(document.querySelectorAll(e));else{if(!Array.isArray(e))return void console.warn("无效的选择器或元素列表");n=e}n.forEach(function(e,n){var i=Array.isArray(r)?r[n]||{}:r;t.trackProduct(e,i)}),this.config.getConfig().debugSwitch}else console.warn("曝光追踪器未初始化")}},{key:"untrackProduct",value:function(e){if(this.observer){var t=this.getElementId(e);this.observer.unobserve&&this.observer.unobserve(e),this.trackedElements.delete(t),this.lastReportTime.delete(t),e&&e.removeAttribute&&(e.removeAttribute("data-exposure-tracked"),e.removeAttribute("data-exposure-config")),this.config.getConfig().debugSwitch&&console.log("取消追踪商品元素: ".concat(t))}}},{key:"untrackAll",value:function(){var e=this;this.observer&&(this.useFallback||this.trackedElements.forEach(function(t,r){t.element&&e.observer.unobserve&&e.observer.unobserve(t.element)}),this.trackedElements.clear())}},{key:"getElementId",value:function(e){if(e.getAttribute("data-exposure-id"))return e.getAttribute("data-exposure-id");if(e._exposureUniqueId)return e._exposureUniqueId;if(e.id)return"id_".concat(e.id);if(e.getAttribute("data-product-id"))return"product_".concat(e.getAttribute("data-product-id"));var t=Vn();return e._exposureUniqueId=t,t}},{key:"getElementConfig",value:function(e){var t=e.getAttribute("data-exposure-config");if(t)try{return JSON.parse(t)}catch(e){return{}}return{}}},{key:"extractProductInfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={productId:t.productId||e.getAttribute("data-product-id")||null,productName:t.productName||e.getAttribute("data-product-name")||null,productPrice:t.productPrice||e.getAttribute("data-product-price")||null,productCategory:t.productCategory||e.getAttribute("data-product-category")||null,productImage:t.productImage||e.getAttribute("data-product-image")||null};return Object.keys(r).forEach(function(e){null===r[e]&&delete r[e]}),r}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushExposureQueue()},t))}},{key:"getReportData",value:function(e){if(e.length>0){var t=e[0];return t.tags&&(t.tags.exposeContent=(r=e.map(function(e){var t;return null===(t=e.viewParam)||void 0===t?void 0:t.productId}).filter(Boolean),Array.from(new Set(r)))),delete t.viewParam,t}var r;return null}},{key:"flushExposureQueue",value:function(){var e=this;if(this.exposureQueue.length>0){var t=T(this.exposureQueue);this.exposureQueue=[],Promise.resolve().then(function(){e.reporter.report("exposure",e.getReportData(t)).catch(function(t){console.error("批量曝光上报失败:",t),e.config.getConfig().debugSwitch&&console.error("批量曝光上报失败详情:",t)})})}}},{key:"reportExposure",value:function(){var e,t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(i=this.eventTracker.getPreviousPageInfo());var o={uuid:Vn(),timestamp:Date.now(),pageKey:Wn(Qn(window.location.href),this.config.getConfig().uiVersion),pageUri:Qn(window.location.href),eventType:"EXPOSE",viewParam:m({},n),tags:m(m({},config),{},{actionKey:"",refer:Qn(null===(e=i)||void 0===e||null===(e=e.previousPage)||void 0===e?void 0:e.url),duration:null===(t=i)||void 0===t?void 0:t.previousPageStayTime})};Promise.resolve().then(function(){r.reporter.report("exposure",r.getReportData(o)).catch(function(e){console.error("手动曝光上报失败:",e),r.config.getConfig().debugSwitch&&console.error("手动曝光上报失败详情:",e)})})}},{key:"getTrackedElements",value:function(){return Array.from(this.trackedElements.keys())}},{key:"getExposureQueue",value:function(){return T(this.exposureQueue)}},{key:"destroy",value:function(){this.flushExposureQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.untrackAll(),this.observer&&(this.observer.disconnect&&this.observer.disconnect(),this.observer=null),this.removeScrollListener(),this.trackedElements.clear(),this.exposureQueue=[],this.lastReportTime.clear(),this.useFallback=!1,this.isInitialized=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器已销毁")}}])}(),ni=function(){return f(function e(t){c(this,e),this.config=t,this.integratedSDKs={},this.isInitialized=!1},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getThirdPartyConfig();e.baidu&&e.baidu.enabled&&this.initBaiduAnalytics(e.baidu),e.umeng&&e.umeng.enabled&&this.initUmengAnalytics(e.umeng),e.sensors&&e.sensors.enabled&&this.initSensorsAnalytics(e.sensors),e.tencent&&e.tencent.enabled&&this.initTencentAnalytics(e.tencent),e.google&&e.google.enabled&&this.initGoogleAnalytics(e.google),e.custom&&e.custom.enabled&&this.initCustomAnalytics(e.custom),this.isInitialized=!0}}},{key:"initBaiduAnalytics",value:function(e){try{window._hmt?(this.integratedSDKs.baidu={name:"baidu",instance:window._hmt,config:e},e.siteId&&window._hmt.push(["_setAccount",e.siteId]),!1!==e.autoPageview&&window._hmt.push(["_trackPageview"]),console.log("百度统计集成成功")):console.warn("百度统计未加载,请检查脚本是否正确引入")}catch(e){console.error("百度统计集成失败:",e)}}},{key:"initUmengAnalytics",value:function(e){try{window._um?(this.integratedSDKs.umeng={name:"umeng",instance:window._um,config:e},e.siteId&&window._um.push(["setAccount",e.siteId]),!1!==e.autoPageview&&window._um.push(["trackPageview"]),console.log("友盟统计集成成功")):console.warn("友盟统计未加载,请检查脚本是否正确引入")}catch(e){console.error("友盟统计集成失败:",e)}}},{key:"initSensorsAnalytics",value:function(e){try{window.sensors?(this.integratedSDKs.sensors={name:"sensors",instance:window.sensors,config:e},e.serverUrl&&window.sensors.setServerUrl(e.serverUrl),e.siteId&&window.sensors.setSiteId(e.siteId),!1!==e.autoPageview&&window.sensors.trackPageview(),console.log("神策数据集成成功")):console.warn("神策数据未加载,请检查脚本是否正确引入")}catch(e){console.error("神策数据集成失败:",e)}}},{key:"initTencentAnalytics",value:function(e){try{window.MTA?(this.integratedSDKs.tencent={name:"tencent",instance:window.MTA,config:e},e.appId&&window.MTA.setAppId(e.appId),!1!==e.autoPageview&&window.MTA.trackPageview(),console.log("腾讯云分析集成成功")):console.warn("腾讯云分析未加载,请检查脚本是否正确引入")}catch(e){console.error("腾讯云分析集成失败:",e)}}},{key:"initGoogleAnalytics",value:function(e){try{window.gtag?(this.integratedSDKs.google={name:"google",instance:window.gtag,config:e},e.measurementId&&window.gtag("config",e.measurementId,{page_title:document.title,page_location:window.location.href}),console.log("Google Analytics集成成功")):console.warn("Google Analytics未加载,请检查脚本是否正确引入")}catch(e){console.error("Google Analytics集成失败:",e)}}},{key:"initCustomAnalytics",value:function(e){try{if("function"==typeof e.init){var t=e.init(e);this.integratedSDKs.custom={name:"custom",instance:t,config:e},console.log("自定义第三方集成成功")}else console.warn("自定义第三方配置缺少init函数")}catch(e){console.error("自定义第三方集成失败:",e)}}},{key:"reportEvent",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.values(this.integratedSDKs).forEach(function(n){try{t.reportToSDK(n,e,r)}catch(e){console.error("上报事件到".concat(n.name,"失败:"),e)}})}},{key:"reportPageView",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPageViewToSDK(r,t)}catch(e){console.error("上报页面浏览到".concat(r.name,"失败:"),e)}})}},{key:"reportUser",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportUserToSDK(r,t)}catch(e){console.error("上报用户信息到".concat(r.name,"失败:"),e)}})}},{key:"reportPerformance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPerformanceToSDK(r,t)}catch(e){console.error("上报性能指标到".concat(r.name,"失败:"),e)}})}},{key:"reportToSDK",value:function(e,t,r){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent",t,JSON.stringify(r)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track",t,r]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track(t,r);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat(t,r);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event",t,r);break;case"custom":e.instance&&"function"==typeof e.instance.track&&e.instance.track(t,r);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPageViewToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackPageview",t.url||window.location.href]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["trackPageview",t.url||window.location.href]);break;case"sensors":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t);break;case"tencent":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t.url||window.location.href);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("config",e.config.measurementId,{page_title:t.title||document.title,page_location:t.url||window.location.href});break;case"custom":e.instance&&"function"==typeof e.instance.trackPageview&&e.instance.trackPageview(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportUserToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&(e.instance.push(["_setUserTag","userId",t.userId]),e.instance.push(["_setUserTag","userType",t.userType]));break;case"umeng":e.instance&&e.instance.push&&(e.instance.push(["setUserTag","userId",t.userId]),e.instance.push(["setUserTag","userType",t.userType]));break;case"sensors":e.instance&&e.instance.setProfile&&e.instance.setProfile(t);break;case"tencent":e.instance&&e.instance.setUserInfo&&e.instance.setUserInfo(t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("set","user_id",t.userId);break;case"custom":e.instance&&"function"==typeof e.instance.setUser&&e.instance.setUser(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPerformanceToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent","performance",JSON.stringify(t)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track","performance",t]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track("performance",t);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat("performance",t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event","performance",t);break;case"custom":e.instance&&"function"==typeof e.instance.trackPerformance&&e.instance.trackPerformance(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"isSDKIntegrated",value:function(e){return!!this.integratedSDKs[e]}},{key:"getIntegratedSDKs",value:function(){return Object.keys(this.integratedSDKs)}},{key:"getSDKInstance",value:function(e){var t;return(null===(t=this.integratedSDKs[e])||void 0===t?void 0:t.instance)||null}},{key:"destroy",value:function(){Object.values(this.integratedSDKs).forEach(function(e){try{e.instance&&"function"==typeof e.instance.destroy&&e.instance.destroy()}catch(t){console.error("销毁".concat(e.name,"失败:"),t)}}),this.integratedSDKs={},this.isInitialized=!1}}])}(),ii=function(){return f(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),this.config={appId:t.appId||"",appVersion:t.appVersion||"1.0.0",environment:t.environment||"production",debugSwitch:!0===t.debugSwitch,customerId:t.customerId||"",userId:t.userId||"",deviceNo:t.deviceNo||"",deviceId:t.userId||"",uiVersion:t.uiVersion||"",sessionId:t.sessionId||zn(),reportUrl:t.reportUrl||"",reportInterval:t.reportInterval||5e3,maxQueueSize:t.maxQueueSize||100,enableErrorTracking:!1!==t.enableErrorTracking,enableUnhandledRejection:!1!==t.enableUnhandledRejection,enableResourceError:!1!==t.enableResourceError,enableEventTracking:!1!==t.enableEventTracking,enableClickTracking:!1!==t.enableClickTracking,enablePageViewTracking:!1!==t.enablePageViewTracking,enablePerformanceTracking:!1!==t.enablePerformanceTracking,enableResourceTracking:!1!==t.enableResourceTracking,enableApiTracking:!1!==t.enableApiTracking,enableInteractionTracking:!1!==t.enableInteractionTracking,enableRouteTracking:!1!==t.enableRouteTracking,enableUserInteractionTracking:!1!==t.enableUserInteractionTracking,enableFormTracking:!1!==t.enableFormTracking,enableScrollTracking:!1!==t.enableScrollTracking,enableMouseTracking:!1!==t.enableMouseTracking,enableKeyboardTracking:!1!==t.enableKeyboardTracking,thirdPartyConfig:t.thirdPartyConfig||{},user:t.user||null,customReport:t.customReport||null},this.user=null},[{key:"updateConfig",value:function(e){this.config=m(m({},this.config),e)}},{key:"setUser",value:function(e){this.user=e}},{key:"getConfig",value:function(){return this.config}},{key:"getUser",value:function(){return this.user}},{key:"getReportUrl",value:function(){return this.config.reportUrl}},{key:"getThirdPartyConfig",value:function(){return this.config.thirdPartyConfig}},{key:"isErrorTrackingEnabled",value:function(){return this.config.enableErrorTracking}},{key:"isEventTrackingEnabled",value:function(){return this.config.enableEventTracking}},{key:"getConfigSessionId",value:function(){return this.config.sessionId}}])}();"undefined"==typeof window||null!==(qn=window)&&void 0!==qn&&qn.axios||(window.axios=Wt);var oi=function(){return f(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),this.config=new ii(t),this.errorTracker=new Yn(this.config),this.eventTracker=new Zn(this.config),this.performanceTracker=new ei(this.config,this.eventTracker),this.userBehaviorTracker=new ti(this.config),this.exposureTracker=new ri(this.config,this.eventTracker),this.thirdPartyIntegrator=new ni(this.config),this.init()},[{key:"init",value:function(){this.eventTracker.init(),this.exposureTracker.init(),this.thirdPartyIntegrator.init(),console.log("Frontend SDK 初始化完成")}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errorTracker.reportError(e,t)}},{key:"reportEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventTracker.reportEvent(e,t)}},{key:"getPreviousPageInfo",value:function(){return this.eventTracker.getPreviousPageInfo()}},{key:"getCurrentPageStayTime",value:function(){return this.eventTracker.getCurrentPageStayTime()}},{key:"getPageHistory",value:function(){return this.eventTracker.pageHistory||[]}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.performanceTracker.reportPerformance(e)}},{key:"reportBehavior",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.userBehaviorTracker.reportCustomBehavior(e,t)}},{key:"setUser",value:function(e){this.config.setUser(e),this.thirdPartyIntegrator.reportUser(e)}},{key:"setConfig",value:function(e){this.config.updateConfig(e)}},{key:"getPerformanceMetrics",value:function(){return this.performanceTracker.getCurrentMetrics()}},{key:"getBehaviorData",value:function(){return this.userBehaviorTracker.getCurrentBehaviors()}},{key:"getSessionId",value:function(){return this.config.getConfigSessionId()}},{key:"isThirdPartySDKIntegrated",value:function(e){return this.thirdPartyIntegrator.isSDKIntegrated(e)}},{key:"getIntegratedThirdPartySDKs",value:function(){return this.thirdPartyIntegrator.getIntegratedSDKs()}},{key:"setupVueRouterMonitoring",value:function(e){e?this.config.config.enableRouteTracking&&this.performanceTracker.setupVueRouterMonitoring(e):console.warn("Vue Router 实例未提供")}},{key:"getCurrentRoute",value:function(){return this.performanceTracker.getCurrentRoute()}},{key:"getRouteHistory",value:function(){return this.performanceTracker.getRouteHistory()}},{key:"getCurrentRouteStayTime",value:function(){return this.performanceTracker.getCurrentPageStayTime()}},{key:"getRoutePerformanceStats",value:function(){return this.performanceTracker.getRoutePerformanceStats()}},{key:"trackProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProduct(e,t)}},{key:"trackProducts",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProducts(e,t)}},{key:"untrackProduct",value:function(e){return this.exposureTracker.untrackProduct(e)}},{key:"untrackAllProducts",value:function(){return this.exposureTracker.untrackAll()}},{key:"reportExposure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.exposureTracker.reportExposure(e)}},{key:"getTrackedProducts",value:function(){return this.exposureTracker.getTrackedElements()}},{key:"getExposureQueue",value:function(){return this.exposureTracker.getExposureQueue()}},{key:"flushExposureQueue",value:function(){return this.exposureTracker.flushExposureQueue()}},{key:"destroy",value:function(){this.errorTracker.destroy(),this.eventTracker.destroy(),this.performanceTracker.destroy(),this.userBehaviorTracker.destroy(),this.exposureTracker.destroy(),this.thirdPartyIntegrator.destroy(),console.log("Frontend SDK 已销毁")}}])}();export{oi as default,Bn as performanceNow};
3
+ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(r,n,i,o){var u=n&&n.prototype instanceof s?n:s,c=Object.create(u.prototype);return y(c,"_invoke",function(r,n,i){var o,s,u,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return o=t,s=0,u=e,h.n=r,a}};function d(r,n){for(s=r,u=n,t=0;!f&&c&&!i&&t<l.length;t++){var i,o=l[t],d=h.p,p=o[2];r>3?(i=p===n)&&(u=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=d&&((i=r<2&&d<o[1])?(s=0,h.v=n,h.n=o[1]):d<p&&(i=r<3||o[0]>n||n>p)&&(o[4]=r,o[5]=n,h.n=p,s=0))}if(i||r>1)return a;throw f=!0,n}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),s=l,u=p;(t=s<2?e:u)||!f;){o||(s?s<3?(s>1&&(h.n=-1),d(s,u)):h.n=u:h.v=u);try{if(c=2,o){if(s||(i="next"),t=o[i]){if(!(t=t.call(o,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),s=1);o=e}else if((t=(f=h.n<0)?u:r.call(n,h))!==a)break}catch(t){o=e,s=1,u=t}finally{c=1}}return{value:t,done:f}}}(r,i,o),!0),c}var a={};function s(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(y(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,y(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,y(f,"constructor",c),y(c,"constructor",u),u.displayName="GeneratorFunction",y(c,i,"GeneratorFunction"),y(f),y(f,i,"Generator"),y(f,n,function(){return this}),y(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:h}})()}function y(e,t,r,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}y=function(e,t,r,n){function o(t,r){y(e,t,function(e){return this._invoke(t,r,e)})}t?i?i(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},y(e,t,r,n)}function b(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function k(e,t){return r(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||P(e,t)||g()}function T(e){return function(e){if(Array.isArray(e))return t(e)}(e)||p(e)||P(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function P(e,r){if(e){if("string"==typeof e)return t(e,r);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}function x(e){return function(){return new R(e.apply(this,arguments))}}function R(t){var r,n;function i(r,n){try{var a=t[r](n),s=a.value,u=s instanceof e;Promise.resolve(u?s.v:s).then(function(e){if(u){var n="return"===r?"return":"next";if(!s.k||e.done)return i(n,e);e=t[n](e).value}o(a.done?"return":"normal",e)},function(e){i("throw",e)})}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":r.resolve({value:t,done:!0});break;case"throw":r.reject(t);break;default:r.resolve({value:t,done:!1})}(r=r.next)?i(r.key,r.arg):n=null}this._invoke=function(e,t){return new Promise(function(o,a){var s={key:e,arg:t,resolve:o,reject:a,next:null};n?n=n.next=s:(r=n=s,i(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}function C(e,t){return function(){return e.apply(t,arguments)}}R.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},R.prototype.next=function(e){return this._invoke("next",e)},R.prototype.throw=function(e){return this._invoke("throw",e)},R.prototype.return=function(e){return this._invoke("return",e)};var O,I=Object.prototype.toString,A=Object.getPrototypeOf,D=Symbol.iterator,_=Symbol.toStringTag,N=(O=Object.create(null),function(e){var t=I.call(e);return O[t]||(O[t]=t.slice(8,-1).toLowerCase())}),L=function(e){return e=e.toLowerCase(),function(t){return N(t)===e}},j=function(e){return function(t){return E(t)===e}},U=Array.isArray,F=j("undefined");function B(e){return null!==e&&!F(e)&&null!==e.constructor&&!F(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var M=L("ArrayBuffer");var z=j("string"),H=j("function"),V=j("number"),q=function(e){return null!==e&&"object"===E(e)},K=function(e){if("object"!==N(e))return!1;var t=A(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||_ in e||D in e)},Q=L("Date"),W=L("File"),J=L("Blob"),G=L("FileList"),X=L("URLSearchParams"),$=k(["ReadableStream","Request","Response","Headers"].map(L),4),Y=$[0],Z=$[1],ee=$[2],te=$[3];function re(e,t){var r,n,i=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).allOwnKeys,o=void 0!==i&&i;if(null!=e)if("object"!==E(e)&&(e=[e]),U(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{if(B(e))return;var a,s=o?Object.getOwnPropertyNames(e):Object.keys(e),u=s.length;for(r=0;r<u;r++)a=s[r],t.call(null,e[a],a,e)}}function ne(e,t){if(B(e))return null;t=t.toLowerCase();for(var r,n=Object.keys(e),i=n.length;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}var ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,oe=function(e){return!F(e)&&e!==ie};var ae,se=(ae="undefined"!=typeof Uint8Array&&A(Uint8Array),function(e){return ae&&e instanceof ae}),ue=L("HTMLFormElement"),ce=function(){var e=Object.prototype.hasOwnProperty;return function(t,r){return e.call(t,r)}}(),le=L("RegExp"),fe=function(e,t){var r=Object.getOwnPropertyDescriptors(e),n={};re(r,function(r,i){var o;!1!==(o=t(r,i,e))&&(n[i]=o||r)}),Object.defineProperties(e,n)};var he,de,pe,ge,ve=L("AsyncFunction"),me=(he="function"==typeof setImmediate,de=H(ie.postMessage),he?setImmediate:de?(pe="axios@".concat(Math.random()),ge=[],ie.addEventListener("message",function(e){var t=e.source,r=e.data;t===ie&&r===pe&&ge.length&&ge.shift()()},!1),function(e){ge.push(e),ie.postMessage(pe,"*")}):function(e){return setTimeout(e)}),we="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ie):"undefined"!=typeof process&&process.nextTick||me,ye={isArray:U,isArrayBuffer:M,isBuffer:B,isFormData:function(e){var t;return e&&("function"==typeof FormData&&e instanceof FormData||H(e.append)&&("formdata"===(t=N(e))||"object"===t&&H(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&M(e.buffer)},isString:z,isNumber:V,isBoolean:function(e){return!0===e||!1===e},isObject:q,isPlainObject:K,isEmptyObject:function(e){if(!q(e)||B(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:Y,isRequest:Z,isResponse:ee,isHeaders:te,isUndefined:F,isDate:Q,isFile:W,isBlob:J,isRegExp:le,isFunction:H,isStream:function(e){return q(e)&&H(e.pipe)},isURLSearchParams:X,isTypedArray:se,isFileList:G,forEach:re,merge:function e(){for(var t=(oe(this)&&this||{}).caseless,r={},n=function(n,i){var o=t&&ne(r,i)||i;K(r[o])&&K(n)?r[o]=e(r[o],n):K(n)?r[o]=e({},n):U(n)?r[o]=n.slice():r[o]=n},i=0,o=arguments.length;i<o;i++)arguments[i]&&re(arguments[i],n);return r},extend:function(e,t,r){return re(t,function(t,n){r&&H(t)?e[n]=C(t,r):e[n]=t},{allOwnKeys:(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).allOwnKeys}),e},trim:function(e){return e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,r,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:function(e,t,r,n){var i,o,a,s={};if(t=t||{},null==e)return t;do{for(o=(i=Object.getOwnPropertyNames(e)).length;o-- >0;)a=i[o],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&A(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:N,kindOfTest:L,endsWith:function(e,t,r){e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;var n=e.indexOf(t,r);return-1!==n&&n===r},toArray:function(e){if(!e)return null;if(U(e))return e;var t=e.length;if(!V(t))return null;for(var r=new Array(t);t-- >0;)r[t]=e[t];return r},forEachEntry:function(e,t){for(var r,n=(e&&e[D]).call(e);(r=n.next())&&!r.done;){var i=r.value;t.call(e,i[0],i[1])}},matchAll:function(e,t){for(var r,n=[];null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:ue,hasOwnProperty:ce,hasOwnProp:ce,reduceDescriptors:fe,freezeMethods:function(e){fe(e,function(t,r){if(H(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;var n=e[r];H(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=function(){throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:function(e,t){var r={},n=function(e){e.forEach(function(e){r[e]=!0})};return U(e)?n(e):n(String(e).split(t)),r},toCamelCase:function(e){return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})},noop:function(){},toFiniteNumber:function(e,t){return null!=e&&Number.isFinite(e=+e)?e:t},findKey:ne,global:ie,isContextDefined:oe,isSpecCompliantForm:function(e){return!!(e&&H(e.append)&&"FormData"===e[_]&&e[D])},toJSONObject:function(e){var t=new Array(10),r=function(e,n){if(q(e)){if(t.indexOf(e)>=0)return;if(B(e))return e;if(!("toJSON"in e)){t[n]=e;var i=U(e)?[]:{};return re(e,function(e,t){var o=r(e,n+1);!F(o)&&(i[t]=o)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:ve,isThenable:function(e){return e&&(q(e)||H(e))&&H(e.then)&&H(e.catch)},setImmediate:me,asap:we,isIterable:function(e){return null!=e&&H(e[D])}};function be(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}ye.inherits(be,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:ye.toJSONObject(this.config),code:this.code,status:this.status}}});var ke=be.prototype,Te={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(function(e){Te[e]={value:e}}),Object.defineProperties(be,Te),Object.defineProperty(ke,"isAxiosError",{value:!0}),be.from=function(e,t,r,n,i,o){var a=Object.create(ke);return ye.toFlatObject(e,a,function(e){return e!==Error.prototype},function(e){return"isAxiosError"!==e}),be.call(a,e.message,t,r,n,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};function Se(e){return ye.isPlainObject(e)||ye.isArray(e)}function Ee(e){return ye.endsWith(e,"[]")?e.slice(0,-2):e}function Pe(e,t,r){return e?e.concat(t).map(function(e,t){return e=Ee(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}var xe=ye.toFlatObject(ye,{},null,function(e){return/^is[A-Z]/.test(e)});function Re(e,t,r){if(!ye.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;var n=(r=ye.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ye.isUndefined(t[e])})).metaTokens,i=r.visitor||c,o=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&ye.isSpecCompliantForm(t);if(!ye.isFunction(i))throw new TypeError("visitor must be a function");function u(e){if(null===e)return"";if(ye.isDate(e))return e.toISOString();if(ye.isBoolean(e))return e.toString();if(!s&&ye.isBlob(e))throw new be("Blob is not supported. Use a Buffer instead.");return ye.isArrayBuffer(e)||ye.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,r,i){var s=e;if(e&&!i&&"object"===E(e))if(ye.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(ye.isArray(e)&&function(e){return ye.isArray(e)&&!e.some(Se)}(e)||(ye.isFileList(e)||ye.endsWith(r,"[]"))&&(s=ye.toArray(e)))return r=Ee(r),s.forEach(function(e,n){!ye.isUndefined(e)&&null!==e&&t.append(!0===a?Pe([r],n,o):null===a?r:r+"[]",u(e))}),!1;return!!Se(e)||(t.append(Pe(i,r,o),u(e)),!1)}var l=[],f=Object.assign(xe,{defaultVisitor:c,convertValue:u,isVisitable:Se});if(!ye.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!ye.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),ye.forEach(r,function(r,o){!0===(!(ye.isUndefined(r)||null===r)&&i.call(t,r,ye.isString(o)?o.trim():o,n,f))&&e(r,n?n.concat(o):[o])}),l.pop()}}(e),t}function Ce(e){var t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Oe(e,t){this._pairs=[],e&&Re(e,this,t)}var Ie=Oe.prototype;function Ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function De(e,t,r){if(!t)return e;var n=r&&r.encode||Ae;ye.isFunction(r)&&(r={serialize:r});var i,o=r&&r.serialize;if(i=o?o(t,r):ye.isURLSearchParams(t)?t.toString():new Oe(t,r).toString(n)){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ie.append=function(e,t){this._pairs.push([e,t])},Ie.toString=function(e){var t=e?function(t){return e.call(this,t,Ce)}:Ce;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var _e=function(){return f(function e(){c(this,e),this.handlers=[]},[{key:"use",value:function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}},{key:"eject",value:function(e){this.handlers[e]&&(this.handlers[e]=null)}},{key:"clear",value:function(){this.handlers&&(this.handlers=[])}},{key:"forEach",value:function(e){ye.forEach(this.handlers,function(t){null!==t&&e(t)})}}])}(),Ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Le={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Oe,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},je="undefined"!=typeof window&&"undefined"!=typeof document,Ue="object"===("undefined"==typeof navigator?"undefined":E(navigator))&&navigator||void 0,Fe=je&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),Be="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Me=je&&window.location.href||"http://localhost",ze=m(m({},Object.freeze({__proto__:null,hasBrowserEnv:je,hasStandardBrowserWebWorkerEnv:Be,hasStandardBrowserEnv:Fe,navigator:Ue,origin:Me})),Le);function He(e){function t(e,r,n,i){var o=e[i++];if("__proto__"===o)return!0;var a=Number.isFinite(+o),s=i>=e.length;return o=!o&&ye.isArray(n)?n.length:o,s?(ye.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!a):(n[o]&&ye.isObject(n[o])||(n[o]=[]),t(e,r,n[o],i)&&ye.isArray(n[o])&&(n[o]=function(e){var t,r,n={},i=Object.keys(e),o=i.length;for(t=0;t<o;t++)n[r=i[t]]=e[r];return n}(n[o])),!a)}if(ye.isFormData(e)&&ye.isFunction(e.entries)){var r={};return ye.forEachEntry(e,function(e,n){t(function(e){return ye.matchAll(/\w+|\[(\w*)]/g,e).map(function(e){return"[]"===e[0]?"":e[1]||e[0]})}(e),n,r,0)}),r}return null}var Ve={transitional:Ne,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){var r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=ye.isObject(e);if(o&&ye.isHTMLForm(e)&&(e=new FormData(e)),ye.isFormData(e))return i?JSON.stringify(He(e)):e;if(ye.isArrayBuffer(e)||ye.isBuffer(e)||ye.isStream(e)||ye.isFile(e)||ye.isBlob(e)||ye.isReadableStream(e))return e;if(ye.isArrayBufferView(e))return e.buffer;if(ye.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Re(e,new ze.classes.URLSearchParams,m({visitor:function(e,t,r,n){return ze.isNode&&ye.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((r=ye.isFileList(e))||n.indexOf("multipart/form-data")>-1){var a=this.env&&this.env.FormData;return Re(r?{"files[]":e}:e,a&&new a,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),function(e,t,r){if(ye.isString(e))try{return(t||JSON.parse)(e),ye.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Ve.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(ye.isResponse(e)||ye.isReadableStream(e))return e;if(e&&ye.isString(e)&&(r&&!this.responseType||n)){var i=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw be.from(e,be.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ze.classes.FormData,Blob:ze.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ye.forEach(["delete","get","head","post","put","patch"],function(e){Ve.headers[e]={}});var qe=Ve,Ke=ye.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Qe=Symbol("internals");function We(e){return e&&String(e).trim().toLowerCase()}function Je(e){return!1===e||null==e?e:ye.isArray(e)?e.map(Je):String(e)}function Ge(e,t,r,n,i){return ye.isFunction(n)?n.call(this,t,r):(i&&(t=r),ye.isString(t)?ye.isString(n)?-1!==t.indexOf(n):ye.isRegExp(n)?n.test(t):void 0:void 0)}var Xe=function(){return f(function e(t){c(this,e),t&&this.set(t)},[{key:"set",value:function(e,t,r){var n=this;function i(e,t,r){var i=We(t);if(!i)throw new Error("header name must be a non-empty string");var o=ye.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||t]=Je(e))}var o=function(e,t){return ye.forEach(e,function(e,r){return i(e,r,t)})};if(ye.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(ye.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))o(function(e){var t,r,n,i={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||i[t]&&Ke[t]||("set-cookie"===t?i[t]?i[t].push(r):i[t]=[r]:i[t]=i[t]?i[t]+", "+r:r)}),i}(e),t);else if(ye.isObject(e)&&ye.isIterable(e)){var a,s,u,c={},l=h(e);try{for(l.s();!(u=l.n()).done;){var f=u.value;if(!ye.isArray(f))throw TypeError("Object iterator must return a key-value pair");c[s=f[0]]=(a=c[s])?ye.isArray(a)?[].concat(T(a),[f[1]]):[a,f[1]]:f[1]}}catch(e){l.e(e)}finally{l.f()}o(c,t)}else null!=e&&i(t,e,r);return this}},{key:"get",value:function(e,t){if(e=We(e)){var r=ye.findKey(this,e);if(r){var n=this[r];if(!t)return n;if(!0===t)return function(e){for(var t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;t=n.exec(e);)r[t[1]]=t[2];return r}(n);if(ye.isFunction(t))return t.call(this,n,r);if(ye.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}},{key:"has",value:function(e,t){if(e=We(e)){var r=ye.findKey(this,e);return!(!r||void 0===this[r]||t&&!Ge(0,this[r],r,t))}return!1}},{key:"delete",value:function(e,t){var r=this,n=!1;function i(e){if(e=We(e)){var i=ye.findKey(r,e);!i||t&&!Ge(0,r[i],i,t)||(delete r[i],n=!0)}}return ye.isArray(e)?e.forEach(i):i(e),n}},{key:"clear",value:function(e){for(var t=Object.keys(this),r=t.length,n=!1;r--;){var i=t[r];e&&!Ge(0,this[i],i,e,!0)||(delete this[i],n=!0)}return n}},{key:"normalize",value:function(e){var t=this,r={};return ye.forEach(this,function(n,i){var o=ye.findKey(r,i);if(o)return t[o]=Je(n),void delete t[i];var a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r})}(i):String(i).trim();a!==i&&delete t[i],t[a]=Je(n),r[a]=!0}),this}},{key:"concat",value:function(){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return(e=this.constructor).concat.apply(e,[this].concat(r))}},{key:"toJSON",value:function(e){var t=Object.create(null);return ye.forEach(this,function(r,n){null!=r&&!1!==r&&(t[n]=e&&ye.isArray(r)?r.join(", "):r)}),t}},{key:Symbol.iterator,value:function(){return Object.entries(this.toJSON())[Symbol.iterator]()}},{key:"toString",value:function(){return Object.entries(this.toJSON()).map(function(e){var t=k(e,2);return t[0]+": "+t[1]}).join("\n")}},{key:"getSetCookie",value:function(){return this.get("set-cookie")||[]}},{key:Symbol.toStringTag,get:function(){return"AxiosHeaders"}}],[{key:"from",value:function(e){return e instanceof this?e:new this(e)}},{key:"concat",value:function(e){for(var t=new this(e),r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.forEach(function(e){return t.set(e)}),t}},{key:"accessor",value:function(e){var t=(this[Qe]=this[Qe]={accessors:{}}).accessors,r=this.prototype;function n(e){var n=We(e);t[n]||(!function(e,t){var r=ye.toCamelCase(" "+t);["get","set","has"].forEach(function(n){Object.defineProperty(e,n+r,{value:function(e,r,i){return this[n].call(this,t,e,r,i)},configurable:!0})})}(r,e),t[n]=!0)}return ye.isArray(e)?e.forEach(n):n(e),this}}])}();Xe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ye.reduceDescriptors(Xe.prototype,function(e,t){var r=e.value,n=t[0].toUpperCase()+t.slice(1);return{get:function(){return r},set:function(e){this[n]=e}}}),ye.freezeMethods(Xe);var $e=Xe;function Ye(e,t){var r=this||qe,n=t||r,i=$e.from(n.headers),o=n.data;return ye.forEach(e,function(e){o=e.call(r,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ze(e){return!(!e||!e.__CANCEL__)}function et(e,t,r){be.call(this,null==e?"canceled":e,be.ERR_CANCELED,t,r),this.name="CanceledError"}function tt(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new be("Request failed with status code "+r.status,[be.ERR_BAD_REQUEST,be.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}ye.inherits(et,be,{__CANCEL__:!0});var rt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,n=0,i=function(e,t){e=e||10;var r,n=new Array(e),i=new Array(e),o=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=i[a];r||(r=u),n[o]=s,i[o]=u;for(var l=a,f=0;l!==o;)f+=n[l++],l%=e;if((o=(o+1)%e)===a&&(a=(a+1)%e),!(u-r<t)){var h=c&&u-c;return h?Math.round(1e3*f/h):void 0}}}(50,250);return function(e,t){var r,n,i=0,o=1e3/t,a=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();i=o,r=null,n&&(clearTimeout(n),n=null),e.apply(void 0,T(t))};return[function(){for(var e=Date.now(),t=e-i,s=arguments.length,u=new Array(s),c=0;c<s;c++)u[c]=arguments[c];t>=o?a(u,e):(r=u,n||(n=setTimeout(function(){n=null,a(r)},o-t)))},function(){return r&&a(r)}]}(function(r){var o=r.loaded,a=r.lengthComputable?r.total:void 0,s=o-n,u=i(s);n=o;var c=d({loaded:o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:r,lengthComputable:null!=a},t?"download":"upload",!0);e(c)},r)},nt=function(e,t){var r=null!=e;return[function(n){return t[0]({lengthComputable:r,total:e,loaded:n})},t[1]]},it=function(e){return function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return ye.asap(function(){return e.apply(void 0,r)})}},ot=ze.hasStandardBrowserEnv?function(e,t){return function(r){return r=new URL(r,ze.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)}}(new URL(ze.origin),ze.navigator&&/(msie|trident)/i.test(ze.navigator.userAgent)):function(){return!0},at=ze.hasStandardBrowserEnv?{write:function(e,t,r,n,i,o){var a=[e+"="+encodeURIComponent(t)];ye.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),ye.isString(n)&&a.push("path="+n),ye.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function st(e,t,r){var n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var ut=function(e){return e instanceof $e?m({},e):e};function ct(e,t){t=t||{};var r={};function n(e,t,r,n){return ye.isPlainObject(e)&&ye.isPlainObject(t)?ye.merge.call({caseless:n},e,t):ye.isPlainObject(t)?ye.merge({},t):ye.isArray(t)?t.slice():t}function i(e,t,r,i){return ye.isUndefined(t)?ye.isUndefined(e)?void 0:n(void 0,e,0,i):n(e,t,0,i)}function o(e,t){if(!ye.isUndefined(t))return n(void 0,t)}function a(e,t){return ye.isUndefined(t)?ye.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,o){return o in t?n(r,i):o in e?n(void 0,r):void 0}var u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:function(e,t,r){return i(ut(e),ut(t),0,!0)}};return ye.forEach(Object.keys(m(m({},e),t)),function(n){var o=u[n]||i,a=o(e[n],t[n],n);ye.isUndefined(a)&&o!==s||(r[n]=a)}),r}var lt,ft,ht=function(e){var n,i,o=ct({},e),a=o.data,s=o.withXSRFToken,u=o.xsrfHeaderName,c=o.xsrfCookieName,l=o.headers,f=o.auth;if(o.headers=l=$e.from(l),o.url=De(st(o.baseURL,o.url,o.allowAbsoluteUrls),e.params,e.paramsSerializer),f&&l.set("Authorization","Basic "+btoa((f.username||"")+":"+(f.password?unescape(encodeURIComponent(f.password)):""))),ye.isFormData(a))if(ze.hasStandardBrowserEnv||ze.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(!1!==(n=l.getContentType())){var h=n?n.split(";").map(function(e){return e.trim()}).filter(Boolean):[],d=r(i=h)||p(i)||P(i)||g(),v=d[0],m=t(d).slice(1);l.setContentType([v||"multipart/form-data"].concat(T(m)).join("; "))}if(ze.hasStandardBrowserEnv&&(s&&ye.isFunction(s)&&(s=s(o)),s||!1!==s&&ot(o.url))){var w=u&&c&&at.read(c);w&&l.set(u,w)}return o},dt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n,i,o,a,s,u=ht(e),c=u.data,l=$e.from(u.headers).normalize(),f=u.responseType,h=u.onUploadProgress,d=u.onDownloadProgress;function p(){a&&a(),s&&s(),u.cancelToken&&u.cancelToken.unsubscribe(n),u.signal&&u.signal.removeEventListener("abort",n)}var g=new XMLHttpRequest;function v(){if(g){var n=$e.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());tt(function(e){t(e),p()},function(e){r(e),p()},{data:f&&"text"!==f&&"json"!==f?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}}if(g.open(u.method.toUpperCase(),u.url,!0),g.timeout=u.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(r(new be("Request aborted",be.ECONNABORTED,e,g)),g=null)},g.onerror=function(){r(new be("Network Error",be.ERR_NETWORK,e,g)),g=null},g.ontimeout=function(){var t=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded",n=u.transitional||Ne;u.timeoutErrorMessage&&(t=u.timeoutErrorMessage),r(new be(t,n.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,g)),g=null},void 0===c&&l.setContentType(null),"setRequestHeader"in g&&ye.forEach(l.toJSON(),function(e,t){g.setRequestHeader(t,e)}),ye.isUndefined(u.withCredentials)||(g.withCredentials=!!u.withCredentials),f&&"json"!==f&&(g.responseType=u.responseType),d){var m=k(rt(d,!0),2);o=m[0],s=m[1],g.addEventListener("progress",o)}if(h&&g.upload){var w=k(rt(h),2);i=w[0],a=w[1],g.upload.addEventListener("progress",i),g.upload.addEventListener("loadend",a)}(u.cancelToken||u.signal)&&(n=function(t){g&&(r(!t||t.type?new et(null,e,g):t),g.abort(),g=null)},u.cancelToken&&u.cancelToken.subscribe(n),u.signal&&(u.signal.aborted?n():u.signal.addEventListener("abort",n)));var y,b,T=(y=u.url,(b=/^([-+\w]{1,25})(:?\/\/|:)/.exec(y))&&b[1]||"");T&&-1===ze.protocols.indexOf(T)?r(new be("Unsupported protocol "+T+":",be.ERR_BAD_REQUEST,e)):g.send(c||null)})},pt=function(e,t){var r=(e=e?e.filter(Boolean):[]).length;if(t||r){var n,i=new AbortController,o=function(e){if(!n){n=!0,s();var t=e instanceof Error?e:this.reason;i.abort(t instanceof be?t:new et(t instanceof Error?t.message:t))}},a=t&&setTimeout(function(){a=null,o(new be("timeout ".concat(t," of ms exceeded"),be.ETIMEDOUT))},t),s=function(){e&&(a&&clearTimeout(a),a=null,e.forEach(function(e){e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(function(e){return e.addEventListener("abort",o)});var u=i.signal;return u.unsubscribe=function(){return ye.asap(s)},u}},gt=w().m(function e(t,r){var n,i,o;return w().w(function(e){for(;;)switch(e.n){case 0:if(n=t.byteLength,r&&!(n<r)){e.n=2;break}return e.n=1,t;case 1:return e.a(2);case 2:i=0;case 3:if(!(i<n)){e.n=5;break}return o=i+r,e.n=4,t.slice(i,o);case 4:i=o,e.n=3;break;case 5:return e.a(2)}},e)}),vt=function(){var e=x(w().m(function e(t,r){var o,a,s,c,l,f,h;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:o=!1,a=!1,e.p=1,c=i(mt(t));case 2:return e.n=3,u(c.next());case 3:if(!(o=!(l=e.v).done)){e.n=5;break}return f=l.value,e.d(b(n(i(gt(f,r)))),4);case 4:o=!1,e.n=2;break;case 5:e.n=7;break;case 6:e.p=6,h=e.v,a=!0,s=h;case 7:if(e.p=7,e.p=8,!o||null==c.return){e.n=9;break}return e.n=9,u(c.return());case 9:if(e.p=9,!a){e.n=10;break}throw s;case 10:return e.f(9);case 11:return e.f(7);case 12:return e.a(2)}},e,null,[[8,,9,11],[1,6,7,12]])}));return function(t,r){return e.apply(this,arguments)}}(),mt=function(){var e=x(w().m(function e(t){var r,o,a,s;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(!t[Symbol.asyncIterator]){e.n=2;break}return e.d(b(n(i(t))),1);case 1:return e.a(2);case 2:r=t.getReader(),e.p=3;case 4:return e.n=5,u(r.read());case 5:if(o=e.v,a=o.done,s=o.value,!a){e.n=6;break}return e.a(3,8);case 6:return e.n=7,s;case 7:e.n=4;break;case 8:return e.p=8,e.n=9,u(r.cancel());case 9:return e.f(8);case 10:return e.a(2)}},e,null,[[3,,8,10]])}));return function(t){return e.apply(this,arguments)}}(),wt=function(e,t,r,n){var i,o=vt(e,t),a=0,u=function(e){i||(i=!0,n&&n(e))};return new ReadableStream({pull:function(e){return s(w().m(function t(){var n,i,s,c,l,f;return w().w(function(t){for(;;)switch(t.p=t.n){case 0:return t.p=0,t.n=1,o.next();case 1:if(n=t.v,i=n.done,s=n.value,!i){t.n=2;break}return u(),e.close(),t.a(2);case 2:c=s.byteLength,r&&(l=a+=c,r(l)),e.enqueue(new Uint8Array(s)),t.n=4;break;case 3:throw t.p=3,f=t.v,u(f),f;case 4:return t.a(2)}},t,null,[[0,3]])}))()},cancel:function(e){return u(e),o.return()}},{highWaterMark:2})},yt="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,bt=yt&&"function"==typeof ReadableStream,kt=yt&&("function"==typeof TextEncoder?(lt=new TextEncoder,function(e){return lt.encode(e)}):function(){var e=s(w().m(function e(t){var r,n;return w().w(function(e){for(;;)switch(e.n){case 0:return r=Uint8Array,e.n=1,new Response(t).arrayBuffer();case 1:return n=e.v,e.a(2,new r(n))}},e)}));return function(t){return e.apply(this,arguments)}}()),Tt=function(e){try{for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return!!e.apply(void 0,r)}catch(e){return!1}},St=bt&&Tt(function(){var e=!1,t=new Request(ze.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Et=bt&&Tt(function(){return ye.isReadableStream(new Response("").body)}),Pt={stream:Et&&function(e){return e.body}};yt&&(ft=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(function(e){!Pt[e]&&(Pt[e]=ye.isFunction(ft[e])?function(t){return t[e]()}:function(t,r){throw new be("Response type '".concat(e,"' is not supported"),be.ERR_NOT_SUPPORT,r)})}));var xt=function(){var e=s(w().m(function e(t){var r;return w().w(function(e){for(;;)switch(e.n){case 0:if(null!=t){e.n=1;break}return e.a(2,0);case 1:if(!ye.isBlob(t)){e.n=2;break}return e.a(2,t.size);case 2:if(!ye.isSpecCompliantForm(t)){e.n=4;break}return r=new Request(ze.origin,{method:"POST",body:t}),e.n=3,r.arrayBuffer();case 3:case 6:return e.a(2,e.v.byteLength);case 4:if(!ye.isArrayBufferView(t)&&!ye.isArrayBuffer(t)){e.n=5;break}return e.a(2,t.byteLength);case 5:if(ye.isURLSearchParams(t)&&(t+=""),!ye.isString(t)){e.n=7;break}return e.n=6,kt(t);case 7:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Rt=function(){var e=s(w().m(function e(t,r){var n;return w().w(function(e){for(;;)if(0===e.n)return n=ye.toFiniteNumber(t.getContentLength()),e.a(2,null==n?xt(r):n)},e)}));return function(t,r){return e.apply(this,arguments)}}(),Ct={http:null,xhr:dt,fetch:yt&&function(){var e=s(w().m(function e(t){var r,n,i,o,a,s,u,c,l,f,h,d,p,g,v,y,b,T,S,E,P,x,R,C,O,I,A,D,_,N,L,j,U,F,B,M,z;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=ht(t),n=r.url,i=r.method,o=r.data,a=r.signal,s=r.cancelToken,u=r.timeout,c=r.onDownloadProgress,l=r.onUploadProgress,f=r.responseType,h=r.headers,d=r.withCredentials,p=void 0===d?"same-origin":d,g=r.fetchOptions,f=f?(f+"").toLowerCase():"text",v=pt([a,s&&s.toAbortSignal()],u),b=v&&v.unsubscribe&&function(){v.unsubscribe()},e.p=1,!(B=l&&St&&"get"!==i&&"head"!==i)){e.n=3;break}return e.n=2,Rt(h,o);case 2:M=T=e.v,B=0!==M;case 3:if(!B){e.n=4;break}S=new Request(n,{method:"POST",body:o,duplex:"half"}),ye.isFormData(o)&&(E=S.headers.get("content-type"))&&h.setContentType(E),S.body&&(P=nt(T,rt(it(l))),x=k(P,2),R=x[0],C=x[1],o=wt(S.body,65536,R,C));case 4:return ye.isString(p)||(p=p?"include":"omit"),O="credentials"in Request.prototype,y=new Request(n,m(m({},g),{},{signal:v,method:i.toUpperCase(),headers:h.normalize().toJSON(),body:o,duplex:"half",credentials:O?p:void 0})),e.n=5,fetch(y,g);case 5:return I=e.v,A=Et&&("stream"===f||"response"===f),Et&&(c||A&&b)&&(D={},["status","statusText","headers"].forEach(function(e){D[e]=I[e]}),_=ye.toFiniteNumber(I.headers.get("content-length")),N=c&&nt(_,rt(it(c),!0))||[],L=k(N,2),j=L[0],U=L[1],I=new Response(wt(I.body,65536,j,function(){U&&U(),b&&b()}),D)),f=f||"text",e.n=6,Pt[ye.findKey(Pt,f)||"text"](I,t);case 6:return F=e.v,!A&&b&&b(),e.n=7,new Promise(function(e,r){tt(e,r,{data:F,headers:$e.from(I.headers),status:I.status,statusText:I.statusText,config:t,request:y})});case 7:return e.a(2,e.v);case 8:if(e.p=8,z=e.v,b&&b(),!z||"TypeError"!==z.name||!/Load failed|fetch/i.test(z.message)){e.n=9;break}throw Object.assign(new be("Network Error",be.ERR_NETWORK,t,y),{cause:z.cause||z});case 9:throw be.from(z,z&&z.code,t,y);case 10:return e.a(2)}},e,null,[[1,8]])}));return function(t){return e.apply(this,arguments)}}()};ye.forEach(Ct,function(e,t){if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});var Ot=function(e){return"- ".concat(e)},It=function(e){return ye.isFunction(e)||null===e||!1===e},At=function(e){for(var t,r,n=(e=ye.isArray(e)?e:[e]).length,i={},o=0;o<n;o++){var a=void 0;if(r=t=e[o],!It(t)&&void 0===(r=Ct[(a=String(t)).toLowerCase()]))throw new be("Unknown adapter '".concat(a,"'"));if(r)break;i[a||"#"+o]=r}if(!r){var s=Object.entries(i).map(function(e){var t=k(e,2),r=t[0],n=t[1];return"adapter ".concat(r," ")+(!1===n?"is not supported by the environment":"is not available in the build")});throw new be("There is no suitable adapter to dispatch the request "+(n?s.length>1?"since :\n"+s.map(Ot).join("\n"):" "+Ot(s[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new et(null,e)}function _t(e){return Dt(e),e.headers=$e.from(e.headers),e.data=Ye.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),At(e.adapter||qe.adapter)(e).then(function(t){return Dt(e),t.data=Ye.call(e,e.transformResponse,t),t.headers=$e.from(t.headers),t},function(t){return Ze(t)||(Dt(e),t&&t.response&&(t.response.data=Ye.call(e,e.transformResponse,t.response),t.response.headers=$e.from(t.response.headers))),Promise.reject(t)})}var Nt="1.11.0",Lt={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Lt[e]=function(r){return E(r)===e||"a"+(t<1?"n ":" ")+e}});var jt={};Lt.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Nt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,o){if(!1===e)throw new be(n(i," has been removed"+(t?" in "+t:"")),be.ERR_DEPRECATED);return t&&!jt[i]&&(jt[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,o)}},Lt.spelling=function(e){return function(t,r){return console.warn("".concat(r," is likely a misspelling of ").concat(e)),!0}};var Ut={assertOptions:function(e,t,r){if("object"!==E(e))throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),i=n.length;i-- >0;){var o=n[i],a=t[o];if(a){var s=e[o],u=void 0===s||a(s,o,e);if(!0!==u)throw new be("option "+o+" must be "+u,be.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new be("Unknown option "+o,be.ERR_BAD_OPTION)}},validators:Lt},Ft=Ut.validators,Bt=function(){return f(function e(t){c(this,e),this.defaults=t||{},this.interceptors={request:new _e,response:new _e}},[{key:"request",value:(e=s(w().m(function e(t,r){var n,i,o;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request(t,r);case 1:return e.a(2,e.v);case 2:if(e.p=2,(o=e.v)instanceof Error){n={},Error.captureStackTrace?Error.captureStackTrace(n):n=new Error,i=n.stack?n.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+="\n"+i):o.stack=i}catch(e){}}throw o;case 3:return e.a(2)}},e,this,[[0,2]])})),function(t,r){return e.apply(this,arguments)})},{key:"_request",value:function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};var r=t=ct(this.defaults,t),n=r.transitional,i=r.paramsSerializer,o=r.headers;void 0!==n&&Ut.assertOptions(n,{silentJSONParsing:Ft.transitional(Ft.boolean),forcedJSONParsing:Ft.transitional(Ft.boolean),clarifyTimeoutError:Ft.transitional(Ft.boolean)},!1),null!=i&&(ye.isFunction(i)?t.paramsSerializer={serialize:i}:Ut.assertOptions(i,{encode:Ft.function,serialize:Ft.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Ut.assertOptions(t,{baseUrl:Ft.spelling("baseURL"),withXsrfToken:Ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();var a=o&&ye.merge(o.common,o[t.method]);o&&ye.forEach(["delete","get","head","post","put","patch","common"],function(e){delete o[e]}),t.headers=$e.concat(a,o);var s=[],u=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(u=u&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});var c,l=[];this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});var f,h=0;if(!u){var d=[_t.bind(this),void 0];for(d.unshift.apply(d,s),d.push.apply(d,l),f=d.length,c=Promise.resolve(t);h<f;)c=c.then(d[h++],d[h++]);return c}f=s.length;var p=t;for(h=0;h<f;){var g=s[h++],v=s[h++];try{p=g(p)}catch(e){v.call(this,e);break}}try{c=_t.call(this,p)}catch(e){return Promise.reject(e)}for(h=0,f=l.length;h<f;)c=c.then(l[h++],l[h++]);return c}},{key:"getUri",value:function(e){return De(st((e=ct(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}]);var e}();ye.forEach(["delete","get","head","options"],function(e){Bt.prototype[e]=function(t,r){return this.request(ct(r||{},{method:e,url:t,data:(r||{}).data}))}}),ye.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(ct(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Bt.prototype[e]=t(),Bt.prototype[e+"Form"]=t(!0)});var Mt=Bt,zt=function(){function e(t){if(c(this,e),"function"!=typeof t)throw new TypeError("executor must be a function.");var r;this.promise=new Promise(function(e){r=e});var n=this;this.promise.then(function(e){if(n._listeners){for(var t=n._listeners.length;t-- >0;)n._listeners[t](e);n._listeners=null}}),this.promise.then=function(e){var t,r=new Promise(function(e){n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},t(function(e,t,i){n.reason||(n.reason=new et(e,t,i),r(n.reason))})}return f(e,[{key:"throwIfRequested",value:function(){if(this.reason)throw this.reason}},{key:"subscribe",value:function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}},{key:"unsubscribe",value:function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}}},{key:"toAbortSignal",value:function(){var e=this,t=new AbortController,r=function(e){t.abort(e)};return this.subscribe(r),t.signal.unsubscribe=function(){return e.unsubscribe(r)},t.signal}}],[{key:"source",value:function(){var t;return{token:new e(function(e){t=e}),cancel:t}}}])}(),Ht=zt;var Vt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Vt).forEach(function(e){var t=k(e,2),r=t[0],n=t[1];Vt[n]=r});var qt=Vt;var Kt=function e(t){var r=new Mt(t),n=C(Mt.prototype.request,r);return ye.extend(n,Mt.prototype,r,{allOwnKeys:!0}),ye.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(ct(t,r))},n}(qe);Kt.Axios=Mt,Kt.CanceledError=et,Kt.CancelToken=Ht,Kt.isCancel=Ze,Kt.VERSION=Nt,Kt.toFormData=Re,Kt.AxiosError=be,Kt.Cancel=Kt.CanceledError,Kt.all=function(e){return Promise.all(e)},Kt.spread=function(e){return function(t){return e.apply(null,t)}},Kt.isAxiosError=function(e){return ye.isObject(e)&&!0===e.isAxiosError},Kt.mergeConfig=ct,Kt.AxiosHeaders=$e,Kt.formToJSON=function(e){return He(ye.isHTMLForm(e)?new FormData(e):e)},Kt.getAdapter=At,Kt.HttpStatusCode=qt,Kt.default=Kt;var Qt=Kt;Qt.Axios,Qt.AxiosError,Qt.CanceledError,Qt.isCancel,Qt.CancelToken,Qt.VERSION,Qt.all,Qt.Cancel,Qt.isAxiosError,Qt.spread,Qt.toFormData,Qt.AxiosHeaders,Qt.HttpStatusCode,Qt.formToJSON,Qt.getAdapter,Qt.mergeConfig;var Wt=Qt.create({timeout:1e4,headers:{"Content-Type":"multipart/form-data"}});Wt.interceptors.request.use(function(e){return e},function(e){return Promise.reject(e)}),Wt.interceptors.response.use(function(e){return e},function(e){return Promise.reject(e)});var Jt,Gt="user-agent",Xt="",$t="function",Yt="object",Zt="string",er="undefined",tr="browser",rr="cpu",nr="device",ir="engine",or="os",ar="result",sr="name",ur="type",cr="vendor",lr="version",fr="architecture",hr="major",dr="model",pr="console",gr="mobile",vr="tablet",mr="smarttv",wr="wearable",yr="xr",br="embedded",kr="inapp",Tr="brands",Sr="formFactors",Er="fullVersionList",Pr="platform",xr="platformVersion",Rr="bitness",Cr="sec-ch-ua",Or=Cr+"-full-version-list",Ir=Cr+"-arch",Ar=Cr+"-"+Rr,Dr=Cr+"-form-factors",_r=Cr+"-"+gr,Nr=Cr+"-"+dr,Lr=Cr+"-"+Pr,jr=Lr+"-version",Ur=[Tr,Er,gr,dr,Pr,xr,fr,Sr,Rr],Fr="Amazon",Br="Apple",Mr="ASUS",zr="BlackBerry",Hr="Google",Vr="Huawei",qr="Lenovo",Kr="Honor",Qr="LG",Wr="Microsoft",Jr="Motorola",Gr="Nvidia",Xr="OnePlus",$r="OPPO",Yr="Samsung",Zr="Sharp",en="Sony",tn="Xiaomi",rn="Zebra",nn="Chrome",on="Chromium",an="Chromecast",sn="Edge",un="Firefox",cn="Opera",ln="Facebook",fn="Sogou",hn="Mobile ",dn=" Browser",pn="Windows",gn=("undefined"==typeof window?"undefined":E(window))!==er&&window.navigator?window.navigator:void 0,vn=gn&&gn.userAgentData?gn.userAgentData:void 0,mn=function(e){for(var t={},r=0;r<e.length;r++)t[e[r].toUpperCase()]=e[r];return t},wn=function(e,t){if(E(e)===Yt&&e.length>0){for(var r in e)if(Tn(t)==Tn(e[r]))return!0;return!1}return!!bn(e)&&Tn(t)==Tn(e)},yn=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&yn(e[r])},bn=function(e){return E(e)===Zt},kn=function(e){if(e){for(var t=[],r=Pn(/\\?\"/g,e).split(","),n=0;n<r.length;n++)if(r[n].indexOf(";")>-1){var i=Rn(r[n]).split(";v=");t[n]={brand:i[0],version:i[1]}}else t[n]=Rn(r[n]);return t}},Tn=function(e){return bn(e)?e.toLowerCase():e},Sn=function(e){return bn(e)?Pn(/[^\d\.]/g,e).split(".")[0]:void 0},En=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];E(r)==Yt&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},Pn=function(e,t){return bn(t)?t.replace(e,Xt):t},xn=function(e){return Pn(/\\?\"/g,e)},Rn=function(e,t){return e=Pn(/^\s\s*/,String(e)),E(t)===er?e:e.substring(0,t)},Cn=function(e,t){if(e&&t)for(var r,n,i,o,a,s,u=0;u<t.length&&!a;){var c=t[u],l=t[u+1];for(r=n=0;r<c.length&&!a&&c[r];)if(a=c[r++].exec(e))for(i=0;i<l.length;i++)s=a[++n],E(o=l[i])===Yt&&o.length>0?2===o.length?E(o[1])==$t?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:o.length>=3&&(E(o[1])!==$t||o[1].exec&&o[1].test?3==o.length?this[o[0]]=s?s.replace(o[1],o[2]):void 0:4==o.length?this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=s?o[3].apply(this,[s.replace(o[1],o[2])].concat(o.slice(4))):void 0):o.length>3?this[o[0]]=s?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0):this[o]=s||void 0;u+=2}},On=function(e,t){for(var r in t)if(E(t[r])===Yt&&t[r].length>0){for(var n=0;n<t[r].length;n++)if(wn(t[r][n],e))return"?"===r?void 0:r}else if(wn(t[r],e))return"?"===r?void 0:r;return t.hasOwnProperty("*")?t["*"]:e},In={ME:"4.90","NT 3.51":"3.51","NT 4.0":"4.0",2e3:["5.0","5.01"],XP:["5.1","5.2"],Vista:"6.0",7:"6.1",8:"6.2",8.1:"6.3",10:["6.4","10.0"],NT:""},An={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Dn={Chrome:"Google Chrome",Edge:"Microsoft Edge","Edge WebView2":"Microsoft Edge WebView2","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"},_n={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[lr,[sr,hn+"Chrome"]],[/webview.+edge\/([\w\.]+)/i],[lr,[sr,sn+" WebView"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[lr,[sr,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[sr,lr],[/opios[\/ ]+([\w\.]+)/i],[lr,[sr,cn+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[lr,[sr,cn+" GX"]],[/\bopr\/([\w\.]+)/i],[lr,[sr,cn]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[lr,[sr,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[lr,[sr,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser|palemoon)\/([-\w\.]+)/i,/(heytap|ovi|115|surf|qwant)browser\/([\d\.]+)/i,/(qwant)(?:ios|mobile)\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[sr,lr],[/quark(?:pc)?\/([-\w\.]+)/i],[lr,[sr,"Quark"]],[/\bddg\/([\w\.]+)/i],[lr,[sr,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[lr,[sr,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[lr,[sr,"WeChat"]],[/konqueror\/([\w\.]+)/i],[lr,[sr,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[lr,[sr,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[lr,[sr,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[lr,[sr,"Smart "+qr+dn]],[/(avast|avg)\/([\w\.]+)/i],[[sr,/(.+)/,"$1 Secure"+dn],lr],[/\bfocus\/([\w\.]+)/i],[lr,[sr,un+" Focus"]],[/\bopt\/([\w\.]+)/i],[lr,[sr,cn+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[lr,[sr,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[lr,[sr,"Dolphin"]],[/coast\/([\w\.]+)/i],[lr,[sr,cn+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[lr,[sr,"MIUI"+dn]],[/fxios\/([\w\.-]+)/i],[lr,[sr,hn+un]],[/\bqihoobrowser\/?([\w\.]*)/i],[lr,[sr,"360"]],[/\b(qq)\/([\w\.]+)/i],[[sr,/(.+)/,"$1Browser"],lr],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[sr,/(.+)/,"$1"+dn],lr],[/samsungbrowser\/([\w\.]+)/i],[lr,[sr,Yr+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[lr,[sr,fn+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[sr,fn+" Mobile"],lr],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[sr,lr],[/(lbbrowser|rekonq)/i],[sr],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[lr,sr],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[sr,ln],lr,[ur,kr]],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(bing)(?:web|sapphire)\/([\w\.]+)/i,/(instagram|snapchat|klarna)[\/ ]([-\w\.]+)/i],[sr,lr,[ur,kr]],[/\bgsa\/([\w\.]+) .*safari\//i],[lr,[sr,"GSA"],[ur,kr]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[lr,[sr,"TikTok"],[ur,kr]],[/\[(linkedin)app\]/i],[sr,[ur,kr]],[/(zalo(?:app)?)[\/\sa-z]*([\w\.-]+)/i],[[sr,/(.+)/,"Zalo"],lr,[ur,kr]],[/(chromium)[\/ ]([-\w\.]+)/i],[sr,lr],[/headlesschrome(?:\/([\w\.]+)| )/i],[lr,[sr,nn+" Headless"]],[/wv\).+chrome\/([\w\.]+).+edgw\//i],[lr,[sr,sn+" WebView2"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[sr,nn+" WebView"],lr],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[lr,[sr,"Android"+dn]],[/chrome\/([\w\.]+) mobile/i],[lr,[sr,hn+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[sr,lr],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[lr,[sr,hn+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[sr,hn+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[lr,sr],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[sr,[lr,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[sr,lr],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[sr,hn+un],lr],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[sr,"Netscape"],lr],[/(wolvic|librewolf)\/([\w\.]+)/i],[sr,lr],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[lr,[sr,un+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+(?= .+rv\:.+gecko\/\d+)|[0-4][\w\.]+(?!.+compatible))/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[sr,[lr,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[sr,[lr,/[^\d\.]+./,Xt]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[fr,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[fr,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[fr,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[fr,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[fr,"arm"]],[/ sun4\w[;\)]/i],[[fr,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i,/((ppc|powerpc)(64)?)( mac|;|\))/i,/(?:osf1|[freopnt]{3,4}bsd) (alpha)/i],[[fr,/ower/,Xt,Tn]],[/mc680.0/i],[[fr,"68k"]],[/winnt.+\[axp/i],[[fr,"alpha"]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[dr,[cr,Yr],[ur,vr]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr]|browser)[-\w]+)/i,/sec-(sgh\w+)/i],[dr,[cr,Yr],[ur,gr]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)[\/\);]/i],[dr,[cr,Br],[ur,gr]],[/\b(?:ios|apple\w+)\/.+[\(\/](ipad)/i,/\b(ipad)[\d,]*[;\] ].+(mac |i(pad)?)os/i],[dr,[cr,Br],[ur,vr]],[/(macintosh);/i],[dr,[cr,Br]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[dr,[cr,Zr],[ur,gr]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[dr,[cr,Kr],[ur,vr]],[/honor([-\w ]+)[;\)]/i],[dr,[cr,Kr],[ur,gr]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[dr,[cr,Vr],[ur,vr]],[/(?:huawei) ?([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][\dc][adnt]?)\b(?!.+d\/s)/i],[dr,[cr,Vr],[ur,gr]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b(?:xiao)?((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[dr,/_/g," "],[cr,tn],[ur,vr]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note|max|cc)?[_ ]?(?:\d{0,2}\w?)[_ ]?(?:plus|se|lite|pro)?( 5g|lte)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[dr,/_/g," "],[cr,tn],[ur,gr]],[/droid.+; (cph2[3-6]\d[13579]|((gm|hd)19|(ac|be|in|kb)20|(d[en]|eb|le|mt)21|ne22)[0-2]\d|p[g-k]\w[1m]10)\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[dr,[cr,Xr],[ur,gr]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[dr,[cr,$r],[ur,gr]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[dr,[cr,On,{OnePlus:["203","304","403","404","413","415"],"*":$r}],[ur,vr]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[dr,[cr,"BLU"],[ur,gr]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[dr,[cr,"Vivo"],[ur,gr]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[dr,[cr,"Realme"],[ur,gr]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[dr,[cr,qr],[ur,vr]],[/lenovo[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i],[dr,[cr,qr],[ur,gr]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ]([\w\s]+)(\)| bui)/i,/((?:moto(?! 360)[-\w\(\) ]+|xt\d{3,4}[cgkosw\+]?[-\d]*|nexus 6)(?= bui|\)))/i],[dr,[cr,Jr],[ur,gr]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[dr,[cr,Jr],[ur,vr]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[dr,[cr,Qr],[ur,vr]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch|webos))(\w+)/i,/\blg-?([\d\w]+) bui/i],[dr,[cr,Qr],[ur,gr]],[/(nokia) (t[12][01])/i],[cr,dr,[ur,vr]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*?))( bui|\)|;|\/)/i],[[dr,/_/g," "],[ur,gr],[cr,"Nokia"]],[/(pixel (c|tablet))\b/i],[dr,[cr,Hr],[ur,vr]],[/droid.+;(?: google)? (g(01[13]a|020[aem]|025[jn]|1b60|1f8f|2ybb|4s1m|576d|5nz6|8hhn|8vou|a02099|c15s|d1yq|e2ae|ec77|gh2x|kv4x|p4bc|pj41|r83y|tt9q|ur25|wvk6)|pixel[\d ]*a?( pro)?( xl)?( fold)?( \(5g\))?)( bui|\))/i],[dr,[cr,Hr],[ur,gr]],[/(google) (pixelbook( go)?)/i],[cr,dr],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-\w\w\d\d)(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[dr,[cr,en],[ur,gr]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[dr,"Xperia Tablet"],[cr,en],[ur,vr]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[dr,[cr,Fr],[ur,vr]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[dr,/(.+)/g,"Fire Phone $1"],[cr,Fr],[ur,gr]],[/(playbook);[-\w\),; ]+(rim)/i],[dr,cr,[ur,vr]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/(?:blackberry|\(bb10;) (\w+)/i],[dr,[cr,zr],[ur,gr]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[dr,[cr,Mr],[ur,vr]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[dr,[cr,Mr],[ur,gr]],[/(nexus 9)/i],[dr,[cr,"HTC"],[ur,vr]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[cr,[dr,/_/g," "],[ur,gr]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[dr,[cr,"TCL"],[ur,vr]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[dr,[cr,"TCL"],[ur,gr]],[/(itel) ((\w+))/i],[[cr,Tn],dr,[ur,On,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[dr,[cr,"Acer"],[ur,vr]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[dr,[cr,"Meizu"],[ur,gr]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[dr,[cr,"Ulefone"],[ur,gr]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[dr,[cr,"Energizer"],[ur,gr]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[dr,[cr,"Cat"],[ur,gr]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[dr,[cr,"Smartfren"],[ur,gr]],[/droid.+; (a(in)?(0(15|59|6[35])|142)p?)/i],[dr,[cr,"Nothing"],[ur,gr]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[dr,[cr,"Archos"],[ur,vr]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[dr,[cr,"Archos"],[ur,gr]],[/; (n159v)/i],[dr,[cr,"HMD"],[ur,gr]],[/(imo) (tab \w+)/i,/(infinix|tecno) (x1101b?|p904|dp(7c|8d|10a)( pro)?|p70[1-3]a?|p904|t1101)/i],[cr,dr,[ur,vr]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|infinix|lava|oneplus|tcl|wiko)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(oppo) ?([\w ]+) bui/i,/(hisense) ([ehv][\w ]+)\)/i,/droid[^;]+; (philips)[_ ]([sv-x][\d]{3,4}[xz]?)/i],[cr,dr,[ur,gr]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[cr,dr,[ur,vr]],[/(surface duo)/i],[dr,[cr,Wr],[ur,vr]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[dr,[cr,"Fairphone"],[ur,gr]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[dr,[cr,Gr],[ur,vr]],[/(sprint) (\w+)/i],[cr,dr,[ur,gr]],[/(kin\.[onetw]{3})/i],[[dr,/\./g," "],[cr,Wr],[ur,gr]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[dr,[cr,rn],[ur,vr]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[dr,[cr,rn],[ur,gr]],[/(philips)[\w ]+tv/i,/smart-tv.+(samsung)/i],[cr,[ur,mr]],[/hbbtv.+maple;(\d+)/i],[[dr,/^/,"SmartTV"],[cr,Yr],[ur,mr]],[/(vizio)(?: |.+model\/)(\w+-\w+)/i,/tcast.+(lg)e?. ([-\w]+)/i],[cr,dr,[ur,mr]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[cr,Qr],[ur,mr]],[/(apple) ?tv/i],[cr,[dr,Br+" TV"],[ur,mr]],[/crkey.*devicetype\/chromecast/i],[[dr,an+" Third Generation"],[cr,Hr],[ur,mr]],[/crkey.*devicetype\/([^/]*)/i],[[dr,/^/,"Chromecast "],[cr,Hr],[ur,mr]],[/fuchsia.*crkey/i],[[dr,an+" Nest Hub"],[cr,Hr],[ur,mr]],[/crkey/i],[[dr,an],[cr,Hr],[ur,mr]],[/(portaltv)/i],[dr,[cr,ln],[ur,mr]],[/droid.+aft(\w+)( bui|\))/i],[dr,[cr,Fr],[ur,mr]],[/(shield \w+ tv)/i],[dr,[cr,Gr],[ur,mr]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[dr,[cr,Zr],[ur,mr]],[/(bravia[\w ]+)( bui|\))/i],[dr,[cr,en],[ur,mr]],[/(mi(tv|box)-?\w+) bui/i],[dr,[cr,tn],[ur,mr]],[/Hbbtv.*(technisat) (.*);/i],[cr,dr,[ur,mr]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[cr,/.+\/(\w+)/,"$1",On,{LG:"lge"}],[dr,Rn],[ur,mr]],[/(playstation \w+)/i],[dr,[cr,en],[ur,pr]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[dr,[cr,Wr],[ur,pr]],[/(ouya)/i,/(nintendo) (\w+)/i,/(retroid) (pocket ([^\)]+))/i],[cr,dr,[ur,pr]],[/droid.+; (shield)( bui|\))/i],[dr,[cr,Gr],[ur,pr]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[dr,[cr,Yr],[ur,wr]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[cr,dr,[ur,wr]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[dr,[cr,$r],[ur,wr]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[dr,[cr,Br],[ur,wr]],[/(opwwe\d{3})/i],[dr,[cr,Xr],[ur,wr]],[/(moto 360)/i],[dr,[cr,Jr],[ur,wr]],[/(smartwatch 3)/i],[dr,[cr,en],[ur,wr]],[/(g watch r)/i],[dr,[cr,Qr],[ur,wr]],[/droid.+; (wt63?0{2,3})\)/i],[dr,[cr,rn],[ur,wr]],[/droid.+; (glass) \d/i],[dr,[cr,Hr],[ur,yr]],[/(pico) ([\w ]+) os\d/i],[cr,dr,[ur,yr]],[/(quest( \d| pro)?s?).+vr/i],[dr,[cr,ln],[ur,yr]],[/mobile vr; rv.+firefox/i],[[ur,yr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[cr,[ur,br]],[/(aeobc)\b/i],[dr,[cr,Fr],[ur,br]],[/(homepod).+mac os/i],[dr,[cr,Br],[ur,br]],[/windows iot/i],[[ur,br]],[/droid.+; ([\w- ]+) (4k|android|smart|google)[- ]?tv/i],[dr,[ur,mr]],[/\b((4k|android|smart|opera)[- ]?tv|tv; rv:|large screen[\w ]+safari)\b/i],[[ur,mr]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew|; hmsc).+?(mobile|vr|\d) safari/i],[dr,[ur,On,{mobile:"Mobile",xr:"VR","*":vr}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[ur,vr]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[ur,gr]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[dr,[cr,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[lr,[sr,sn+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[sr,lr],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[lr,[sr,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[sr,lr],[/ladybird\//i],[[sr,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[lr,sr]],os:[[/(windows nt) (6\.[23]); arm/i],[[sr,/N/,"R"],[lr,On,In]],[/(windows (?:phone|mobile|iot))(?: os)?[\/ ]?([\d\.]*( se)?)/i,/(windows)[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i],[sr,lr],[/windows nt ?([\d\.\)]*)(?!.+xbox)/i,/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d\.;]*)/i],[[lr,/(;|\))/g,"",On,In],[sr,pn]],[/(windows ce)\/?([\d\.]*)/i],[sr,lr],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w\.]+)/i,/cfnetwork\/.+darwin/i],[[lr,/_/g,"."],[sr,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i],[[sr,"macOS"],[lr,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[lr,[sr,an+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[lr,[sr,an+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[lr,[sr,an+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[lr,[sr,an+" Linux"]],[/crkey\/([\d\.]+)/i],[lr,[sr,an]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[lr,sr],[/(ubuntu) ([\w\.]+) like android/i],[[sr,/(.+)/,"$1 Touch"],lr],[/(harmonyos)[\/ ]?([\d\.]*)/i,/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen)\w*[-\/\.; ]?([\d\.]*)/i],[sr,lr],[/\(bb(10);/i],[lr,[sr,zr]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[lr,[sr,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[lr,[sr,un+" OS"]],[/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i,/webos(?:[ \/]?|\.tv-20(?=2[2-9]))(\d[\d\.]*)/i],[lr,[sr,"webOS"]],[/web0s;.+?(?:chr[o0]me|safari)\/(\d+)/i],[[lr,On,{25:"120",24:"108",23:"94",22:"87",6:"79",5:"68",4:"53",3:"38",2:"538",1:"537","*":"TV"}],[sr,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[lr,[sr,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[sr,"Chrome OS"],lr],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/linux.+(mint)[\/\(\) ]?([\w\.]*)/i,/(mageia|vectorlinux|fuchsia|arcaos|arch(?= ?linux))[;l ]([\d\.]*)/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire|knoppix)(?: gnu[\/ ]linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/\b(aix)[; ]([1-9\.]{0,4})/i,/(hurd|linux|morphos)(?: (?:arm|x86|ppc)\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) ?(r\d)?/i],[sr,lr],[/(sunos) ?([\d\.]*)/i],[[sr,"Solaris"],lr],[/\b(beos|os\/2|amigaos|openvms|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[sr,lr]]},Nn=(En.call((Jt={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[tr,[sr,lr,hr,ur]],[rr,[fr]],[nr,[ur,dr,cr]],[ir,[sr,lr]],[or,[sr,lr]]]),En.call(Jt.isIgnore,[[tr,[lr,hr]],[ir,[lr]],[or,[lr]]]),En.call(Jt.isIgnoreRgx,[[tr,/ ?browser$/i],[or,/ ?os$/i]]),En.call(Jt.toString,[[tr,[sr,lr]],[rr,[fr]],[nr,[cr,dr]],[ir,[sr,lr]],[or,[sr,lr]]]),Jt),Ln=function(e,t){var r=Nn.init[t],n=Nn.isIgnore[t]||0,i=Nn.isIgnoreRgx[t]||0,o=Nn.toString[t]||0;function a(){En.call(this,r)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return vn?vn.getHighEntropyValues(Ur).then(function(t){return e.setCH(new jn(t,!1)).parseCH().get()}):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=ar&&(a.prototype.is=function(e){var t=!1;for(var r in this)if(this.hasOwnProperty(r)&&!wn(n,r)&&Tn(i?Pn(i,this[r]):this[r])==Tn(i?Pn(i,e):e)){if(t=!0,e!=er)break}else if(e==er&&t){t=!t;break}return t},a.prototype.toString=function(){var e=Xt;for(var t in o)E(this[o[t]])!==er&&(e+=(e?" ":Xt)+this[o[t]]);return e||er}),vn||(a.prototype.then=function(e){var t=this,r=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};r.prototype={is:a.prototype.is,toString:a.prototype.toString};var n=new r;return e(n),n}),new a};function jn(e,t){if(e=e||{},En.call(this,Ur),t)En.call(this,[[Tr,kn(e[Cr])],[Er,kn(e[Or])],[gr,/\?1/.test(e[_r])],[dr,xn(e[Nr])],[Pr,xn(e[Lr])],[xr,xn(e[jr])],[fr,xn(e[Ir])],[Sr,kn(e[Dr])],[Rr,xn(e[Ar])]]);else for(var r in e)this.hasOwnProperty(r)&&E(e[r])!==er&&(this[r]=e[r])}function Un(e,t,r,n){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(gn&&gn.userAgent==this.ua)switch(this.itemType){case tr:gn.brave&&E(gn.brave.isBrave)==$t&&this.set(sr,"Brave");break;case nr:!this.get(ur)&&vn&&vn[gr]&&this.set(ur,gr),"Macintosh"==this.get(dr)&&gn&&E(gn.standalone)!==er&&gn.maxTouchPoints&&gn.maxTouchPoints>2&&this.set(dr,"iPad").set(ur,vr);break;case or:!this.get(sr)&&vn&&vn[Pr]&&this.set(sr,vn[Pr]);break;case ar:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(tr,t(tr)).set(rr,t(rr)).set(nr,t(nr)).set(ir,t(ir)).set(or,t(or))}return this},this.parseUA=function(){switch(this.itemType!=ar&&Cn.call(this.data,this.ua,this.rgxMap),this.itemType){case tr:this.set(hr,Sn(this.get(lr)));break;case or:if("iOS"==this.get(sr)&&"18.6"==this.get(lr)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(lr,e[1])}}return this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case tr:case ir:var r,n=e[Er]||e[Tr];if(n)for(var i=0;i<n.length;i++){var o=n[i].brand||n[i],a=n[i].version;this.itemType==tr&&!/not.a.brand/i.test(o)&&(!r||/Chrom/.test(r)&&o!=on||r==sn&&/WebView2/.test(o))&&(o=On(o,Dn),(r=this.get(sr))&&!/Chrom/.test(r)&&/Chrom/.test(o)||this.set(sr,o).set(lr,a).set(hr,Sn(a)),r=o),this.itemType==ir&&o==on&&this.set(lr,a)}break;case rr:var s=e[fr];s&&(s&&"64"==e[Rr]&&(s+="64"),Cn.call(this.data,s+";",t));break;case nr:if(e[gr]&&this.set(ur,gr),e[dr]&&(this.set(dr,e[dr]),!this.get(ur)||!this.get(cr))){var u={};Cn.call(u,"droid 9; "+e[dr]+")",t),!this.get(ur)&&u.type&&this.set(ur,u.type),!this.get(cr)&&u.vendor&&this.set(cr,u.vendor)}if(e[Sr]){var c;if("string"!=typeof e[Sr])for(var l=0;!c&&l<e[Sr].length;)c=On(e[Sr][l++],An);else c=On(e[Sr],An);this.set(ur,c)}break;case or:var f=e[Pr];if(f){var h=e[xr];f==pn&&(h=parseInt(Sn(h),10)>=13?"11":"10"),this.set(sr,f).set(lr,h)}this.get(sr)==pn&&"Xbox"==e[dr]&&this.set(sr,"Xbox").set(lr,void 0);break;case ar:var d=this.data,p=function(t){return d[t].getItem().setCH(e).parseCH().get()};this.set(tr,p(tr)).set(rr,p(rr)).set(nr,p(nr)).set(ir,p(ir)).set(or,p(or))}return this},En.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",Ln(this,e)]]),this}function Fn(e,t,r){if(E(e)===Yt?(yn(e,!0)?(E(t)===Yt&&(r=t),t=e):(r=e,t=void 0),e=void 0):E(e)!==Zt||yn(t,!0)||(r=t,t=void 0),r)if(E(r.append)===$t){var n={};r.forEach(function(e,t){n[String(t).toLowerCase()]=e}),r=n}else{var i={};for(var o in r)r.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=r[o]);r=i}if(!(this instanceof Fn))return new Fn(e,t,r).getResult();var a=E(e)===Zt?e:r&&r[Gt]?r[Gt]:gn&&gn.userAgent?gn.userAgent:Xt,s=new jn(r,!0),u=t?function(e,t){var r={},n=t;if(!yn(t))for(var i in n={},t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[]);for(var a in e)r[a]=n[a]&&n[a].length%2==0?n[a].concat(e[a]):e[a];return r}(_n,t):_n,c=function(e){return e==ar?function(){return new Un(e,a,u,s).set("ua",a).set(tr,this.getBrowser()).set(rr,this.getCPU()).set(nr,this.getDevice()).set(ir,this.getEngine()).set(or,this.getOS()).get()}:function(){return new Un(e,a,u[e],s).parseUA().get()}};return En.call(this,[["getBrowser",c(tr)],["getCPU",c(rr)],["getDevice",c(nr)],["getEngine",c(ir)],["getOS",c(or)],["getResult",c(ar)],["getUA",function(){return a}],["setUA",function(e){return bn(e)&&(a=Rn(e,500)),this}]]).setUA(a),this}Fn.VERSION="2.0.6",Fn.BROWSER=mn([sr,lr,hr,ur]),Fn.CPU=mn([fr]),Fn.DEVICE=mn([dr,cr,ur,pr,gr,mr,vr,wr,br]),Fn.ENGINE=Fn.OS=mn([sr,lr]);var Bn="undefined"!=typeof performance&&"function"==typeof performance.now?function(){return performance.now()}:function(){return Date.now()};function Mn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"0",n=String(e);if(n.length<t){for(var i=n,o=0;o<t-n.length;o+=1)i=r+i;return i}return n}var zn=0,Hn=0,Vn=Math.floor(65535*Math.random())<<16|Date.now()%65535,qn=function(){var e=Date.now();e===Hn?zn++:(zn=0,Hn=e);var t=Mn(e.toString(16),11,"0"),r=e>>12&4095,n=4095&e,i=e>>36&255,o=t+Mn(zn.toString(16),4,"0")+Mn((65535&Vn).toString(16),4,"0")+(Mn((e>>24&1048575).toString(16),5,"0")+Mn(i.toString(16),2,"0")+Mn(r.toString(16),3,"0")+Mn(n.toString(16),3,"0"));return o=Mn(o=o.slice(0,32),32,"0"),"".concat(o.slice(0,8)).concat(o.slice(8,16)).concat(o.slice(16))},Kn=0;function Qn(){var e=Date.now().toString(36).slice(-8).padStart(8,"0");Kn=(Kn+1)%46656;var t=Math.floor(36*Math.random());return e+(Kn.toString(36).padStart(2,"0")+t.toString(36)).padStart(4,"0").slice(-4)}var Wn,Jn=function(){return function(){if("undefined"!=typeof WeixinJSBridge)return!0;var e=navigator.userAgent.toLowerCase();return!(-1===e.indexOf("micromessenger")&&"micromessenger"!=e.match(/MicroMessenger/i))}()?"WECHAT":-1!==(e=navigator.userAgent.toLowerCase()).indexOf("alipay")||"alipay"==e.match(/Alipay/i)?"ALIPAY":"OTHER";var e},Gn=function(e){var t=e.indexOf("#");return-1===t?"":e.slice(t+1).replace(/^\//,"").split("?")[0]},Xn=function(e,t){return["HONGSHUN"].includes(t)&&"chargeMoney"===e&&window.location.href.indexOf("showMoney=false")>-1?"EQUITY":{login:"LOGIN",buyPkgListNew:"BUY_LIST",cardDetailInfo:"CARD_DETAIL",flowSettle:"SETTLEMENT",chargeMoney:"WALLET",payOrderDetail:"ORDER_DETAIL"}[e]||e},$n=function(){var e=navigator.userAgent.toLowerCase();return/android|adr/.test(e)?"Android":/iphone|ipad|ipod|ios/.test(e)?"iOS":"其他"},Yn=function(e){try{return new Fn(e||("undefined"!=typeof navigator?navigator.userAgent:"")).getResult()}catch(e){return console.warn("UAParser 解析失败:",e),{ua:"undefined"!=typeof navigator?navigator.userAgent:"",browser:{},engine:{},os:{name:$n()},device:{},cpu:{}}}},Zn=function(e){try{var t,r=Yn(e);if(null!=r&&null!==(t=r.os)&&void 0!==t&&t.version)return r.os.version;var n=e||("undefined"!=typeof navigator?navigator.userAgent:""),i=n.match(/OS\s+(\d+)[_.](\d+)/i);if(i)return"".concat(i[1],".").concat(i[2]);var o=n.match(/Android\s+([\d.]+)/i);return o?o[1]:null}catch(e){return console.warn("获取系统版本失败:",e),null}},ei=function(){return f(function e(t){c(this,e),this.config=t,this.isReporting=!1},[{key:"report",value:(h=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:if(this.config.getConfig().debugSwitch&&console.log("report----------",t,r),e.p=1,n=this.formatReportData(t,r),!this.config.getConfig().customReport){e.n=3;break}return e.n=2,this.config.getConfig().customReport(t,n);case 2:e.n=4;break;case 3:return e.n=4,this.defaultReport(t,n);case 4:e.n=6;break;case 5:e.p=5,i=e.v,console.error("上报失败:",i),this.config.getConfig().debugSwitch&&console.error("上报失败详情:",{type:t,error:i.message,stack:i.stack});case 6:return e.a(2)}},e,this,[[1,5]])})),function(e,t){return h.apply(this,arguments)})},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"formatReportData",value:function(e,t){var r,n,i,o,a={sessionId:this.config.getConfig().sessionId||"",channel:Jn(),uiVer:this.config.getConfig().uiVersion,osType:(o=Yn(),function(e){return null===e}(n=null==o?void 0:o.os)||function(e){return void 0===e}(n)||""===n?$n():["iOS","Android"].includes(null==o||null===(r=o.os)||void 0===r?void 0:r.name)?(console.log("parseagernt--",null==o?void 0:o.os),null==o||null===(i=o.os)||void 0===i?void 0:i.name):"其他"),osVersion:Zn(),screenWidth:screen.width,screenHeight:screen.height,windowInnerWidth:window.innerWidth,windowInnerHeight:window.innerHeight,netType:navigator.connection?navigator.connection.effectiveType:"",tags:{customerId:this.config.getConfig().customerId,deviceId:this.config.getConfig().deviceId,deviceNo:this.config.getConfig().deviceNo,userId:this.config.getConfig().userId}},s=Array.isArray(t)?t:[t];return s.forEach(function(e){var t=Object.assign({},a.tags||{},e&&e.tags||{});Object.assign(e,a),Object.keys(t).length>0&&(e.tags=t)}),s}},{key:"defaultReport",value:(l=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.n){case 0:if(n=this.config.getReportUrl(),i=this.config.getThirdPartyConfig(),!n){e.n=1;break}return e.n=1,this.reportToBackend(n,r);case 1:if(!(i&&Object.keys(i).length>0)){e.n=2;break}return e.n=2,this.reportToThirdParty(i,r);case 2:return e.a(2)}},e,this)})),function(e,t){return l.apply(this,arguments)})},{key:"reportToBackend",value:(u=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.n){case 0:if(!navigator.sendBeacon||this.isObjectOverSizeLimit(r,60)){e.n=3;break}if((n=new FormData).append("events",JSON.stringify(r)),i=navigator.sendBeacon(t,n),this.config.getConfig().debugSwitch&&console.log("上报数据:",t,r),i){e.n=2;break}return e.n=1,this.reportViaAxios(t,n);case 1:case 4:return e.a(2,e.v);case 2:e.n=5;break;case 3:return this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 sendBeacon,使用 axios"),e.n=4,this.reportViaAxios(t,r);case 5:return e.a(2)}},e,this)})),function(e,t){return u.apply(this,arguments)})},{key:"reportViaAxios",value:(a=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Wt.post(t,r);case 1:return n=e.v,e.a(2,n.data);case 2:e.p=2,i=e.v,console.error("后端上报失败:",i);case 3:return e.a(2)}},e,null,[[0,2]])})),function(e,t){return a.apply(this,arguments)})},{key:"reportToThirdParty",value:(o=s(w().m(function e(t,r){var n,i;return w().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=[],t.baidu&&window._hmt&&n.push(this.reportToBaidu(t.baidu,r)),t.umeng&&window._um&&n.push(this.reportToUmeng(t.umeng,r)),t.sensors&&window.sensors&&n.push(this.reportToSensors(t.sensors,r)),t.tencent&&window.MTA&&n.push(this.reportToTencent(t.tencent,r)),t.custom&&n.push(this.reportToCustom(t.custom,r)),e.p=1,e.n=2,Promise.allSettled(n);case 2:e.n=4;break;case 3:e.p=3,i=e.v,console.error("第三方上报失败:",i);case 4:return e.a(2)}},e,this,[[1,3]])})),function(e,t){return o.apply(this,arguments)})},{key:"reportToBaidu",value:(i=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window._hmt&&window._hmt.push(["_trackEvent",r.type,JSON.stringify(r.data)]);case 1:return e.a(2)}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"reportToUmeng",value:(n=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window._um&&window._um.push(["track",r.type,r.data]);case 1:return e.a(2)}},e)})),function(e,t){return n.apply(this,arguments)})},{key:"reportToSensors",value:(r=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window.sensors&&window.sensors.track(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,t){return r.apply(this,arguments)})},{key:"reportToTencent",value:(t=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:window.MTA&&window.MTA.Event.stat(r.type,r.data[0]||{});case 1:return e.a(2)}},e)})),function(e,r){return t.apply(this,arguments)})},{key:"reportToCustom",value:(e=s(w().m(function e(t,r){return w().w(function(e){for(;;)switch(e.n){case 0:if("function"!=typeof t.report){e.n=1;break}return e.n=1,t.report(r);case 1:return e.a(2)}},e)})),function(t,r){return e.apply(this,arguments)})},{key:"isObjectOverSizeLimit",value:function(e,t){var r=JSON.stringify(e);return(new TextEncoder).encode(r).length/1024>t}}]);var e,t,r,n,i,o,a,u,l,h}(),ti=function(){return f(function e(t){c(this,e),this.config=t,this.reporter=new ei(t),this.errorQueue=[],this.isInitialized=!1,this.reportTimer=null,this.errorCache=new Map,this.errorCacheTimeout=5e3,this.maxCacheSize=100,this.errorFingerprint=this.createErrorFingerprint.bind(this),this.errorTimeout=null,this.resourceErrorTimeout=null,this.lastResourceError=null},[{key:"createErrorFingerprint",value:function(e,t){var r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,n=(null==e?void 0:e.stack)||t.stack,i=t.type||"unknown",o=window.location.href;return"".concat(i,":").concat(r,":").concat(o,":").concat(n?n.split("\n")[0]:"")}},{key:"isDuplicateError",value:function(e,t){var r=this.errorFingerprint(e,t),n=Date.now();if((this.cleanupErrorCache(n),this.errorCache.has(r))&&n-this.errorCache.get(r)<this.errorCacheTimeout)return!0;if(this.errorCache.set(r,n),this.errorCache.size>this.maxCacheSize){var i=this.errorCache.keys().next().value;this.errorCache.delete(i)}return!1}},{key:"cleanupErrorCache",value:function(e){var t,r=h(this.errorCache.entries());try{for(r.s();!(t=r.n()).done;){var n=k(t.value,2),i=n[0];e-n[1]>this.errorCacheTimeout&&this.errorCache.delete(i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();(e.enableErrorTracking||e.enableResourceError)&&this.setupErrorListener(),e.enableUnhandledRejection&&this.setupUnhandledRejectionListener(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushErrorQueue()},t))}},{key:"setupErrorListener",value:function(){var e=this;window.addEventListener("error",function(t){t.target&&t.target!==window?e.handleResourceError(t):e.handleJavaScriptError(t)},!0)}},{key:"handleJavaScriptError",value:function(e){var t=this;this.errorTimeout&&clearTimeout(this.errorTimeout),this.errorTimeout=setTimeout(function(){var r;t.handleError(e.error||e.message,{type:"javascript",filename:e.filename,lineno:e.lineno,colno:e.colno,stack:null===(r=e.error)||void 0===r?void 0:r.stack})},100)}},{key:"handleResourceError",value:function(e){var t=this,r="".concat(e.target.tagName,":").concat(e.target.src||e.target.href);this.lastResourceError!==r?(this.lastResourceError=r,this.resourceErrorTimeout&&clearTimeout(this.resourceErrorTimeout),this.resourceErrorTimeout=setTimeout(function(){t.handleError("Resource load failed: ".concat(e.target.src||e.target.href),{type:"resource",tagName:e.target.tagName,src:e.target.src,href:e.target.href}),setTimeout(function(){t.lastResourceError=null},2e3)},100)):this.config.getConfig().debugSwitch&&console.log("忽略重复的资源加载错误:",r)}},{key:"setupUnhandledRejectionListener",value:function(){var e=this,t=null,r=null;window.addEventListener("unhandledrejection",function(n){var i,o,a="".concat((null===(i=n.reason)||void 0===i?void 0:i.message)||n.reason,":").concat((null===(o=n.reason)||void 0===o?void 0:o.stack)||"");r!==a?(r=a,t&&clearTimeout(t),t=setTimeout(function(){var t;e.handleError(n.reason,{type:"unhandledrejection",stack:null===(t=n.reason)||void 0===t?void 0:t.stack}),setTimeout(function(){r=null},1e3)},100)):e.config.getConfig().debugSwitch&&console.log("忽略重复的 Promise 拒绝:",n.reason)})}},{key:"handleError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isDuplicateError(e,t))this.config.getConfig().debugSwitch&&console.log("忽略重复错误:",(null==e?void 0:e.message)||e);else{var r=this.parseStack(e),n=m({message:(null==e?void 0:e.message)||(null==e?void 0:e.toString())||e,stack:(null==e?void 0:e.stack)||t.stack,type:t.type||"unknown",timestamp:Date.now(),url:window.location.href,userAgent:navigator.userAgent,fileName:r.fileName,lineNumber:r.lineNumber,columnNumber:r.columnNumber,functionName:r.functionName,stackFrames:r.stackFrames},t);this.errorQueue.push(n),0===this.config.getConfig().reportInterval?this.reporter.report("error",[n]):this.errorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushErrorQueue()}}},{key:"parseStack",value:function(e){var t=(null==e?void 0:e.stack)||"",r=(null==e?void 0:e.message)||(null==e?void 0:e.toString())||"",n={errMessage:r,errStack:t,fileName:"",lineNumber:"",columnNumber:"",functionName:"",stackFrames:[]};if(!t)return n;try{var i=/^\s*at\s+([^(]+?)\s+\((.+?):(\d+):(\d+)\)$/,o=/^\s*at\s+(.+?):(\d+):(\d+)$/,a=/^\s*([^@]*)@(.+?):(\d+):(\d+)$/,s=t;if(r&&t.startsWith(r))s=t.substring(r.length).replace(/^\n+/,"");else if(t.includes("\n")){var u=t.split("\n");!u[0]||u[0].trim().startsWith("at")||u[0].includes("@")||(s=u.slice(1).join("\n"))}var c,l=s.split("\n").filter(function(e){return e.trim()}),f=[],d=h(l);try{for(d.s();!(c=d.n()).done;){var p=c.value,g=null,v=p.match(i);v?g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}:(v=p.match(o))?g={functionName:"",fileName:v[1],lineNumber:parseInt(v[2]),columnNumber:parseInt(v[3])}:(v=p.match(a))&&(g={functionName:v[1].trim(),fileName:v[2],lineNumber:parseInt(v[3]),columnNumber:parseInt(v[4])}),g&&f.push(g)}}catch(e){d.e(e)}finally{d.f()}if(f.length>0){var m=f[0];n.fileName=m.fileName,n.lineNumber=m.lineNumber,n.columnNumber=m.columnNumber,n.functionName=m.functionName}n.stackFrames=f}catch(e){var w;null!==(w=this.config)&&void 0!==w&&null!==(w=w.getConfig())&&void 0!==w&&w.debugSwitch&&console.warn("解析堆栈失败:",e)}return n}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.handleError(e,t)}},{key:"flushErrorQueue",value:function(){this.errorQueue.length>0&&(this.reporter.report("error",T(this.errorQueue)),this.errorQueue=[])}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushErrorQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),ri=function(){return f(function e(t){c(this,e),this.config=t,this.reporter=new ei(t),this.eventQueue=[],this.isInitialized=!1,this.clickListener=null,this.pageViewListener=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.pageHistory=[],this.currentPage=null,this.currentPageStartTime=Date.now(),this.previousPage=null,this.previousPageStayTime=0},[{key:"init",value:function(){var e=this;if(!this.isInitialized){var t=this.config.getConfig();this.currentPage={url:window.location.href,title:document.title,enterTime:Date.now(),referrer:document.referrer},this.currentPageStartTime=Date.now(),t.enableClickTracking&&this.setupClickTracking(),t.enablePageViewTracking&&this.setupPageViewTracking(),window.addEventListener("beforeunload",function(){e.handlePageUnload()}),document.addEventListener("visibilitychange",function(){}),this.config.getConfig().reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"handlePageUnload",value:function(){if(this.currentPage){var e=Date.now()-this.currentPageStartTime;this.previousPage=m(m({},this.currentPage),{},{stayTime:e,leaveTime:Date.now()}),this.previousPageStayTime=e}}},{key:"setupClickTracking",value:function(){var e=this;this.clickListener=function(t){var r,n=t.target,i={type:"click",timestamp:Date.now(),url:window.location.href,element:{tagName:n.tagName,className:n.className,id:n.id,text:null===(r=n.textContent)||void 0===r?void 0:r.substring(0,50)},position:{x:t.clientX,y:t.clientY}};e.handleEvent("click",i)},document.addEventListener("click",this.clickListener,!0)}},{key:"setupPageViewTracking",value:function(){var e=this,t=this.config.getConfig().pageViewTracking||{},r=window.location.href,n=Date.now(),i=t.debounce||100;this.pageViewListener=function(){var t=window.location.href,o=Date.now();t===r&&o-n<i&&e.config.getConfig().debugSwitch?console.log("忽略重复的页面浏览事件:",t):(e.handlePageChange(t,o),r=t,n=o,e.handleEvent("pageview",{uuid:Qn(),timestamp:o,pageKey:Xn(Gn(t),e.config.getConfig().uiVersion),pageUri:Gn(t),eventType:"VIEW"}))},!1!==t.listenPopstate&&window.addEventListener("popstate",this.pageViewListener),!1!==t.listenHistoryAPI&&(this.originalPushState=history.pushState,this.originalReplaceState=history.replaceState,history.pushState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalPushState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this),history.replaceState=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];this.originalReplaceState.apply(history,r),setTimeout(function(){e.pageViewListener()},0)}.bind(this)),t.vueRouterMode&&(this.config.getConfig().debugSwitch&&console.log("Vue Router 模式:页面浏览追踪已优化"),this.pageViewListener())}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushEventQueue()},t))}},{key:"handlePageChange",value:function(e,t){if(this.currentPage){var r=t-this.currentPageStartTime;this.previousPage=m(m({},this.currentPage),{},{stayTime:r,leaveTime:t}),this.previousPageStayTime=r,this.pageHistory.push(m({},this.previousPage)),this.pageHistory.length>20&&this.pageHistory.shift(),this.config.getConfig().debugSwitch&&console.log("页面切换: ".concat(this.currentPage.url," → ").concat(e,",停留时间: ").concat(r,"ms"))}this.currentPage={url:e,title:document.title,enterTime:t,referrer:document.referrer},this.currentPageStartTime=t}},{key:"getPreviousPageInfo",value:function(){return{previousPage:this.previousPage?{url:this.previousPage.url,title:this.previousPage.title,stayTime:this.previousPageStayTime}:null,previousPageStayTime:this.previousPageStayTime}}},{key:"getCurrentPageStayTime",value:function(){return this.currentPageStartTime?Date.now()-this.currentPageStartTime:0}},{key:"handleEvent",value:function(e,t){var r,n=this.getPreviousPageInfo(),i=m(m({},t),{},{tags:{refer:Gn(null==n||null===(r=n.previousPage)||void 0===r?void 0:r.url),duration:null==n?void 0:n.previousPageStayTime}});this.eventQueue.push(i),this.config.getConfig().debugSwitch&&console.log("eventInfo----",i),0===this.config.getConfig().reportInterval?this.reporter.report("event",[i]):this.eventQueue.length>=this.config.getConfig().maxQueueSize&&this.flushEventQueue()}},{key:"reportEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=d({uuid:Qn(),timestamp:Date.now(),pageKey:Xn(Gn(window.location.href),this.config.getConfig().uiVersion),pageUri:Gn(window.location.href),eventType:"CLICK",tags:t},"tags",{actionKey:e});this.handleEvent(e,r)}},{key:"flushEventQueue",value:function(){this.eventQueue.length>0&&(this.reporter.report("event",T(this.eventQueue)),this.eventQueue=[])}},{key:"destroy",value:function(){this.flushEventQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.clickListener&&(document.removeEventListener("click",this.clickListener,!0),this.clickListener=null),this.pageViewListener&&(window.removeEventListener("popstate",this.pageViewListener),this.pageViewListener=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),ni=function(){return f(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;c(this,e),this.config=t,this.reporter=new ei(t),this.eventTracker=r,this.isInitialized=!1,this.pageStartTime=Date.now(),this.performanceQueue=[],this.thirdPartySDKs={},this.reportTimer=null,this.currentRoute=null,this.routeStartTime=Date.now(),this.routeHistory=[],this.vueRouter=null,this.metrics={fcp:0,lcp:0,fid:0,cls:0,ttfb:0,domLoad:0,windowLoad:0,resourceLoad:[],apiRequests:[],pageStayTime:0,previousPageUrl:"",currentPageUrl:""}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enablePerformanceTracking&&this.setupPerformanceMonitoring(),e.enableResourceTracking&&this.setupResourceMonitoring(),e.enableApiTracking&&this.setupApiMonitoring(),e.enableInteractionTracking&&this.setupInteractionMonitoring(),this.initThirdPartySDKs(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushPerformanceQueue()},t))}},{key:"setupVueRouterMonitoring",value:function(e){var t=this;e&&!this.vueRouter&&(this.vueRouter=e,this.currentRoute=e.currentRoute.value,e.beforeEach(function(e,r,n){r.name&&t.handleRouteLeave(r,e),n()}),e.afterEach(function(e,r){t.handleRouteEnter(e,r)}),e.beforeResolve(function(e,r,n){r.name&&t.calculateRouteStayTime(r),n()}))}},{key:"handleRouteLeave",value:function(e,t){var r=Date.now()-this.routeStartTime;this.recordRouteStayTime(e,r),this.currentRoute=e,this.routeStartTime=Date.now()}},{key:"handleRouteEnter",value:function(e,t){this.routeStartTime=Date.now(),this.currentRoute=e,this.recordRouteEnter(e,t)}},{key:"recordRouteStayTime",value:function(e,t){var r,n={name:e.name||"unknown",path:e.path,fullPath:e.fullPath,stayTime:t,enterTime:this.routeStartTime,leaveTime:Date.now(),params:e.params,query:e.query,meta:e.meta};this.routeHistory.push(n),this.metrics.pageStayTime=t,this.metrics.previousPageUrl=e.name,this.reportRouteStayTime(n),null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("路由数据",n)}},{key:"recordRouteEnter",value:function(e,t){var r;e.name,e.path,e.fullPath,Date.now(),e.params,e.query,e.meta,t&&(t.name,t.path),this.metrics.currentPageUrl=e.name,null!==(r=this.config)&&void 0!==r&&null!==(r=r.config)&&void 0!==r&&r.debugSwitch&&console.log("进入路由: ".concat(e.name||e.path))}},{key:"calculateRouteStayTime",value:function(e){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"reportRouteStayTime",value:function(e){var t={type:"route_stay_time",timestamp:Date.now(),route:e,user:this.config.getUser(),device:this.getDeviceInfo()};this.reporter.report("route_performance",[t])}},{key:"getCurrentRoute",value:function(){return this.currentRoute}},{key:"getRouteHistory",value:function(){return T(this.routeHistory)}},{key:"getCurrentPageStayTime",value:function(){return this.routeStartTime?Date.now()-this.routeStartTime:0}},{key:"getRoutePerformanceStats",value:function(){var e={totalRoutes:this.routeHistory.length,averageStayTime:0,routesByPath:new Map,totalStayTime:0};return this.routeHistory.length>0&&(this.routeHistory.forEach(function(t){e.totalStayTime+=t.stayTime,e.routesByPath.has(t.path)||e.routesByPath.set(t.path,{count:0,totalStayTime:0,averageStayTime:0});var r=e.routesByPath.get(t.path);r.count++,r.totalStayTime+=t.stayTime,r.averageStayTime=r.totalStayTime/r.count}),e.averageStayTime=e.totalStayTime/e.totalRoutes),e}},{key:"setupPerformanceMonitoring",value:function(){var e=this;"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){e.captureDOMLoadTime()}):this.captureDOMLoadTime(),window.addEventListener("load",function(){e.captureWindowLoadTime(),e.captureWebVitals(),e.reportPerformanceMetrics()})}},{key:"setupResourceMonitoring",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window){var t=new PerformanceObserver(function(t){var r,n=h(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;"resource"===i.entryType&&e.handleResourceLoad(i)}}catch(e){n.e(e)}finally{n.f()}});try{t.observe({entryTypes:["resource"]})}catch(e){this.setupResourceFallback()}}}},{key:"setupApiMonitoring",value:function(){var e=this;void 0!==window.axios&&(window.axios.interceptors.request.use(function(e){return e._startTime=Bn(),e}),window.axios.interceptors.response.use(function(t){var r=Bn()-t.config._startTime;return e.handleApiRequest(t.config.url,r,t.status),t},function(t){if(t.config){var r=Bn()-t.config._startTime;e.handleApiRequest(t.config.url,r,"error")}throw t}))}},{key:"setupInteractionMonitoring",value:function(){var e=this,t=0,r=0,n=function(i){0===t&&(t=Bn(),r=t-e.metrics.fcp,e.metrics.fid=r,document.removeEventListener("click",n,!0),document.removeEventListener("keydown",n,!0),document.removeEventListener("touchstart",n,!0))};document.addEventListener("click",n,!0),document.addEventListener("keydown",n,!0),document.addEventListener("touchstart",n,!0)}},{key:"captureDOMLoadTime",value:function(){this.metrics.domLoad=Bn()}},{key:"captureWindowLoadTime",value:function(){this.metrics.windowLoad=Bn()}},{key:"captureWebVitals",value:function(){var e=this;if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=h(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i,o=r.value;if("first-contentful-paint"===o.name)e.metrics.fcp=o.startTime,null!==(i=e.config)&&void 0!==i&&null!==(i=i.config)&&void 0!==i&&i.debugSwitch&&console.log("FCP:",o.startTime)}}catch(e){n.e(e)}finally{n.f()}}).observe({type:"paint",buffered:!0})}catch(e){console.warn("FCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{new PerformanceObserver(function(t){var r,n=h(t.getEntries());try{for(n.s();!(r=n.n()).done;){var i=r.value;e.metrics.lcp=i.startTime}}catch(e){n.e(e)}finally{n.f()}}).observe({entryTypes:["largest-contentful-paint"]})}catch(e){console.warn("LCP监控失败:",e)}if("undefined"!=typeof window&&"PerformanceObserver"in window)try{var t=0;new PerformanceObserver(function(r){var n,i=h(r.getEntries());try{for(i.s();!(n=i.n()).done;){var o=n.value;o.hadRecentInput||(t+=o.value)}}catch(e){i.e(e)}finally{i.f()}e.metrics.cls=t}).observe({entryTypes:["layout-shift"]})}catch(e){console.warn("CLS监控失败:",e)}}},{key:"handleResourceLoad",value:function(e){var t={name:e.name,type:e.initiatorType,duration:e.duration,size:e.transferSize,timestamp:Date.now()};this.metrics.resourceLoad.push(t),e.duration>3e3&&this.reportSlowResource(t)}},{key:"handleApiRequest",value:function(e,t,r){this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&this.eventTracker.getPreviousPageInfo();var n={interfaceUrl:"string"==typeof e?e:e.toString(),interfaceDuration:t,status:r,uuid:Qn(),timestamp:Date.now(),pageKey:Xn(this.metrics.currentPageUrl,this.config.getConfig().uiVersion),pageUri:this.metrics.currentPageUrl,eventType:"INTERFACEDURATION",refer:this.metrics.previousPageUrl,duration:this.metrics.previousPageStayTime||0,tags:{actionKey:""}};t>5e3||this.performanceQueue.push(n)}},{key:"handlePageHidden",value:function(){this.calculatePageStayTime()}},{key:"handlePageVisible",value:function(){this.pageStartTime=Date.now()}},{key:"calculatePageStayTime",value:function(){var e=Date.now()-this.pageStartTime;this.reportPageStayTime(e)}},{key:"reportPerformanceMetrics",value:function(){var e=this;setTimeout(function(){var t,r,n,i={};e.eventTracker&&"function"==typeof e.eventTracker.getPreviousPageInfo&&(i=e.eventTracker.getPreviousPageInfo());var o=Gn(window.location.href);e.metrics.currentPageUrl=o,e.metrics.previousPageUrl=Gn((null===(t=i)||void 0===t||null===(t=t.previousPage)||void 0===t?void 0:t.url)||"")||e.metrics.previousPageUrl;var a={eventType:"PERFORMANCE",uuid:Qn(),timestamp:Date.now(),pageKey:Xn(Gn(window.location.href),e.config.getConfig().uiVersion),pageUri:Gn(window.location.href),refer:Gn((null===(r=i)||void 0===r||null===(r=r.previousPage)||void 0===r?void 0:r.url)||""),duration:(null===(n=i)||void 0===n?void 0:n.previousPageStayTime)||0,metrics:e.metrics};e.performanceQueue.push(a),e.config.getConfig().debugSwitch&&console.log("Performance Data:",a),0===e.config.getConfig().reportInterval?e.reporter.report("performance",[a]):e.performanceQueue.length>=e.config.getConfig().maxQueueSize&&e.flushPerformanceQueue()},100)}},{key:"reportSlowResource",value:function(e){this.reporter.report("slow_resource",[e])}},{key:"reportSlowApi",value:function(e){this.reporter.report("slow_api",[e])}},{key:"reportPageStayTime",value:function(e){var t={type:"page_stay",url:window.location.href,stayTime:e,timestamp:Date.now()};this.reporter.report("page_stay",[t])}},{key:"getDeviceInfo",value:function(){return{screen:{width:screen.width,height:screen.height,availWidth:screen.availWidth,availHeight:screen.availHeight,colorDepth:screen.colorDepth,pixelDepth:screen.pixelDepth},viewport:{width:window.innerWidth,height:window.innerHeight},connection:navigator.connection?{effectiveType:navigator.connection.effectiveType,downlink:navigator.connection.downlink,rtt:navigator.connection.rtt}:null,memory:navigator.memory?{usedJSHeapSize:navigator.memory.usedJSHeapSize,totalJSHeapSize:navigator.memory.totalJSHeapSize,jsHeapSizeLimit:navigator.memory.jsHeapSizeLimit}:null}}},{key:"initThirdPartySDKs",value:function(){var e=this.config.getThirdPartyConfig();e.baidu&&window._hmt&&(this.thirdPartySDKs.baidu=window._hmt),e.umeng&&window._um&&(this.thirdPartySDKs.umeng=window._um),e.sensors&&window.sensors&&(this.thirdPartySDKs.sensors=window.sensors),e.tencent&&window.MTA&&(this.thirdPartySDKs.tencent=window.MTA)}},{key:"flushPerformanceQueue",value:function(){this.performanceQueue.length>0&&(this.reporter.report("performance",T(this.performanceQueue)),this.performanceQueue=[])}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t={type:"custom_performance",timestamp:Date.now(),url:window.location.href,metrics:e,user:this.config.getUser()};this.reporter.report("performance",[t])}},{key:"getCurrentMetrics",value:function(){return m({},this.metrics)}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushPerformanceQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.isInitialized=!1}}])}(),ii=function(){return f(function e(t){c(this,e),this.config=t,this.reporter=new ei(t),this.isInitialized=!1,this.behaviorQueue=[],this.sessionId=this.generateSessionId(),this.pageStartTime=Date.now(),this.scrollDepth=0,this.mouseMovements=[],this.keyStrokes=[],this.formInteractions=[],this.timeTracker=null,this.reportTimer=null,this.originalPushState=null,this.originalReplaceState=null,this.behaviors={pageViews:[],clicks:[],scrolls:[],formSubmissions:[],navigation:[],timeOnPage:0}},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getConfig();e.enableUserInteractionTracking&&this.setupUserInteractionTracking(),e.enableFormTracking&&this.setupFormTracking(),e.enableScrollTracking&&this.setupScrollTracking(),e.enableMouseTracking&&this.setupMouseTracking(),e.enableKeyboardTracking&&this.setupKeyboardTracking(),this.setupTimeTracking(),e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0}}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushBehaviorQueue()},t))}},{key:"setupUserInteractionTracking",value:function(){var e=this;document.addEventListener("click",function(t){e.trackClick(t)},!0),document.addEventListener("dblclick",function(t){e.trackDoubleClick(t)},!0),document.addEventListener("contextmenu",function(t){e.trackRightClick(t)},!0),"ontouchstart"in window&&document.addEventListener("touchstart",function(t){e.trackTouch(t)},!0)}},{key:"setupFormTracking",value:function(){var e=this;document.addEventListener("submit",function(t){e.trackFormSubmission(t)},!0),document.addEventListener("change",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldChange(t)},!0),document.addEventListener("focus",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldFocus(t)},!0),document.addEventListener("blur",function(t){"INPUT"!==t.target.tagName&&"SELECT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName||e.trackFormFieldBlur(t)},!0)}},{key:"setupScrollTracking",value:function(){var e,t=this;document.addEventListener("scroll",function(){clearTimeout(e),e=setTimeout(function(){var e=window.pageYOffset||document.documentElement.scrollTop,r=document.documentElement.scrollHeight,n=document.documentElement.clientHeight,i=Math.round(e/(r-n)*100);i>t.scrollDepth&&(t.scrollDepth=i,t.trackScroll(i,e))},100)},{passive:!0})}},{key:"setupMouseTracking",value:function(){var e,t=this,r=[];document.addEventListener("mousemove",function(n){clearTimeout(e),r.push({x:n.clientX,y:n.clientY,timestamp:Date.now()}),r.length>100&&r.shift(),e=setTimeout(function(){r.length>10&&(t.trackMouseMovement(r),r=[])},1e3)},{passive:!0})}},{key:"setupKeyboardTracking",value:function(){var e=this;document.addEventListener("keydown",function(t){"password"!==t.target.type&&e.trackKeyStroke(t)},!0)}},{key:"setupTimeTracking",value:function(){var e=this;this.timeTracker&&clearInterval(this.timeTracker),this.timeTracker=setInterval(function(){e.behaviors.timeOnPage+=1},1e3),window.addEventListener("beforeunload",function(){e.reportTimeOnPage()})}},{key:"trackReferrer",value:function(){var e=document.referrer;if(e){var t={type:"referrer",url:e,domain:this.extractDomain(e),timestamp:Date.now()};this.config.getConfig().debugSwitch&&console.log("referrerData----",t),this.behaviors.navigation.push(t),this.reportBehavior("referrer",t)}}},{key:"trackPageView",value:function(){var e={type:"pageview",url:window.location.href,title:document.title,timestamp:Date.now(),sessionId:this.sessionId,referrer:document.referrer};this.behaviors.pageViews.push(e),this.reportBehavior("pageview",e),this.pageStartTime=Date.now(),this.scrollDepth=0}},{key:"trackClick",value:function(e){var t,r={type:"click",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id,text:null===(t=e.target.textContent)||void 0===t?void 0:t.substring(0,50),href:e.target.href},position:{x:e.clientX,y:e.clientY,pageX:e.pageX,pageY:e.pageY},timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.clicks.push(r),this.reportBehavior("click",r)}},{key:"trackDoubleClick",value:function(e){var t={type:"doubleclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("doubleclick",t)}},{key:"trackRightClick",value:function(e){var t={type:"rightclick",element:{tagName:e.target.tagName,className:e.target.className,id:e.target.id},position:{x:e.clientX,y:e.clientY},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("rightclick",t)}},{key:"trackTouch",value:function(e){var t={type:"touch",touches:Array.from(e.touches).map(function(e){return{x:e.clientX,y:e.clientY,identifier:e.identifier}}),timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("touch",t)}},{key:"trackFormSubmission",value:function(e){var t={type:"form_submission",form:{action:e.target.action,method:e.target.method,id:e.target.id,className:e.target.className},fields:this.getFormFields(e.target),timestamp:Date.now(),sessionId:this.sessionId};this.behaviors.formSubmissions.push(t),this.reportBehavior("form_submission",t)}},{key:"trackFormFieldChange",value:function(e){var t={type:"form_field_change",field:{name:e.target.name,type:e.target.type,value:"password"===e.target.type?"***":e.target.value,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_change",t)}},{key:"trackFormFieldFocus",value:function(e){var t={type:"form_field_focus",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_focus",t)}},{key:"trackFormFieldBlur",value:function(e){var t={type:"form_field_blur",field:{name:e.target.name,type:e.target.type,id:e.target.id},timestamp:Date.now(),sessionId:this.sessionId};this.reportBehavior("form_field_blur",t)}},{key:"trackScroll",value:function(e,t){var r={type:"scroll",depth:e,scrollTop:t,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("scrollData---",r),this.reportBehavior("scroll",r)}},{key:"trackMouseMovement",value:function(e){var t={type:"mouse_movement",movements:e,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("mouse_movement---",t),this.reportBehavior("mouse_movement",t)}},{key:"trackKeyStroke",value:function(e){var t={type:"keystroke",key:e.key,code:e.code,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,altKey:e.altKey,metaKey:e.metaKey,timestamp:Date.now(),sessionId:this.sessionId};this.config.getConfig().debugSwitch&&console.log("keystroke---",t),this.reportBehavior("keystroke",t)}},{key:"reportBehavior",value:function(e,t){var r={type:e,data:t,user:this.config.getUser(),config:{appId:this.config.getConfig().appId,appVersion:this.config.getConfig().appVersion}};this.behaviorQueue.push(r),0===this.config.getConfig().reportInterval?this.reporter.report("behavior",[r]):this.behaviorQueue.length>=this.config.getConfig().maxQueueSize&&this.flushBehaviorQueue()}},{key:"reportCustomBehavior",value:function(e){var t=m(m({type:"custom_behavior",eventName:e},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),{},{timestamp:Date.now(),sessionId:this.sessionId});this.reportBehavior("custom_behavior",t)}},{key:"flushBehaviorQueue",value:function(){this.behaviorQueue.length>0&&(this.reporter.report("behavior",T(this.behaviorQueue)),this.behaviorQueue=[])}},{key:"getFormFields",value:function(e){for(var t=[],r=e.elements,n=0;n<r.length;n++){var i=r[n];i.name&&t.push({name:i.name,type:i.type,value:"password"===i.type?"***":i.value})}return t}},{key:"extractDomain",value:function(e){try{return new URL(e).hostname}catch(t){return e}}},{key:"generateSessionId",value:function(){return"session_"+Date.now()+"_"+Math.random().toString(36).substr(2,9)}},{key:"getCurrentBehaviors",value:function(){return m({},this.behaviors)}},{key:"getSessionId",value:function(){return this.sessionId}},{key:"destroy",value:function(){this.config.getConfig().reportInterval>0&&this.flushBehaviorQueue(),this.reportTimeOnPage(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.timeTracker&&(clearInterval(this.timeTracker),this.timeTracker=null),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.isInitialized=!1}}])}(),oi=function(){return f(function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;c(this,e),this.config=t,this.reporter=new ei(t),this.eventTracker=r,this.isInitialized=!1,this.observer=null,this.trackedElements=new Map,this.exposureQueue=[],this.reportTimer=null,this.scrollTimer=null,this.useFallback=!1,this.lastReportTime=new Map,this.debounceTime=500,this.defaultOptions={threshold:.5,rootMargin:"0px",scrollThrottle:100}},[{key:"init",value:function(){if(!this.isInitialized){this.isIntersectionObserverSupported()?(this.createObserver(),this.useFallback=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器初始化完成(使用 Intersection Observer API)")):(this.setupFallbackTracking(),this.useFallback=!0,this.config.getConfig().debugSwitch&&console.warn("浏览器不支持 Intersection Observer,使用降级方案(滚动事件追踪)"));var e=this.config.getConfig();e.reportInterval>0&&this.setupPeriodicReport(),this.isInitialized=!0,e.debugSwitch&&console.log("曝光追踪器初始化完成")}}},{key:"isIntersectionObserverSupported",value:function(){return"undefined"!=typeof window&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype}},{key:"createObserver",value:function(){var e=this,t={root:null,rootMargin:this.defaultOptions.rootMargin,threshold:[0,.5,1]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){e.handleIntersection(t)})},t)}},{key:"handleIntersection",value:function(e){var t=e.target,r=this.getElementId(t),n=this.getElementConfig(t),i=n.threshold||this.defaultOptions.threshold,o=e.intersectionRatio;if(o>=i){this.trackedElements.has(r)||this.trackedElements.set(r,{element:t,config:n});var a=this.trackedElements.get(r),s=Date.now(),u=s-(this.lastReportTime.get(r)||0);u>=this.debounceTime?(this.lastReportTime.set(r,s),this.triggerExposure(t,r,a,o,0)):this.config.getConfig().debugSwitch&&console.log("元素 ".concat(r," 跳过上报(去重),距离上次上报 ").concat(u,"ms,需要间隔 ").concat(this.debounceTime,"ms"))}}},{key:"triggerExposure",value:function(e,t,r,n,i){var o,a,s=this,u=this.extractProductInfo(e,r.config),c={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(c=this.eventTracker.getPreviousPageInfo());var l=this.getElementConfig(e),f={uuid:Qn(),timestamp:Date.now(),pageKey:Xn(Gn(window.location.href),this.config.getConfig().uiVersion),pageUri:Gn(window.location.href),eventType:"EXPOSE",viewParam:m({},u),tags:m(m({actionKey:""},l),{},{refer:Gn(null===(o=c)||void 0===o||null===(o=o.previousPage)||void 0===o?void 0:o.url),duration:null===(a=c)||void 0===a?void 0:a.previousPageStayTime})};this.exposureQueue.push(f),0===this.config.getConfig().reportInterval?Promise.resolve().then(function(){s.reporter.report("exposure",s.getReportData([f])).catch(function(e){console.error("曝光上报失败:",e),s.config.getConfig().debugSwitch&&console.error("曝光上报失败详情:",e)})}):this.exposureQueue.length>=this.config.getConfig().maxQueueSize&&this.flushExposureQueue()}},{key:"setupFallbackTracking",value:function(){var e=this;this.observer={observe:function(t){var r=e.getElementId(t);e.trackedElements.has(r)},unobserve:function(t){var r=e.getElementId(t);e.trackedElements.delete(r)},disconnect:function(){e.trackedElements.clear(),e.removeScrollListener()}},this.addScrollListener(),setTimeout(function(){e.checkAllElementsVisibility()},100)}},{key:"addScrollListener",value:function(){var e=this;if(!this.scrollHandler){var t=0,r=this.defaultOptions.scrollThrottle;this.scrollHandler=function(){var n=Date.now();n-t>=r&&(t=n,e.checkAllElementsVisibility())},window.addEventListener("scroll",this.scrollHandler,{passive:!0}),window.addEventListener("touchmove",this.scrollHandler,{passive:!0}),window.addEventListener("resize",this.scrollHandler,{passive:!0})}}},{key:"removeScrollListener",value:function(){this.scrollHandler&&(window.removeEventListener("scroll",this.scrollHandler),window.removeEventListener("touchmove",this.scrollHandler),window.removeEventListener("resize",this.scrollHandler),this.scrollHandler=null)}},{key:"checkAllElementsVisibility",value:function(){var e=this;if(this.useFallback){var t=window.innerHeight,r=window.innerWidth;this.trackedElements.forEach(function(n,i){var o=n.element;if(o&&document.contains(o)){var a=n.config.threshold||e.defaultOptions.threshold,s=e.calculateVisibleRatio(o,0,t,0,r);if(s>=a){var u=Date.now(),c=u-(e.lastReportTime.get(i)||0);c>=e.debounceTime?(e.lastReportTime.set(i,u),e.triggerExposure(o,i,n,s,0),e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 进入可视区域,可见比例: ").concat((100*s).toFixed(2),"%,立即触发曝光"))):e.config.getConfig().debugSwitch&&console.log("元素 ".concat(i," 跳过上报(去重),距离上次上报 ").concat(c,"ms,需要间隔 ").concat(e.debounceTime,"ms"))}}else e.trackedElements.delete(i)})}}},{key:"calculateVisibleRatio",value:function(e,t,r,n,i){var o=e.getBoundingClientRect();if(o.bottom<t||o.top>r||o.right<n||o.left>i)return 0;var a=Math.max(o.top,t),s=Math.min(o.bottom,r),u=Math.max(o.left,n),c=Math.min(o.right,i),l=Math.max(0,c-u)*Math.max(0,s-a),f=o.width*o.height;return 0===f?0:l/f}},{key:"trackProduct",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized)if(e&&"object"===E(e)&&e.nodeType){var n=this.getElementId(e),i=m({},r);this.trackedElements.has(n)&&this.untrackProduct(e),e.setAttribute("data-exposure-tracked","true"),e.setAttribute("data-exposure-config",JSON.stringify(i)),this.trackedElements.set(n,{element:e,config:i}),this.observer&&this.observer.observe(e),this.useFallback&&setTimeout(function(){t.checkAllElementsVisibility()},0),this.config.getConfig().debugSwitch}else console.warn("无效的元素,无法追踪");else console.warn("曝光追踪器未初始化")}},{key:"trackProducts",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isInitialized&&this.observer){var n=[];if("string"==typeof e)n=Array.from(document.querySelectorAll(e));else{if(!Array.isArray(e))return void console.warn("无效的选择器或元素列表");n=e}n.forEach(function(e,n){var i=Array.isArray(r)?r[n]||{}:r;t.trackProduct(e,i)}),this.config.getConfig().debugSwitch}else console.warn("曝光追踪器未初始化")}},{key:"untrackProduct",value:function(e){if(this.observer){var t=this.getElementId(e);this.observer.unobserve&&this.observer.unobserve(e),this.trackedElements.delete(t),this.lastReportTime.delete(t),e&&e.removeAttribute&&(e.removeAttribute("data-exposure-tracked"),e.removeAttribute("data-exposure-config")),this.config.getConfig().debugSwitch&&console.log("取消追踪商品元素: ".concat(t))}}},{key:"untrackAll",value:function(){var e=this;this.observer&&(this.useFallback||this.trackedElements.forEach(function(t,r){t.element&&e.observer.unobserve&&e.observer.unobserve(t.element)}),this.trackedElements.clear())}},{key:"getElementId",value:function(e){if(e.getAttribute("data-exposure-id"))return e.getAttribute("data-exposure-id");if(e._exposureUniqueId)return e._exposureUniqueId;if(e.id)return"id_".concat(e.id);if(e.getAttribute("data-product-id"))return"product_".concat(e.getAttribute("data-product-id"));var t=Qn();return e._exposureUniqueId=t,t}},{key:"getElementConfig",value:function(e){var t=e.getAttribute("data-exposure-config");if(t)try{return JSON.parse(t)}catch(e){return{}}return{}}},{key:"extractProductInfo",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={productId:t.productId||e.getAttribute("data-product-id")||null,productName:t.productName||e.getAttribute("data-product-name")||null,productPrice:t.productPrice||e.getAttribute("data-product-price")||null,productCategory:t.productCategory||e.getAttribute("data-product-category")||null,productImage:t.productImage||e.getAttribute("data-product-image")||null};return Object.keys(r).forEach(function(e){null===r[e]&&delete r[e]}),r}},{key:"setupPeriodicReport",value:function(){var e=this,t=this.config.getConfig().reportInterval;t>0&&(this.reportTimer&&clearInterval(this.reportTimer),this.reportTimer=setInterval(function(){e.flushExposureQueue()},t))}},{key:"getReportData",value:function(e){if(e.length>0){var t=e[0];if(t.tags){var r=function(e){return Array.from(new Set(e))}(e.map(function(e){var t;return null===(t=e.viewParam)||void 0===t?void 0:t.productId}).filter(Boolean));t.tags.exposeContent=(null==r?void 0:r.length)>0?r.join(","):""}return delete t.viewParam,t}return null}},{key:"flushExposureQueue",value:function(){var e=this;if(this.exposureQueue.length>0){var t=T(this.exposureQueue);this.exposureQueue=[],Promise.resolve().then(function(){e.reporter.report("exposure",e.getReportData(t)).catch(function(t){console.error("批量曝光上报失败:",t),e.config.getConfig().debugSwitch&&console.error("批量曝光上报失败详情:",t)})})}}},{key:"reportExposure",value:function(){var e,t,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i={};this.eventTracker&&"function"==typeof this.eventTracker.getPreviousPageInfo&&(i=this.eventTracker.getPreviousPageInfo());var o={uuid:Qn(),timestamp:Date.now(),pageKey:Xn(Gn(window.location.href),this.config.getConfig().uiVersion),pageUri:Gn(window.location.href),eventType:"EXPOSE",viewParam:m({},n),tags:m(m({},config),{},{actionKey:"",refer:Gn(null===(e=i)||void 0===e||null===(e=e.previousPage)||void 0===e?void 0:e.url),duration:null===(t=i)||void 0===t?void 0:t.previousPageStayTime})};Promise.resolve().then(function(){r.reporter.report("exposure",r.getReportData(o)).catch(function(e){console.error("手动曝光上报失败:",e),r.config.getConfig().debugSwitch&&console.error("手动曝光上报失败详情:",e)})})}},{key:"getTrackedElements",value:function(){return Array.from(this.trackedElements.keys())}},{key:"getExposureQueue",value:function(){return T(this.exposureQueue)}},{key:"destroy",value:function(){this.flushExposureQueue(),this.reportTimer&&(clearInterval(this.reportTimer),this.reportTimer=null),this.untrackAll(),this.observer&&(this.observer.disconnect&&this.observer.disconnect(),this.observer=null),this.removeScrollListener(),this.trackedElements.clear(),this.exposureQueue=[],this.lastReportTime.clear(),this.useFallback=!1,this.isInitialized=!1,this.config.getConfig().debugSwitch&&console.log("曝光追踪器已销毁")}}])}(),ai=function(){return f(function e(t){c(this,e),this.config=t,this.integratedSDKs={},this.isInitialized=!1},[{key:"init",value:function(){if(!this.isInitialized){var e=this.config.getThirdPartyConfig();e.baidu&&e.baidu.enabled&&this.initBaiduAnalytics(e.baidu),e.umeng&&e.umeng.enabled&&this.initUmengAnalytics(e.umeng),e.sensors&&e.sensors.enabled&&this.initSensorsAnalytics(e.sensors),e.tencent&&e.tencent.enabled&&this.initTencentAnalytics(e.tencent),e.google&&e.google.enabled&&this.initGoogleAnalytics(e.google),e.custom&&e.custom.enabled&&this.initCustomAnalytics(e.custom),this.isInitialized=!0}}},{key:"initBaiduAnalytics",value:function(e){try{window._hmt?(this.integratedSDKs.baidu={name:"baidu",instance:window._hmt,config:e},e.siteId&&window._hmt.push(["_setAccount",e.siteId]),!1!==e.autoPageview&&window._hmt.push(["_trackPageview"]),console.log("百度统计集成成功")):console.warn("百度统计未加载,请检查脚本是否正确引入")}catch(e){console.error("百度统计集成失败:",e)}}},{key:"initUmengAnalytics",value:function(e){try{window._um?(this.integratedSDKs.umeng={name:"umeng",instance:window._um,config:e},e.siteId&&window._um.push(["setAccount",e.siteId]),!1!==e.autoPageview&&window._um.push(["trackPageview"]),console.log("友盟统计集成成功")):console.warn("友盟统计未加载,请检查脚本是否正确引入")}catch(e){console.error("友盟统计集成失败:",e)}}},{key:"initSensorsAnalytics",value:function(e){try{window.sensors?(this.integratedSDKs.sensors={name:"sensors",instance:window.sensors,config:e},e.serverUrl&&window.sensors.setServerUrl(e.serverUrl),e.siteId&&window.sensors.setSiteId(e.siteId),!1!==e.autoPageview&&window.sensors.trackPageview(),console.log("神策数据集成成功")):console.warn("神策数据未加载,请检查脚本是否正确引入")}catch(e){console.error("神策数据集成失败:",e)}}},{key:"initTencentAnalytics",value:function(e){try{window.MTA?(this.integratedSDKs.tencent={name:"tencent",instance:window.MTA,config:e},e.appId&&window.MTA.setAppId(e.appId),!1!==e.autoPageview&&window.MTA.trackPageview(),console.log("腾讯云分析集成成功")):console.warn("腾讯云分析未加载,请检查脚本是否正确引入")}catch(e){console.error("腾讯云分析集成失败:",e)}}},{key:"initGoogleAnalytics",value:function(e){try{window.gtag?(this.integratedSDKs.google={name:"google",instance:window.gtag,config:e},e.measurementId&&window.gtag("config",e.measurementId,{page_title:document.title,page_location:window.location.href}),console.log("Google Analytics集成成功")):console.warn("Google Analytics未加载,请检查脚本是否正确引入")}catch(e){console.error("Google Analytics集成失败:",e)}}},{key:"initCustomAnalytics",value:function(e){try{if("function"==typeof e.init){var t=e.init(e);this.integratedSDKs.custom={name:"custom",instance:t,config:e},console.log("自定义第三方集成成功")}else console.warn("自定义第三方配置缺少init函数")}catch(e){console.error("自定义第三方集成失败:",e)}}},{key:"reportEvent",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.values(this.integratedSDKs).forEach(function(n){try{t.reportToSDK(n,e,r)}catch(e){console.error("上报事件到".concat(n.name,"失败:"),e)}})}},{key:"reportPageView",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPageViewToSDK(r,t)}catch(e){console.error("上报页面浏览到".concat(r.name,"失败:"),e)}})}},{key:"reportUser",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportUserToSDK(r,t)}catch(e){console.error("上报用户信息到".concat(r.name,"失败:"),e)}})}},{key:"reportPerformance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.values(this.integratedSDKs).forEach(function(r){try{e.reportPerformanceToSDK(r,t)}catch(e){console.error("上报性能指标到".concat(r.name,"失败:"),e)}})}},{key:"reportToSDK",value:function(e,t,r){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent",t,JSON.stringify(r)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track",t,r]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track(t,r);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat(t,r);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event",t,r);break;case"custom":e.instance&&"function"==typeof e.instance.track&&e.instance.track(t,r);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPageViewToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackPageview",t.url||window.location.href]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["trackPageview",t.url||window.location.href]);break;case"sensors":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t);break;case"tencent":e.instance&&e.instance.trackPageview&&e.instance.trackPageview(t.url||window.location.href);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("config",e.config.measurementId,{page_title:t.title||document.title,page_location:t.url||window.location.href});break;case"custom":e.instance&&"function"==typeof e.instance.trackPageview&&e.instance.trackPageview(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportUserToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&(e.instance.push(["_setUserTag","userId",t.userId]),e.instance.push(["_setUserTag","userType",t.userType]));break;case"umeng":e.instance&&e.instance.push&&(e.instance.push(["setUserTag","userId",t.userId]),e.instance.push(["setUserTag","userType",t.userType]));break;case"sensors":e.instance&&e.instance.setProfile&&e.instance.setProfile(t);break;case"tencent":e.instance&&e.instance.setUserInfo&&e.instance.setUserInfo(t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("set","user_id",t.userId);break;case"custom":e.instance&&"function"==typeof e.instance.setUser&&e.instance.setUser(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"reportPerformanceToSDK",value:function(e,t){switch(e.name){case"baidu":e.instance&&e.instance.push&&e.instance.push(["_trackEvent","performance",JSON.stringify(t)]);break;case"umeng":e.instance&&e.instance.push&&e.instance.push(["track","performance",t]);break;case"sensors":e.instance&&e.instance.track&&e.instance.track("performance",t);break;case"tencent":e.instance&&e.instance.Event&&e.instance.Event.stat&&e.instance.Event.stat("performance",t);break;case"google":e.instance&&"function"==typeof e.instance&&e.instance("event","performance",t);break;case"custom":e.instance&&"function"==typeof e.instance.trackPerformance&&e.instance.trackPerformance(t);break;default:console.warn("未知的SDK类型: ".concat(e.name))}}},{key:"isSDKIntegrated",value:function(e){return!!this.integratedSDKs[e]}},{key:"getIntegratedSDKs",value:function(){return Object.keys(this.integratedSDKs)}},{key:"getSDKInstance",value:function(e){var t;return(null===(t=this.integratedSDKs[e])||void 0===t?void 0:t.instance)||null}},{key:"destroy",value:function(){Object.values(this.integratedSDKs).forEach(function(e){try{e.instance&&"function"==typeof e.instance.destroy&&e.instance.destroy()}catch(t){console.error("销毁".concat(e.name,"失败:"),t)}}),this.integratedSDKs={},this.isInitialized=!1}}])}(),si=function(){return f(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),this.config={appId:t.appId||"",appVersion:t.appVersion||"1.0.0",environment:t.environment||"production",debugSwitch:!0===t.debugSwitch,customerId:t.customerId||"",userId:t.userId||"",deviceNo:t.deviceNo||"",deviceId:t.userId||"",uiVersion:t.uiVersion||"",sessionId:t.sessionId||qn(),reportUrl:t.reportUrl||"",reportInterval:t.reportInterval||5e3,maxQueueSize:t.maxQueueSize||100,enableErrorTracking:!1!==t.enableErrorTracking,enableUnhandledRejection:!1!==t.enableUnhandledRejection,enableResourceError:!1!==t.enableResourceError,enableEventTracking:!1!==t.enableEventTracking,enableClickTracking:!1!==t.enableClickTracking,enablePageViewTracking:!1!==t.enablePageViewTracking,enablePerformanceTracking:!1!==t.enablePerformanceTracking,enableResourceTracking:!1!==t.enableResourceTracking,enableApiTracking:!1!==t.enableApiTracking,enableInteractionTracking:!1!==t.enableInteractionTracking,enableRouteTracking:!1!==t.enableRouteTracking,enableUserInteractionTracking:!1!==t.enableUserInteractionTracking,enableFormTracking:!1!==t.enableFormTracking,enableScrollTracking:!1!==t.enableScrollTracking,enableMouseTracking:!1!==t.enableMouseTracking,enableKeyboardTracking:!1!==t.enableKeyboardTracking,thirdPartyConfig:t.thirdPartyConfig||{},user:t.user||null,customReport:t.customReport||null},this.user=null},[{key:"updateConfig",value:function(e){this.config=m(m({},this.config),e)}},{key:"setUser",value:function(e){this.user=e}},{key:"getConfig",value:function(){return this.config}},{key:"getUser",value:function(){return this.user}},{key:"getReportUrl",value:function(){return this.config.reportUrl}},{key:"getThirdPartyConfig",value:function(){return this.config.thirdPartyConfig}},{key:"isErrorTrackingEnabled",value:function(){return this.config.enableErrorTracking}},{key:"isEventTrackingEnabled",value:function(){return this.config.enableEventTracking}},{key:"getConfigSessionId",value:function(){return this.config.sessionId}}])}();"undefined"==typeof window||null!==(Wn=window)&&void 0!==Wn&&Wn.axios||(window.axios=Wt);var ui=function(){return f(function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};c(this,e),this.config=new si(t),this.errorTracker=new ti(this.config),this.eventTracker=new ri(this.config),this.performanceTracker=new ni(this.config,this.eventTracker),this.userBehaviorTracker=new ii(this.config),this.exposureTracker=new oi(this.config,this.eventTracker),this.thirdPartyIntegrator=new ai(this.config),this.init()},[{key:"init",value:function(){this.eventTracker.init(),this.exposureTracker.init(),this.thirdPartyIntegrator.init(),console.log("Frontend SDK 初始化完成")}},{key:"reportError",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.errorTracker.reportError(e,t)}},{key:"reportEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.eventTracker.reportEvent(e,t)}},{key:"getPreviousPageInfo",value:function(){return this.eventTracker.getPreviousPageInfo()}},{key:"getCurrentPageStayTime",value:function(){return this.eventTracker.getCurrentPageStayTime()}},{key:"getPageHistory",value:function(){return this.eventTracker.pageHistory||[]}},{key:"reportPerformance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.performanceTracker.reportPerformance(e)}},{key:"reportBehavior",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.userBehaviorTracker.reportCustomBehavior(e,t)}},{key:"setUser",value:function(e){this.config.setUser(e),this.thirdPartyIntegrator.reportUser(e)}},{key:"setConfig",value:function(e){this.config.updateConfig(e)}},{key:"getPerformanceMetrics",value:function(){return this.performanceTracker.getCurrentMetrics()}},{key:"getBehaviorData",value:function(){return this.userBehaviorTracker.getCurrentBehaviors()}},{key:"getSessionId",value:function(){return this.config.getConfigSessionId()}},{key:"isThirdPartySDKIntegrated",value:function(e){return this.thirdPartyIntegrator.isSDKIntegrated(e)}},{key:"getIntegratedThirdPartySDKs",value:function(){return this.thirdPartyIntegrator.getIntegratedSDKs()}},{key:"setupVueRouterMonitoring",value:function(e){e?this.config.config.enableRouteTracking&&this.performanceTracker.setupVueRouterMonitoring(e):console.warn("Vue Router 实例未提供")}},{key:"getCurrentRoute",value:function(){return this.performanceTracker.getCurrentRoute()}},{key:"getRouteHistory",value:function(){return this.performanceTracker.getRouteHistory()}},{key:"getCurrentRouteStayTime",value:function(){return this.performanceTracker.getCurrentPageStayTime()}},{key:"getRoutePerformanceStats",value:function(){return this.performanceTracker.getRoutePerformanceStats()}},{key:"trackProduct",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProduct(e,t)}},{key:"trackProducts",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.exposureTracker.trackProducts(e,t)}},{key:"untrackProduct",value:function(e){return this.exposureTracker.untrackProduct(e)}},{key:"untrackAllProducts",value:function(){return this.exposureTracker.untrackAll()}},{key:"reportExposure",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.exposureTracker.reportExposure(e)}},{key:"getTrackedProducts",value:function(){return this.exposureTracker.getTrackedElements()}},{key:"getExposureQueue",value:function(){return this.exposureTracker.getExposureQueue()}},{key:"flushExposureQueue",value:function(){return this.exposureTracker.flushExposureQueue()}},{key:"destroy",value:function(){this.errorTracker.destroy(),this.eventTracker.destroy(),this.performanceTracker.destroy(),this.userBehaviorTracker.destroy(),this.exposureTracker.destroy(),this.thirdPartyIntegrator.destroy(),console.log("Frontend SDK 已销毁")}}])}();export{ui as default,Bn as performanceNow};
4
4
  //# sourceMappingURL=index.esm.js.map