Ai
4 Star 3 Fork 2

Ax/webpack-test-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sgm-web-main-3.0.6.js 78.63 KB
一键复制 编辑 原始数据 按行查看 历史
Ax 提交于 2023-06-16 17:02 +08:00 . tree-graph-react
/*! JD SGM Web前端监控脚本; Version 3.0.6; BuildTime 1679641645280; 京Me群82402193、yangjijiang@jd.com */var WIN=window;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("crypto-js/core"),require("crypto-js/aes")):"function"==typeof define&&define.amd?define(["crypto-js/core","crypto-js/aes"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).SgmWebSdkMain=t()}(this,(function(){"use strict";function e(){e=function(){return t};var t={},n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new E(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return T()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=l(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===f)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,a),o}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var f={};function h(){}function p(){}function d(){}var v={};u(v,o,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(O([])));m&&m!==n&&r.call(m,o)&&(v=m);var y=d.prototype=h.prototype=Object.create(v);function b(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){function n(i,o,a,s){var u=l(e[i],e,o);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){c.value=e,a(c)}),(function(e){return n("throw",e,a,s)}))}s(u.arg)}var i;this._invoke=function(e,r){function o(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(o,o):o()}}function w(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,w(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=l(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:T}}function T(){return{value:void 0,done:!0}}return p.prototype=d,u(y,"constructor",d),u(d,"constructor",p),p.displayName=u(d,s,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,u(e,s,"GeneratorFunction")),e.prototype=Object.create(y),e},t.awrap=function(e){return{__await:e}},b(S.prototype),u(S.prototype,a,(function(){return this})),t.AsyncIterator=S,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new S(c(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(y),u(y,s,"Generator"),u(y,o,(function(){return this})),u(y,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=O,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;k(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},t}function t(e){return t="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},t(e)}function n(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,u,"next",e)}function u(e){n(a,i,o,s,u,"throw",e)}s(void 0)}))}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function l(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function f(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(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 v(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.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)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var m=String.prototype.replace,y=/%20/g,b="RFC3986",S={default:b,formatters:{RFC1738:function(e){return m.call(e,y,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:b},w=Object.prototype.hasOwnProperty,x=Array.isArray,k=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),E=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},O={arrayToObject:E,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var i=t[r],o=i.obj[i.prop],a=Object.keys(o),s=0;s<a.length;++s){var u=a[s],c=o[u];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:o,prop:u}),n.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(x(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,r,i){if(0===e.length)return e;var o=e;if("symbol"==typeof e?o=Symbol.prototype.toString.call(e):"string"!=typeof e&&(o=String(e)),"iso-8859-1"===n)return escape(o).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",s=0;s<o.length;++s){var u=o.charCodeAt(s);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===S.RFC1738&&(40===u||41===u)?a+=o.charAt(s):u<128?a+=k[u]:u<2048?a+=k[192|u>>6]+k[128|63&u]:u<55296||u>=57344?a+=k[224|u>>12]+k[128|u>>6&63]+k[128|63&u]:(s+=1,u=65536+((1023&u)<<10|1023&o.charCodeAt(s)),a+=k[240|u>>18]+k[128|u>>12&63]+k[128|u>>6&63]+k[128|63&u])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(x(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(x(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!w.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var i=t;return x(t)&&!x(n)&&(i=E(t,r)),x(t)&&x(n)?(n.forEach((function(n,i){if(w.call(t,i)){var o=t[i];o&&"object"==typeof o&&n&&"object"==typeof n?t[i]=e(o,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var o=n[i];return w.call(t,i)?t[i]=e(t[i],o,r):t[i]=o,t}),i)}},T=O,I=Object.prototype.hasOwnProperty,R=Array.isArray,C={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:T.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},N=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},j=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},P=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(i),s=a?i.slice(0,a.index):i,u=[];if(s){if(!n.plainObjects&&I.call(Object.prototype,s)&&!n.allowPrototypes)return;u.push(s)}for(var c=0;n.depth>0&&null!==(a=o.exec(i))&&c<n.depth;){if(c+=1,!n.plainObjects&&I.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+i.slice(a.index)+"]"),function(e,t,n,r){for(var i=r?t:j(t,n),o=e.length-1;o>=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(a=[])[c]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(u,t,n,r)}},L=function(e,t){var n=function(e){if(!e)return C;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?C.charset:e.charset;return{allowDots:void 0===e.allowDots?C.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:C.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:C.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:C.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:C.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:C.comma,decoder:"function"==typeof e.decoder?e.decoder:C.decoder,delimiter:"string"==typeof e.delimiter||T.isRegExp(e.delimiter)?e.delimiter:C.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:C.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:C.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:C.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:C.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:C.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,a=i.split(t.delimiter,o),s=-1,u=t.charset;if(t.charsetSentinel)for(n=0;n<a.length;++n)0===a[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[n]?u="utf-8":"utf8=%26%2310003%3B"===a[n]&&(u="iso-8859-1"),s=n,n=a.length);for(n=0;n<a.length;++n)if(n!==s){var c,l,f=a[n],h=f.indexOf("]="),p=-1===h?f.indexOf("="):h+1;-1===p?(c=t.decoder(f,C.decoder,u,"key"),l=t.strictNullHandling?null:""):(c=t.decoder(f.slice(0,p),C.decoder,u,"key"),l=T.maybeMap(j(f.slice(p+1),t),(function(e){return t.decoder(e,C.decoder,u,"value")}))),l&&t.interpretNumericEntities&&"iso-8859-1"===u&&(l=N(l)),f.indexOf("[]=")>-1&&(l=R(l)?[l]:l),I.call(r,c)?r[c]=T.combine(r[c],l):r[c]=l}return r}(e,n):e,i=n.plainObjects?Object.create(null):{},o=Object.keys(r),a=0;a<o.length;++a){var s=o[a],u=P(s,r[s],n,"string"==typeof e);i=T.merge(i,u,n)}return!0===n.allowSparse?i:T.compact(i)};function M(e){e&&"object"===t(e)&&(e.appName="sgm-js",WIN.__sgm__.error(e))}function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=/[^\w.$]/;if(t.test(e))return function(){};var n=e.split(".");return function(e){for(var t=0;t<n.length;t++){if(!e)return;e=e[n[t]]}return e}}function _(e){var t={};try{if(e)if(U(e,"Object"))t=e;else if(U(e,"String"))try{t=JSON.parse(e.toString())}catch(n){t=L(e)}}catch(e){}return t}function B(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.location,n=t.origin,r=t.protocol,i=t.host,o=t.hostname,a=t.port;return 0===e.indexOf("http")?e:0===e.indexOf("//")?r+e:(n||"".concat(r,"//").concat(i||o+(a?":".concat(a):"")))+(0===e.indexOf("/")?e:"/".concat(e))}function W(e){if(e){var t={js:["js"],css:["css"],img:["jpg","jpeg","png","gif","ico","svg","avif","apng","webp"],other:["woff","woff2","eot","ttf","otf","json","htm","html","txt","pdf","md","mp3","mp4","mov","ogg","webm"]};try{e=B(e);var n=new URL(e).pathname,r=n.lastIndexOf(".");if(r>1){var i=n.substring(r+1).toLowerCase(),o=Object.keys(t).find((function(e){return t[e].includes(i)}));if(o)return{type:o,href:e,extName:i}}}catch(e){}}}function U(e,t){return"Array"===t&&Array.isArray?Array.isArray(e):Object.prototype.toString.call(e)==="[object ".concat(t,"]")}function F(e){var t=new RegExp("(^| )"+e+"=([^;]*)(;|$)"),n=document.cookie.match(t);return n?window.decodeURIComponent(n[2]||""):""}function D(e){switch(e){case 0:return"navigate";case 1:return"reload";case 2:return"back_forward";case 255:return"prerender";default:return""}}function G(e){var t=e||{},n=t.data,r=t.headers,i=void 0===r?{"Content-Type":"application/x-www-form-urlencoded"}:r,o=i["Content-Type"];return o.includes("application/x-www-form-urlencoded")&&U(n,"Object")?e.data=Object.keys(n).map((function(e){return"".concat(e,"=").concat(n[e]).replace(/\+/g,"%2B")})).join("&"):o.includes("application/json")&&(e.data=JSON.stringify(n)),i["Content-Crypto"]="none",e.headers=i,function(e){var t=e.url,n=e.data,r=e.headers,i=e.async,o=void 0===i||i,a=window.__sgm__oldFetch||window.fetch;return a&&n.length<65535?a(t,{method:"POST",body:n,headers:r,keepalive:o}).then((function(e){var t=e.status,n=e.statusText;if(t>=200&&t<400)return e.text();if(0===t){var r=new Error("Fail网络");throw r.code="fail",r}if(401===t){var i=new Error("Token过期");throw i.code="token",i}var o=new Error(n||"获取数据出错");throw o.code="api",o})).catch((function(e){throw e.code=e.code||"fail",e})):new Promise((function(e,i){var a=new XMLHttpRequest,s=a.__sgm__oldXHROpen||a.open,u=a.__sgm__oldXHRSend||a.send;for(var c in s.call(a,"POST",t,o),r)a.setRequestHeader(c,r[c]);a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){var t=a.status,n=a.statusText,r=a.responseText;if(t>=200&&t<400)e(r);else if(0===t){var o=new Error("Fail网络");o.code="fail",i(o)}else if(401===t){var s=new Error("Token过期");s.code="token",i(s)}else{var u=new Error(n||"获取数据出错");u.code="api",i(u)}}},u.call(a,n)}))}(e)}var H=["base"],q=["base"],X=function(){function t(e){i(this,t),this.sendFailCount=0,this.isStop=!1,this.config=e,window.addEventListener("beforeunload",this.sendBeaconHandler()),window.addEventListener("pagehide",this.sendBeaconHandler()),document.addEventListener("visibilitychange",this.sendBeaconHandler())}return a(t,[{key:"register",value:function(e){return this.plugins=e,this}},{key:"start",value:function(){var n,i=this,o=(n=r(e().mark((function n(r){return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:clearTimeout(i.sendTimeout),!i.isStop&&i.sendFailCount<7&&(i.sendTimeout=setTimeout((function(){r||(r=i.onUpdate());var e=r;e.base;var n=l(e,H);n&&i.isLength(n)?G({url:i.config.getReporterUrl(),data:i.onTransform(r),headers:t.HEADERS}).then((function(e){i.sendFailCount=0,o(null)})).catch((function(e){i.sendFailCount++,o(r)})):o(null)}),1e3*(i.config.getReporterBatchSecond()+(i.sendFailCount&&Math.pow(2,i.sendFailCount)))));case 2:case"end":return e.stop()}}),n)}))),function(e){return n.apply(this,arguments)});o(null)}},{key:"stop",value:function(){this.isStop=!0,clearTimeout(this.sendTimeout)}},{key:"sendBeaconHandler",value:function(){var e=this;return function(n){if("visibilitychange"!==n.type||document.hidden){var r=e.onUpdate();r.base;var i=l(r,q);i&&e.isLength(i)&&G({url:e.config.getReporterUrl(),data:e.onTransform(r),headers:t.HEADERS}).catch((function(e){}))}}}},{key:"onUpdate",value:function(){var e=this,t={};return this.plugins.forEach((function(n){var r=n.consume();e.config.getGlobStatus()&&n.getStatus()&&(t[n.getName()]=r)})),t}},{key:"onTransform",value:function(e){var t=this.config,n=JSON.stringify(e);return{log:encodeURIComponent(n),"Sgm-Token":t.getToken(),"Sgm-SDK-Version":t.getVersion()}}},{key:"isLength",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=!1;for(var n in e)if(e[n].length){t=!0;break}return t}}]),t}(),V=X;V.HEADERS={"Content-Type":"application/x-www-form-urlencoded"};var $=function(){function e(t,n,r,o){i(this,e),this.initDomain="https://lyra-m.jdcloud.com",this.initAppInfoSecond=600,this.reporterBatchSecond=5,this.updateTime=Date.now(),this.sid=t,this.version=n,r&&(this.uid=r),o&&(this.initDomain=o)}return a(e,[{key:"getVersion",value:function(){return this.version}},{key:"setGlobStatus",value:function(e){this.globStatus=e}},{key:"getGlobStatus",value:function(){return this.globStatus}},{key:"getInitUrl",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.initDomain+e}},{key:"setInitAppInfoSecond",value:function(e){this.initAppInfoSecond=e}},{key:"getInitAppInfoSecond",value:function(){return this.initAppInfoSecond}},{key:"setReportDomain",value:function(e){this.reportDomain=e||this.initDomain}},{key:"setReporterPath",value:function(e){this.reporterPath=e}},{key:"getReporterUrl",value:function(){return this.reportDomain+this.reporterPath}},{key:"setReporterBatchSecond",value:function(e){this.reporterBatchSecond=e}},{key:"getReporterBatchSecond",value:function(){return this.reporterBatchSecond}},{key:"setUid",value:function(e){this.uid=e||void 0}},{key:"getUid",value:function(){return this.uid}},{key:"setToken",value:function(e){this.token=e}},{key:"getToken",value:function(){return this.token}},{key:"setSecret",value:function(e){this.secret=e}},{key:"getSecret",value:function(){return this.secret}},{key:"getSid",value:function(){return this.sid}},{key:"setUpdateTime",value:function(e){this.updateTime=e}},{key:"getUpdateTime",value:function(){return this.updateTime}}]),e}(),K={prefix:"__sgm__",isEncrypt:!0},z=function(e,t){window.localStorage.setItem(e,t)},J=function(e){return window.localStorage.getItem(e)},Y=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(""!==t&&null!=t||(t=null),isNaN(n)||n<0)throw new Error("Expire must be a number");var r={value:t};n&&(r={value:t,time:Date.now(),expire:1e3*n});var i=K.isEncrypt?ee(JSON.stringify(r)):JSON.stringify(r);z(Z(e),i)},Q=function(e){var t;t=Z(e),window.localStorage.removeItem(t)},Z=function(e){var t,n,r,i=null!=(t=null==K?void 0:K.prefix)?t:"";return(null!=(r=null==(n=WIN[i])?void 0:n.id)?r:"")+i+e},ee=function(e){if("object"===t(e))try{e=JSON.stringify(e)}catch(e){}return btoa(e)},te=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return atob(e)},ne=function(t){s(u,t);var n,o=h(u);function u(e,t,n,r,a,s){var c;return i(this,u),(c=o.call(this,e,r,a,s)).appKey=t,c.sdkName=n,c.createDeviceId(),c}return a(u,[{key:"init",value:(n=r(e().mark((function t(n){var r,i,o;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.url=this.getInitUrl(n),r="{ 'text':'".concat(this.getDeviceId(),"', 'sid':'").concat(this.getSid(),"' }"),i={log:encodeURIComponent(r),"Sgm-Pid":this.getAppKey(),"Sgm-SDK-Version":this.getVersion()},e.next=6,this.update(i);case 6:return o=e.sent,e.abrupt("return",o);case 8:case"end":return e.stop()}}),t,this)}))),function(e){return n.apply(this,arguments)})},{key:"requestConfig",value:function(e,t){var n=function(e){try{if(e=Z(e),!J(e)||"null"===JSON.stringify(J(e)))return null;var t=K.isEncrypt?JSON.parse(te(J(e))):JSON.parse(J(e));if(t.expire){var n=Date.now();return t.expire<n-t.time?(Q(e),null):t.value}return t.value}catch(t){return Q(e),null}}("init");return n?new Promise((function(e){e(n)})):G({url:e,data:t}).then((function(e){var t=JSON.parse(e).config;if(t){var n=t.initInterval/1e3;Y("init",e,n<=0?1:n)}return e})).catch((function(e){throw e}))}},{key:"update",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return clearTimeout(this.loopTimeout),new Promise((function(r,i){t.loopTimeout=setTimeout((function(){t.requestConfig(t.url,e).then((function(e){var n=JSON.parse(e);t.setUpdateTime(Date.now()),t.dispatchEvent(n),t.setConfig(n),r(n)})).catch((function(e){t.setGlobStatus(!1),Q("init"),"fail"!==e.code&&M(e)})).then((function(){Y("config",{globStatus:t.getGlobStatus(),apiStatus:t.getApiStatus(),errorStatus:t.getErrorStatus(),resourceStatus:t.getResourceStatus(),customStatus:t.getCustomStatus(),pageStatus:t.getPageTimingStatus(),corsWhiteList:t.getCorsWhiteList()}),t.update(e,60)}))}),1e3*n)}))}},{key:"setConfig",value:function(e){if(e&&Object.keys(e).length){var t=e.config,n=e.token,r=e.secret,i=t.reportDomain,o=t.logInterval,a=t.sgmLogState,s=t.errorLogState,u=t.corsWhiteList,c=t.pageContextLevel,l=t.pageResourceState,f=t.customLogState,h=t.loadAvgLogState,p=t.vitalsState,d=t.userAgentState,v=o/1e3;v<=0&&(v=1),this.config=t,this.setToken(n),this.setSecret(r),this.setReporterPath("/h5"),this.setReportDomain(i),this.setReporterBatchSecond(v),this.setCustomStatus(f),this.setApiStatus(a),this.setErrorStatus(s),this.setResourceStatus(l),this.setPageTimingStatus(h),this.setVitalsStatus(p),this.setUserAgentStatus(d),this.setCorsWhiteList(u),this.setPageLevel(c),this.setGlobStatus(!0)}else this.setGlobStatus(!1)}},{key:"getConfig",value:function(e){return e?this.config[e]:this.config}},{key:"getAppKey",value:function(){return this.appKey}},{key:"getSdkName",value:function(){return this.sdkName}},{key:"setApiStatus",value:function(e){this.apiStatus=e}},{key:"getApiStatus",value:function(){return this.apiStatus}},{key:"setErrorStatus",value:function(e){this.errorStatus=e}},{key:"getErrorStatus",value:function(){return this.errorStatus}},{key:"setResourceStatus",value:function(e){this.resourceState=e}},{key:"getResourceStatus",value:function(){return this.resourceState}},{key:"setCustomStatus",value:function(e){this.customLogStatus=e}},{key:"getCustomStatus",value:function(){return this.customLogStatus}},{key:"setCorsWhiteList",value:function(e){this.corsWhiteList=e}},{key:"getPageTimingStatus",value:function(){return this.pageTimingStatus}},{key:"setPageTimingStatus",value:function(e){this.pageTimingStatus=e}},{key:"setVitalsStatus",value:function(e){this.vitalsStatus=e}},{key:"getVitalsStatus",value:function(){return this.vitalsStatus}},{key:"setUserAgentStatus",value:function(e){this.userAgentStatus=e}},{key:"getUserAgentStatus",value:function(){return this.userAgentStatus}},{key:"getCorsWhiteList",value:function(){return this.corsWhiteList}},{key:"setPageLevel",value:function(e){this.pageLevel=e}},{key:"getPageLevel",value:function(){return this.pageLevel}},{key:"createDeviceId",value:function(){var e=J("deviceId");e||(e=window&&void 0!==window.crypto&&window.crypto.getRandomValues?([1e7].toString()+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^window.crypto.getRandomValues(new window.Uint8Array(1))[0]&15>>e/4).toString(16)})):"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),z("deviceId",e)),this.deviceId=e}},{key:"getDeviceId",value:function(){return this.deviceId}}]),u}($),re=function(e){s(n,e);var t=h(n);function n(e,r,o,a,s,u){return i(this,n),t.call(this,e,r,o,a,s,u)}return a(n,[{key:"dispatchEvent",value:function(e){}}]),n}(ne),ie=function(){function e(t,n,r){i(this,e),this.name=t,this.status=n,this.config=r}return a(e,[{key:"watcher",value:function(e){var t,n=this,r=this.config,i=this.production,o=WIN["__sgm__"+r.getAppKey()][e];o&&(o.push=new Proxy(o.push,{apply:function(e,a,s){Reflect.apply.apply(Reflect,arguments),t!==r.getUpdateTime()&&(n.onConfig(r.getConfig()),t=r.getUpdateTime()),i.call(n,o),o.length=0}}),o.push())}},{key:"getName",value:function(){return this.name}},{key:"getStatus",value:function(){return"boolean"==typeof this.status?!!this.status:!!this.config.getConfig(this.status.toString())}},{key:"getConfig",value:function(e){return e?this.config.getConfig(e):this.config}},{key:"onConfig",value:function(e){}},{key:"production",value:function(e){}}],[{key:"limiting",value:function(t){var n=e.MAX_LOG_COUNT;if(t<n){if(!(t>=.6*n))return!0;var r=1-t/n;if(Math.random()<r)return!0}}}]),e}(),oe=ie;oe.MAX_LOG_COUNT=1e3;var ae,se=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this,"base",!0,e)).storage=r,o}return a(n,[{key:"consume",value:function(){return this.storage.update()}}]),n}(oe),ue=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this,"n","sgmLogState",e)).excludes=["https://hmma.baidu.com/mini.gif"],o.excludeRegExps=[],o.storage=[],o.tempItems=[],o.factory=r,o.excludes.push(e.getReporterUrl()),o.watcher("apiStorage"),o}return a(n,[{key:"onConfig",value:function(e){this.excludeRegExps=[].concat(d(this.excludes),d(e.apiPathBlackList||[])).map((function(e){return new RegExp(e)}))}},{key:"production",value:function(e){var t=this;this.tempItems=e.map((function(e){return t.factory.getInfo(e,t.getConfig())})),this.filterItems().removeDuplicates()}},{key:"filterItems",value:function(){var e=this;return this.tempItems=this.tempItems.filter((function(t){return!e.excludeRegExps.find((function(e){return e.test(t.getOri()+t.getPat())}))})),this}},{key:"removeDuplicates",value:function(){var e=this;return this.tempItems.forEach((function(t){oe.limiting(e.storage.length)&&e.storage.push(t)})),this}},{key:"consume",value:function(){var e=this.storage;return this.storage=[],e}}]),n}(oe),ce=function(){function e(){i(this,e)}return a(e,null,[{key:"generateFullXPath",value:function(e){for(var t="";e&&e.nodeType===this.EN;){var n=e.tagName.toLowerCase(),r=this.getElementIndex(e);r>=1&&(n+="["+r+"]"),t="/"+n+t,e=e.parentNode}return t}},{key:"getElementIndex",value:function(e){for(var t=1,n=e.previousSibling;n;)n.nodeType===this.EN&&this.compareTagNameEqual(e,n)&&t++,n=n.previousSibling;if(t>1)return t;for(n=e.nextSibling;n;){if(n.nodeType===this.EN&&this.compareTagNameEqual(e,n))return 1;n=n.nextSibling}return 0}},{key:"compareTagNameEqual",value:function(e,t){var n=t;return e.tagName===n.tagName}}]),e}();ce.EN=null!=(ae=null==Node?void 0:Node.ELEMENT_NODE)?ae:1;var le,fe,he,pe,de=function(){function e(t,n){var r=t.key,o=t.time,a=t.pageUrl,s=t.referrer,u=t.mode;i(this,e),this.und=r,this.ltm=o,this.rem=u,this.ete=n,this.url=a,this.ref=s}return a(e,[{key:"setHash",value:function(){this.hah=function(e,t){if(!e||!t)return"null";for(var n=0,r=0,i=0;i<e.length;i++)n+=e[i].charCodeAt();for(var o=0;o<t.length;o++)r+=t[o].charCodeAt();var a=n+""+t[t.length-1].charCodeAt()+r+e[e.length-1].charCodeAt();return a&&(a+="ABCDEFGHJKMNPQRSTWXYZ"[a[a.length-1]]),a}(this.ete+this.eme,"".concat(this.elo,":").concat(this.eco))}},{key:"getHash",value:function(){return this.hah}},{key:"getTime",value:function(){return this.ltm}},{key:"setBehavior",value:function(e,t,n){if(e&&(this.tet=e.tagName,this.tdh=this.getSelector(e)),t){var r=t.type;t.path;var i=t.pageX,o=t.pageY,a=t.screenX,s=t.screenY,u=t.target;this.eve=r,this.pgx=i,this.pgy=o,this.scx=a,this.scy=s,this.tgt=u&&u.tagName,this.dpa=this.getSelector(u)}if(n){var c=n.soy,l=n.som,f=n.rat,h=n.ram;this.soy=c,this.som=l,this.rat=f,this.ram=h}}},{key:"getSelector",value:function(e){return e?ce.generateFullXPath(e):void 0}},{key:"setFileName",value:function(e){this.fil=null==e?void 0:e.trim(),/\/sgm-((web)|(mp))[-\w.]*\.js$/.test(this.fil)&&this.setApp("sgm-js")}},{key:"setMessage",value:function(e){this.eme=(e+"").substring(0,256)}},{key:"setPosition",value:function(e,t){this.elo=e,this.eco=t}},{key:"setStack",value:function(e){this.esk=e?(e.split("\n").filter((function(e){return!e.includes("Error: ")})).map((function(e){return e.replace(/^\s+at\s+/g,"")})).join("\n")+"").substring(0,512):""}},{key:"setApp",value:function(e){this.ap=e,"sgm-js"===e&&(this.sdk=1)}}],[{key:"getStackDetail",value:function(e){if(!e)return{};var t,n={},r=e.split("\n").filter((function(e){return!e.includes("Error: ")}));if(r.length>=2){var i=(t="".concat(r[0],":").concat(r[1])).indexOf("rror:");i>0&&(t=t.substr(i+5)),Object.assign(n,{mes:t.trim()})}var o=/.*(http[s]?:\/\/.+):(\d+):(\d+)/,a=r.find((function(e){return o.test(e)}));if(a){var s=p(a.match(o),4),u=s[1],c=s[2],l=s[3];u&&(u=u.trim()),(!c||c>2147483647)&&(c=0),(!l||l>2147483647)&&(l=0),Object.assign(n,{fileName:u,lineNo:+c,colNo:+l})}return n}}]),e}(),ve=function(e){s(n,e);var t=h(n);function n(e){var r;i(this,n);var o=e.message,a=e.filename,s=e.lineno,u=e.colno,c=e.error,l=e.type,f=e._extend_,h=f.key,p=f.time,d=f.lastEvent,v=f.scrollInfo,g=f.pageUrl,m=f.referrer,y=f.activeElement,b=f.mode,S=e.msg,w=e.stack,x=e.errorType,k=e.errorLevel,E=e.appName;r=t.call(this,{key:h,time:p,pageUrl:g,referrer:m,mode:b},x||l||"JsError"),1===b?(r.ell=k,r.setApp(E)):w=(c?c.stack:w)||"";var O=de.getStackDetail(w),T=O.fileName,I=O.lineNo,R=void 0===I?0:I,C=O.colNo,N=void 0===C?0:C,j=O.mes;return a&&s&&u||(a=T,s=R,u=N),r.setMessage(o||S||j),r.setStack(w),r.setFileName(a),r.setPosition(s,u),r.setBehavior(y,d,v),r.setHash(),r}return a(n)}(de),ge=function(e){s(r,e);var n=h(r);function r(e){var o;i(this,r);var a=e.reason,s=e.type,u=e._extend_,c=u.key,l=u.time,f=u.lastEvent,h=u.scrollInfo,p=u.pageUrl,d=u.referrer,v=u.activeElement,g=u.mode;if(o=n.call(this,{key:c,time:l,pageUrl:p,referrer:d,mode:g},s||"PromiseError"),"string"==typeof a)o.setMessage(a);else if("object"===t(a)){var m=a.message,y=a.stack;if(m||y){var b=de.getStackDetail(y),S=b.fileName,w=b.lineNo,x=void 0===w?0:w,k=b.colNo,E=void 0===k?0:k;o.setMessage(m),o.setFileName(S),o.setPosition(x,E),o.setStack(y)}else{var O={};for(var T in a){var I=a[T];"function"!=typeof I&&(O[T]=I)}o.setMessage("自定义异常"),o.setStack(JSON.stringify(O).substring(0,512))}}return o.setBehavior(v,f,h),o.setHash(),o}return a(r)}(de),me=function(){function e(){i(this,e)}return a(e,null,[{key:"getInfo",value:function(e){var t=e.target;return"promise"===e._t_?new ge(e):t&&(t.src||t.href)?null:new ve(e)}}]),e}(),ye=function(e){s(n,e);var t=h(n);function n(e){var r;return i(this,n),(r=t.call(this,"je","errorLogState",e)).repeatMaxTime=100,r.excludeRegExps=[],r.excludes=["420248154125F"],r.storage={has:{},stores:[]},r.tempItems=[],r.watcher("errorStorage"),r}return a(n,[{key:"onConfig",value:function(e){this.excludeRegExps=[].concat(d(this.excludes),d(e.errorLogBlackList||[]))}},{key:"production",value:function(e){this.tempItems=e.map((function(e){return me.getInfo(e)})),this.filterItems().removeDuplicates()}},{key:"filterItems",value:function(){var e=this;return this.tempItems=this.tempItems.filter((function(t){return t&&!e.excludeRegExps.includes(t.getHash())})),this}},{key:"removeDuplicates",value:function(){var e=this;return this.tempItems.forEach((function(t){var n=e.storage,r=n.has,i=n.stores;if(oe.limiting(i.length)){var o=t.getTime(),a=t.getHash(),s=r[a];s?e.repeatMaxTime<=o-s.time&&(s.time=o,i.push(t)):(r[a]={time:o},i.push(t))}})),this}},{key:"consume",value:function(){var e=this.storage.stores;return this.storage={has:{},stores:[]},e}}]),n}(oe),be=function(){function e(t,n){i(this,e);var r=t._extend_,o=r.key,a=r.time,s=r.pageUrl,u=r.referrer,c=r.lastEvent;if(this.und=o,this.ltm=a,this.url=s,this.ref=u,this.typ=n,this.stu=void 0===t.stu?200:t.stu,c){var l=c.target;l&&(this.tgt=l.tagName,this.dpa=ce.generateFullXPath(l))}this.initPerformanceResourceTiming(t)}return a(e,[{key:"initPerformanceResourceTiming",value:function(e){var t=e||{},n=t.name,r=t.initiatorType,i=t.nextHopProtocol,o=t.transferSize,a=t.connectStart,s=t.connectEnd,u=t.domainLookupStart,c=t.domainLookupEnd,l=t.duration,f=t.responseStatus;this.rsc=n,this.itt=r,this.ptc=i||void 0,this.bts=o,this.cos=void 0===l?l:Math.round(l),void 0!==s&&void 0!==a&&(this.cot=Math.max(Math.round(s-a),0)),void 0!==c&&void 0!==u&&(this.dnt=Math.max(Math.round(c-u),0)),void 0!==f&&(this.stu=f||200)}},{key:"getUnd",value:function(){return this.und}},{key:"getResourceName",value:function(){return this.rsc}},{key:"getCot",value:function(){return this.cot}},{key:"setState",value:function(e){this.state=e}},{key:"isReporter",value:function(){return(1!=this.state||200!==this.stu)&&!(2==this.state)}},{key:"isFile",value:function(){return!!W(this.rsc)}}]),e}(),Se=function(e){s(n,e);var t=h(n);function n(e,r){var o;i(this,n),o=t.call(this,e,1);var a=(r.getConfig("pageResourceItemState")||{}).jsState,s=void 0===a?0:a;return o.setState(s),o}return a(n)}(be),we=function(e){s(n,e);var t=h(n);function n(e,r){var o;i(this,n),o=t.call(this,e,2);var a=(r.getConfig("pageResourceItemState")||{}).cssState,s=void 0===a?0:a;return o.setState(s),o}return a(n)}(be),xe=function(e){s(n,e);var t=h(n);function n(e,r){var o;i(this,n),o=t.call(this,e,3);var a=(r.getConfig("pageResourceItemState")||{}).imgState,s=void 0===a?1:a;return o.setState(s),o}return a(n)}(be),ke=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this,e,0)).setState(0),o}return a(n)}(be),Ee=function(){function e(){i(this,e)}return a(e,null,[{key:"getInfo",value:function(e,t){var n=(W(e.name)||{}).type;return"js"===n?new Se(e,t):"css"===n?new we(e,t):"img"===n?new xe(e,t):new ke(e,t)}}]),e}(),Oe=function(e){s(n,e);var t=h(n);function n(e,r){var o;return i(this,n),(o=t.call(this,"r","pageResourceState",e)).excludes=[],o.excludeRegExps=[],o.storage=[],o.tempItems=[],o.excludes.push(r+"/sgm-web-"),o.watcher("resourceStorage"),o}return a(n,[{key:"onConfig",value:function(e){this.excludeRegExps=[].concat(d(this.excludes),d(e.pageResourceBlackList||[])).map((function(e){return new RegExp(e)}))}},{key:"production",value:function(e){var t=this;this.tempItems=e.map((function(e){return Ee.getInfo(e,t.getConfig())})),this.filterItems().removeDuplicates()}},{key:"filterItems",value:function(){var e=this;return this.tempItems=this.tempItems.filter((function(t){if(t.isFile()&&t.isReporter()){var n=t.getResourceName();return!e.excludeRegExps.find((function(e){return e.test(n)}))}return!1})),this}},{key:"removeDuplicates",value:function(){var e=this;return this.tempItems.forEach((function(t){oe.limiting(e.storage.length)&&e.storage.push(t)})),this}},{key:"consume",value:function(){var e=this;if(this.storage.length>1){var t=[[],[]];this.storage.forEach((function(e){void 0===e.getCot()?t[0].push(e):t[1].push(e)}));var n={};t[0].forEach((function(r){t[1].some((function(t){if(r.rsc===t.rsc&&!n[t.und])return 200===t.stu&&(t.stu=0),e.storage=e.storage.filter((function(e){return e.getUnd()!==r.und})),n[t.und]=t}))}))}var r=this.storage;return this.storage=[],r}}]),n}(oe),Te=function(){function e(t){var n=t.key,r=t.time,o=t.pageUrl,a=t.referrer,s=t.lastEvent,u=t.type,c=t.code,l=t.msg,f=t.cost1,h=t.cost2,p=t.cost3,d=t.cost4;if(i(this,e),this.und=n,this.ltm=r,this.url=o,this.ref=a,this.lgt=u,this.cod=this.substr(c,128),this.msg=this.substr(l,1024),this.cos1=this.getCos(f),this.cos2=this.getCos(h),this.cos3=this.getCos(p),this.cos4=this.getCos(d),s){var v=s.target;this.tgt=v&&v.tagName,this.dpa=v?ce.generateFullXPath(v):void 0}}return a(e,[{key:"substr",value:function(e,t){return(e+"").substring(0,t)}},{key:"getCos",value:function(e){return 0===e?void 0:e}}]),e}(),Ie=function(e){s(n,e);var t=h(n);function n(e){var r;return i(this,n),(r=t.call(this,"c","customLogState",e)).storage=[],r.tempItems=[],r.watcher("customStorage"),r}return a(n,[{key:"production",value:function(e){this.tempItems=e.map((function(e){return new Te(e)})),this.removeDuplicates()}},{key:"removeDuplicates",value:function(){var e=this;return this.tempItems.forEach((function(t){oe.limiting(e.storage.length)&&e.storage.push(t)})),this}},{key:"consume",value:function(){var e=this.storage;return this.storage=[],e}}]),n}(oe),Re=function(e){s(n,e);var t=h(n);function n(e){var r;i(this,n);var o,a,s=e.key,u=e.time,c=e.pageUrl,l=e.referrer,f=e.openType,h=e.fmp,p="",d="",v=c;try{0===v.indexOf("//")?v="http:"+v:0!==v.indexOf("http://")&&0!==v.indexOf("https://")&&(v="http://"+v);var g=new URL(v);p=g.origin||"",d=g.pathname||"",o=g.search,a=g.hash}catch(e){M(e)}return(r=t.call(this,{und:s,ltm:u,url:p+d,ref:l})).par=o||a||void 0,r.setTyp(f),f||(h>0&&h<12e4&&(r.ite=Math.round(h)),r.getPerformanceResourceTiming()),r}return a(n,[{key:"getPerformanceResourceTiming",value:function(){var e,t;try{if(WIN.performance){var n=WIN.performance.getEntriesByName&&WIN.performance.getEntriesByName("first-paint")||[],r=WIN.performance.getEntriesByType&&WIN.performance.getEntriesByType("navigation")||[];if(t=n[0]||{},!(e=r[0])){var i=WIN.performance,o=i.timing,a=i.navigation||{},s=a.redirectCount,u=a.type;(e=o||{}).redirectCount=s,e.type=D(u),e.startTime=e.navigationStart||0}}}catch(e){M(e)}var c=null==t?void 0:t.startTime,l=e||{},f=l.startTime,h=void 0===f?0:f,p=l.redirectStart,d=void 0===p?0:p,v=l.redirectEnd,g=void 0===v?0:v,m=l.fetchStart,y=void 0===m?0:m,b=l.domComplete,S=void 0===b?0:b,w=l.domainLookupStart,x=void 0===w?0:w,k=l.domainLookupEnd,E=void 0===k?0:k,O=l.connectStart,T=void 0===O?0:O,I=l.connectEnd,R=void 0===I?0:I,C=l.secureConnectionStart,N=void 0===C?0:C,j=l.requestStart,P=void 0===j?0:j,L=l.responseStart,A=void 0===L?0:L,_=l.responseEnd,B=void 0===_?0:_,W=l.domInteractive,U=void 0===W?0:W,F=l.domContentLoadedEventEnd,G=void 0===F?0:F,H=l.loadEventEnd,q=void 0===H?0:H,X=l.redirectCount,V=void 0===X?0:X,$=l.type,K=void 0===$?"":$;this.rdc=V,this.rdt=this.getMaxRound(g-d),this.cct=x&&this.getMaxRound(x-y),this.dnt=this.getMaxRound(E-x),this.cot=this.getMaxRound(R-T),this.slt="https:"===document.location.protocol&&N?this.getMaxRound(R-N):0,this.tbt=this.getMaxRound(B-P),this.tst=this.getMaxRound(B-A),this.dot=this.getMaxRound(S-U),this.ret=q&&this.getMaxRound(q-G),this.fbe=this.getMaxRound(A-h),this.tte=this.getMaxRound(U-h),this.setRte(this.getMaxRound(G-h)),this.setTyp(K),this.setFpt(c&&Math.round(c)),this.setLdt(q&&this.getMaxRound(q-h))}},{key:"getMaxRound",value:function(e){return Math.max(Math.round(e),0)}}]),n}(function(){function e(t){var n=t.und,r=t.ltm,o=t.url,a=t.ref;i(this,e),this.und=n,this.ltm=r,this.url=o,this.ref=a}return a(e,[{key:"getUrl",value:function(){return this.url}},{key:"setFpt",value:function(e){this.fpt=e}},{key:"setLdt",value:function(e){this.ldt=e}},{key:"setTyp",value:function(e){this.typ=e}},{key:"getTyp",value:function(){return this.typ}},{key:"setRte",value:function(e){this.rte=e}}]),e}()),Ce=function(){function e(){i(this,e)}return a(e,null,[{key:"getInfo",value:function(e){return new Re(e)}}]),e}(),Ne=function(e){s(n,e);var t=h(n);function n(e){var r;return i(this,n),(r=t.call(this,"p","loadAvgLogState",e)).excludeRegExps=[],r.storage=[],r.tempItems=[],r.hashRouteState=!0,r.watcher("pageStorage"),r}return a(n,[{key:"onConfig",value:function(e){this.hashRouteState=e.hashRouteState,this.excludeRegExps=d(e.webUrlBlackList||[]).map((function(e){return new RegExp(e)}))}},{key:"production",value:function(e){this.tempItems=e.map((function(e){return Ce.getInfo(e)})),this.filterItems().removeDuplicates()}},{key:"filterItems",value:function(){var e=this;return this.tempItems=this.tempItems.filter((function(t){var n=!(!e.hashRouteState&&"hashChange"===t.getTyp());return t&&!e.excludeRegExps.find((function(e){return e.test(t.getUrl())}))&&n})),this}},{key:"removeDuplicates",value:function(){var e=this;return this.tempItems.forEach((function(t){oe.limiting(e.storage.length)&&e.storage.push(t)})),this}},{key:"consume",value:function(){var e=this.storage;return this.storage=[],e}}]),n}(oe),je=-1,Pe=function(e){addEventListener("pageshow",(function(t){t.persisted&&(je=t.timeStamp,e(t))}),!0)},Le=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Me=function(){var e=Le();return e&&e.activationStart||0},Ae=function(e,t){var n=Le(),r="navigate";return je>=0?r="back-forward-cache":n&&(r=document.prerendering||Me()>0?"prerender":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},_e=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){t(e.getEntries())}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},Be=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},We=function(e,t,n,r){var i,o;return function(a){var s,u;t.value>=0&&(a||r)&&((o=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=(s=t.value)>(u=n)[1]?"poor":s>u[0]?"needs-improvement":"good",e(t))}},Ue=-1,Fe=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},De=function(){Be((function(e){var t=e.timeStamp;Ue=t}),!0)},Ge=function(){return Ue<0&&(Ue=Fe(),De(),Pe((function(){setTimeout((function(){Ue=Fe(),De()}),0)}))),{get firstHiddenTime(){return Ue}}},He=function(e,t){t=t||{};var n,r=[1800,3e3],i=Ge(),o=Ae("FCP"),a=function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(u&&u.disconnect(),e.startTime<i.firstHiddenTime&&(o.value=e.startTime-Me(),o.entries.push(e),n(!0)))}))},s=window.performance&&window.performance.getEntriesByName&&window.performance.getEntriesByName("first-contentful-paint")[0],u=s?null:_e("paint",a);(s||u)&&(n=We(e,o,r,t.reportAllChanges),s&&a([s]),Pe((function(i){o=Ae("FCP"),n=We(e,o,r,t.reportAllChanges),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,n(!0)}))}))})))},qe=!1,Xe=-1,Ve={passive:!0,capture:!0},$e=new Date,Ke=function(e,t){le||(le=t,fe=e,he=new Date,Ye(removeEventListener),ze())},ze=function(){if(fe>=0&&fe<he-$e){var e={entryType:"first-input",name:le.type,target:le.target,cancelable:le.cancelable,startTime:le.timeStamp,processingStart:le.timeStamp+fe};pe.forEach((function(t){t(e)})),pe=[]}},Je=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(n=t,r=e,i=function(){Ke(n,r),a()},o=function(){a()},a=function(){removeEventListener("pointerup",i,Ve),removeEventListener("pointercancel",o,Ve)},addEventListener("pointerup",i,Ve),addEventListener("pointercancel",o,Ve)):Ke(t,e)}var n,r,i,o,a},Ye=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Je,Ve)}))},Qe={},Ze=function e(t){document.prerendering?addEventListener("prerenderingchange",(function(){return e(t)}),!0):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},et=function(e,t){t=t||{};var n=[800,1800],r=Ae("TTFB"),i=We(e,r,n,t.reportAllChanges);Ze((function(){var o=Le();if(o){if(r.value=Math.max(o.responseStart-Me(),0),r.value<0||r.value>performance.now())return;r.entries=[o],i(!0),Pe((function(){r=Ae("TTFB",0),(i=We(e,r,n,t.reportAllChanges))(!0)}))}}))},tt=function(){function e(){i(this,e),this.queue=new Set,this.initWebVitals(),this.und=function(){try{return window&&void 0!==window.crypto&&window.crypto.getRandomValues?+([1e3].toString()+-1e3+-4e3+-8e3+-1e6).replace(/[018]/g,(function(e){return(e^window.crypto.getRandomValues(new window.Uint8Array(1))[0]&15>>e/4).toString()})).replace(/-/g,"").substring(0,18):+"xxx-xxx-4xxx-yxxx-xxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString()})).replace(/-/g,"").substring(0,18)}catch(e){}return 0}(),this.ltm=Date.now(),this.url=document.location.href,this.ref=document.referrer||void 0}return a(e,[{key:"initWebVitals",value:function(){var e=this,t=function(t){e.queue&&e.queue.add(t)};try{!function(e,t){t=t||{};var n,r=[2500,4e3],i=Ge(),o=Ae("LCP"),a=function(e){var t=e[e.length-1];if(t){var r=t.startTime-Me();r<i.firstHiddenTime&&(o.value=r,o.entries=[t],n())}},s=_e("largest-contentful-paint",a);if(s){n=We(e,o,r,t.reportAllChanges);var u=function(){Qe[o.id]||(a(s.takeRecords()),s.disconnect(),Qe[o.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,u,{once:!0,capture:!0})})),Be(u,!0),Pe((function(i){o=Ae("LCP"),n=We(e,o,r,t.reportAllChanges),requestAnimationFrame((function(){requestAnimationFrame((function(){o.value=performance.now()-i.timeStamp,Qe[o.id]=!0,n(!0)}))}))}))}}(t)}catch(e){}try{!function(e,t){t=t||{};var n,r=[100,300],i=Ge(),o=Ae("FID"),a=function(e){e.startTime<i.firstHiddenTime&&(o.value=e.processingStart-e.startTime,o.entries.push(e),n(!0))},s=function(e){e.forEach(a)},u=_e("first-input",s);n=We(e,o,r,t.reportAllChanges),u&&Be((function(){s(u.takeRecords()),u.disconnect()}),!0),u&&Pe((function(){var i;o=Ae("FID"),n=We(e,o,r,t.reportAllChanges),pe=[],fe=-1,le=null,Ye(addEventListener),i=a,pe.push(i),ze()}))}(t)}catch(e){}try{He(t)}catch(e){}try{et(t)}catch(e){}try{!function(e,t){t=t||{};var n=[.1,.25];qe||(He((function(e){Xe=e.value})),qe=!0);var r,i=function(t){Xe>-1&&e(t)},o=Ae("CLS",0),a=0,s=[],u=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=s[0],n=s[s.length-1];a&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,s.push(e)):(a=e.value,s=[e]),a>o.value&&(o.value=a,o.entries=s,r())}}))},c=_e("layout-shift",u);c&&(r=We(i,o,n,t.reportAllChanges),Be((function(){u(c.takeRecords()),r(!0)})),Pe((function(){a=0,Xe=-1,o=Ae("CLS",0),r=We(i,o,n,t.reportAllChanges)})))}(t)}catch(e){}}},{key:"update",value:function(){this.queue&&this.queue.size&&(this.list=d(this.queue).map((function(e){return{name:e.name,value:+e.value.toFixed(3)}})),this.queue.clear()),this.queue=void 0}}]),e}(),nt=function(e){s(n,e);var t=h(n);function n(e){var r;i(this,n),(r=t.call(this,"v","vitalsState",e)).storage=[],r.isNotMark=!0;var o=new tt;return window.addEventListener("beforeunload",(function(){r.setStorage(o)}),!0),window.addEventListener("pagehide",(function(){r.setStorage(o)}),!0),document.addEventListener("visibilitychange",(function(){document.hidden&&r.setStorage(o)}),!0),r.timeOut=setTimeout((function(){r.setStorage(o)}),6e4),r}return a(n,[{key:"consume",value:function(){var e=this.storage;return this.storage=[],e}},{key:"setStorage",value:function(e){this.isNotMark&&(clearTimeout(this.timeOut),this.isNotMark=!1,e.update(),this.storage=[e])}}]),n}(oe),rt={function:!0,object:!0},it=rt["undefined"==typeof window?"undefined":t(window)]&&window,ot=rt["undefined"==typeof exports?"undefined":t(exports)]&&exports,at=rt["undefined"==typeof module?"undefined":t(module)]&&module&&!module.nodeType&&module,st=ot&&at&&"object"==("undefined"==typeof global?"undefined":t(global))&&global;!st||st.global!==st&&st.window!==st&&st.self!==st||(it=st);var ut=Math.pow(2,53)-1,ct=/\bOpera/,lt=Object.prototype,ft=lt.hasOwnProperty,ht=lt.toString;function pt(e){return(e=String(e)).charAt(0).toUpperCase()+e.slice(1)}function dt(e){return e=bt(e),/^(?:webOS|i(?:OS|P))/.test(e)?e:pt(e)}function vt(e,t){for(var n in e)ft.call(e,n)&&t(e[n],n,e)}function gt(e){return null==e?pt(e):ht.call(e).slice(8,-1)}function mt(e){return String(e).replace(/([ -])(?!$)/g,"$1?")}function yt(e,t){var n=null;return function(e,t){var n=-1,r=e?e.length:0;if("number"==typeof r&&r>-1&&r<=ut)for(;++n<r;)t(e[n],n,e);else vt(e,t)}(e,(function(r,i){n=t(n,r,i,e)})),n}function bt(e){return String(e).replace(/^ +| +$/g,"")}var St=function e(n){var r=it,i=n&&"object"==t(n)&&"String"!=gt(n);i&&(r=n,n=null);var o=r.navigator||{},a=o.userAgent||"";n||(n=a);var s,u,c,l,f,h=i?!!o.likeChrome:/\bChrome\b/.test(n)&&!/internal|\n/i.test(ht.toString()),p="Object",d=i?p:"ScriptBridgingProxyObject",v=i?p:"Environment",g=i&&r.java?"JavaPackage":gt(r.java),m=i?p:"RuntimeObject",y=/\bJava/.test(g)&&r.java,b=y&&gt(r.environment)==v,S=y?"a":"α",w=y?"b":"β",x=r.document||{},k=r.operamini||r.opera,E=ct.test(E=i&&k?k["[[Class]]"]:gt(k))?E:k=null,O=n,T=[],I=null,R=n==a,C=R&&k&&"function"==typeof k.version&&k.version(),N=yt([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"],(function(e,t){return e||RegExp("\\b"+(t.pattern||mt(t))+"\\b","i").exec(n)&&(t.label||t)})),j=function(e){return yt(e,(function(e,t){return e||RegExp("\\b"+(t.pattern||mt(t))+"\\b","i").exec(n)&&(t.label||t)}))}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"(?:Edge|Edg|EdgA|EdgiOS)"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Vivaldi","Waterfox","WebPositive",{label:"Yandex Browser",pattern:"YaBrowser"},{label:"UC Browser",pattern:"UCBrowser"},"Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chromium","Chrome",{label:"Chrome",pattern:"(?:HeadlessChrome)"},{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),P=A([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),L=function(e){return yt(e,(function(e,t,r){return e||(t[P]||t[/^[a-z]+(?: +[a-z]+\b)*/i.exec(P)]||RegExp("\\b"+mt(r)+"(?:\\b|\\w*\\d)","i").exec(n))&&r}))}({Apple:{iPad:1,iPhone:1,iPod:1},Alcatel:{},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},Huawei:{},Lenovo:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Oppo:{},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1},Xiaomi:{Mi:1,Redmi:1}}),M=function(e){return yt(e,(function(e,t){var r=t.pattern||mt(t);return!e&&(e=RegExp("\\b"+r+"(?:/[\\d.]+|[ \\w.]*)","i").exec(n))&&(e=function(e,t,n){var r={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return t&&n&&/^Win/i.test(e)&&!/^Windows Phone /i.test(e)&&(r=r[/[\d.]+$/.exec(e)])&&(e="Windows "+r),e=String(e),t&&n&&(e=e.replace(RegExp(t,"i"),n)),dt(e.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}(e,r,t.label||t)),e}))}(["Windows Phone","KaiOS","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian",{label:"DragonFly BSD",pattern:"DragonFly"},"Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);function A(e){return yt(e,(function(e,t){var r=t.pattern||mt(t);return!e&&(e=RegExp("\\b"+r+" *\\d+[.\\w_]*","i").exec(n)||RegExp("\\b"+r+" *\\w+-[\\w]*","i").exec(n)||RegExp("\\b"+r+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(n))&&((e=String(t.label&&!RegExp(r,"i").test(t.label)?t.label:e).split("/"))[1]&&!/[\d.]+/.test(e[0])&&(e[0]+=" "+e[1]),t=t.label||t,e=dt(e[0].replace(RegExp(r,"i"),t).replace(RegExp("; *(?:"+t+"[_-])?","i")," ").replace(RegExp("("+t+")[-_.]?(\\w)","i"),"$1 $2"))),e}))}function _(e){return yt(e,(function(e,t){return e||(RegExp(t+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(n)||0)[1]||null}))}if(N&&(N=[N]),/\bAndroid\b/.test(M)&&!P&&(s=/\bAndroid[^;]*;(.*?)(?:Build|\) AppleWebKit)\b/i.exec(n))&&(P=bt(s[1]).replace(/^[a-z]{2}-[a-z]{2};\s*/i,"")||null),L&&!P?P=A([L]):L&&P&&(P=P.replace(RegExp("^("+mt(L)+")[-_.\\s]","i"),L+" ").replace(RegExp("^("+mt(L)+")[-_.]?(\\w)","i"),L+" $2")),(s=/\bGoogle TV\b/.exec(P))&&(P=s[0]),/\bSimulator\b/i.test(n)&&(P=(P?P+" ":"")+"Simulator"),"Opera Mini"==j&&/\bOPiOS\b/.test(n)&&T.push("running in Turbo/Uncompressed mode"),"IE"==j&&/\blike iPhone OS\b/.test(n)?(L=(s=e(n.replace(/like iPhone OS/,""))).manufacturer,P=s.product):/^iP/.test(P)?(j||(j="Safari"),M="iOS"+((s=/ OS ([\d_]+)/i.exec(n))?" "+s[1].replace(/_/g,"."):"")):"Konqueror"==j&&/^Linux\b/i.test(M)?M="Kubuntu":L&&"Google"!=L&&(/Chrome/.test(j)&&!/\bMobile Safari\b/i.test(n)||/\bVita\b/.test(P))||/\bAndroid\b/.test(M)&&/^Chrome/.test(j)&&/\bVersion\//i.test(n)?(j="Android Browser",M=/\bAndroid\b/.test(M)?M:"Android"):"Silk"==j?(/\bMobi/i.test(n)||(M="Android",T.unshift("desktop mode")),/Accelerated *= *true/i.test(n)&&T.unshift("accelerated")):"UC Browser"==j&&/\bUCWEB\b/.test(n)?T.push("speed mode"):"PaleMoon"==j&&(s=/\bFirefox\/([\d.]+)\b/.exec(n))?T.push("identifying as Firefox "+s[1]):"Firefox"==j&&(s=/\b(Mobile|Tablet|TV)\b/i.exec(n))?(M||(M="Firefox OS"),P||(P=s[1])):!j||(s=!/\bMinefield\b/i.test(n)&&/\b(?:Firefox|Safari)\b/.exec(j))?(j&&!P&&/[\/,]|^[^(]+?\)/.test(n.slice(n.indexOf(s+"/")+8))&&(j=null),(s=P||L||M)&&(P||L||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(M))&&(j=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(M)?M:s)+" Browser")):"Electron"==j&&(s=(/\bChrome\/([\d.]+)\b/.exec(n)||0)[1])&&T.push("Chromium "+s),C||(C=_(["(?:Cloud9|CriOS|CrMo|Edge|Edg|EdgA|EdgiOS|FxiOS|HeadlessChrome|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$)|UCBrowser|YaBrowser)","Version",mt(j),"(?:Firefox|Minefield|NetFront)"])),(s=("iCab"==N&&parseFloat(C)>3?"WebKit":/\bOpera\b/.test(j)&&(/\bOPR\b/.test(n)?"Blink":"Presto"))||/\b(?:Midori|Nook|Safari)\b/i.test(n)&&!/^(?:Trident|EdgeHTML)$/.test(N)&&"WebKit"||!N&&/\bMSIE\b/i.test(n)&&("Mac OS"==M?"Tasman":"Trident")||"WebKit"==N&&/\bPlayStation\b(?! Vita\b)/i.test(j)&&"NetFront")&&(N=[s]),"IE"==j&&(s=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(n)||0)[1])?(j+=" Mobile",M="Windows Phone "+(/\+$/.test(s)?s:s+".x"),T.unshift("desktop mode")):/\bWPDesktop\b/i.test(n)?(j="IE Mobile",M="Windows Phone 8.x",T.unshift("desktop mode"),C||(C=(/\brv:([\d.]+)/.exec(n)||0)[1])):"IE"!=j&&"Trident"==N&&(s=/\brv:([\d.]+)/.exec(n))&&(j&&T.push("identifying as "+j+(C?" "+C:"")),j="IE",C=s[1]),R){if(l="global",f=null!=(c=r)?t(c[l]):"number",/^(?:boolean|number|string|undefined)$/.test(f)||"object"==f&&!c[l])gt(s=r.runtime)==d?(j="Adobe AIR",M=s.flash.system.Capabilities.os):gt(s=r.phantom)==m?(j="PhantomJS",C=(s=s.version||null)&&s.major+"."+s.minor+"."+s.patch):"number"==typeof x.documentMode&&(s=/\bTrident\/(\d+)/i.exec(n))?(C=[C,x.documentMode],(s=+s[1]+4)!=C[1]&&(T.push("IE "+C[1]+" mode"),N&&(N[1]=""),C[1]=s),C="IE"==j?String(C[1].toFixed(1)):C[0]):"number"==typeof x.documentMode&&/^(?:Chrome|Firefox)\b/.test(j)&&(T.push("masking as "+j+" "+C),j="IE",C="11.0",N=["Trident"],M="Windows");else if(y&&(O=(s=y.lang.System).getProperty("os.arch"),M=M||s.getProperty("os.name")+" "+s.getProperty("os.version")),b){try{C=r.require("ringo/engine").version.join("."),j="RingoJS"}catch(e){(s=r.system)&&s.global.system==r.system&&(j="Narwhal",M||(M=s[0].os||null))}j||(j="Rhino")}else"object"==t(r.process)&&!r.process.browser&&(s=r.process)&&("object"==t(s.versions)&&("string"==typeof s.versions.electron?(T.push("Node "+s.versions.node),j="Electron",C=s.versions.electron):"string"==typeof s.versions.nw&&(T.push("Chromium "+C,"Node "+s.versions.node),j="NW.js",C=s.versions.nw)),j||(j="Node.js",O=s.arch,M=s.platform,C=(C=/[\d.]+/.exec(s.version))?C[0]:null));M=M&&dt(M)}if(C&&(s=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(C)||/(?:alpha|beta)(?: ?\d)?/i.exec(n+";"+(R&&o.appMinorVersion))||/\bMinefield\b/i.test(n)&&"a")&&(I=/b/i.test(s)?"beta":"alpha",C=C.replace(RegExp(s+"\\+?$"),"")+("beta"==I?w:S)+(/\d+\+?/.exec(s)||"")),"Fennec"==j||"Firefox"==j&&/\b(?:Android|Firefox OS|KaiOS)\b/.test(M))j="Firefox Mobile";else if("Maxthon"==j&&C)C=C.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(P))"Xbox 360"==P&&(M=null),"Xbox 360"==P&&/\bIEMobile\b/.test(n)&&T.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(j)&&(!j||P||/Browser|Mobi/.test(j))||"Windows CE"!=M&&!/Mobi/i.test(n))if("IE"==j&&R)try{null===r.external&&T.unshift("platform preview")}catch(e){T.unshift("embedded")}else(/\bBlackBerry\b/.test(P)||/\bBB10\b/.test(n))&&(s=(RegExp(P.replace(/ +/g," *")+"/([.\\d]+)","i").exec(n)||0)[1]||C)?(M=((s=[s,/BB10/.test(n)])[1]?(P=null,L="BlackBerry"):"Device Software")+" "+s[0],C=null):this!=vt&&"Wii"!=P&&(R&&k||/Opera/.test(j)&&/\b(?:MSIE|Firefox)\b/i.test(n)||"Firefox"==j&&/\bOS X (?:\d+\.){2,}/.test(M)||"IE"==j&&(M&&!/^Win/.test(M)&&C>5.5||/\bWindows XP\b/.test(M)&&C>8||8==C&&!/\bTrident\b/.test(n)))&&!ct.test(s=e.call(vt,n.replace(ct,"")+";"))&&s.name&&(s="ing as "+s.name+((s=s.version)?" "+s:""),ct.test(j)?(/\bIE\b/.test(s)&&"Mac OS"==M&&(M=null),s="identify"+s):(s="mask"+s,j=E?dt(E.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(s)&&(M=null),R||(C=null)),N=["Presto"],T.push(s));else j+=" Mobile";(s=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(n)||0)[1])&&(s=[parseFloat(s.replace(/\.(\d)$/,".0$1")),s],"Safari"==j&&"+"==s[1].slice(-1)?(j="WebKit Nightly",I="alpha",C=s[1].slice(0,-1)):C!=s[1]&&C!=(s[2]=(/\bSafari\/([\d.]+\+?)/i.exec(n)||0)[1])||(C=null),s[1]=(/\b(?:Headless)?Chrome\/([\d.]+)/i.exec(n)||0)[1],537.36==s[0]&&537.36==s[2]&&parseFloat(s[1])>=28&&"WebKit"==N&&(N=["Blink"]),R&&(h||s[1])?(N&&(N[1]="like Chrome"),s=s[1]||((s=s[0])<530?1:s<532?2:s<532.05?3:s<533?4:s<534.03?5:s<534.07?6:s<534.1?7:s<534.13?8:s<534.16?9:s<534.24?10:s<534.3?11:s<535.01?12:s<535.02?"13+":s<535.07?15:s<535.11?16:s<535.19?17:s<536.05?18:s<536.1?19:s<537.01?20:s<537.11?"21+":s<537.13?23:s<537.18?24:s<537.24?25:s<537.36?26:"Blink"!=N?"27":"28")):(N&&(N[1]="like Safari"),s=(s=s[0])<400?1:s<500?2:s<526?3:s<533?4:s<534?"4+":s<535?5:s<537?6:s<538?7:s<601?8:s<602?9:s<604?10:s<606?11:s<608?12:"12"),N&&(N[1]+=" "+(s+="number"==typeof s?".x":/[.+]/.test(s)?"":"+")),"Safari"==j&&(!C||parseInt(C)>45)?C=s:"Chrome"==j&&/\bHeadlessChrome/i.test(n)&&T.unshift("headless")),"Opera"==j&&(s=/\bzbov|zvav$/.exec(M))?(j+=" ",T.unshift("desktop mode"),"zvav"==s?(j+="Mini",C=null):j+="Mobile",M=M.replace(RegExp(" *"+s+"$"),"")):"Safari"==j&&/\bChrome\b/.exec(N&&N[1])?(T.unshift("desktop mode"),j="Chrome Mobile",C=null,/\bOS X\b/.test(M)?(L="Apple",M="iOS 4.3+"):M=null):/\bSRWare Iron\b/.test(j)&&!C&&(C=_("Chrome")),C&&0==C.indexOf(s=/[\d.]+$/.exec(M))&&n.indexOf("/"+s+"-")>-1&&(M=bt(M.replace(s,""))),M&&-1!=M.indexOf(j)&&!RegExp(j+" OS").test(M)&&(M=M.replace(RegExp(" *"+mt(j)+" *"),"")),N&&!/\b(?:Avant|Nook)\b/.test(j)&&(/Browser|Lunascape|Maxthon/.test(j)||"Safari"!=j&&/^iOS/.test(M)&&/\bSafari\b/.test(N[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|SRWare Iron|Vivaldi|Web)/.test(j)&&N[1])&&(s=N[N.length-1])&&T.push(s),T.length&&(T=["("+T.join("; ")+")"]),L&&P&&P.indexOf(L)<0&&T.push("on "+L),P&&T.push((/^on /.test(T[T.length-1])?"":"on ")+P),M&&(s=/ ([\d.+]+)$/.exec(M),u=s&&"/"==M.charAt(M.length-s[0].length-1),M={architecture:32,family:s&&!u?M.replace(s[0],""):M,version:s?s[1]:null,toString:function(){var e=this.version;return this.family+(e&&!u?" "+e:"")+(64==this.architecture?" 64-bit":"")}}),(s=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(O))&&!/\bi686\b/i.test(O)?(M&&(M.architecture=64,M.family=M.family.replace(RegExp(" *"+s),"")),j&&(/\bWOW64\b/i.test(n)||R&&/\w(?:86|32)$/.test(o.cpuClass||o.platform)&&!/\bWin64; x64\b/i.test(n))&&T.unshift("32-bit")):M&&/^OS X/.test(M.family)&&"Chrome"==j&&parseFloat(C)>=39&&(M.architecture=64),n||(n=null);var B={};B.description=n,B.layout=N&&N[0],B.manufacturer=L,B.name=j,B.prerelease=I,B.product=P,B.ua=n,B.version=j&&C,B.os=M||{architecture:null,family:null,version:null,toString:function(){return"null"}},B.parse=e,B.toString=function(){return this.description||""},B.version&&T.unshift(C),B.name&&T.unshift(j),M&&j&&(M!=String(M).split(" ")[0]||M!=j.split(" ")[0]&&!P)&&T.push(P?"("+M+")":"on "+M),T.length&&(B.description=T.join(" "));var W=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["jdmp","fresh","jdlocal","jdme","jrapp","jdzgbapp","jdapp","jdstock","miniprogram","weixin","walletclient","jdpingou"];e=e.toLowerCase();for(var n=[{name:/;jdmp;|\sjdmp/i,version:null},{name:/7freshapp;/i,version:/;\w+?;([\d.]+);/i},{name:/appname=jdlocal/i,version:/djappversion=([\d.]+)/i},{name:/jdme\/[\d.]+/i,version:/jdme\/([\d.]+)/i},{name:/application=jdjr-app/i,version:/clientVersion=([\d.]+)/i},{name:/^jdapp jdzgbapp;/i,version:/^jdapp jdzgbapp;\w+?;([\d.]+);/i},{name:/^jdapp;/i,version:/^jdapp;\w+?;([\d.]+);/i},{name:/jdstock-pay/i,version:/jdstock-\w+?_([\d.]+)/i},{name:/miniprogram(?!env)/i,version:/micromessenger\/([\d.]+)/i},{name:/micromessenger[|/]([\w.]+)/i,version:/micromessenger\/([\d.]+)/i},{name:/[\s/]walletclient/i,version:/walletclientapp[\s/]([\d.]+)/i},{name:/[\s/]jdpingou/i,version:/jdpingou[\s/]([\d.]+)/i}],r=n.length,i="",o="",a=0;a<r;a++){var s=n[a],u=s.name,c=s.version;if(u.test(e)){if(i=t[a],c){var l=c.exec(e);o=l?l[1]:""}return{name:i,version:o}}}return{}}(n);return B.appName=W.name||"browser",B.appVer=W.version,B}(),wt=function(){function e(t){i(this,e),this.uid=t.getUid(),this.dev=t.getDeviceId(),this.ap=t.getAppKey(),this.v=t.getVersion(),this.pal=t.getPageLevel(),this.isUa=t.getUserAgentStatus()}return a(e,[{key:"setUid",value:function(e){this.uid=e}},{key:"getUid",value:function(){return this.uid}},{key:"setOs",value:function(e){this.os=e}},{key:"setOsV",value:function(e){this.osv=e}},{key:"setMaf",value:function(e){e&&(this.maf=e)}},{key:"setMod",value:function(e){e&&(this.mod=e)}},{key:"setBrw",value:function(e){this.brw=e}},{key:"setBrv",value:function(e){this.brv=e}},{key:"setUa",value:function(e){this.isUa&&(this.ua=e)}},{key:"setNe",value:function(e){this.ne=e}},{key:"setScw",value:function(e){this.scw=e}},{key:"setSch",value:function(e){this.sch=e}},{key:"setDpr",value:function(e){this.dpr=e}},{key:"setRes",value:function(e){this.res=e}},{key:"setPgw",value:function(e){this.pgw=e}},{key:"setPgh",value:function(e){this.pgh=e}},{key:"setPa",value:function(e){this.pa=e}},{key:"getPal",value:function(){return this.pal}},{key:"setWid",value:function(e){this.wid=e}},{key:"setOpe",value:function(e){this.ope=e}},{key:"getOpe",value:function(){return this.ope}}]),e}(),xt=function(e){s(n,e);var t=h(n);function n(e){var r;return i(this,n),(r=t.call(this,e)).typ="web",r.setWebviewId(),r.setStartUpId(),r.setOpenModel(),r.setSoftwareInfo(),r.setHardwareInfo(),r}return a(n,[{key:"setOpenModel",value:function(){var e;try{e=(WIN.performance&&WIN.performance.getEntriesByType&&WIN.performance.getEntriesByType("navigation")||[])[0]||{}}catch(t){e={},M(t)}var t=e.type,n=void 0===t?function(){var e,t=WIN.performance;return t&&t.navigation&&(e=D(t.navigation.type)),e}():t;this.setOpe(n)}},{key:"setSoftwareInfo",value:function(){var e=St.os,t=St.manufacturer,n=St.product,r=St.name,i=St.version,o=St.ua,a=St.appName,s=St.appVer;this.setOs(e.family),this.setOsV(e.version),this.setBrw(r),this.setBrv(i),this.setUa(o),this.aap=a,this.aapv=s,this.pt="string"==typeof WIN.jdd_h5_offline_tag?WIN.jdd_h5_offline_tag:void 0,t&&this.setMaf(t),n&&this.setMod(n)}},{key:"setHardwareInfo",value:function(){var e=WIN.devicePixelRatio,t=WIN.screen,n=t.width,r=t.height,i=document.documentElement,o=i.clientWidth,a=i.clientHeight;this.setScw(n),this.setSch(r),this.setDpr(e),this.setRes("".concat(n,"*").concat(r,"*").concat(e)),this.setPgw(o),this.setPgh(a)}},{key:"getUserId",value:function(){var e=WIN.__sgm_uid__;return e?"function"==typeof e?e.call(this):e:this.getUid()}},{key:"setSubPath",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",t=this.getPal();t&&(e="/"+(document.location.pathname.split("/")[t]||"")),this.setPa(e)}},{key:"setNetworkType",value:function(){var e=WIN.navigator,t=e.userAgent,n=e.connection,r=n&&n.type?n.type.toLowerCase():null;if(r)switch(r){case"cellular":case"wimax":r=n&&n.effectiveType?n.effectiveType.toLowerCase():null;break;case"wifi":break;case"ethernet":r="wired";case"none":case"other":case"unknown":r=null}else r=n&&n.effectiveType?n.effectiveType.toLowerCase():null;var i=r||(t.match(/NetType\/\w+/)?t.match(/NetType\/\w+/)[0]:"");i=i.toLowerCase().replace("nettype/",""),this.setNe(i?"3gnet"===i?"3g":i:"unknown")}},{key:"setWebviewId",value:function(){var e,t=n.getNativeApmInfo();t&&t.webviewId?this.setWid(t.webviewId):this.setWid((e=("function"==typeof Date.now?Date.now():(new Date).getTime()).toString(36),"".concat(e,"-xxxxxxxx").replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))))}},{key:"setStartUpId",value:function(){var e=n.getNativeApmInfo();this.sud=null==e?void 0:e.startUpId}},{key:"update",value:function(){return this.setUid(this.getUserId()),this.setSubPath(),this.setNetworkType(),this.setHardwareInfo(),this}}],[{key:"getNativeApmInfo",value:function(){try{return _(WIN.jddNativeApm&&WIN.jddNativeApm.getApmStartInfo())}catch(e){return{}}}}]),n}(wt),kt=["domain","path"],Et=function(){function e(t,n){var r=t.key,o=t.time,a=t.requestType,s=t.pageUrl,u=t.referrer;if(i(this,e),this.tid=r,this.sid=r,this.ltm=o,this.rt=a,this.rem=0,this.url=s,this.ref=u,n){var c=n();if(c){var l=c.con,f=c.cos,h=c.dns,p=c.dwn,d=c.rsb,v=c.ssl,g=c.wat,m=c.rt;this.con=l,this.cos=f,this.dns=h,this.dwn=p,this.rsb=d,this.ssl=v,this.wat=g,m&&(this.rt=m)}}}return a(e,[{key:"setUrl",value:function(e){var t=e.protocol,n=e.hostname,r=e.port,i=e.pathname,o=e.origin;this.do=n,this.pat=i,this.spa=i,this.ori=o,t&&(this.pr=t.replace(":","")),this.po=+(r||("https"===this.pr?443:80))}},{key:"setSelector",value:function(e){this.sel=(null==e?void 0:e.target)?ce.generateFullXPath(e.target):void 0}},{key:"setRequestLength",value:function(e){var t="";try{t=JSON.stringify(e)}catch(e){}this.rqb=t?t.replace(/[^\x00-\xff]/g,"__").length:0}},{key:"setReportMode",value:function(e){this.rem=e}},{key:"setMethod",value:function(e){this.met=e}},{key:"setStatus",value:function(e){this.stu=e}},{key:"setEventType",value:function(e){this.evt=e}},{key:"setBusiness",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=_(i),s=!1;t.length&&(s=t.some((function(t){var i=t.domain,s=t.path,u=l(t,kt);if(i&&s){if(e.do===i&&e.pat===s)return e.setExt(u,n,r,a,o),!0}else if(i){if(e.do===i)return e.setExt(u,n,r,a,o),!0}else{if(!s)return e.setExt(u,n,r,a,o),!0;if(e.pat===s)return e.setExt(u,n,r,a,o),!0}}))),s||(this.setCode(a,""),this.setMsg(a,"",o),this.setRetType(this.cod))}},{key:"setExt",value:function(e,t,n,r,i){var o=this,a=e.biz,s=e.codePath,u=e.msgPath,c=e.succCode,l=e.failCode,f=e.statistics,h=function(e){if(!e)return{};var t=e.substring(1).split("&"),n={};return t.forEach((function(e){var t=e.split("=");null!=t[0]&&(n[t[0]]=t[1])})),n}(t),p=_(n),d=Object.assign(h,p);a&&a.split(",").forEach((function(e,t){var n;n=0===e.indexOf("@/")?A(e.substring(2))(r):A(e)(d),o.setExtN(t,n)})),this.setCode(r,s),this.setMsg(r,u,i),this.setRetType(this.cod,c,l),this.setSpa(d,f)}},{key:"setExtN",value:function(e,t){if(t)switch(e){case 0:this.ext1=t;break;case 1:this.ext2=t;break;case 2:this.ext3=t;break;case 3:this.ext4=t;break;case 4:this.ext5=t}}},{key:"setCode",value:function(e,t){this.cod=this.getResExt(e,[t,"code","Code","CODE","responseCode","retCode","errorCode","resultCode"])}},{key:"setMsg",value:function(e,t,n){this.msg=this.getResExt(e,[t,"desc","Desc","DESC","responseDesc","retDesc","errorDesc","resultDesc"])||n||void 0}},{key:"setRetType",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0,i=[0,"0",!0,"TRUE","success","SUCCESS"];void 0!==n&&""!==n?e=new RegExp(n.toString()).test(t.toString())?0:1:void 0!==r&&""!==r&&(e=new RegExp(r.toString()).test(t.toString())?1:0),void 0===e&&(e=i.includes(t)?0:1),this.ret=e}},{key:"setSpa",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[];null==t||t.split(",").forEach((function(t){var r=e[t];r&&n.push("".concat(t,"=").concat(r))})),this.spa=this.pat+(n.length?"?"+n.join("&"):"")}},{key:"getResExt",value:function(e,t){var n;return t.find((function(t){var r=A(t)(e);return void 0!==r&&(n=r,!0)})),n}},{key:"getOri",value:function(){return this.ori||""}},{key:"getPat",value:function(){return this.pat}},{key:"getCos",value:function(){return this.cos}},{key:"getWat",value:function(){return this.wat}}]),e}(),Ot=function(e){s(n,e);var t=h(n);function n(e,r,o){var a;i(this,n);var s=e._extend_,u=s.key,c=s.time,l=s.requestType,f=s.lastEvent,h=s.args,p=s.pageUrl,d=s.referrer,v=h.url,g=h.status,m=h.method,y=h.requestBody,b=h.responseData;a=t.call(this,{key:u,time:c,requestType:l,pageUrl:p,referrer:d},(function(){return o.getPerformance(v)}));var S=o.createURL(v);return a.setUrl(S),a.setReportMode(1),a.setMethod(m),a.setStatus(g),a.setRequestLength(y),a.setBusiness(r.getConfig("apiPathConfig"),S.search,y,b),a.setSelector(f),a}return a(n)}(Et),Tt=function(e){s(n,e);var t=h(n);function n(e,r,o){var a;i(this,n);var s,u=e.url,c=e.status,l=e.statusText,f=e._extend_,h=f.key,d=f.time,v=f.requestType,g=f.lastEvent,m=f.args,y=f.requestStatus,b=f.responseText,S=f.pageUrl,w=f.referrer,x="",k="GET";if(m)if("string"==typeof m[0]){var E=p(m,2),O=E[0],T=E[1];if(x=O,T)k=T.method,s=T.body}else if(m[0]instanceof window.Request){var I=m[0],R=I.url,C=I.method,N=I.body;x=R,k=C,s=N}x=u||x,a=t.call(this,{key:h,time:d,requestType:v,pageUrl:S,referrer:w},(function(){return o.getPerformance(x)}));var j=o.createURL(x);return a.setUrl(j),a.setMethod(k),a.setStatus(c),a.setRequestLength(s),a.setEventType(y),a.setBusiness(r.getConfig("apiPathConfig"),j.search,s,b,l),a.setSelector(g),a}return a(n)}(Et),It=function(e){s(n,e);var t=h(n);function n(e,r,o){var a;i(this,n);var s=e._extend_,u=s.key,c=s.time,l=s.lastEvent,f=s.pageUrl,h=s.referrer,p=s.body,d=s.requestType,v=s.method,g=s.url,m=e.target,y=m.response,b=m.responseURL,S=m.status,w=m.statusText,x=b||g;a=t.call(this,{key:u,time:c,pageUrl:f,referrer:h,requestType:d},(function(){return o.getPerformance(x)}));var k=o.createURL(x);return a.setUrl(k),a.setMethod(v),a.setStatus(S),a.setRequestLength(p),a.setEventType(e.type),a.setBusiness(r.getConfig("apiPathConfig"),k.search,p,y,w),a.setSelector(l),a}return a(n)}(Et),Rt=function(){function e(){i(this,e)}return a(e,[{key:"getPerformance",value:function(e){try{var t=new URL(B(e)),n=t.href,r=t.protocol,i=WIN.performance&&WIN.performance.getEntriesByName&&WIN.performance.getEntriesByName(n)||[],o=i.length?i[i.length-1]:{},a=o.initiatorType,s=o.duration,u=void 0===s?0:s,c=o.transferSize,l=void 0===c?0:c,f=o.encodedBodySize,h=void 0===f?0:f,p=o.requestStart,d=void 0===p?0:p,v=o.responseStart,g=void 0===v?0:v,m=o.responseEnd,y=void 0===m?0:m,b=o.secureConnectionStart,S=void 0===b?0:b,w=o.connectStart,x=void 0===w?0:w,k=o.connectEnd,E=void 0===k?0:k,O=o.domainLookupEnd,T=void 0===O?0:O,I=o.domainLookupStart,R=void 0===I?0:I;return{cos:Math.round(u),con:Math.round(E-x),dns:Math.round(T-R),dwn:Math.round(g?y-g:0),ssl:"https:"===r&&S?Math.round(E-S):0,wat:Math.round(g-d),rsb:l||h,rt:a}}catch(e){}}},{key:"createURL",value:function(e){var t={pathname:e};try{e&&(t=new URL(e))}catch(e){}return t}},{key:"getInfo",value:function(e,t){var n;return"manual"===(null==e?void 0:e.type)?new Ot(e,t,this):"fetch"===(null==(n=null==e?void 0:e._extend_)?void 0:n.requestType)?new Tt(e,t,this):new It(e,t,this)}}]),e}(),Ct=function(){function e(t,n,r,o,a,s){var u=this;i(this,e);try{if(t&&n&&r){var c=this.getUserId(o||void 0),l=new re(t,n,r,"3.0.6",c,a);l.init("/h5/init").then((function(){if(l.getGlobStatus()){try{u.setResourceTimingBufferSize()}catch(e){M(e)}var e=[];try{l.getResourceStatus()&&e.push(new Oe(l,s))}catch(e){M(e)}try{l.getErrorStatus()&&e.push(new ye(l))}catch(e){M(e)}try{l.getApiStatus()&&e.push(new ue(l,new Rt))}catch(e){M(e)}try{l.getCustomStatus()&&e.push(new Ie(l))}catch(e){M(e)}try{l.getPageTimingStatus()&&e.push(new Ne(l))}catch(e){M(e)}try{l.getVitalsStatus()&&e.push(new nt(l))}catch(e){M(e)}e.length&&(e.push(new se(l,new xt(l))),new V(l).register(e).start())}})).catch((function(e){M(e)})).finally((function(){var e,t=WIN.__sgm__.onLaunch;t&&void 0===t.type&&(t.type=1,null==(e=t.callbacks)||e.forEach((function(e){return e(1)})))}))}}catch(e){M(e)}}return a(e,[{key:"getUserId",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"pin,pt_pin,pwdt_id";return t.split(",").some((function(t){return e=F(t.trim())})),e}},{key:"setResourceTimingBufferSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:512;WIN.performance&&WIN.performance.onresourcetimingbufferfull&&WIN.performance.setResourceTimingBufferSize&&(WIN.performance.onresourcetimingbufferfull=function(){var t=WIN.performance.getEntries&&WIN.performance.getEntries()||[];e<t.length?WIN.performance.clearResourceTimings():WIN.performance.setResourceTimingBufferSize(e)})}}]),e}(),Nt=document.currentScript;if(Nt){var jt=new URL(Nt.src).href,Pt=Nt.getAttribute("sid"),Lt=Nt.getAttribute("pid"),Mt=Nt.getAttribute("name"),At=Nt.getAttribute("userKeys"),_t=Nt.getAttribute("initDomain");Pt&&Lt&&Mt&&new Ct(Pt,Lt,Mt,At,_t,jt.substring(0,jt.lastIndexOf("/")))}return Ct}));
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/ajaxget/webpack-test-web.git
git@gitee.com:ajaxget/webpack-test-web.git
ajaxget
webpack-test-web
webpack-test-web
master

搜索帮助