@apm-insight-web/rangers-site-sdk
Advanced tools
Comparing version 0.2.47 to 0.2.48
@@ -1,1 +0,1 @@ | ||
var RangersSiteSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function t(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var U=function(){return(U=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=v(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=v(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function d(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function v(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=v(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&d(t))?u(t)?e([],t):v({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function m(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function h(){return!!l(window)}function g(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function _(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var w=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),S=new RegExp("("+["bearer","session"].join("|")+")","i"),E=function(t,e){return!(!t||!e)&&(w.test(t)||S.test(e))};function M(){}function N(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function x(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function P(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!E(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function R(t){var e={},n=_(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function T(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),s=b(u[0])&&u[0].trim();s&&b(u[1])&&(o[s]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function j(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function F(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var O=function(t){var e,n;return void 0===t&&(t=window),h()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},k=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function L(t){return!!t&&Math.random()<Number(t)}var A=(D.post=function(t,e,n){var r=n&&n.success||M,o=n&&n.fail||M,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},D.get=function(t,e){var n=e&&e.success||M,r=e&&e.fail||M,o=e&&e.getResponse||M,i=e&&e.getResponseText||M,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},D.prototype.getCommonParams=function(){return{timestamp:Date.now()}},D);function D(t){var e=this;this.postEvent=function(t){t=U(U({},t),e.getCommonParams());D.post(e.url,t)},this.getEvent=function(t){t=g(U(U({},t),e.getCommonParams())),t=e.url+"?"+t;D.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function H(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function q(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var B="x-tt-trace-id",I="x-tt-trace-host",Q="x-tt-logid";function V(t,e,n){void 0===n&&(n="01");e=""+H((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+q(18);t=22-e.length-4;return""+H(""+e.length,2)+e+q(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+H(""+e.length,2)+e+q(n)}(t)+("string"==typeof e?q(4):H(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function W(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var z=.1,G=["/log/sentry/","/monitor_browser/collect"],X=8e3,K=4e3;W(),W();function $(e){return function(t){return e===t}}function Y(t){return t}function Z(){return y(Date)?Math.round(Date.now()/1e3):0}function tt(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function et(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&s(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:tt(e.tags,b),timestamp:Z()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&s(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:tt(o.tags,b),timestamp:Z()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:tt(r.tags,b),timestamp:Z()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:tt(t.metrics,s),category:tt(t.tags,b),timestamp:Z()}:{}:i):i}function nt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,c([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=rt(o).then,o}var rt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,c([],J(e.map(function(t){return t.returns}))))}var o,i,t=nt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,c([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),rt(t)}},"resolved",{get:a})};function ot(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function it(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function at(){if(l(window))return window}function ut(){if(l(document))return document}function st(){if(at()&&l(window.performance))return window.performance}function ct(){if(y(XMLHttpRequest))return XMLHttpRequest}function lt(){if(at()&&y(window.MutationObserver))return window.MutationObserver}function ft(){if(at()&&y(window.PerformanceObserver))return window.PerformanceObserver}function pt(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=_(n=n),e=_(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function dt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return M;var n=i[a],r=u.apply(void 0,c([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function vt(t,e){return t instanceof e}function mt(t,e){return t instanceof e}function ht(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function gt(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=p({},n,t),e()}]}function yt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,c([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function bt(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function _t(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function wt(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function St(t,e){return void 0===e&&(e=st()),(0,J(wt(e),5)[4])(t).pop()}function Et(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,s=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:P(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),E(t[0],t[1])||n.push([t[0],t[1]]))}),P(n)}return l(e)?P(Object.keys(e).filter(function(t){return!E(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!pt(e,a,r)||(n=n||t.getResponseHeader(B))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(I)||void 0,o.log_id=t.getResponseHeader(Q)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return x(t.responseText);if(t.response)return x(t.response);try{return x(t.responseText)}catch(t){return 0}}(t)),(o=U(U({},o),R(a))).resource_timing=St(o.ax_href),t=o.ax_status,ht(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:s?""+s:void 0,search:_(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function Mt(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function xt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function Ct(o,i,a,u){var s=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return pt(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(s=V(e,t),this.setRequestHeader(B,s))),Tt(this)(i,s,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Pt(t,e,n){var r="",r=vt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var Rt="AjaxMonitor",Tt=function(u){return dt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:Rt,type:"get",event:Et(u,r,o,a)}),n&&n.apply(this,t)}})};function jt(t,e){if(!t)return"";var n=[];return mt(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,c([],J(t))):n.push.apply(n,c([],J(Object.entries(t)))),P(n)}function Ot(t,e,n,r,o,i){var a=e.ax_status;ht(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Pt(n,!0,o),e.ax_request={body:null===(e=r,e=vt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:_(a).search,content_type:function(t,e,n){if(t){if(mt(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function kt(i,v,a,m,h,g){return function(s,c){void 0===c&&(c={});var l=Pt(s,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(s,c);var t,e,n,r=v.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{pt(v,l,g)&&(c.headers||(c.headers=[]),o&&r&&(p.trace_id=V(o,r),t=c.headers,e=B,n=p.trace_id,mt(t,m)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=vt(t,n)?t.method||e:e).toLowerCase()}(s,c,h);function d(){Ot(v,p,s,c,h,m),null!=a&&a({name:Kt,type:"get",event:p})}p=U(U({},p),R(Pt(s,!0,h)));return i(s,c).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=jt(n.headers,m),p.ax_request_header=jt((e=s,r=c,i=h,a=new(o=m),vt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),m),p.resource_timing=St(p.ax_href);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),pt(v,l,g)&&(u(I,"trace_host"),u(B,"trace_id"),u(Q,"log_id"))),d()}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,p.resource_timing=St(p.ax_href),d()}catch(t){}return Promise.reject(t)})}}function Lt(d,v,m){var t;return void 0===d&&(d=ut()),void 0===v&&(v=lt()),void 0===m&&(m=null===(t=function(){var t=st();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:Zt(d&&d.body,1,!1,s)})}var n,o,i,a=Date.now(),u=[],s=Yt.concat(t.ignoreTags||[]),c=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:M,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(bt(v,function(){return c(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:$t,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(m||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function At(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function Dt(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(bt(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(m(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&m(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function Ht(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function qt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function Bt(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),dt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function Ut(i,a,u){var s=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,c([],J(o))):new Promise(function(e,n){var r=s+=2;a(r,Date.now()),i.apply(void 0,c([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function Jt(S,E,M,x){return function(t,n,e){var s,c,r,o,i,a,u,l,f=J([s=[],c=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(s.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(c.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],v=f[2],m=J((r=S,o=E,m=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=m[0],f=m[1],m=m[2],a=o&&dt(o.prototype,"open",qt)(),u=o&&dt(o.prototype,"send",Bt)(f,m),l=r&&dt(r,"fetch",Ut)(f,m),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=m[0],g=m[1],y=J(Dt(x,function(){return n(e()+5e3)})||[],2),m=y[0],b=y[1];m&&m();function _(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var s=C(e),c=s.next();!c.done;c=s.next()){var l=c.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var v=t.length,m=u.length-1;0<=m;m--){var h=J(u[m],2),g=h[0];switch(h[1]){case 0:v--;break;case 1:if(2<++v)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(_t(M,v(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(_()+5e3)}),!1,function(){return p.notSupport=!0}),2),m=y[0],w=y[1];return m("longtask","resource"),t.forEach(v()),[p,function(){g(),w(),b&&b()},_]}}function Nt(b,_,w,S,E){return void 0===b&&(b=ct()),void 0===_&&(_=it()&&at()),void 0===w&&(w=ft()),void 0===S&&(S=lt()),void 0===E&&(E=st()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:Ht(c))||0,a||Ht(c)||0,g(),l()+(t?0:5e3),m);return t?e?(y(),void t(Math.round(e))):v(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,s=t.observer,t=J(wt(E),5),c=t[0],l=t[1],f=t[4],t=J(At(l),3),p=t[0],d=t[1],v=t[2],i=J(Jt(_,b,w,S)(i?[]:u,v,l),3),m=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),s&&s.disconnect(),u.length=0};return[function(t){if(m.notSupport)return t();var e=m[m.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},m,v,function(){return!m.notSupport&&r()||0}]}}function Ft(e,o){return void 0===e&&(e=ft()),void 0===o&&(o=st()),function(t,n){var r=J(wt(o),3)[2];return(0,J(_t(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(te),[function(){var t=r(te)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function It(u){return void 0===u&&(u=ft()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===ee&&(r=t)});var t=J(_t(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(ee);function i(){o(),ne.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};ne.forEach(function(t){window.addEventListener(t,a,!0)}),F(i);return[function(){return{lcp:r}}]}}function Qt(a){return void 0===a&&(a=ft()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(_t(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function Vt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function Wt(o,u){return void 0===o&&(o=ft()),void 0===u&&(u=st()),function(t,i){function e(){var t=n("paint");return{fp:Vt(oe,t),fcp:Vt(re,t)}}var a={},n=J(wt(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(_t(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[oe]&&a[re]&&(i&&i({fp:a[oe],fcp:a[re]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function zt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:ie,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Gt(s,c){return void 0===s&&(s=st()),void 0===c&&(c=ft()),function(t,e){function r(t){(t=zt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(wt(s),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(_t(c,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return zt(n())}]}}function Xt(t){var e=U({},t);return[function(t){t=(e=t?U(U({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:ue,type:"post",event:e}},function(t){return e=U({},t)}]}var Kt="FetchMonitor",$t="FMPMonitor",Yt=["SCRIPT","STYLE","META","HEAD"],Zt=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+Zt(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},te="first-input",ee="largest-contentful-paint",ne=["keydown","click"],re="first-contentful-paint",oe="first-paint",ie="ResourcePerformanceMonitor",ae={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},ue="PerformanceMonitor",se="StaticErrorMonitor";function ce(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function le(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=ce(r);if(r&&r!==n)return{name:se,type:"get",event:fe(r,e.toLowerCase(),t)}}}var fe=function(t,e,n){var r=_(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var pe="EmitMonitor",de=(ve.prototype.setup=function(t){this.callback=t||M},ve.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},ve.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},ve.prototype.buildEmitSingleEvent=function(t){t=et(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},ve.monitorName=pe,ve);function ve(){var o=this;this.name=pe,this.callback=M,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,c([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function me(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function he(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function ge(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=U(U({},t),{timestamp:(new Date).getTime()});n=0<=e?c(c([],J(n)),[t]).slice(-e):c(c([],J(n)),[t])}]}function ye(t){if(t=t.error)return t}function be(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function _e(n,r){return function(t){var e;if(!function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t)?(o(t)&&(e={message:JSON.stringify(t)}),b(t)&&(e={message:t})):e=t,e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:Ce,type:"post",event:t}}}}var we=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=yt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,c([t],J(n)))}}),i},Se=we(Rt,function(t,r){void 0===t&&(t=ct()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(o,"open",Mt)(),dt(o,"send",Ct)(t,e,r||""),dt(o,"setRequestHeader",xt)(),[n]}},["updateConfig"]),Ee=we("BreadcrumbMonitor",function(i){return void 0===i&&(i=ut()),function(t){var n,e=J(me(100),2),r=e[0],o=e[1],e=J(ge(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?ot(t.event.target):ot(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",he(e,"dom"))),i.addEventListener("keypress",o(he(e,"dom")))),[t]}},["getBreadcrumbs"]),Me=we(Kt,function(r,o,i,a){if(void 0===r&&(r=it()&&at()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(r,"fetch",kt)(t,e,o,i,a||""),[n]}},["updateConfig"]),xe=we($t,Lt,["disconnect","getFmp","getLoadFmp"]),Ce="JSExceptionMonitor",Pe=we(Ce,function(a){return void 0===a&&(a=at()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=_e(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};return a&&((void 0===r||r)&&a.addEventListener("error",t(ye)),o&&a.addEventListener("unhandledrejection",t(be))),[i]}},["buildEvent"]),Re=we(ue,function(B){return void 0===B&&(B=st()),function(t,s){function r(t){if(clearTimeout(g),g=0,s){h=!1;var e=p.isAsync;w(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(wt(B),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,s=t.requestStart,c=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,v=t.loadEventStart,m=t.secureConnectionStart,s={dns:n-r,tcp:o-i,request:u-s,response:a-u,processing:c-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:v-t.domContentLoadedEventEnd,ttfb:u-s,redirect:t.redirectEnd-t.redirectStart};m&&(s.ssl=o-m);e=e("navigation")[0];return(e||t)&&(s.navigation=e||t),t&&(s.timing=t),e&&(s.navigation_timing=e),s}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[$(1),function(){return u().event.fmp}],[$(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,c,function(){return k().fcp}),i=R().lcp;b(U(U(U({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,_())};if(y=function(){b({fid:j()}),b(k()),D&&b({tti:Math.round(D()-v)}),u()},T.then(function(t){return b({fid:t})}),O.then(b),L.then(function(t){return b({tti:t})}),t)return b(k()),R&&b(R()),u();A&&A(L),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,c=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=U({},ae),d=a||Nt,v=0,m="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Xt(p),3),b=a[0],_=a[1],w=a[2],S=J(wt(B),2)[1],a=J((n=s,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,N(function(){return e=!0}),function(){return e}),C=J(yt(Gt),1)[0],P=J(yt(Qt,t),1)[0],R=J(yt(It,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],T=nt(function(t){return t.fid}),j=J(yt(Ft,0,T),1)[0],O=nt(Y),k=J(yt(Wt,0,O),1)[0],L=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)}),t=J(yt(d,t),4),A=t[0],D=t[3],H=rt(L,O);N(function(){return f&&(g=setTimeout(r,200))}),F(function(){E()||(r(!0),u&&u())});var q=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||q(),r(),y()),p.isAsync=1,e=J(Xt(p),3),b=e[0],_=e[1],w=e[2],h=!0,v=Math.round(S()),m=t;var e={isAsync:1,prePerformanceObserver:i},t=J(yt(Gt,e),1);C=t[0],t=J(yt(Qt,e),1),P=t[0],e=J(yt(d,U(U({},e),{minValue:v})),4),A=e[0],D=e[3],L=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)});var n={fp:0,fcp:0};k=function(){return n},(O=nt(Y))(n),H=rt(L,O),l=yt(Lt)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-v),p.route_from=m),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),_()},q]}},["initAsync","send","getPerformance","stopAutoPerf"]),Te=we(se,function(o,i,a){return void 0===o&&(o=at()),void 0===i&&(i=st()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(wt(i),3)[2];return o&&o.addEventListener("error",function(t){t=le(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return le(n(),t,a||"")}]}},["buildEvent"]),je=we(ie,Gt,["getResourcePerformance"]),Oe=(ke.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},ke.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},ke.prototype._modifyEvent=function(t){return t},ke.prototype._shouldSend=function(t){return!0},ke.prototype._send=function(t){},ke.prototype.idleSendEvent=function(t){this._send(t)},ke);function ke(){}var Le,we=(t(Ae,Le=Oe),Object.defineProperty(Ae.prototype,"ready",{get:function(){return this.isReady},set:function(t){this.isReady=t,this.isReady&&this._uploadQueue()},enumerable:!1,configurable:!0}),Ae.prototype._send=function(t){var e=this,t=this.buildParams(t);null!=t&&(this.reportQueue.push(t),this.isReady&&(this.reportQueue.length>=this.batchReportLength&&this._uploadQueue(),this.batchReportTimeout&&clearTimeout(this.batchReportTimeout),this.batchReportTimeout=setTimeout(function(){e._uploadQueue()},this.batchReportWait)))},Ae.prototype._uploadQueue=function(){var t;this.reportQueue.length&&this.ready&&(t={ev_type:"batch",list:this.reportQueue},this.reportQueue=[],this._request({event:t,type:"post"}))},Ae.prototype._request=function(t){},Ae);function Ae(t){var e,n=Le.call(this)||this;return n.reportQueue=[],n.isReady=!0,n.batchReportLength=null!==(e=t.maxBatchReportLength)&&void 0!==e?e:10,n.batchReportWait=null!==(t=t.batchReportWait)&&void 0!==t?t:1e3,n.batchReportTimeout=null,n}var De="RANGERS_WEB_ID";function He(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:L(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:L(1),sampleRate:1,sampleHitTrace:!1,ignore:G,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:L(z),slowSessionTime:X,spaSlowSessionTime:K,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:G},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.47",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:Ne(W()),rangers_session_id:W(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:O(),network_type:k()},t}var qe,Be,Ue,Je,Ne=function(t){return t=null!==document&&void 0!==document&&document.cookie?T(document.cookie,De):t},Fe=(qe="/v2/user/webid",Be="/v2/user/ssid",Ue="/v2/event/list",Je=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[qe,Be,Ue].forEach(function(t){Je.push(e+t)})}),Je);function Ie(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=j(c(["/monitor_browser/collect"],J(Fe))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!L(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=j(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=j(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return L(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=j([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=L(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&L(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!L(e.sampleRate)&&!((e=j(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=j(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&L(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&L(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Qe(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.ev_type="performance",t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp,isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:U(U({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function Ve(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var We,ze=(t(Ge,We=we),Ge.prototype._shouldSend=function(t){return Ie({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Ge.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Ge.prototype._request=function(t){var e,n;t&&t.event&&(e=t.type,n=t.event,"beacon"===this.options.reportType&&navigator&&navigator.sendBeacon?(t=JSON.stringify(n),navigator.sendBeacon(this.getReportURL(),t)):this.transport&&("get"!==e?"post"===e&&this.transport.postEvent(n):this.transport.getEvent(n)))},Ge.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Qe({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Ge.prototype.getReportURL=function(){return this.reportURL},Ge);function Ge(t){var o=We.call(this,t)||this;return o.options={},o.setTransport=function(){o.transport=new A({reportURL:o.getReportURL()}),o.preQueue.forEach(function(t){We.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return U({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=U(U({},n),r)).commonParams=i({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=i({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=U(U({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=U(U({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?We.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.uploadQueue=function(){o._uploadQueue()},o.reportURL=null!==(t=null==t?void 0:t.reportURL)&&void 0!==t?t:"",o.preQueue=[],o}Xe.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){m(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Xe.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){m(r,t)&&(n[t]=e)}),n},Xe.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Xe.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=L(t.sampleRate)),e;var e},Xe.prototype.configure=function(t){l(t)&&(this.userConfig=U(U({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Xe.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Xe.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,c([],J(t)))},Xe.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Xe.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Xe.prototype.init=function(){var e=this,n=this.getClientOptions();this.client=new ze(n),this.getUserIDFromRangers(function(t){e.finderSetting.user_unique_id=t.user_unique_id,e.finderSetting.uuid=t.user_unique_id,e.finderSetting.ssid=t.ssid,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.getAbSdkVersionFromTester(function(t){e.finderSetting.ab_sdk_version=t,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.getServerSetting()},Xe.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);A.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Xe.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport()},Xe.prototype.updateCurrentSetting=function(){var t,e={commonParams:Xe.getClientCommonParams(this.finderSetting),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:Xe.getClientMonitorsSetting({})},t={commonParams:Xe.getClientCommonParams({}),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=L(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=L(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=L(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=L(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Xe.getClientMonitorsSetting({})},n={commonParams:Xe.getClientCommonParams(this.userConfig),flags:Xe.getClientFlags(this.userConfig),custom:Xe.getClientCustom(this.userConfig),monitors:Xe.getClientMonitorsSetting(this.userConfig)};this.currentSetting=p({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Xe.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==T(document.cookie,De)&&(document.cookie=De+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Xe.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new xe;return i.push(n),i.push(new de),a.enableCatchJSError&&i.push(new Pe),a.hookXHR&&i.push(new Se({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new Me({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new Te),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new Re({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new Re({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Ee),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new je({observe:!0,checkIgnore:function(t){return t.name===Ve(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Xe.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(M):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Xe.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Xe.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Xe.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Xe.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:Ve(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Xe.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Xe.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},Oe=Xe;function Xe(){var n=this;this.version="0.2.47",this.serverDomain="tbm.snssdk.com",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){F(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=He(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var Ke=M;return h()&&(we=new Oe,Ke=we.instance,null!==(Oe=window.RangersSiteSDK)&&void 0!==Oe&&Oe.q&&(u(Oe=window.RangersSiteSDK.q)&&Oe.forEach(function(t){Ke.apply(void 0,c([],J(t)))}),delete window.RangersSiteSDK.q),window.RangersSiteSDK=we.instance),Ke}(); | ||
var RangersSiteSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function t(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var U=function(){return(U=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function i(t){return"undefined"!=typeof Event&&function(t,e){try{return t instanceof e}catch(t){return}}(t,Event)}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function d(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=m(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function v(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function m(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&v(t))?u(t)?e([],t):m({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function h(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function g(){return!!l(window)}function _(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function w(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var S=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),E=new RegExp("("+["bearer","session"].join("|")+")","i"),M=function(t,e){return!(!t||!e)&&(S.test(t)||E.test(e))};function x(){}function I(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function P(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function R(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!M(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function j(t){var e={},n=w(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function T(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),s=b(u[0])&&u[0].trim();s&&b(u[1])&&(o[s]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function O(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function N(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var k=function(t){var e,n;return void 0===t&&(t=window),g()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},L=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function A(t){return!!t&&Math.random()<Number(t)}var D=(H.post=function(t,e,n){var r=n&&n.success||x,o=n&&n.fail||x,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},H.get=function(t,e){var n=e&&e.success||x,r=e&&e.fail||x,o=e&&e.getResponse||x,i=e&&e.getResponseText||x,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},H.prototype.getCommonParams=function(){return{timestamp:Date.now()}},H);function H(t){var e=this;this.postEvent=function(t){t=U(U({},t),e.getCommonParams());H.post(e.url,t)},this.getEvent=function(t){t=_(U(U({},t),e.getCommonParams())),t=e.url+"?"+t;H.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function q(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function B(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var F="x-tt-trace-id",Q="x-tt-trace-host",V="x-tt-logid";function W(t,e,n){void 0===n&&(n="01");e=""+q((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+B(18);t=22-e.length-4;return""+q(""+e.length,2)+e+B(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+q(""+e.length,2)+e+B(n)}(t)+("string"==typeof e?B(4):q(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function z(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var G=.1,X=["/log/sentry/","/monitor_browser/collect"],K=8e3,$=4e3;z(),z();function Y(e){return function(t){return e===t}}function Z(t){return t}function tt(){return y(Date)?Math.round(Date.now()/1e3):0}function et(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function nt(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&s(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:et(e.tags,b),timestamp:tt()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&s(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:et(o.tags,b),timestamp:tt()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:et(r.tags,b),timestamp:tt()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:et(t.metrics,s),category:et(t.tags,b),timestamp:tt()}:{}:i):i}function rt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,c([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=ot(o).then,o}var ot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,c([],J(e.map(function(t){return t.returns}))))}var o,i,t=rt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,c([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),ot(t)}},"resolved",{get:a})};function it(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function at(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function ut(){if(l(window))return window}function st(){if(l(document))return document}function ct(){if(ut()&&l(window.performance))return window.performance}function lt(){if(y(XMLHttpRequest))return XMLHttpRequest}function ft(){if(ut()&&y(window.MutationObserver))return window.MutationObserver}function pt(){if(ut()&&y(window.PerformanceObserver))return window.PerformanceObserver}function dt(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=w(n=n),e=w(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function vt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return x;var n=i[a],r=u.apply(void 0,c([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function mt(t,e){return t instanceof e}function ht(t,e){return t instanceof e}function gt(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function yt(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=d({},n,t),e()}]}function bt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,c([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function _t(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function wt(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function St(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function Et(t,e){return void 0===e&&(e=ct()),(0,J(St(e),5)[4])(t).pop()}function Mt(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,s=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:R(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),M(t[0],t[1])||n.push([t[0],t[1]]))}),R(n)}return l(e)?R(Object.keys(e).filter(function(t){return!M(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!dt(e,a,r)||(n=n||t.getResponseHeader(F))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(Q)||void 0,o.log_id=t.getResponseHeader(V)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return P(t.responseText);if(t.response)return P(t.response);try{return P(t.responseText)}catch(t){return 0}}(t)),(o=U(U({},o),j(a))).resource_timing=Et(o.ax_href),t=o.ax_status,gt(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:s?""+s:void 0,search:w(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function xt(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function Ct(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function Pt(o,i,a,u){var s=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return dt(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(s=W(e,t),this.setRequestHeader(F,s))),Tt(this)(i,s,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Rt(t,e,n){var r="",r=mt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var jt="AjaxMonitor",Tt=function(u){return vt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:jt,type:"get",event:Mt(u,r,o,a)}),n&&n.apply(this,t)}})};function Ot(t,e){if(!t)return"";var n=[];return ht(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,c([],J(t))):n.push.apply(n,c([],J(Object.entries(t)))),R(n)}function kt(t,e,n,r,o,i){var a=e.ax_status;gt(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Rt(n,!0,o),e.ax_request={body:null===(e=r,e=mt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:w(a).search,content_type:function(t,e,n){if(t){if(ht(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function Lt(i,v,a,m,h,g){return function(s,c){void 0===c&&(c={});var l=Rt(s,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(s,c);var t,e,n,r=v.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{dt(v,l,g)&&(c.headers||(c.headers=[]),o&&r&&(p.trace_id=W(o,r),t=c.headers,e=F,n=p.trace_id,ht(t,m)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=mt(t,n)?t.method||e:e).toLowerCase()}(s,c,h);function d(){p.resource_timing=Et(p.ax_href),kt(v,p,s,c,h,m),null!=a&&a({name:$t,type:"get",event:p})}p=U(U({},p),j(Rt(s,!0,h)));return i(s,c).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=Ot(n.headers,m),p.ax_request_header=Ot((e=s,r=c,i=h,a=new(o=m),mt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),m);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),dt(v,l,g)&&(u(Q,"trace_host"),u(F,"trace_id"),u(V,"log_id"))),setTimeout(function(){d()},100)}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,d()}catch(t){}return Promise.reject(t)})}}function At(d,v,m){var t;return void 0===d&&(d=st()),void 0===v&&(v=ft()),void 0===m&&(m=null===(t=function(){var t=ct();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:te(d&&d.body,1,!1,s)})}var n,o,i,a=Date.now(),u=[],s=Zt.concat(t.ignoreTags||[]),c=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:x,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(_t(v,function(){return c(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:Yt,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(m||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function Dt(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function Ht(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(_t(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(h(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&h(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function qt(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function Bt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function Ut(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),vt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function Jt(i,a,u){var s=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,c([],J(o))):new Promise(function(e,n){var r=s+=2;a(r,Date.now()),i.apply(void 0,c([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function It(S,E,M,x){return function(t,n,e){var s,c,r,o,i,a,u,l,f=J([s=[],c=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(s.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(c.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],v=f[2],m=J((r=S,o=E,m=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=m[0],f=m[1],m=m[2],a=o&&vt(o.prototype,"open",Bt)(),u=o&&vt(o.prototype,"send",Ut)(f,m),l=r&&vt(r,"fetch",Jt)(f,m),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=m[0],g=m[1],y=J(Ht(x,function(){return n(e()+5e3)})||[],2),m=y[0],b=y[1];m&&m();function _(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var s=C(e),c=s.next();!c.done;c=s.next()){var l=c.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var v=t.length,m=u.length-1;0<=m;m--){var h=J(u[m],2),g=h[0];switch(h[1]){case 0:v--;break;case 1:if(2<++v)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(wt(M,v(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(_()+5e3)}),!1,function(){return p.notSupport=!0}),2),m=y[0],w=y[1];return m("longtask","resource"),t.forEach(v()),[p,function(){g(),w(),b&&b()},_]}}function Nt(b,_,w,S,E){return void 0===b&&(b=lt()),void 0===_&&(_=at()&&ut()),void 0===w&&(w=pt()),void 0===S&&(S=ft()),void 0===E&&(E=ct()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:qt(c))||0,a||qt(c)||0,g(),l()+(t?0:5e3),m);return t?e?(y(),void t(Math.round(e))):v(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,s=t.observer,t=J(St(E),5),c=t[0],l=t[1],f=t[4],t=J(Dt(l),3),p=t[0],d=t[1],v=t[2],i=J(It(_,b,w,S)(i?[]:u,v,l),3),m=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),s&&s.disconnect(),u.length=0};return[function(t){if(m.notSupport)return t();var e=m[m.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},m,v,function(){return!m.notSupport&&r()||0}]}}function Ft(e,o){return void 0===e&&(e=pt()),void 0===o&&(o=ct()),function(t,n){var r=J(St(o),3)[2];return(0,J(wt(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(ee),[function(){var t=r(ee)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function Qt(u){return void 0===u&&(u=pt()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===ne&&(r=t)});var t=J(wt(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(ne);function i(){o(),re.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};re.forEach(function(t){window.addEventListener(t,a,!0)}),N(i);return[function(){return{lcp:r}}]}}function Vt(a){return void 0===a&&(a=pt()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(wt(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function Wt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function zt(o,u){return void 0===o&&(o=pt()),void 0===u&&(u=ct()),function(t,i){function e(){var t=n("paint");return{fp:Wt(ie,t),fcp:Wt(oe,t)}}var a={},n=J(St(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(wt(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[ie]&&a[oe]&&(i&&i({fp:a[ie],fcp:a[oe]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function Gt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:ae,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Xt(s,c){return void 0===s&&(s=ct()),void 0===c&&(c=pt()),function(t,e){function r(t){(t=Gt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(St(s),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(wt(c,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return Gt(n())}]}}function Kt(t){var e=U({},t);return[function(t){t=(e=t?U(U({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:se,type:"post",event:e}},function(t){return e=U({},t)}]}var $t="FetchMonitor",Yt="FMPMonitor",Zt=["SCRIPT","STYLE","META","HEAD"],te=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+te(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},ee="first-input",ne="largest-contentful-paint",re=["keydown","click"],oe="first-contentful-paint",ie="first-paint",ae="ResourcePerformanceMonitor",ue={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},se="PerformanceMonitor",ce="StaticErrorMonitor";function le(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function fe(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=le(r);if(r&&r!==n)return{name:ce,type:"get",event:pe(r,e.toLowerCase(),t)}}}var pe=function(t,e,n){var r=w(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var de="EmitMonitor",ve=(me.prototype.setup=function(t){this.callback=t||x},me.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},me.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},me.prototype.buildEmitSingleEvent=function(t){t=nt(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},me.monitorName=de,me);function me(){var o=this;this.name=de,this.callback=x,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,c([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function he(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function ge(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function ye(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=U(U({},t),{timestamp:(new Date).getTime()});n=0<=e?c(c([],J(n)),[t]).slice(-e):c(c([],J(n)),[t])}]}function be(t){if(t=t.error)return t}function _e(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function we(n,r){return function(t){var e;if(function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t))e=t;else{if(o(t)||i(t))try{e={message:JSON.stringify(t)}}catch(t){}b(t)&&(e={message:t})}if(e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:Pe,type:"post",event:t}}}}var Se=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=bt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,c([t],J(n)))}}),i},Ee=Se(jt,function(t,r){void 0===t&&(t=lt()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(yt(t),2),t=n[0],n=n[1];return vt(o,"open",xt)(),vt(o,"send",Pt)(t,e,r||""),vt(o,"setRequestHeader",Ct)(),[n]}},["updateConfig"]),Me=Se("BreadcrumbMonitor",function(i){return void 0===i&&(i=st()),function(t){var n,e=J(he(100),2),r=e[0],o=e[1],e=J(ye(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?it(t.event.target):it(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",ge(e,"dom"))),i.addEventListener("keypress",o(ge(e,"dom")))),[t]}},["getBreadcrumbs"]),xe=Se($t,function(r,o,i,a){if(void 0===r&&(r=at()&&ut()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(yt(t),2),t=n[0],n=n[1];return vt(r,"fetch",Lt)(t,e,o,i,a||""),[n]}},["updateConfig"]),Ce=Se(Yt,At,["disconnect","getFmp","getLoadFmp"]),Pe="JSExceptionMonitor",Re=Se(Pe,function(a){return void 0===a&&(a=ut()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=we(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};a&&(void 0!==r&&!r||a.addEventListener("error",t(be)),o&&a.addEventListener("unhandledrejection",t(_e)));return[function(t){var e=null;return(e="[object ErrorEvent]"===Object.prototype.toString.call(t)?be(t):"[object PromiseRejectionEvent]"===Object.prototype.toString.call(t)?_e(t):t)&&i(e)}]}},["buildEvent"]),je=Se(se,function(B){return void 0===B&&(B=ct()),function(t,s){function r(t){if(clearTimeout(g),g=0,s){h=!1;var e=p.isAsync;w(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(St(B),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,s=t.requestStart,c=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,v=t.loadEventStart,m=t.secureConnectionStart,s={dns:n-r,tcp:o-i,request:u-s,response:a-u,processing:c-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:v-t.domContentLoadedEventEnd,ttfb:u-s,redirect:t.redirectEnd-t.redirectStart};m&&(s.ssl=o-m);e=e("navigation")[0];return(e||t)&&(s.navigation=e||t),t&&(s.timing=t),e&&(s.navigation_timing=e),s}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[Y(1),function(){return u().event.fmp}],[Y(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,c,function(){return k().fcp}),i=R().lcp;b(U(U(U({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,_())};if(y=function(){b({fid:T()}),b(k()),D&&b({tti:Math.round(D()-v)}),u()},j.then(function(t){return b({fid:t})}),O.then(b),L.then(function(t){return b({tti:t})}),t)return b(k()),R&&b(R()),u();A&&A(L),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,c=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=U({},ue),d=a||Nt,v=0,m="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Kt(p),3),b=a[0],_=a[1],w=a[2],S=J(St(B),2)[1],a=J((n=s,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,I(function(){return e=!0}),function(){return e}),C=J(bt(Xt),1)[0],P=J(bt(Vt,t),1)[0],R=J(bt(Qt,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],j=rt(function(t){return t.fid}),T=J(bt(Ft,0,j),1)[0],O=rt(Z),k=J(bt(zt,0,O),1)[0],L=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)}),t=J(bt(d,t),4),A=t[0],D=t[3],H=ot(L,O);I(function(){return f&&(g=setTimeout(r,200))}),N(function(){E()||(r(!0),u&&u())});var q=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||q(),r(),y()),p.isAsync=1,e=J(Kt(p),3),b=e[0],_=e[1],w=e[2],h=!0,v=Math.round(S()),m=t;var e={isAsync:1,prePerformanceObserver:i},t=J(bt(Xt,e),1);C=t[0],t=J(bt(Vt,e),1),P=t[0],e=J(bt(d,U(U({},e),{minValue:v})),4),A=e[0],D=e[3],L=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)});var n={fp:0,fcp:0};k=function(){return n},(O=rt(Z))(n),H=ot(L,O),l=bt(At)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-v),p.route_from=m),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),_()},q]}},["initAsync","send","getPerformance","stopAutoPerf"]),Te=Se(ce,function(o,i,a){return void 0===o&&(o=ut()),void 0===i&&(i=ct()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(St(i),3)[2];return o&&o.addEventListener("error",function(t){t=fe(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return fe(n(),t,a||"")}]}},["buildEvent"]),Oe=Se(ae,Xt,["getResourcePerformance"]),ke=(Le.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},Le.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},Le.prototype._modifyEvent=function(t){return t},Le.prototype._shouldSend=function(t){return!0},Le.prototype._send=function(t){},Le.prototype.idleSendEvent=function(t){this._send(t)},Le);function Le(){}var Ae,Se=(t(De,Ae=ke),Object.defineProperty(De.prototype,"ready",{get:function(){return this.isReady},set:function(t){this.isReady=t,this.isReady&&this._uploadQueue()},enumerable:!1,configurable:!0}),De.prototype._send=function(t){var e=this,t=this.buildParams(t);null!=t&&(this.reportQueue.push(t),this.isReady&&(this.reportQueue.length>=this.batchReportLength&&this._uploadQueue(),this.batchReportTimeout&&clearTimeout(this.batchReportTimeout),this.batchReportTimeout=setTimeout(function(){e._uploadQueue()},this.batchReportWait)))},De.prototype._uploadQueue=function(){var t;this.reportQueue.length&&this.ready&&(t={ev_type:"batch",list:this.reportQueue},this.reportQueue=[],this._request({event:t,type:"post"}))},De.prototype._request=function(t){},De);function De(t){var e,n=Ae.call(this)||this;return n.reportQueue=[],n.isReady=!0,n.batchReportLength=null!==(e=t.maxBatchReportLength)&&void 0!==e?e:10,n.batchReportWait=null!==(t=t.batchReportWait)&&void 0!==t?t:1e3,n.batchReportTimeout=null,n}var He="RANGERS_WEB_ID";function qe(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:A(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:A(1),sampleRate:1,sampleHitTrace:!1,ignore:X,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:A(G),slowSessionTime:K,spaSlowSessionTime:$,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:X},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.48",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:Ne(z()),rangers_session_id:z(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:k(),network_type:L()},t}var Be,Ue,Je,Ie,Ne=function(t){return t=null!==document&&void 0!==document&&document.cookie?T(document.cookie,He):t},Fe=(Be="/v2/user/webid",Ue="/v2/user/ssid",Je="/v2/event/list",Ie=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[Be,Ue,Je].forEach(function(t){Ie.push(e+t)})}),Ie);function Qe(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=O(c(["/monitor_browser/collect"],J(Fe))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!A(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=O(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=O(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return A(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=O([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=A(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&A(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!A(e.sampleRate)&&!((e=O(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=O(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&A(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&A(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Ve(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);t.ev_type="performance";o=o;return t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp&&parseInt(o.lcp),isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:U(U({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function We(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var ze,Ge=(t(Xe,ze=Se),Xe.prototype._shouldSend=function(t){return Qe({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Xe.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Xe.prototype._request=function(t){var e,n;t&&t.event&&(e=t.type,n=t.event,"beacon"===this.options.reportType&&navigator&&navigator.sendBeacon?(t=JSON.stringify(n),navigator.sendBeacon(this.getReportURL(),t)):this.transport&&("get"!==e?"post"===e&&this.transport.postEvent(n):this.transport.getEvent(n)))},Xe.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Ve({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Xe.prototype.getReportURL=function(){return this.reportURL},Xe);function Xe(t){var o=ze.call(this,t)||this;return o.options={},o.setTransport=function(){o.transport=new D({reportURL:o.getReportURL()}),o.preQueue.forEach(function(t){ze.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return U({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=U(U({},n),r)).commonParams=p({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=p({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=U(U({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=U(U({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?ze.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.uploadQueue=function(){o._uploadQueue()},o.reportURL=null!==(t=null==t?void 0:t.reportURL)&&void 0!==t?t:"",o.preQueue=[],o}Ke.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){h(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Ke.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){h(r,t)&&(n[t]=e)}),n},Ke.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Ke.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=A(t.sampleRate)),e;var e},Ke.prototype.configure=function(t){l(t)&&(this.userConfig=U(U({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Ke.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Ke.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,c([],J(t)))},Ke.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Ke.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Ke.prototype.init=function(){var e=this,n=this.getClientOptions();this.client=new Ge(n),this.getUserIDFromRangers(function(t){e.finderSetting.user_unique_id=t.user_unique_id,e.finderSetting.uuid=t.user_unique_id,e.finderSetting.ssid=t.ssid,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.getAbSdkVersionFromTester(function(t){e.finderSetting.ab_sdk_version=t,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.getServerSetting()},Ke.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);D.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Ke.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport()},Ke.prototype.updateCurrentSetting=function(){var t,e={commonParams:Ke.getClientCommonParams(this.finderSetting),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:Ke.getClientMonitorsSetting({})},t={commonParams:Ke.getClientCommonParams({}),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=A(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=A(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=A(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=A(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Ke.getClientMonitorsSetting({})},n={commonParams:Ke.getClientCommonParams(this.userConfig),flags:Ke.getClientFlags(this.userConfig),custom:Ke.getClientCustom(this.userConfig),monitors:Ke.getClientMonitorsSetting(this.userConfig)};this.currentSetting=d({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Ke.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==T(document.cookie,He)&&(document.cookie=He+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Ke.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new Ce;return i.push(n),i.push(new ve),a.enableCatchJSError&&i.push(new Re),a.hookXHR&&i.push(new Ee({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new xe({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new Te),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new je({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new je({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Me),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new Oe({observe:!0,checkIgnore:function(t){return t.name===We(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Ke.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(x):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Ke.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Ke.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Ke.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Ke.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:We(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Ke.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Ke.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},ke=Ke;function Ke(){var n=this;this.version="0.2.48",this.serverDomain="tbm.snssdk.com",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){N(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=qe(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var $e=x;return g()&&(Se=new ke,$e=Se.instance,null!==(ke=window.RangersSiteSDK)&&void 0!==ke&&ke.q&&(u(ke=window.RangersSiteSDK.q)&&ke.forEach(function(t){$e.apply(void 0,c([],J(t)))}),delete window.RangersSiteSDK.q),window.RangersSiteSDK=Se.instance),$e}(); |
@@ -1,1 +0,1 @@ | ||
var RangersSiteHybridSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var q=function(){return(q=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=m(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function d(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function m(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&d(t))?u(t)?e([],t):m({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function v(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function h(){return!!l(window)}function g(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function w(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var _=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),S=new RegExp("("+["bearer","session"].join("|")+")","i"),E=function(t,e){return!(!t||!e)&&(_.test(t)||S.test(e))};function M(){}function N(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function x(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function P(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!E(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function j(t){var e={},n=w(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function T(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),s=b(u[0])&&u[0].trim();s&&b(u[1])&&(o[s]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function R(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function U(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var O=function(t){var e,n;return void 0===t&&(t=window),h()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},k=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function D(t){return!!t&&Math.random()<Number(t)}var A=(L.post=function(t,e,n){var r=n&&n.success||M,o=n&&n.fail||M,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},L.get=function(t,e){var n=e&&e.success||M,r=e&&e.fail||M,o=e&&e.getResponse||M,i=e&&e.getResponseText||M,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},L.prototype.getCommonParams=function(){return{timestamp:Date.now()}},L);function L(t){var e=this;this.postEvent=function(t){t=q(q({},t),e.getCommonParams());L.post(e.url,t)},this.getEvent=function(t){t=g(q(q({},t),e.getCommonParams())),t=e.url+"?"+t;L.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function H(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function B(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var I="x-tt-trace-id",F="x-tt-trace-host",V="x-tt-logid";function z(t,e,n){void 0===n&&(n="01");e=""+H((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+B(18);t=22-e.length-4;return""+H(""+e.length,2)+e+B(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+H(""+e.length,2)+e+B(n)}(t)+("string"==typeof e?B(4):H(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function G(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var Q=.1,X=["/log/sentry/","/monitor_browser/collect"],K=8e3,W=4e3;G(),G();function $(e){return function(t){return e===t}}function Y(t){return t}function Z(){return y(Date)?Math.round(Date.now()/1e3):0}function tt(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function et(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&s(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:tt(e.tags,b),timestamp:Z()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&s(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:tt(o.tags,b),timestamp:Z()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:tt(r.tags,b),timestamp:Z()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:tt(t.metrics,s),category:tt(t.tags,b),timestamp:Z()}:{}:i):i}function nt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,c([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=rt(o).then,o}var rt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,c([],J(e.map(function(t){return t.returns}))))}var o,i,t=nt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,c([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),rt(t)}},"resolved",{get:a})};function ot(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function t(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function it(){if(l(window))return window}function at(){if(l(document))return document}function ut(){if(it()&&l(window.performance))return window.performance}function st(){if(y(XMLHttpRequest))return XMLHttpRequest}function ct(){if(it()&&y(window.MutationObserver))return window.MutationObserver}function lt(){if(it()&&y(window.PerformanceObserver))return window.PerformanceObserver}function ft(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=w(n=n),e=w(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function pt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return M;var n=i[a],r=u.apply(void 0,c([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function dt(t,e){return t instanceof e}function mt(t,e){return t instanceof e}function vt(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function ht(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=p({},n,t),e()}]}function gt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,c([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function yt(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function bt(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function wt(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function _t(t,e){return void 0===e&&(e=ut()),(0,J(wt(e),5)[4])(t).pop()}function St(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,s=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:P(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),E(t[0],t[1])||n.push([t[0],t[1]]))}),P(n)}return l(e)?P(Object.keys(e).filter(function(t){return!E(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!ft(e,a,r)||(n=n||t.getResponseHeader(I))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(F)||void 0,o.log_id=t.getResponseHeader(V)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return x(t.responseText);if(t.response)return x(t.response);try{return x(t.responseText)}catch(t){return 0}}(t)),(o=q(q({},o),j(a))).resource_timing=_t(o.ax_href),t=o.ax_status,vt(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:s?""+s:void 0,search:w(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function Et(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function Mt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function xt(o,i,a,u){var s=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return ft(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(s=z(e,t),this.setRequestHeader(I,s))),jt(this)(i,s,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Ct(t,e,n){var r="",r=dt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var Pt="AjaxMonitor",jt=function(u){return pt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:Pt,type:"get",event:St(u,r,o,a)}),n&&n.apply(this,t)}})};function Tt(t,e){if(!t)return"";var n=[];return mt(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,c([],J(t))):n.push.apply(n,c([],J(Object.entries(t)))),P(n)}function Rt(t,e,n,r,o,i){var a=e.ax_status;vt(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Ct(n,!0,o),e.ax_request={body:null===(e=r,e=dt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:w(a).search,content_type:function(t,e,n){if(t){if(mt(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function Ot(i,m,a,v,h,g){return function(s,c){void 0===c&&(c={});var l=Ct(s,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(s,c);var t,e,n,r=m.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{ft(m,l,g)&&(c.headers||(c.headers=[]),o&&r&&(p.trace_id=z(o,r),t=c.headers,e=I,n=p.trace_id,mt(t,v)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=dt(t,n)?t.method||e:e).toLowerCase()}(s,c,h);function d(){Rt(m,p,s,c,h,v),null!=a&&a({name:Kt,type:"get",event:p})}p=q(q({},p),j(Ct(s,!0,h)));return i(s,c).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=Tt(n.headers,v),p.ax_request_header=Tt((e=s,r=c,i=h,a=new(o=v),dt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),v),p.resource_timing=_t(p.ax_href);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),ft(m,l,g)&&(u(F,"trace_host"),u(I,"trace_id"),u(V,"log_id"))),d()}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,p.resource_timing=_t(p.ax_href),d()}catch(t){}return Promise.reject(t)})}}function kt(d,m,v){var t;return void 0===d&&(d=at()),void 0===m&&(m=ct()),void 0===v&&(v=null===(t=function(){var t=ut();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:Yt(d&&d.body,1,!1,s)})}var n,o,i,a=Date.now(),u=[],s=$t.concat(t.ignoreTags||[]),c=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:M,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(yt(m,function(){return c(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:Wt,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(v||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function Dt(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function At(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(yt(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(v(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&v(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function Lt(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function Ht(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function Bt(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),pt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function It(i,a,u){var s=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,c([],J(o))):new Promise(function(e,n){var r=s+=2;a(r,Date.now()),i.apply(void 0,c([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function qt(S,E,M,x){return function(t,n,e){var s,c,r,o,i,a,u,l,f=J([s=[],c=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(s.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(c.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],m=f[2],v=J((r=S,o=E,v=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=v[0],f=v[1],v=v[2],a=o&&pt(o.prototype,"open",Ht)(),u=o&&pt(o.prototype,"send",Bt)(f,v),l=r&&pt(r,"fetch",It)(f,v),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=v[0],g=v[1],y=J(At(x,function(){return n(e()+5e3)})||[],2),v=y[0],b=y[1];v&&v();function w(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var s=C(e),c=s.next();!c.done;c=s.next()){var l=c.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var m=t.length,v=u.length-1;0<=v;v--){var h=J(u[v],2),g=h[0];switch(h[1]){case 0:m--;break;case 1:if(2<++m)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(bt(M,m(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(w()+5e3)}),!1,function(){return p.notSupport=!0}),2),v=y[0],_=y[1];return v("longtask","resource"),t.forEach(m()),[p,function(){g(),_(),b&&b()},w]}}function Jt(b,w,_,S,E){return void 0===b&&(b=st()),void 0===w&&(w=t()&&it()),void 0===_&&(_=lt()),void 0===S&&(S=ct()),void 0===E&&(E=ut()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:Lt(c))||0,a||Lt(c)||0,g(),l()+(t?0:5e3),v);return t?e?(y(),void t(Math.round(e))):m(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,s=t.observer,t=J(wt(E),5),c=t[0],l=t[1],f=t[4],t=J(Dt(l),3),p=t[0],d=t[1],m=t[2],i=J(qt(w,b,_,S)(i?[]:u,m,l),3),v=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),s&&s.disconnect(),u.length=0};return[function(t){if(v.notSupport)return t();var e=v[v.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},v,m,function(){return!v.notSupport&&r()||0}]}}function Nt(e,o){return void 0===e&&(e=lt()),void 0===o&&(o=ut()),function(t,n){var r=J(wt(o),3)[2];return(0,J(bt(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(Zt),[function(){var t=r(Zt)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function Ut(u){return void 0===u&&(u=lt()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===te&&(r=t)});var t=J(bt(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(te);function i(){o(),ee.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};ee.forEach(function(t){window.addEventListener(t,a,!0)}),U(i);return[function(){return{lcp:r}}]}}function Ft(a){return void 0===a&&(a=lt()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(bt(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function Vt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function zt(o,u){return void 0===o&&(o=lt()),void 0===u&&(u=ut()),function(t,i){function e(){var t=n("paint");return{fp:Vt(re,t),fcp:Vt(ne,t)}}var a={},n=J(wt(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(bt(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[re]&&a[ne]&&(i&&i({fp:a[re],fcp:a[ne]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function Gt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:oe,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Qt(s,c){return void 0===s&&(s=ut()),void 0===c&&(c=lt()),function(t,e){function r(t){(t=Gt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(wt(s),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(bt(c,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return Gt(n())}]}}function Xt(t){var e=q({},t);return[function(t){t=(e=t?q(q({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:ae,type:"post",event:e}},function(t){return e=q({},t)}]}var Kt="FetchMonitor",Wt="FMPMonitor",$t=["SCRIPT","STYLE","META","HEAD"],Yt=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+Yt(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},Zt="first-input",te="largest-contentful-paint",ee=["keydown","click"],ne="first-contentful-paint",re="first-paint",oe="ResourcePerformanceMonitor",ie={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},ae="PerformanceMonitor",ue="StaticErrorMonitor";function se(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function ce(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=se(r);if(r&&r!==n)return{name:ue,type:"get",event:le(r,e.toLowerCase(),t)}}}var le=function(t,e,n){var r=w(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var fe="EmitMonitor",pe=(de.prototype.setup=function(t){this.callback=t||M},de.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},de.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},de.prototype.buildEmitSingleEvent=function(t){t=et(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},de.monitorName=fe,de);function de(){var o=this;this.name=fe,this.callback=M,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,c([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function me(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function ve(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function he(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=q(q({},t),{timestamp:(new Date).getTime()});n=0<=e?c(c([],J(n)),[t]).slice(-e):c(c([],J(n)),[t])}]}function ge(t){if(t=t.error)return t}function ye(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function be(n,r){return function(t){var e;if(!function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t)?(o(t)&&(e={message:JSON.stringify(t)}),b(t)&&(e={message:t})):e=t,e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:xe,type:"post",event:t}}}}var we=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=gt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,c([t],J(n)))}}),i},_e=we(Pt,function(t,r){void 0===t&&(t=st()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(ht(t),2),t=n[0],n=n[1];return pt(o,"open",Et)(),pt(o,"send",xt)(t,e,r||""),pt(o,"setRequestHeader",Mt)(),[n]}},["updateConfig"]),Se=we("BreadcrumbMonitor",function(i){return void 0===i&&(i=at()),function(t){var n,e=J(me(100),2),r=e[0],o=e[1],e=J(he(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?ot(t.event.target):ot(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",ve(e,"dom"))),i.addEventListener("keypress",o(ve(e,"dom")))),[t]}},["getBreadcrumbs"]),Ee=we(Kt,function(r,o,i,a){if(void 0===r&&(r=t()&&it()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(ht(t),2),t=n[0],n=n[1];return pt(r,"fetch",Ot)(t,e,o,i,a||""),[n]}},["updateConfig"]),Me=we(Wt,kt,["disconnect","getFmp","getLoadFmp"]),xe="JSExceptionMonitor",Ce=we(xe,function(a){return void 0===a&&(a=it()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=be(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};return a&&((void 0===r||r)&&a.addEventListener("error",t(ge)),o&&a.addEventListener("unhandledrejection",t(ye))),[i]}},["buildEvent"]),Pe=we(ae,function(I){return void 0===I&&(I=ut()),function(t,s){function r(t){if(clearTimeout(g),g=0,s){h=!1;var e=p.isAsync;_(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(wt(I),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,s=t.requestStart,c=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,m=t.loadEventStart,v=t.secureConnectionStart,s={dns:n-r,tcp:o-i,request:u-s,response:a-u,processing:c-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:m-t.domContentLoadedEventEnd,ttfb:u-s,redirect:t.redirectEnd-t.redirectStart};v&&(s.ssl=o-v);e=e("navigation")[0];return(e||t)&&(s.navigation=e||t),t&&(s.timing=t),e&&(s.navigation_timing=e),s}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[$(1),function(){return u().event.fmp}],[$(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,c,function(){return k().fcp}),i=j().lcp;b(q(q(q({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,w())};if(y=function(){b({fid:R()}),b(k()),L&&b({tti:Math.round(L()-m)}),u()},T.then(function(t){return b({fid:t})}),O.then(b),D.then(function(t){return b({tti:t})}),t)return b(k()),j&&b(j()),u();A&&A(D),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,c=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=q({},ie),d=a||Jt,m=0,v="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Xt(p),3),b=a[0],w=a[1],_=a[2],S=J(wt(I),2)[1],a=J((n=s,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,N(function(){return e=!0}),function(){return e}),C=J(gt(Qt),1)[0],P=J(gt(Ft,t),1)[0],j=J(gt(Ut,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],T=nt(function(t){return t.fid}),R=J(gt(Nt,0,T),1)[0],O=nt(Y),k=J(gt(zt,0,O),1)[0],D=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-m),0)}),t=J(gt(d,t),4),A=t[0],L=t[3],H=rt(D,O);N(function(){return f&&(g=setTimeout(r,200))}),U(function(){E()||(r(!0),u&&u())});var B=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||B(),r(),y()),p.isAsync=1,e=J(Xt(p),3),b=e[0],w=e[1],_=e[2],h=!0,m=Math.round(S()),v=t;var e={isAsync:1,prePerformanceObserver:i},t=J(gt(Qt,e),1);C=t[0],t=J(gt(Ft,e),1),P=t[0],e=J(gt(d,q(q({},e),{minValue:m})),4),A=e[0],L=e[3],D=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-m),0)});var n={fp:0,fcp:0};k=function(){return n},(O=nt(Y))(n),H=rt(D,O),l=gt(kt)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-m),p.route_from=v),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),w()},B]}},["initAsync","send","getPerformance","stopAutoPerf"]),je=we(ue,function(o,i,a){return void 0===o&&(o=it()),void 0===i&&(i=ut()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(wt(i),3)[2];return o&&o.addEventListener("error",function(t){t=ce(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return ce(n(),t,a||"")}]}},["buildEvent"]),Te=we(oe,Qt,["getResourcePerformance"]),Re=(Oe.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},Oe.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},Oe.prototype._modifyEvent=function(t){return t},Oe.prototype._shouldSend=function(t){return!0},Oe.prototype._send=function(t){},Oe.prototype.idleSendEvent=function(t){this._send(t)},Oe);function Oe(){}var ke="RANGERS_WEB_ID";function De(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:D(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:D(1),sampleRate:1,sampleHitTrace:!1,ignore:X,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:D(Q),slowSessionTime:K,spaSlowSessionTime:W,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:X},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.47",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:Ie(G()),rangers_session_id:G(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:O(),network_type:k()},t}var Ae,Le,He,Be,Ie=function(t){return t=null!==document&&void 0!==document&&document.cookie?T(document.cookie,ke):t},qe=(Ae="/v2/user/webid",Le="/v2/user/ssid",He="/v2/event/list",Be=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[Ae,Le,He].forEach(function(t){Be.push(e+t)})}),Be);function Je(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=R(c(["/monitor_browser/collect"],J(qe))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!D(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=R(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=R(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return D(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=R([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=D(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&D(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!D(e.sampleRate)&&!((e=R(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=R(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&D(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&D(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Ne(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.ev_type="performance",t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp,isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:q(q({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function Ue(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var Fe,Ve={cover:M,accumulate:M,reportDirectly:M,average:M},ze=function(t){var n=this;this.cover=function(t,e){n.log.cover(t,e)},this.accumulate=function(t,e){n.log.accumulate(t,e)},this.reportDirectly=function(t,e){n.log.reportDirectly(t,e)},this.average=function(t,e){n.log.average(t,e)},this.log=null!==(t=t.transport)&&void 0!==t?t:Ve},Ge=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(Qe,Fe=Re),Qe.prototype.uploadQueue=function(){},Qe.prototype._shouldSend=function(t){return Je({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Qe.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Qe.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Ne({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Qe.prototype._send=function(t){t&&t.event&&t.name&&this.transport&&this.sendByTypes(t)},Qe.prototype.sendByTypes=function(t){var e;this.transport&&(e={jsBase:null!==(e=this.options.commonParams)&&void 0!==e?e:{},jsInfo:this.buildParams(t)},"PerformanceMonitor"===t.name&&this.transport.cover(e,e.jsInfo.ev_type),"StaticErrorMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"ResourcePerformanceMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"AjaxMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"FetchMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"JSExceptionMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"PageViewMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type))},Qe);function Qe(t){var o=Fe.call(this)||this;return o.options={},o.setTransport=function(t){o.transport=new ze({transport:t.transport}),o.preQueue.forEach(function(t){Fe.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return q({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=q(q({},n),r)).commonParams=i({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=i({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=q(q({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=q(q({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?Fe.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.getEventToBeSent=function(t){return null!==(t=Fe.prototype.getEventToBeSent.call(o,t))&&void 0!==t?t:{}},o.options=t,o.preQueue=[],o}Xe.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){v(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Xe.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){v(r,t)&&(n[t]=e)}),n},Xe.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Xe.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=D(t.sampleRate)),e;var e},Xe.prototype.configure=function(t){l(t)&&(this.userConfig=q(q({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Xe.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Xe.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,c([],J(t)))},Xe.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Xe.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Xe.prototype.init=function(){var t=this.getClientOptions();this.client=new Ge(t),this.updateClientConfig(t),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.afterServerSetting()},Xe.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);A.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Xe.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport({transport:this.userConfig.transport})},Xe.prototype.updateCurrentSetting=function(){var t,e={commonParams:Xe.getClientCommonParams(this.finderSetting),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:Xe.getClientMonitorsSetting({})},t={commonParams:Xe.getClientCommonParams({}),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=D(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=D(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=D(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=D(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Xe.getClientMonitorsSetting({})},n={commonParams:Xe.getClientCommonParams(this.userConfig),flags:Xe.getClientFlags(this.userConfig),custom:Xe.getClientCustom(this.userConfig),monitors:Xe.getClientMonitorsSetting(this.userConfig)};this.currentSetting=p({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Xe.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==T(document.cookie,ke)&&(document.cookie=ke+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Xe.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new Me;return i.push(n),i.push(new pe),a.enableCatchJSError&&i.push(new Ce),a.hookXHR&&i.push(new _e({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new Ee({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new je),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new Pe({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new Pe({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Se),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new Te({observe:!0,checkIgnore:function(t){return t.name===Ue(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Xe.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(M):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Xe.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Xe.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Xe.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Xe.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:Ue(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Xe.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Xe.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},we=Xe;function Xe(){var n=this;this.version="0.2.47",this.serverDomain="tbm.snssdk.com",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){U(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=De(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var Ke=M;return h()&&(Re=new we,Ke=Re.instance,null!==(we=window.RangersSiteHybridSDK)&&void 0!==we&&we.q&&(u(we=window.RangersSiteHybridSDK.q)&&we.forEach(function(t){Ke.apply(void 0,c([],J(t)))}),delete window.RangersSiteHybridSDK.q),window.RangersSiteHybridSDK=Re.instance),Ke}(); | ||
var RangersSiteHybridSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var q=function(){return(q=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function i(t){return"undefined"!=typeof Event&&function(t,e){try{return t instanceof e}catch(t){return}}(t,Event)}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function d(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=m(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function v(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function m(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&v(t))?u(t)?e([],t):m({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function h(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function g(){return!!l(window)}function w(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function _(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var S=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),E=new RegExp("("+["bearer","session"].join("|")+")","i"),M=function(t,e){return!(!t||!e)&&(S.test(t)||E.test(e))};function x(){}function N(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function P(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function j(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!M(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function T(t){var e={},n=_(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function R(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),s=b(u[0])&&u[0].trim();s&&b(u[1])&&(o[s]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function O(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function U(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var k=function(t){var e,n;return void 0===t&&(t=window),g()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},D=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function A(t){return!!t&&Math.random()<Number(t)}var L=(H.post=function(t,e,n){var r=n&&n.success||x,o=n&&n.fail||x,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},H.get=function(t,e){var n=e&&e.success||x,r=e&&e.fail||x,o=e&&e.getResponse||x,i=e&&e.getResponseText||x,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},H.prototype.getCommonParams=function(){return{timestamp:Date.now()}},H);function H(t){var e=this;this.postEvent=function(t){t=q(q({},t),e.getCommonParams());H.post(e.url,t)},this.getEvent=function(t){t=w(q(q({},t),e.getCommonParams())),t=e.url+"?"+t;H.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function B(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function I(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var F="x-tt-trace-id",V="x-tt-trace-host",z="x-tt-logid";function G(t,e,n){void 0===n&&(n="01");e=""+B((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+I(18);t=22-e.length-4;return""+B(""+e.length,2)+e+I(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+B(""+e.length,2)+e+I(n)}(t)+("string"==typeof e?I(4):B(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function Q(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var X=.1,K=["/log/sentry/","/monitor_browser/collect"],W=8e3,$=4e3;Q(),Q();function Y(e){return function(t){return e===t}}function Z(t){return t}function tt(){return y(Date)?Math.round(Date.now()/1e3):0}function et(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function nt(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&s(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:et(e.tags,b),timestamp:tt()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&s(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:et(o.tags,b),timestamp:tt()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:et(r.tags,b),timestamp:tt()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:et(t.metrics,s),category:et(t.tags,b),timestamp:tt()}:{}:i):i}function rt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,c([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=ot(o).then,o}var ot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,c([],J(e.map(function(t){return t.returns}))))}var o,i,t=rt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,c([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),ot(t)}},"resolved",{get:a})};function it(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function t(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function at(){if(l(window))return window}function ut(){if(l(document))return document}function st(){if(at()&&l(window.performance))return window.performance}function ct(){if(y(XMLHttpRequest))return XMLHttpRequest}function lt(){if(at()&&y(window.MutationObserver))return window.MutationObserver}function ft(){if(at()&&y(window.PerformanceObserver))return window.PerformanceObserver}function pt(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=_(n=n),e=_(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function dt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return x;var n=i[a],r=u.apply(void 0,c([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function vt(t,e){return t instanceof e}function mt(t,e){return t instanceof e}function ht(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function gt(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=d({},n,t),e()}]}function yt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,c([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function bt(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function wt(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function _t(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function St(t,e){return void 0===e&&(e=st()),(0,J(_t(e),5)[4])(t).pop()}function Et(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,s=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:j(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),M(t[0],t[1])||n.push([t[0],t[1]]))}),j(n)}return l(e)?j(Object.keys(e).filter(function(t){return!M(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!pt(e,a,r)||(n=n||t.getResponseHeader(F))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(V)||void 0,o.log_id=t.getResponseHeader(z)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return P(t.responseText);if(t.response)return P(t.response);try{return P(t.responseText)}catch(t){return 0}}(t)),(o=q(q({},o),T(a))).resource_timing=St(o.ax_href),t=o.ax_status,ht(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:s?""+s:void 0,search:_(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function Mt(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function xt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function Ct(o,i,a,u){var s=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return pt(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(s=G(e,t),this.setRequestHeader(F,s))),Tt(this)(i,s,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Pt(t,e,n){var r="",r=vt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var jt="AjaxMonitor",Tt=function(u){return dt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:jt,type:"get",event:Et(u,r,o,a)}),n&&n.apply(this,t)}})};function Rt(t,e){if(!t)return"";var n=[];return mt(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,c([],J(t))):n.push.apply(n,c([],J(Object.entries(t)))),j(n)}function Ot(t,e,n,r,o,i){var a=e.ax_status;ht(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Pt(n,!0,o),e.ax_request={body:null===(e=r,e=vt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:_(a).search,content_type:function(t,e,n){if(t){if(mt(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function kt(i,v,a,m,h,g){return function(s,c){void 0===c&&(c={});var l=Pt(s,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(s,c);var t,e,n,r=v.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{pt(v,l,g)&&(c.headers||(c.headers=[]),o&&r&&(p.trace_id=G(o,r),t=c.headers,e=F,n=p.trace_id,mt(t,m)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=vt(t,n)?t.method||e:e).toLowerCase()}(s,c,h);function d(){p.resource_timing=St(p.ax_href),Ot(v,p,s,c,h,m),null!=a&&a({name:Wt,type:"get",event:p})}p=q(q({},p),T(Pt(s,!0,h)));return i(s,c).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=Rt(n.headers,m),p.ax_request_header=Rt((e=s,r=c,i=h,a=new(o=m),vt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),m);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),pt(v,l,g)&&(u(V,"trace_host"),u(F,"trace_id"),u(z,"log_id"))),setTimeout(function(){d()},100)}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,d()}catch(t){}return Promise.reject(t)})}}function Dt(d,v,m){var t;return void 0===d&&(d=ut()),void 0===v&&(v=lt()),void 0===m&&(m=null===(t=function(){var t=st();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:Zt(d&&d.body,1,!1,s)})}var n,o,i,a=Date.now(),u=[],s=Yt.concat(t.ignoreTags||[]),c=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:x,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(bt(v,function(){return c(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:$t,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(m||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function At(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function Lt(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(bt(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(h(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&h(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function Ht(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function Bt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function It(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),dt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function qt(i,a,u){var s=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,c([],J(o))):new Promise(function(e,n){var r=s+=2;a(r,Date.now()),i.apply(void 0,c([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function Jt(S,E,M,x){return function(t,n,e){var s,c,r,o,i,a,u,l,f=J([s=[],c=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(s.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(c.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],v=f[2],m=J((r=S,o=E,m=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=m[0],f=m[1],m=m[2],a=o&&dt(o.prototype,"open",Bt)(),u=o&&dt(o.prototype,"send",It)(f,m),l=r&&dt(r,"fetch",qt)(f,m),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=m[0],g=m[1],y=J(Lt(x,function(){return n(e()+5e3)})||[],2),m=y[0],b=y[1];m&&m();function w(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var s=C(e),c=s.next();!c.done;c=s.next()){var l=c.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var v=t.length,m=u.length-1;0<=m;m--){var h=J(u[m],2),g=h[0];switch(h[1]){case 0:v--;break;case 1:if(2<++v)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(wt(M,v(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(w()+5e3)}),!1,function(){return p.notSupport=!0}),2),m=y[0],_=y[1];return m("longtask","resource"),t.forEach(v()),[p,function(){g(),_(),b&&b()},w]}}function Nt(b,w,_,S,E){return void 0===b&&(b=ct()),void 0===w&&(w=t()&&at()),void 0===_&&(_=ft()),void 0===S&&(S=lt()),void 0===E&&(E=st()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:Ht(c))||0,a||Ht(c)||0,g(),l()+(t?0:5e3),m);return t?e?(y(),void t(Math.round(e))):v(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,s=t.observer,t=J(_t(E),5),c=t[0],l=t[1],f=t[4],t=J(At(l),3),p=t[0],d=t[1],v=t[2],i=J(Jt(w,b,_,S)(i?[]:u,v,l),3),m=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),s&&s.disconnect(),u.length=0};return[function(t){if(m.notSupport)return t();var e=m[m.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},m,v,function(){return!m.notSupport&&r()||0}]}}function Ut(e,o){return void 0===e&&(e=ft()),void 0===o&&(o=st()),function(t,n){var r=J(_t(o),3)[2];return(0,J(wt(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(te),[function(){var t=r(te)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function Ft(u){return void 0===u&&(u=ft()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===ee&&(r=t)});var t=J(wt(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(ee);function i(){o(),ne.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};ne.forEach(function(t){window.addEventListener(t,a,!0)}),U(i);return[function(){return{lcp:r}}]}}function Vt(a){return void 0===a&&(a=ft()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(wt(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function zt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function Gt(o,u){return void 0===o&&(o=ft()),void 0===u&&(u=st()),function(t,i){function e(){var t=n("paint");return{fp:zt(oe,t),fcp:zt(re,t)}}var a={},n=J(_t(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(wt(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[oe]&&a[re]&&(i&&i({fp:a[oe],fcp:a[re]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function Qt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:ie,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Xt(s,c){return void 0===s&&(s=st()),void 0===c&&(c=ft()),function(t,e){function r(t){(t=Qt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(_t(s),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(wt(c,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return Qt(n())}]}}function Kt(t){var e=q({},t);return[function(t){t=(e=t?q(q({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:ue,type:"post",event:e}},function(t){return e=q({},t)}]}var Wt="FetchMonitor",$t="FMPMonitor",Yt=["SCRIPT","STYLE","META","HEAD"],Zt=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+Zt(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},te="first-input",ee="largest-contentful-paint",ne=["keydown","click"],re="first-contentful-paint",oe="first-paint",ie="ResourcePerformanceMonitor",ae={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},ue="PerformanceMonitor",se="StaticErrorMonitor";function ce(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function le(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=ce(r);if(r&&r!==n)return{name:se,type:"get",event:fe(r,e.toLowerCase(),t)}}}var fe=function(t,e,n){var r=_(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var pe="EmitMonitor",de=(ve.prototype.setup=function(t){this.callback=t||x},ve.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},ve.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},ve.prototype.buildEmitSingleEvent=function(t){t=nt(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},ve.monitorName=pe,ve);function ve(){var o=this;this.name=pe,this.callback=x,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,c([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function me(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function he(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function ge(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=q(q({},t),{timestamp:(new Date).getTime()});n=0<=e?c(c([],J(n)),[t]).slice(-e):c(c([],J(n)),[t])}]}function ye(t){if(t=t.error)return t}function be(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function we(n,r){return function(t){var e;if(function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t))e=t;else{if(o(t)||i(t))try{e={message:JSON.stringify(t)}}catch(t){}b(t)&&(e={message:t})}if(e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:Ce,type:"post",event:t}}}}var _e=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=yt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,c([t],J(n)))}}),i},Se=_e(jt,function(t,r){void 0===t&&(t=ct()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(o,"open",Mt)(),dt(o,"send",Ct)(t,e,r||""),dt(o,"setRequestHeader",xt)(),[n]}},["updateConfig"]),Ee=_e("BreadcrumbMonitor",function(i){return void 0===i&&(i=ut()),function(t){var n,e=J(me(100),2),r=e[0],o=e[1],e=J(ge(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?it(t.event.target):it(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",he(e,"dom"))),i.addEventListener("keypress",o(he(e,"dom")))),[t]}},["getBreadcrumbs"]),Me=_e(Wt,function(r,o,i,a){if(void 0===r&&(r=t()&&at()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(r,"fetch",kt)(t,e,o,i,a||""),[n]}},["updateConfig"]),xe=_e($t,Dt,["disconnect","getFmp","getLoadFmp"]),Ce="JSExceptionMonitor",Pe=_e(Ce,function(a){return void 0===a&&(a=at()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=we(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};a&&(void 0!==r&&!r||a.addEventListener("error",t(ye)),o&&a.addEventListener("unhandledrejection",t(be)));return[function(t){var e=null;return(e="[object ErrorEvent]"===Object.prototype.toString.call(t)?ye(t):"[object PromiseRejectionEvent]"===Object.prototype.toString.call(t)?be(t):t)&&i(e)}]}},["buildEvent"]),je=_e(ue,function(I){return void 0===I&&(I=st()),function(t,s){function r(t){if(clearTimeout(g),g=0,s){h=!1;var e=p.isAsync;_(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(_t(I),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,s=t.requestStart,c=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,v=t.loadEventStart,m=t.secureConnectionStart,s={dns:n-r,tcp:o-i,request:u-s,response:a-u,processing:c-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:v-t.domContentLoadedEventEnd,ttfb:u-s,redirect:t.redirectEnd-t.redirectStart};m&&(s.ssl=o-m);e=e("navigation")[0];return(e||t)&&(s.navigation=e||t),t&&(s.timing=t),e&&(s.navigation_timing=e),s}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[Y(1),function(){return u().event.fmp}],[Y(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,c,function(){return k().fcp}),i=j().lcp;b(q(q(q({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,w())};if(y=function(){b({fid:R()}),b(k()),L&&b({tti:Math.round(L()-v)}),u()},T.then(function(t){return b({fid:t})}),O.then(b),D.then(function(t){return b({tti:t})}),t)return b(k()),j&&b(j()),u();A&&A(D),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,c=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=q({},ae),d=a||Nt,v=0,m="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Kt(p),3),b=a[0],w=a[1],_=a[2],S=J(_t(I),2)[1],a=J((n=s,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,N(function(){return e=!0}),function(){return e}),C=J(yt(Xt),1)[0],P=J(yt(Vt,t),1)[0],j=J(yt(Ft,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],T=rt(function(t){return t.fid}),R=J(yt(Ut,0,T),1)[0],O=rt(Z),k=J(yt(Gt,0,O),1)[0],D=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)}),t=J(yt(d,t),4),A=t[0],L=t[3],H=ot(D,O);N(function(){return f&&(g=setTimeout(r,200))}),U(function(){E()||(r(!0),u&&u())});var B=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||B(),r(),y()),p.isAsync=1,e=J(Kt(p),3),b=e[0],w=e[1],_=e[2],h=!0,v=Math.round(S()),m=t;var e={isAsync:1,prePerformanceObserver:i},t=J(yt(Xt,e),1);C=t[0],t=J(yt(Vt,e),1),P=t[0],e=J(yt(d,q(q({},e),{minValue:v})),4),A=e[0],L=e[3],D=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)});var n={fp:0,fcp:0};k=function(){return n},(O=rt(Z))(n),H=ot(D,O),l=yt(Dt)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-v),p.route_from=m),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),w()},B]}},["initAsync","send","getPerformance","stopAutoPerf"]),Te=_e(se,function(o,i,a){return void 0===o&&(o=at()),void 0===i&&(i=st()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(_t(i),3)[2];return o&&o.addEventListener("error",function(t){t=le(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return le(n(),t,a||"")}]}},["buildEvent"]),Re=_e(ie,Xt,["getResourcePerformance"]),Oe=(ke.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},ke.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},ke.prototype._modifyEvent=function(t){return t},ke.prototype._shouldSend=function(t){return!0},ke.prototype._send=function(t){},ke.prototype.idleSendEvent=function(t){this._send(t)},ke);function ke(){}var De="RANGERS_WEB_ID";function Ae(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:A(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:A(1),sampleRate:1,sampleHitTrace:!1,ignore:K,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:A(X),slowSessionTime:W,spaSlowSessionTime:$,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:K},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.48",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:qe(Q()),rangers_session_id:Q(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:k(),network_type:D()},t}var Le,He,Be,Ie,qe=function(t){return t=null!==document&&void 0!==document&&document.cookie?R(document.cookie,De):t},Je=(Le="/v2/user/webid",He="/v2/user/ssid",Be="/v2/event/list",Ie=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[Le,He,Be].forEach(function(t){Ie.push(e+t)})}),Ie);function Ne(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=O(c(["/monitor_browser/collect"],J(Je))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!A(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=O(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=O(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return A(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=O([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=A(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&A(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!A(e.sampleRate)&&!((e=O(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=O(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&A(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&A(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Ue(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);t.ev_type="performance";o=o;return t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp&&parseInt(o.lcp),isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:q(q({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function Fe(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var Ve,ze={cover:x,accumulate:x,reportDirectly:x,average:x},Ge=function(t){var n=this;this.cover=function(t,e){n.log.cover(t,e)},this.accumulate=function(t,e){n.log.accumulate(t,e)},this.reportDirectly=function(t,e){n.log.reportDirectly(t,e)},this.average=function(t,e){n.log.average(t,e)},this.log=null!==(t=t.transport)&&void 0!==t?t:ze},Qe=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(Xe,Ve=Oe),Xe.prototype.uploadQueue=function(){},Xe.prototype._shouldSend=function(t){return Ne({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Xe.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Xe.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Ue({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Xe.prototype._send=function(t){t&&t.event&&t.name&&this.transport&&this.sendByTypes(t)},Xe.prototype.sendByTypes=function(t){var e;this.transport&&(e={jsBase:null!==(e=this.options.commonParams)&&void 0!==e?e:{},jsInfo:this.buildParams(t)},"PerformanceMonitor"===t.name&&this.transport.cover(e,e.jsInfo.ev_type),"StaticErrorMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"ResourcePerformanceMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"AjaxMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"FetchMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"JSExceptionMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"PageViewMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type))},Xe);function Xe(t){var o=Ve.call(this)||this;return o.options={},o.setTransport=function(t){o.transport=new Ge({transport:t.transport}),o.preQueue.forEach(function(t){Ve.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return q({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=q(q({},n),r)).commonParams=p({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=p({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=q(q({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=q(q({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?Ve.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.getEventToBeSent=function(t){return null!==(t=Ve.prototype.getEventToBeSent.call(o,t))&&void 0!==t?t:{}},o.options=t,o.preQueue=[],o}Ke.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){h(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Ke.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){h(r,t)&&(n[t]=e)}),n},Ke.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Ke.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=A(t.sampleRate)),e;var e},Ke.prototype.configure=function(t){l(t)&&(this.userConfig=q(q({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Ke.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Ke.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,c([],J(t)))},Ke.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Ke.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Ke.prototype.init=function(){var t=this.getClientOptions();this.client=new Qe(t),this.updateClientConfig(t),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.afterServerSetting()},Ke.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);L.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Ke.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport({transport:this.userConfig.transport})},Ke.prototype.updateCurrentSetting=function(){var t,e={commonParams:Ke.getClientCommonParams(this.finderSetting),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:Ke.getClientMonitorsSetting({})},t={commonParams:Ke.getClientCommonParams({}),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=A(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=A(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=A(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=A(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Ke.getClientMonitorsSetting({})},n={commonParams:Ke.getClientCommonParams(this.userConfig),flags:Ke.getClientFlags(this.userConfig),custom:Ke.getClientCustom(this.userConfig),monitors:Ke.getClientMonitorsSetting(this.userConfig)};this.currentSetting=d({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Ke.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==R(document.cookie,De)&&(document.cookie=De+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Ke.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new xe;return i.push(n),i.push(new de),a.enableCatchJSError&&i.push(new Pe),a.hookXHR&&i.push(new Se({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new Me({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new Te),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new je({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new je({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Ee),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new Re({observe:!0,checkIgnore:function(t){return t.name===Fe(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Ke.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(x):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Ke.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Ke.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Ke.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Ke.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:Fe(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Ke.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Ke.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},_e=Ke;function Ke(){var n=this;this.version="0.2.48",this.serverDomain="tbm.snssdk.com",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){U(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=Ae(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var We=x;return g()&&(Oe=new _e,We=Oe.instance,null!==(_e=window.RangersSiteHybridSDK)&&void 0!==_e&&_e.q&&(u(_e=window.RangersSiteHybridSDK.q)&&_e.forEach(function(t){We.apply(void 0,c([],J(t)))}),delete window.RangersSiteHybridSDK.q),window.RangersSiteHybridSDK=Oe.instance),We}(); |
{ | ||
"name": "@apm-insight-web/rangers-site-sdk", | ||
"version": "0.2.47", | ||
"version": "0.2.48", | ||
"main": "cn/index.cjs.js", | ||
@@ -12,5 +12,5 @@ "module": "cn/index.esm.js", | ||
"devDependencies": { | ||
"@slardar/polyfill": "0.1.7", | ||
"@slardar/sdk": "3.6.33", | ||
"@slardar/sdk-core": "3.6.22", | ||
"@slardar/polyfill": "0.1.8", | ||
"@slardar/sdk": "3.6.34", | ||
"@slardar/sdk-core": "3.6.23", | ||
"@slardar/types": "3.5.12" | ||
@@ -22,3 +22,3 @@ }, | ||
}, | ||
"gitHead": "936691cd3f4f53be563d638e96fe420f09f229ce" | ||
"gitHead": "95960f12612c274c6cbe74750adee36b4dcc49f1" | ||
} |
@@ -1,1 +0,1 @@ | ||
var RangersSiteSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function t(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var U=function(){return(U=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=v(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=v(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function d(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function v(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=v(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&d(t))?u(t)?e([],t):v({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function m(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function h(){return!!l(window)}function g(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function _(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var w=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),S=new RegExp("("+["bearer","session"].join("|")+")","i"),E=function(t,e){return!(!t||!e)&&(w.test(t)||S.test(e))};function M(){}function N(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function x(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function P(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!E(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function R(t){var e={},n=_(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function T(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),s=b(u[0])&&u[0].trim();s&&b(u[1])&&(o[s]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function j(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function F(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var O=function(t){var e,n;return void 0===t&&(t=window),h()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},k=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function L(t){return!!t&&Math.random()<Number(t)}var A=(D.post=function(t,e,n){var r=n&&n.success||M,o=n&&n.fail||M,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},D.get=function(t,e){var n=e&&e.success||M,r=e&&e.fail||M,o=e&&e.getResponse||M,i=e&&e.getResponseText||M,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},D.prototype.getCommonParams=function(){return{timestamp:Date.now()}},D);function D(t){var e=this;this.postEvent=function(t){t=U(U({},t),e.getCommonParams());D.post(e.url,t)},this.getEvent=function(t){t=g(U(U({},t),e.getCommonParams())),t=e.url+"?"+t;D.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function H(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function q(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var B="x-tt-trace-id",I="x-tt-trace-host",Q="x-tt-logid";function V(t,e,n){void 0===n&&(n="01");e=""+H((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+q(18);t=22-e.length-4;return""+H(""+e.length,2)+e+q(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+H(""+e.length,2)+e+q(n)}(t)+("string"==typeof e?q(4):H(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function W(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var z=.1,G=["/log/sentry/","/monitor_browser/collect"],X=8e3,K=4e3;W(),W();function $(e){return function(t){return e===t}}function Y(t){return t}function Z(){return y(Date)?Math.round(Date.now()/1e3):0}function tt(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function et(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&s(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:tt(e.tags,b),timestamp:Z()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&s(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:tt(o.tags,b),timestamp:Z()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:tt(r.tags,b),timestamp:Z()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:tt(t.metrics,s),category:tt(t.tags,b),timestamp:Z()}:{}:i):i}function nt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,c([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=rt(o).then,o}var rt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,c([],J(e.map(function(t){return t.returns}))))}var o,i,t=nt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,c([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),rt(t)}},"resolved",{get:a})};function ot(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function it(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function at(){if(l(window))return window}function ut(){if(l(document))return document}function st(){if(at()&&l(window.performance))return window.performance}function ct(){if(y(XMLHttpRequest))return XMLHttpRequest}function lt(){if(at()&&y(window.MutationObserver))return window.MutationObserver}function ft(){if(at()&&y(window.PerformanceObserver))return window.PerformanceObserver}function pt(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=_(n=n),e=_(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function dt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return M;var n=i[a],r=u.apply(void 0,c([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function vt(t,e){return t instanceof e}function mt(t,e){return t instanceof e}function ht(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function gt(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=p({},n,t),e()}]}function yt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,c([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function bt(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function _t(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function wt(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function St(t,e){return void 0===e&&(e=st()),(0,J(wt(e),5)[4])(t).pop()}function Et(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,s=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:P(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),E(t[0],t[1])||n.push([t[0],t[1]]))}),P(n)}return l(e)?P(Object.keys(e).filter(function(t){return!E(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!pt(e,a,r)||(n=n||t.getResponseHeader(B))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(I)||void 0,o.log_id=t.getResponseHeader(Q)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return x(t.responseText);if(t.response)return x(t.response);try{return x(t.responseText)}catch(t){return 0}}(t)),(o=U(U({},o),R(a))).resource_timing=St(o.ax_href),t=o.ax_status,ht(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:s?""+s:void 0,search:_(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function Mt(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function xt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function Ct(o,i,a,u){var s=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return pt(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(s=V(e,t),this.setRequestHeader(B,s))),Tt(this)(i,s,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Pt(t,e,n){var r="",r=vt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var Rt="AjaxMonitor",Tt=function(u){return dt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:Rt,type:"get",event:Et(u,r,o,a)}),n&&n.apply(this,t)}})};function jt(t,e){if(!t)return"";var n=[];return mt(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,c([],J(t))):n.push.apply(n,c([],J(Object.entries(t)))),P(n)}function Ot(t,e,n,r,o,i){var a=e.ax_status;ht(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Pt(n,!0,o),e.ax_request={body:null===(e=r,e=vt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:_(a).search,content_type:function(t,e,n){if(t){if(mt(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function kt(i,v,a,m,h,g){return function(s,c){void 0===c&&(c={});var l=Pt(s,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(s,c);var t,e,n,r=v.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{pt(v,l,g)&&(c.headers||(c.headers=[]),o&&r&&(p.trace_id=V(o,r),t=c.headers,e=B,n=p.trace_id,mt(t,m)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=vt(t,n)?t.method||e:e).toLowerCase()}(s,c,h);function d(){Ot(v,p,s,c,h,m),null!=a&&a({name:Kt,type:"get",event:p})}p=U(U({},p),R(Pt(s,!0,h)));return i(s,c).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=jt(n.headers,m),p.ax_request_header=jt((e=s,r=c,i=h,a=new(o=m),vt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),m),p.resource_timing=St(p.ax_href);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),pt(v,l,g)&&(u(I,"trace_host"),u(B,"trace_id"),u(Q,"log_id"))),d()}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,p.resource_timing=St(p.ax_href),d()}catch(t){}return Promise.reject(t)})}}function Lt(d,v,m){var t;return void 0===d&&(d=ut()),void 0===v&&(v=lt()),void 0===m&&(m=null===(t=function(){var t=st();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:Zt(d&&d.body,1,!1,s)})}var n,o,i,a=Date.now(),u=[],s=Yt.concat(t.ignoreTags||[]),c=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:M,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(bt(v,function(){return c(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:$t,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(m||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function At(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function Dt(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(bt(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(m(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&m(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function Ht(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function qt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function Bt(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),dt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function Ut(i,a,u){var s=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,c([],J(o))):new Promise(function(e,n){var r=s+=2;a(r,Date.now()),i.apply(void 0,c([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function Jt(S,E,M,x){return function(t,n,e){var s,c,r,o,i,a,u,l,f=J([s=[],c=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(s.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(c.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],v=f[2],m=J((r=S,o=E,m=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=m[0],f=m[1],m=m[2],a=o&&dt(o.prototype,"open",qt)(),u=o&&dt(o.prototype,"send",Bt)(f,m),l=r&&dt(r,"fetch",Ut)(f,m),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=m[0],g=m[1],y=J(Dt(x,function(){return n(e()+5e3)})||[],2),m=y[0],b=y[1];m&&m();function _(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var s=C(e),c=s.next();!c.done;c=s.next()){var l=c.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var v=t.length,m=u.length-1;0<=m;m--){var h=J(u[m],2),g=h[0];switch(h[1]){case 0:v--;break;case 1:if(2<++v)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(_t(M,v(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(_()+5e3)}),!1,function(){return p.notSupport=!0}),2),m=y[0],w=y[1];return m("longtask","resource"),t.forEach(v()),[p,function(){g(),w(),b&&b()},_]}}function Nt(b,_,w,S,E){return void 0===b&&(b=ct()),void 0===_&&(_=it()&&at()),void 0===w&&(w=ft()),void 0===S&&(S=lt()),void 0===E&&(E=st()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:Ht(c))||0,a||Ht(c)||0,g(),l()+(t?0:5e3),m);return t?e?(y(),void t(Math.round(e))):v(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,s=t.observer,t=J(wt(E),5),c=t[0],l=t[1],f=t[4],t=J(At(l),3),p=t[0],d=t[1],v=t[2],i=J(Jt(_,b,w,S)(i?[]:u,v,l),3),m=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),s&&s.disconnect(),u.length=0};return[function(t){if(m.notSupport)return t();var e=m[m.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},m,v,function(){return!m.notSupport&&r()||0}]}}function Ft(e,o){return void 0===e&&(e=ft()),void 0===o&&(o=st()),function(t,n){var r=J(wt(o),3)[2];return(0,J(_t(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(te),[function(){var t=r(te)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function It(u){return void 0===u&&(u=ft()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===ee&&(r=t)});var t=J(_t(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(ee);function i(){o(),ne.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};ne.forEach(function(t){window.addEventListener(t,a,!0)}),F(i);return[function(){return{lcp:r}}]}}function Qt(a){return void 0===a&&(a=ft()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(_t(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function Vt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function Wt(o,u){return void 0===o&&(o=ft()),void 0===u&&(u=st()),function(t,i){function e(){var t=n("paint");return{fp:Vt(oe,t),fcp:Vt(re,t)}}var a={},n=J(wt(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(_t(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[oe]&&a[re]&&(i&&i({fp:a[oe],fcp:a[re]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function zt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:ie,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Gt(s,c){return void 0===s&&(s=st()),void 0===c&&(c=ft()),function(t,e){function r(t){(t=zt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(wt(s),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(_t(c,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return zt(n())}]}}function Xt(t){var e=U({},t);return[function(t){t=(e=t?U(U({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:ue,type:"post",event:e}},function(t){return e=U({},t)}]}var Kt="FetchMonitor",$t="FMPMonitor",Yt=["SCRIPT","STYLE","META","HEAD"],Zt=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+Zt(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},te="first-input",ee="largest-contentful-paint",ne=["keydown","click"],re="first-contentful-paint",oe="first-paint",ie="ResourcePerformanceMonitor",ae={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},ue="PerformanceMonitor",se="StaticErrorMonitor";function ce(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function le(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=ce(r);if(r&&r!==n)return{name:se,type:"get",event:fe(r,e.toLowerCase(),t)}}}var fe=function(t,e,n){var r=_(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var pe="EmitMonitor",de=(ve.prototype.setup=function(t){this.callback=t||M},ve.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},ve.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},ve.prototype.buildEmitSingleEvent=function(t){t=et(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},ve.monitorName=pe,ve);function ve(){var o=this;this.name=pe,this.callback=M,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,c([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function me(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function he(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function ge(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=U(U({},t),{timestamp:(new Date).getTime()});n=0<=e?c(c([],J(n)),[t]).slice(-e):c(c([],J(n)),[t])}]}function ye(t){if(t=t.error)return t}function be(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function _e(n,r){return function(t){var e;if(!function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t)?(o(t)&&(e={message:JSON.stringify(t)}),b(t)&&(e={message:t})):e=t,e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:Ce,type:"post",event:t}}}}var we=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=yt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,c([t],J(n)))}}),i},Se=we(Rt,function(t,r){void 0===t&&(t=ct()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(o,"open",Mt)(),dt(o,"send",Ct)(t,e,r||""),dt(o,"setRequestHeader",xt)(),[n]}},["updateConfig"]),Ee=we("BreadcrumbMonitor",function(i){return void 0===i&&(i=ut()),function(t){var n,e=J(me(100),2),r=e[0],o=e[1],e=J(ge(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?ot(t.event.target):ot(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",he(e,"dom"))),i.addEventListener("keypress",o(he(e,"dom")))),[t]}},["getBreadcrumbs"]),Me=we(Kt,function(r,o,i,a){if(void 0===r&&(r=it()&&at()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(r,"fetch",kt)(t,e,o,i,a||""),[n]}},["updateConfig"]),xe=we($t,Lt,["disconnect","getFmp","getLoadFmp"]),Ce="JSExceptionMonitor",Pe=we(Ce,function(a){return void 0===a&&(a=at()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=_e(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};return a&&((void 0===r||r)&&a.addEventListener("error",t(ye)),o&&a.addEventListener("unhandledrejection",t(be))),[i]}},["buildEvent"]),Re=we(ue,function(B){return void 0===B&&(B=st()),function(t,s){function r(t){if(clearTimeout(g),g=0,s){h=!1;var e=p.isAsync;w(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(wt(B),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,s=t.requestStart,c=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,v=t.loadEventStart,m=t.secureConnectionStart,s={dns:n-r,tcp:o-i,request:u-s,response:a-u,processing:c-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:v-t.domContentLoadedEventEnd,ttfb:u-s,redirect:t.redirectEnd-t.redirectStart};m&&(s.ssl=o-m);e=e("navigation")[0];return(e||t)&&(s.navigation=e||t),t&&(s.timing=t),e&&(s.navigation_timing=e),s}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[$(1),function(){return u().event.fmp}],[$(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,c,function(){return k().fcp}),i=R().lcp;b(U(U(U({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,_())};if(y=function(){b({fid:j()}),b(k()),D&&b({tti:Math.round(D()-v)}),u()},T.then(function(t){return b({fid:t})}),O.then(b),L.then(function(t){return b({tti:t})}),t)return b(k()),R&&b(R()),u();A&&A(L),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,c=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=U({},ae),d=a||Nt,v=0,m="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Xt(p),3),b=a[0],_=a[1],w=a[2],S=J(wt(B),2)[1],a=J((n=s,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,N(function(){return e=!0}),function(){return e}),C=J(yt(Gt),1)[0],P=J(yt(Qt,t),1)[0],R=J(yt(It,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],T=nt(function(t){return t.fid}),j=J(yt(Ft,0,T),1)[0],O=nt(Y),k=J(yt(Wt,0,O),1)[0],L=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)}),t=J(yt(d,t),4),A=t[0],D=t[3],H=rt(L,O);N(function(){return f&&(g=setTimeout(r,200))}),F(function(){E()||(r(!0),u&&u())});var q=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||q(),r(),y()),p.isAsync=1,e=J(Xt(p),3),b=e[0],_=e[1],w=e[2],h=!0,v=Math.round(S()),m=t;var e={isAsync:1,prePerformanceObserver:i},t=J(yt(Gt,e),1);C=t[0],t=J(yt(Qt,e),1),P=t[0],e=J(yt(d,U(U({},e),{minValue:v})),4),A=e[0],D=e[3],L=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)});var n={fp:0,fcp:0};k=function(){return n},(O=nt(Y))(n),H=rt(L,O),l=yt(Lt)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-v),p.route_from=m),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),_()},q]}},["initAsync","send","getPerformance","stopAutoPerf"]),Te=we(se,function(o,i,a){return void 0===o&&(o=at()),void 0===i&&(i=st()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(wt(i),3)[2];return o&&o.addEventListener("error",function(t){t=le(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return le(n(),t,a||"")}]}},["buildEvent"]),je=we(ie,Gt,["getResourcePerformance"]),Oe=(ke.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},ke.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},ke.prototype._modifyEvent=function(t){return t},ke.prototype._shouldSend=function(t){return!0},ke.prototype._send=function(t){},ke.prototype.idleSendEvent=function(t){this._send(t)},ke);function ke(){}var Le,we=(t(Ae,Le=Oe),Object.defineProperty(Ae.prototype,"ready",{get:function(){return this.isReady},set:function(t){this.isReady=t,this.isReady&&this._uploadQueue()},enumerable:!1,configurable:!0}),Ae.prototype._send=function(t){var e=this,t=this.buildParams(t);null!=t&&(this.reportQueue.push(t),this.isReady&&(this.reportQueue.length>=this.batchReportLength&&this._uploadQueue(),this.batchReportTimeout&&clearTimeout(this.batchReportTimeout),this.batchReportTimeout=setTimeout(function(){e._uploadQueue()},this.batchReportWait)))},Ae.prototype._uploadQueue=function(){var t;this.reportQueue.length&&this.ready&&(t={ev_type:"batch",list:this.reportQueue},this.reportQueue=[],this._request({event:t,type:"post"}))},Ae.prototype._request=function(t){},Ae);function Ae(t){var e,n=Le.call(this)||this;return n.reportQueue=[],n.isReady=!0,n.batchReportLength=null!==(e=t.maxBatchReportLength)&&void 0!==e?e:10,n.batchReportWait=null!==(t=t.batchReportWait)&&void 0!==t?t:1e3,n.batchReportTimeout=null,n}var De="RANGERS_WEB_ID";function He(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:L(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:L(1),sampleRate:1,sampleHitTrace:!1,ignore:G,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:L(z),slowSessionTime:X,spaSlowSessionTime:K,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:G},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.47",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:Ne(W()),rangers_session_id:W(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:O(),network_type:k()},t}var qe,Be,Ue,Je,Ne=function(t){return t=null!==document&&void 0!==document&&document.cookie?T(document.cookie,De):t},Fe=(qe="/v2/user/webid",Be="/v2/user/ssid",Ue="/v2/event/list",Je=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[qe,Be,Ue].forEach(function(t){Je.push(e+t)})}),Je);function Ie(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=j(c(["/monitor_browser/collect"],J(Fe))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!L(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=j(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=j(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return L(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=j([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=L(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&L(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!L(e.sampleRate)&&!((e=j(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=j(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&L(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&L(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Qe(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.ev_type="performance",t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp,isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:U(U({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function Ve(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var We,ze=(t(Ge,We=we),Ge.prototype._shouldSend=function(t){return Ie({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Ge.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Ge.prototype._request=function(t){var e,n;t&&t.event&&(e=t.type,n=t.event,"beacon"===this.options.reportType&&navigator&&navigator.sendBeacon?(t=JSON.stringify(n),navigator.sendBeacon(this.getReportURL(),t)):this.transport&&("get"!==e?"post"===e&&this.transport.postEvent(n):this.transport.getEvent(n)))},Ge.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Qe({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Ge.prototype.getReportURL=function(){return this.reportURL},Ge);function Ge(t){var o=We.call(this,t)||this;return o.options={},o.setTransport=function(){o.transport=new A({reportURL:o.getReportURL()}),o.preQueue.forEach(function(t){We.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return U({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=U(U({},n),r)).commonParams=i({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=i({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=U(U({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=U(U({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?We.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.uploadQueue=function(){o._uploadQueue()},o.reportURL=null!==(t=null==t?void 0:t.reportURL)&&void 0!==t?t:"",o.preQueue=[],o}Xe.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){m(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Xe.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){m(r,t)&&(n[t]=e)}),n},Xe.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Xe.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=L(t.sampleRate)),e;var e},Xe.prototype.configure=function(t){l(t)&&(this.userConfig=U(U({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Xe.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Xe.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,c([],J(t)))},Xe.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Xe.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Xe.prototype.init=function(){var e=this,n=this.getClientOptions();this.client=new ze(n),this.getUserIDFromRangers(function(t){e.finderSetting.user_unique_id=t.user_unique_id,e.finderSetting.uuid=t.user_unique_id,e.finderSetting.ssid=t.ssid,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.getAbSdkVersionFromTester(function(t){e.finderSetting.ab_sdk_version=t,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.getServerSetting()},Xe.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);A.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Xe.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport()},Xe.prototype.updateCurrentSetting=function(){var t,e={commonParams:Xe.getClientCommonParams(this.finderSetting),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:Xe.getClientMonitorsSetting({})},t={commonParams:Xe.getClientCommonParams({}),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=L(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=L(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=L(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=L(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Xe.getClientMonitorsSetting({})},n={commonParams:Xe.getClientCommonParams(this.userConfig),flags:Xe.getClientFlags(this.userConfig),custom:Xe.getClientCustom(this.userConfig),monitors:Xe.getClientMonitorsSetting(this.userConfig)};this.currentSetting=p({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Xe.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==T(document.cookie,De)&&(document.cookie=De+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Xe.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new xe;return i.push(n),i.push(new de),a.enableCatchJSError&&i.push(new Pe),a.hookXHR&&i.push(new Se({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new Me({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new Te),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new Re({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new Re({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Ee),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new je({observe:!0,checkIgnore:function(t){return t.name===Ve(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Xe.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(M):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Xe.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Xe.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Xe.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Xe.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:Ve(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Xe.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Xe.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},Oe=Xe;function Xe(){var n=this;this.version="0.2.47",this.serverDomain="",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){F(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=He(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var Ke=M;return h()&&(we=new Oe,Ke=we.instance,null!==(Oe=window.RangersSiteSDK)&&void 0!==Oe&&Oe.q&&(u(Oe=window.RangersSiteSDK.q)&&Oe.forEach(function(t){Ke.apply(void 0,c([],J(t)))}),delete window.RangersSiteSDK.q),window.RangersSiteSDK=we.instance),Ke}(); | ||
var RangersSiteSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function t(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var U=function(){return(U=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function i(t){return"undefined"!=typeof Event&&function(t,e){try{return t instanceof e}catch(t){return}}(t,Event)}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function d(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=m(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function v(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function m(t,e){var n,r=U({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&v(t))?u(t)?e([],t):m({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function h(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function g(){return!!l(window)}function _(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function w(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var S=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),E=new RegExp("("+["bearer","session"].join("|")+")","i"),M=function(t,e){return!(!t||!e)&&(S.test(t)||E.test(e))};function x(){}function I(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function P(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function R(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!M(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function j(t){var e={},n=w(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function T(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),s=b(u[0])&&u[0].trim();s&&b(u[1])&&(o[s]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function O(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function N(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var k=function(t){var e,n;return void 0===t&&(t=window),g()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},L=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function A(t){return!!t&&Math.random()<Number(t)}var D=(H.post=function(t,e,n){var r=n&&n.success||x,o=n&&n.fail||x,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},H.get=function(t,e){var n=e&&e.success||x,r=e&&e.fail||x,o=e&&e.getResponse||x,i=e&&e.getResponseText||x,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},H.prototype.getCommonParams=function(){return{timestamp:Date.now()}},H);function H(t){var e=this;this.postEvent=function(t){t=U(U({},t),e.getCommonParams());H.post(e.url,t)},this.getEvent=function(t){t=_(U(U({},t),e.getCommonParams())),t=e.url+"?"+t;H.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function q(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function B(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var F="x-tt-trace-id",Q="x-tt-trace-host",V="x-tt-logid";function W(t,e,n){void 0===n&&(n="01");e=""+q((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+B(18);t=22-e.length-4;return""+q(""+e.length,2)+e+B(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+q(""+e.length,2)+e+B(n)}(t)+("string"==typeof e?B(4):q(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function z(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var G=.1,X=["/log/sentry/","/monitor_browser/collect"],K=8e3,$=4e3;z(),z();function Y(e){return function(t){return e===t}}function Z(t){return t}function tt(){return y(Date)?Math.round(Date.now()/1e3):0}function et(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function nt(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&s(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:et(e.tags,b),timestamp:tt()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&s(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:et(o.tags,b),timestamp:tt()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:et(r.tags,b),timestamp:tt()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:et(t.metrics,s),category:et(t.tags,b),timestamp:tt()}:{}:i):i}function rt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,c([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=ot(o).then,o}var ot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,c([],J(e.map(function(t){return t.returns}))))}var o,i,t=rt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,c([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),ot(t)}},"resolved",{get:a})};function it(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function at(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function ut(){if(l(window))return window}function st(){if(l(document))return document}function ct(){if(ut()&&l(window.performance))return window.performance}function lt(){if(y(XMLHttpRequest))return XMLHttpRequest}function ft(){if(ut()&&y(window.MutationObserver))return window.MutationObserver}function pt(){if(ut()&&y(window.PerformanceObserver))return window.PerformanceObserver}function dt(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=w(n=n),e=w(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function vt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return x;var n=i[a],r=u.apply(void 0,c([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function mt(t,e){return t instanceof e}function ht(t,e){return t instanceof e}function gt(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function yt(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=d({},n,t),e()}]}function bt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,c([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function _t(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function wt(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function St(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function Et(t,e){return void 0===e&&(e=ct()),(0,J(St(e),5)[4])(t).pop()}function Mt(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,s=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:R(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),M(t[0],t[1])||n.push([t[0],t[1]]))}),R(n)}return l(e)?R(Object.keys(e).filter(function(t){return!M(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!dt(e,a,r)||(n=n||t.getResponseHeader(F))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(Q)||void 0,o.log_id=t.getResponseHeader(V)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return P(t.responseText);if(t.response)return P(t.response);try{return P(t.responseText)}catch(t){return 0}}(t)),(o=U(U({},o),j(a))).resource_timing=Et(o.ax_href),t=o.ax_status,gt(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:s?""+s:void 0,search:w(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function xt(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function Ct(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function Pt(o,i,a,u){var s=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return dt(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(s=W(e,t),this.setRequestHeader(F,s))),Tt(this)(i,s,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Rt(t,e,n){var r="",r=mt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var jt="AjaxMonitor",Tt=function(u){return vt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:jt,type:"get",event:Mt(u,r,o,a)}),n&&n.apply(this,t)}})};function Ot(t,e){if(!t)return"";var n=[];return ht(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,c([],J(t))):n.push.apply(n,c([],J(Object.entries(t)))),R(n)}function kt(t,e,n,r,o,i){var a=e.ax_status;gt(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Rt(n,!0,o),e.ax_request={body:null===(e=r,e=mt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:w(a).search,content_type:function(t,e,n){if(t){if(ht(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function Lt(i,v,a,m,h,g){return function(s,c){void 0===c&&(c={});var l=Rt(s,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(s,c);var t,e,n,r=v.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{dt(v,l,g)&&(c.headers||(c.headers=[]),o&&r&&(p.trace_id=W(o,r),t=c.headers,e=F,n=p.trace_id,ht(t,m)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=mt(t,n)?t.method||e:e).toLowerCase()}(s,c,h);function d(){p.resource_timing=Et(p.ax_href),kt(v,p,s,c,h,m),null!=a&&a({name:$t,type:"get",event:p})}p=U(U({},p),j(Rt(s,!0,h)));return i(s,c).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=Ot(n.headers,m),p.ax_request_header=Ot((e=s,r=c,i=h,a=new(o=m),mt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),m);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),dt(v,l,g)&&(u(Q,"trace_host"),u(F,"trace_id"),u(V,"log_id"))),setTimeout(function(){d()},100)}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,d()}catch(t){}return Promise.reject(t)})}}function At(d,v,m){var t;return void 0===d&&(d=st()),void 0===v&&(v=ft()),void 0===m&&(m=null===(t=function(){var t=ct();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:te(d&&d.body,1,!1,s)})}var n,o,i,a=Date.now(),u=[],s=Zt.concat(t.ignoreTags||[]),c=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:x,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(_t(v,function(){return c(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:Yt,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(m||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function Dt(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function Ht(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(_t(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(h(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&h(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function qt(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function Bt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function Ut(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),vt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function Jt(i,a,u){var s=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,c([],J(o))):new Promise(function(e,n){var r=s+=2;a(r,Date.now()),i.apply(void 0,c([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function It(S,E,M,x){return function(t,n,e){var s,c,r,o,i,a,u,l,f=J([s=[],c=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(s.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(c.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],v=f[2],m=J((r=S,o=E,m=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=m[0],f=m[1],m=m[2],a=o&&vt(o.prototype,"open",Bt)(),u=o&&vt(o.prototype,"send",Ut)(f,m),l=r&&vt(r,"fetch",Jt)(f,m),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=m[0],g=m[1],y=J(Ht(x,function(){return n(e()+5e3)})||[],2),m=y[0],b=y[1];m&&m();function _(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var s=C(e),c=s.next();!c.done;c=s.next()){var l=c.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var v=t.length,m=u.length-1;0<=m;m--){var h=J(u[m],2),g=h[0];switch(h[1]){case 0:v--;break;case 1:if(2<++v)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(wt(M,v(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(_()+5e3)}),!1,function(){return p.notSupport=!0}),2),m=y[0],w=y[1];return m("longtask","resource"),t.forEach(v()),[p,function(){g(),w(),b&&b()},_]}}function Nt(b,_,w,S,E){return void 0===b&&(b=lt()),void 0===_&&(_=at()&&ut()),void 0===w&&(w=pt()),void 0===S&&(S=ft()),void 0===E&&(E=ct()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:qt(c))||0,a||qt(c)||0,g(),l()+(t?0:5e3),m);return t?e?(y(),void t(Math.round(e))):v(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,s=t.observer,t=J(St(E),5),c=t[0],l=t[1],f=t[4],t=J(Dt(l),3),p=t[0],d=t[1],v=t[2],i=J(It(_,b,w,S)(i?[]:u,v,l),3),m=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),s&&s.disconnect(),u.length=0};return[function(t){if(m.notSupport)return t();var e=m[m.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},m,v,function(){return!m.notSupport&&r()||0}]}}function Ft(e,o){return void 0===e&&(e=pt()),void 0===o&&(o=ct()),function(t,n){var r=J(St(o),3)[2];return(0,J(wt(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(ee),[function(){var t=r(ee)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function Qt(u){return void 0===u&&(u=pt()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===ne&&(r=t)});var t=J(wt(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(ne);function i(){o(),re.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};re.forEach(function(t){window.addEventListener(t,a,!0)}),N(i);return[function(){return{lcp:r}}]}}function Vt(a){return void 0===a&&(a=pt()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(wt(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function Wt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function zt(o,u){return void 0===o&&(o=pt()),void 0===u&&(u=ct()),function(t,i){function e(){var t=n("paint");return{fp:Wt(ie,t),fcp:Wt(oe,t)}}var a={},n=J(St(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(wt(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[ie]&&a[oe]&&(i&&i({fp:a[ie],fcp:a[oe]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function Gt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:ae,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Xt(s,c){return void 0===s&&(s=ct()),void 0===c&&(c=pt()),function(t,e){function r(t){(t=Gt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(St(s),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(wt(c,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return Gt(n())}]}}function Kt(t){var e=U({},t);return[function(t){t=(e=t?U(U({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:se,type:"post",event:e}},function(t){return e=U({},t)}]}var $t="FetchMonitor",Yt="FMPMonitor",Zt=["SCRIPT","STYLE","META","HEAD"],te=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+te(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},ee="first-input",ne="largest-contentful-paint",re=["keydown","click"],oe="first-contentful-paint",ie="first-paint",ae="ResourcePerformanceMonitor",ue={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},se="PerformanceMonitor",ce="StaticErrorMonitor";function le(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function fe(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=le(r);if(r&&r!==n)return{name:ce,type:"get",event:pe(r,e.toLowerCase(),t)}}}var pe=function(t,e,n){var r=w(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var de="EmitMonitor",ve=(me.prototype.setup=function(t){this.callback=t||x},me.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},me.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},me.prototype.buildEmitSingleEvent=function(t){t=nt(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},me.monitorName=de,me);function me(){var o=this;this.name=de,this.callback=x,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,c([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function he(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function ge(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function ye(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=U(U({},t),{timestamp:(new Date).getTime()});n=0<=e?c(c([],J(n)),[t]).slice(-e):c(c([],J(n)),[t])}]}function be(t){if(t=t.error)return t}function _e(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function we(n,r){return function(t){var e;if(function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t))e=t;else{if(o(t)||i(t))try{e={message:JSON.stringify(t)}}catch(t){}b(t)&&(e={message:t})}if(e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:Pe,type:"post",event:t}}}}var Se=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=bt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,c([t],J(n)))}}),i},Ee=Se(jt,function(t,r){void 0===t&&(t=lt()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(yt(t),2),t=n[0],n=n[1];return vt(o,"open",xt)(),vt(o,"send",Pt)(t,e,r||""),vt(o,"setRequestHeader",Ct)(),[n]}},["updateConfig"]),Me=Se("BreadcrumbMonitor",function(i){return void 0===i&&(i=st()),function(t){var n,e=J(he(100),2),r=e[0],o=e[1],e=J(ye(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?it(t.event.target):it(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",ge(e,"dom"))),i.addEventListener("keypress",o(ge(e,"dom")))),[t]}},["getBreadcrumbs"]),xe=Se($t,function(r,o,i,a){if(void 0===r&&(r=at()&&ut()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(yt(t),2),t=n[0],n=n[1];return vt(r,"fetch",Lt)(t,e,o,i,a||""),[n]}},["updateConfig"]),Ce=Se(Yt,At,["disconnect","getFmp","getLoadFmp"]),Pe="JSExceptionMonitor",Re=Se(Pe,function(a){return void 0===a&&(a=ut()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=we(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};a&&(void 0!==r&&!r||a.addEventListener("error",t(be)),o&&a.addEventListener("unhandledrejection",t(_e)));return[function(t){var e=null;return(e="[object ErrorEvent]"===Object.prototype.toString.call(t)?be(t):"[object PromiseRejectionEvent]"===Object.prototype.toString.call(t)?_e(t):t)&&i(e)}]}},["buildEvent"]),je=Se(se,function(B){return void 0===B&&(B=ct()),function(t,s){function r(t){if(clearTimeout(g),g=0,s){h=!1;var e=p.isAsync;w(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(St(B),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,s=t.requestStart,c=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,v=t.loadEventStart,m=t.secureConnectionStart,s={dns:n-r,tcp:o-i,request:u-s,response:a-u,processing:c-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:v-t.domContentLoadedEventEnd,ttfb:u-s,redirect:t.redirectEnd-t.redirectStart};m&&(s.ssl=o-m);e=e("navigation")[0];return(e||t)&&(s.navigation=e||t),t&&(s.timing=t),e&&(s.navigation_timing=e),s}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[Y(1),function(){return u().event.fmp}],[Y(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,c,function(){return k().fcp}),i=R().lcp;b(U(U(U({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,_())};if(y=function(){b({fid:T()}),b(k()),D&&b({tti:Math.round(D()-v)}),u()},j.then(function(t){return b({fid:t})}),O.then(b),L.then(function(t){return b({tti:t})}),t)return b(k()),R&&b(R()),u();A&&A(L),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,c=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=U({},ue),d=a||Nt,v=0,m="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Kt(p),3),b=a[0],_=a[1],w=a[2],S=J(St(B),2)[1],a=J((n=s,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,I(function(){return e=!0}),function(){return e}),C=J(bt(Xt),1)[0],P=J(bt(Vt,t),1)[0],R=J(bt(Qt,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],j=rt(function(t){return t.fid}),T=J(bt(Ft,0,j),1)[0],O=rt(Z),k=J(bt(zt,0,O),1)[0],L=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)}),t=J(bt(d,t),4),A=t[0],D=t[3],H=ot(L,O);I(function(){return f&&(g=setTimeout(r,200))}),N(function(){E()||(r(!0),u&&u())});var q=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||q(),r(),y()),p.isAsync=1,e=J(Kt(p),3),b=e[0],_=e[1],w=e[2],h=!0,v=Math.round(S()),m=t;var e={isAsync:1,prePerformanceObserver:i},t=J(bt(Xt,e),1);C=t[0],t=J(bt(Vt,e),1),P=t[0],e=J(bt(d,U(U({},e),{minValue:v})),4),A=e[0],D=e[3],L=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)});var n={fp:0,fcp:0};k=function(){return n},(O=rt(Z))(n),H=ot(L,O),l=bt(At)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-v),p.route_from=m),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),_()},q]}},["initAsync","send","getPerformance","stopAutoPerf"]),Te=Se(ce,function(o,i,a){return void 0===o&&(o=ut()),void 0===i&&(i=ct()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(St(i),3)[2];return o&&o.addEventListener("error",function(t){t=fe(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return fe(n(),t,a||"")}]}},["buildEvent"]),Oe=Se(ae,Xt,["getResourcePerformance"]),ke=(Le.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},Le.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},Le.prototype._modifyEvent=function(t){return t},Le.prototype._shouldSend=function(t){return!0},Le.prototype._send=function(t){},Le.prototype.idleSendEvent=function(t){this._send(t)},Le);function Le(){}var Ae,Se=(t(De,Ae=ke),Object.defineProperty(De.prototype,"ready",{get:function(){return this.isReady},set:function(t){this.isReady=t,this.isReady&&this._uploadQueue()},enumerable:!1,configurable:!0}),De.prototype._send=function(t){var e=this,t=this.buildParams(t);null!=t&&(this.reportQueue.push(t),this.isReady&&(this.reportQueue.length>=this.batchReportLength&&this._uploadQueue(),this.batchReportTimeout&&clearTimeout(this.batchReportTimeout),this.batchReportTimeout=setTimeout(function(){e._uploadQueue()},this.batchReportWait)))},De.prototype._uploadQueue=function(){var t;this.reportQueue.length&&this.ready&&(t={ev_type:"batch",list:this.reportQueue},this.reportQueue=[],this._request({event:t,type:"post"}))},De.prototype._request=function(t){},De);function De(t){var e,n=Ae.call(this)||this;return n.reportQueue=[],n.isReady=!0,n.batchReportLength=null!==(e=t.maxBatchReportLength)&&void 0!==e?e:10,n.batchReportWait=null!==(t=t.batchReportWait)&&void 0!==t?t:1e3,n.batchReportTimeout=null,n}var He="RANGERS_WEB_ID";function qe(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:A(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:A(1),sampleRate:1,sampleHitTrace:!1,ignore:X,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:A(G),slowSessionTime:K,spaSlowSessionTime:$,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:X},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.48",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:Ne(z()),rangers_session_id:z(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:k(),network_type:L()},t}var Be,Ue,Je,Ie,Ne=function(t){return t=null!==document&&void 0!==document&&document.cookie?T(document.cookie,He):t},Fe=(Be="/v2/user/webid",Ue="/v2/user/ssid",Je="/v2/event/list",Ie=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[Be,Ue,Je].forEach(function(t){Ie.push(e+t)})}),Ie);function Qe(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=O(c(["/monitor_browser/collect"],J(Fe))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!A(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=O(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=O(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return A(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=O([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=A(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&A(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!A(e.sampleRate)&&!((e=O(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=O(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&A(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&A(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Ve(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);t.ev_type="performance";o=o;return t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp&&parseInt(o.lcp),isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:U(U({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function We(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var ze,Ge=(t(Xe,ze=Se),Xe.prototype._shouldSend=function(t){return Qe({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Xe.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Xe.prototype._request=function(t){var e,n;t&&t.event&&(e=t.type,n=t.event,"beacon"===this.options.reportType&&navigator&&navigator.sendBeacon?(t=JSON.stringify(n),navigator.sendBeacon(this.getReportURL(),t)):this.transport&&("get"!==e?"post"===e&&this.transport.postEvent(n):this.transport.getEvent(n)))},Xe.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Ve({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Xe.prototype.getReportURL=function(){return this.reportURL},Xe);function Xe(t){var o=ze.call(this,t)||this;return o.options={},o.setTransport=function(){o.transport=new D({reportURL:o.getReportURL()}),o.preQueue.forEach(function(t){ze.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return U({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=U(U({},n),r)).commonParams=p({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=p({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=U(U({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=U(U({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?ze.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.uploadQueue=function(){o._uploadQueue()},o.reportURL=null!==(t=null==t?void 0:t.reportURL)&&void 0!==t?t:"",o.preQueue=[],o}Ke.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){h(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Ke.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){h(r,t)&&(n[t]=e)}),n},Ke.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Ke.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=A(t.sampleRate)),e;var e},Ke.prototype.configure=function(t){l(t)&&(this.userConfig=U(U({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Ke.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Ke.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,c([],J(t)))},Ke.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Ke.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=U(U({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Ke.prototype.init=function(){var e=this,n=this.getClientOptions();this.client=new Ge(n),this.getUserIDFromRangers(function(t){e.finderSetting.user_unique_id=t.user_unique_id,e.finderSetting.uuid=t.user_unique_id,e.finderSetting.ssid=t.ssid,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.getAbSdkVersionFromTester(function(t){e.finderSetting.ab_sdk_version=t,e.updateCurrentSetting(),e.updateClientConfig(n)}),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.getServerSetting()},Ke.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);D.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Ke.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport()},Ke.prototype.updateCurrentSetting=function(){var t,e={commonParams:Ke.getClientCommonParams(this.finderSetting),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:Ke.getClientMonitorsSetting({})},t={commonParams:Ke.getClientCommonParams({}),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=A(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=A(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=A(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=A(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Ke.getClientMonitorsSetting({})},n={commonParams:Ke.getClientCommonParams(this.userConfig),flags:Ke.getClientFlags(this.userConfig),custom:Ke.getClientCustom(this.userConfig),monitors:Ke.getClientMonitorsSetting(this.userConfig)};this.currentSetting=d({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Ke.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==T(document.cookie,He)&&(document.cookie=He+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Ke.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new Ce;return i.push(n),i.push(new ve),a.enableCatchJSError&&i.push(new Re),a.hookXHR&&i.push(new Ee({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new xe({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new Te),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new je({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new je({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Me),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new Oe({observe:!0,checkIgnore:function(t){return t.name===We(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Ke.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(x):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Ke.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Ke.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Ke.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Ke.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:We(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Ke.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Ke.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},ke=Ke;function Ke(){var n=this;this.version="0.2.48",this.serverDomain="",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){N(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=qe(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var $e=x;return g()&&(Se=new ke,$e=Se.instance,null!==(ke=window.RangersSiteSDK)&&void 0!==ke&&ke.q&&(u(ke=window.RangersSiteSDK.q)&&ke.forEach(function(t){$e.apply(void 0,c([],J(t)))}),delete window.RangersSiteSDK.q),window.RangersSiteSDK=Se.instance),$e}(); |
@@ -1,1 +0,1 @@ | ||
var RangersSiteHybridSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var q=function(){return(q=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function c(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function s(t){return"number"==typeof t}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=v(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=v(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function d(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function v(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&d(e[n])?r[n]=v(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&d(t))?u(t)?e([],t):v({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function m(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function h(){return!!l(window)}function g(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function w(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var _=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),S=new RegExp("("+["bearer","session"].join("|")+")","i"),E=function(t,e){return!(!t||!e)&&(_.test(t)||S.test(e))};function M(){}function N(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function x(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function P(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!E(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function j(t){var e={},n=w(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function T(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),s=b(u[0])&&u[0].trim();s&&b(u[1])&&(o[s]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function R(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function U(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var O=function(t){var e,n;return void 0===t&&(t=window),h()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},k=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function D(t){return!!t&&Math.random()<Number(t)}var A=(L.post=function(t,e,n){var r=n&&n.success||M,o=n&&n.fail||M,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},L.get=function(t,e){var n=e&&e.success||M,r=e&&e.fail||M,o=e&&e.getResponse||M,i=e&&e.getResponseText||M,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},L.prototype.getCommonParams=function(){return{timestamp:Date.now()}},L);function L(t){var e=this;this.postEvent=function(t){t=q(q({},t),e.getCommonParams());L.post(e.url,t)},this.getEvent=function(t){t=g(q(q({},t),e.getCommonParams())),t=e.url+"?"+t;L.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function H(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function B(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var I="x-tt-trace-id",F="x-tt-trace-host",V="x-tt-logid";function z(t,e,n){void 0===n&&(n="01");e=""+H((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+B(18);t=22-e.length-4;return""+H(""+e.length,2)+e+B(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+H(""+e.length,2)+e+B(n)}(t)+("string"==typeof e?B(4):H(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function G(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var Q=.1,X=["/log/sentry/","/monitor_browser/collect"],K=8e3,W=4e3;G(),G();function $(e){return function(t){return e===t}}function Y(t){return t}function Z(){return y(Date)?Math.round(Date.now()/1e3):0}function tt(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function et(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&s(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:tt(e.tags,b),timestamp:Z()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&s(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:tt(o.tags,b),timestamp:Z()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:tt(r.tags,b),timestamp:Z()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:tt(t.metrics,s),category:tt(t.tags,b),timestamp:Z()}:{}:i):i}function nt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,c([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=rt(o).then,o}var rt=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,c([],J(e.map(function(t){return t.returns}))))}var o,i,t=nt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,c([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),rt(t)}},"resolved",{get:a})};function ot(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function t(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function it(){if(l(window))return window}function at(){if(l(document))return document}function ut(){if(it()&&l(window.performance))return window.performance}function st(){if(y(XMLHttpRequest))return XMLHttpRequest}function ct(){if(it()&&y(window.MutationObserver))return window.MutationObserver}function lt(){if(it()&&y(window.PerformanceObserver))return window.PerformanceObserver}function ft(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=w(n=n),e=w(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function pt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return M;var n=i[a],r=u.apply(void 0,c([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function dt(t,e){return t instanceof e}function vt(t,e){return t instanceof e}function mt(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function ht(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=p({},n,t),e()}]}function gt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,c([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function yt(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function bt(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function wt(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function _t(t,e){return void 0===e&&(e=ut()),(0,J(wt(e),5)[4])(t).pop()}function St(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,s=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:P(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),E(t[0],t[1])||n.push([t[0],t[1]]))}),P(n)}return l(e)?P(Object.keys(e).filter(function(t){return!E(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!ft(e,a,r)||(n=n||t.getResponseHeader(I))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(F)||void 0,o.log_id=t.getResponseHeader(V)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return x(t.responseText);if(t.response)return x(t.response);try{return x(t.responseText)}catch(t){return 0}}(t)),(o=q(q({},o),j(a))).resource_timing=_t(o.ax_href),t=o.ax_status,mt(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:s?""+s:void 0,search:w(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function Et(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function Mt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function xt(o,i,a,u){var s=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return ft(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(s=z(e,t),this.setRequestHeader(I,s))),jt(this)(i,s,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Ct(t,e,n){var r="",r=dt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var Pt="AjaxMonitor",jt=function(u){return pt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:Pt,type:"get",event:St(u,r,o,a)}),n&&n.apply(this,t)}})};function Tt(t,e){if(!t)return"";var n=[];return vt(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,c([],J(t))):n.push.apply(n,c([],J(Object.entries(t)))),P(n)}function Rt(t,e,n,r,o,i){var a=e.ax_status;mt(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Ct(n,!0,o),e.ax_request={body:null===(e=r,e=dt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:w(a).search,content_type:function(t,e,n){if(t){if(vt(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function Ot(i,v,a,m,h,g){return function(s,c){void 0===c&&(c={});var l=Ct(s,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(s,c);var t,e,n,r=v.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{ft(v,l,g)&&(c.headers||(c.headers=[]),o&&r&&(p.trace_id=z(o,r),t=c.headers,e=I,n=p.trace_id,vt(t,m)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=dt(t,n)?t.method||e:e).toLowerCase()}(s,c,h);function d(){Rt(v,p,s,c,h,m),null!=a&&a({name:Kt,type:"get",event:p})}p=q(q({},p),j(Ct(s,!0,h)));return i(s,c).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=Tt(n.headers,m),p.ax_request_header=Tt((e=s,r=c,i=h,a=new(o=m),dt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),m),p.resource_timing=_t(p.ax_href);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),ft(v,l,g)&&(u(F,"trace_host"),u(I,"trace_id"),u(V,"log_id"))),d()}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,p.resource_timing=_t(p.ax_href),d()}catch(t){}return Promise.reject(t)})}}function kt(d,v,m){var t;return void 0===d&&(d=at()),void 0===v&&(v=ct()),void 0===m&&(m=null===(t=function(){var t=ut();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:Yt(d&&d.body,1,!1,s)})}var n,o,i,a=Date.now(),u=[],s=$t.concat(t.ignoreTags||[]),c=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:M,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(yt(v,function(){return c(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:Wt,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(m||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function Dt(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function At(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(yt(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(m(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&m(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function Lt(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function Ht(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function Bt(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),pt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function It(i,a,u){var s=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,c([],J(o))):new Promise(function(e,n){var r=s+=2;a(r,Date.now()),i.apply(void 0,c([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function qt(S,E,M,x){return function(t,n,e){var s,c,r,o,i,a,u,l,f=J([s=[],c=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(s.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(c.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],v=f[2],m=J((r=S,o=E,m=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=m[0],f=m[1],m=m[2],a=o&&pt(o.prototype,"open",Ht)(),u=o&&pt(o.prototype,"send",Bt)(f,m),l=r&&pt(r,"fetch",It)(f,m),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=m[0],g=m[1],y=J(At(x,function(){return n(e()+5e3)})||[],2),m=y[0],b=y[1];m&&m();function w(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var s=C(e),c=s.next();!c.done;c=s.next()){var l=c.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var v=t.length,m=u.length-1;0<=m;m--){var h=J(u[m],2),g=h[0];switch(h[1]){case 0:v--;break;case 1:if(2<++v)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(bt(M,v(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(w()+5e3)}),!1,function(){return p.notSupport=!0}),2),m=y[0],_=y[1];return m("longtask","resource"),t.forEach(v()),[p,function(){g(),_(),b&&b()},w]}}function Jt(b,w,_,S,E){return void 0===b&&(b=st()),void 0===w&&(w=t()&&it()),void 0===_&&(_=lt()),void 0===S&&(S=ct()),void 0===E&&(E=ut()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:Lt(c))||0,a||Lt(c)||0,g(),l()+(t?0:5e3),m);return t?e?(y(),void t(Math.round(e))):v(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,s=t.observer,t=J(wt(E),5),c=t[0],l=t[1],f=t[4],t=J(Dt(l),3),p=t[0],d=t[1],v=t[2],i=J(qt(w,b,_,S)(i?[]:u,v,l),3),m=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),s&&s.disconnect(),u.length=0};return[function(t){if(m.notSupport)return t();var e=m[m.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},m,v,function(){return!m.notSupport&&r()||0}]}}function Nt(e,o){return void 0===e&&(e=lt()),void 0===o&&(o=ut()),function(t,n){var r=J(wt(o),3)[2];return(0,J(bt(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(Zt),[function(){var t=r(Zt)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function Ut(u){return void 0===u&&(u=lt()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===te&&(r=t)});var t=J(bt(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(te);function i(){o(),ee.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};ee.forEach(function(t){window.addEventListener(t,a,!0)}),U(i);return[function(){return{lcp:r}}]}}function Ft(a){return void 0===a&&(a=lt()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(bt(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function Vt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function zt(o,u){return void 0===o&&(o=lt()),void 0===u&&(u=ut()),function(t,i){function e(){var t=n("paint");return{fp:Vt(re,t),fcp:Vt(ne,t)}}var a={},n=J(wt(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(bt(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[re]&&a[ne]&&(i&&i({fp:a[re],fcp:a[ne]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function Gt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:oe,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Qt(s,c){return void 0===s&&(s=ut()),void 0===c&&(c=lt()),function(t,e){function r(t){(t=Gt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(wt(s),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(bt(c,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return Gt(n())}]}}function Xt(t){var e=q({},t);return[function(t){t=(e=t?q(q({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:ae,type:"post",event:e}},function(t){return e=q({},t)}]}var Kt="FetchMonitor",Wt="FMPMonitor",$t=["SCRIPT","STYLE","META","HEAD"],Yt=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+Yt(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},Zt="first-input",te="largest-contentful-paint",ee=["keydown","click"],ne="first-contentful-paint",re="first-paint",oe="ResourcePerformanceMonitor",ie={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},ae="PerformanceMonitor",ue="StaticErrorMonitor";function se(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function ce(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=se(r);if(r&&r!==n)return{name:ue,type:"get",event:le(r,e.toLowerCase(),t)}}}var le=function(t,e,n){var r=w(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var fe="EmitMonitor",pe=(de.prototype.setup=function(t){this.callback=t||M},de.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},de.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},de.prototype.buildEmitSingleEvent=function(t){t=et(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},de.monitorName=fe,de);function de(){var o=this;this.name=fe,this.callback=M,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,c([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function ve(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function me(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function he(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=q(q({},t),{timestamp:(new Date).getTime()});n=0<=e?c(c([],J(n)),[t]).slice(-e):c(c([],J(n)),[t])}]}function ge(t){if(t=t.error)return t}function ye(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function be(n,r){return function(t){var e;if(!function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t)?(o(t)&&(e={message:JSON.stringify(t)}),b(t)&&(e={message:t})):e=t,e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:xe,type:"post",event:t}}}}var we=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=gt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,c([t],J(n)))}}),i},_e=we(Pt,function(t,r){void 0===t&&(t=st()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(ht(t),2),t=n[0],n=n[1];return pt(o,"open",Et)(),pt(o,"send",xt)(t,e,r||""),pt(o,"setRequestHeader",Mt)(),[n]}},["updateConfig"]),Se=we("BreadcrumbMonitor",function(i){return void 0===i&&(i=at()),function(t){var n,e=J(ve(100),2),r=e[0],o=e[1],e=J(he(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?ot(t.event.target):ot(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",me(e,"dom"))),i.addEventListener("keypress",o(me(e,"dom")))),[t]}},["getBreadcrumbs"]),Ee=we(Kt,function(r,o,i,a){if(void 0===r&&(r=t()&&it()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(ht(t),2),t=n[0],n=n[1];return pt(r,"fetch",Ot)(t,e,o,i,a||""),[n]}},["updateConfig"]),Me=we(Wt,kt,["disconnect","getFmp","getLoadFmp"]),xe="JSExceptionMonitor",Ce=we(xe,function(a){return void 0===a&&(a=it()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=be(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};return a&&((void 0===r||r)&&a.addEventListener("error",t(ge)),o&&a.addEventListener("unhandledrejection",t(ye))),[i]}},["buildEvent"]),Pe=we(ae,function(I){return void 0===I&&(I=ut()),function(t,s){function r(t){if(clearTimeout(g),g=0,s){h=!1;var e=p.isAsync;_(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(wt(I),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,s=t.requestStart,c=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,v=t.loadEventStart,m=t.secureConnectionStart,s={dns:n-r,tcp:o-i,request:u-s,response:a-u,processing:c-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:v-t.domContentLoadedEventEnd,ttfb:u-s,redirect:t.redirectEnd-t.redirectStart};m&&(s.ssl=o-m);e=e("navigation")[0];return(e||t)&&(s.navigation=e||t),t&&(s.timing=t),e&&(s.navigation_timing=e),s}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[$(1),function(){return u().event.fmp}],[$(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,c,function(){return k().fcp}),i=j().lcp;b(q(q(q({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,w())};if(y=function(){b({fid:R()}),b(k()),L&&b({tti:Math.round(L()-v)}),u()},T.then(function(t){return b({fid:t})}),O.then(b),D.then(function(t){return b({tti:t})}),t)return b(k()),j&&b(j()),u();A&&A(D),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,c=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=q({},ie),d=a||Jt,v=0,m="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Xt(p),3),b=a[0],w=a[1],_=a[2],S=J(wt(I),2)[1],a=J((n=s,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,N(function(){return e=!0}),function(){return e}),C=J(gt(Qt),1)[0],P=J(gt(Ft,t),1)[0],j=J(gt(Ut,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],T=nt(function(t){return t.fid}),R=J(gt(Nt,0,T),1)[0],O=nt(Y),k=J(gt(zt,0,O),1)[0],D=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)}),t=J(gt(d,t),4),A=t[0],L=t[3],H=rt(D,O);N(function(){return f&&(g=setTimeout(r,200))}),U(function(){E()||(r(!0),u&&u())});var B=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||B(),r(),y()),p.isAsync=1,e=J(Xt(p),3),b=e[0],w=e[1],_=e[2],h=!0,v=Math.round(S()),m=t;var e={isAsync:1,prePerformanceObserver:i},t=J(gt(Qt,e),1);C=t[0],t=J(gt(Ft,e),1),P=t[0],e=J(gt(d,q(q({},e),{minValue:v})),4),A=e[0],L=e[3],D=nt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)});var n={fp:0,fcp:0};k=function(){return n},(O=nt(Y))(n),H=rt(D,O),l=gt(kt)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-v),p.route_from=m),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),w()},B]}},["initAsync","send","getPerformance","stopAutoPerf"]),je=we(ue,function(o,i,a){return void 0===o&&(o=it()),void 0===i&&(i=ut()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(wt(i),3)[2];return o&&o.addEventListener("error",function(t){t=ce(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return ce(n(),t,a||"")}]}},["buildEvent"]),Te=we(oe,Qt,["getResourcePerformance"]),Re=(Oe.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},Oe.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},Oe.prototype._modifyEvent=function(t){return t},Oe.prototype._shouldSend=function(t){return!0},Oe.prototype._send=function(t){},Oe.prototype.idleSendEvent=function(t){this._send(t)},Oe);function Oe(){}var ke="RANGERS_WEB_ID";function De(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:D(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:D(1),sampleRate:1,sampleHitTrace:!1,ignore:X,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:D(Q),slowSessionTime:K,spaSlowSessionTime:W,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:X},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.47",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:Ie(G()),rangers_session_id:G(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:O(),network_type:k()},t}var Ae,Le,He,Be,Ie=function(t){return t=null!==document&&void 0!==document&&document.cookie?T(document.cookie,ke):t},qe=(Ae="/v2/user/webid",Le="/v2/user/ssid",He="/v2/event/list",Be=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[Ae,Le,He].forEach(function(t){Be.push(e+t)})}),Be);function Je(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=R(c(["/monitor_browser/collect"],J(qe))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!D(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=R(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=R(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return D(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=R([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=D(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&D(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!D(e.sampleRate)&&!((e=R(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=R(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&D(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&D(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Ne(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.ev_type="performance",t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp,isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:q(q({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function Ue(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var Fe,Ve={cover:M,accumulate:M,reportDirectly:M,average:M},ze=function(t){var n=this;this.cover=function(t,e){n.log.cover(t,e)},this.accumulate=function(t,e){n.log.accumulate(t,e)},this.reportDirectly=function(t,e){n.log.reportDirectly(t,e)},this.average=function(t,e){n.log.average(t,e)},this.log=null!==(t=t.transport)&&void 0!==t?t:Ve},Ge=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(Qe,Fe=Re),Qe.prototype.uploadQueue=function(){},Qe.prototype._shouldSend=function(t){return Je({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Qe.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Qe.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Ne({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Qe.prototype._send=function(t){t&&t.event&&t.name&&this.transport&&this.sendByTypes(t)},Qe.prototype.sendByTypes=function(t){var e;this.transport&&(e={jsBase:null!==(e=this.options.commonParams)&&void 0!==e?e:{},jsInfo:this.buildParams(t)},"PerformanceMonitor"===t.name&&this.transport.cover(e,e.jsInfo.ev_type),"StaticErrorMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"ResourcePerformanceMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"AjaxMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"FetchMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"JSExceptionMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"PageViewMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type))},Qe);function Qe(t){var o=Fe.call(this)||this;return o.options={},o.setTransport=function(t){o.transport=new ze({transport:t.transport}),o.preQueue.forEach(function(t){Fe.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return q({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=q(q({},n),r)).commonParams=i({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=i({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=q(q({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=q(q({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?Fe.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.getEventToBeSent=function(t){return null!==(t=Fe.prototype.getEventToBeSent.call(o,t))&&void 0!==t?t:{}},o.options=t,o.preQueue=[],o}Xe.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){m(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Xe.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){m(r,t)&&(n[t]=e)}),n},Xe.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Xe.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=D(t.sampleRate)),e;var e},Xe.prototype.configure=function(t){l(t)&&(this.userConfig=q(q({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Xe.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Xe.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,c([],J(t)))},Xe.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Xe.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Xe.prototype.init=function(){var t=this.getClientOptions();this.client=new Ge(t),this.updateClientConfig(t),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.afterServerSetting()},Xe.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);A.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Xe.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport({transport:this.userConfig.transport})},Xe.prototype.updateCurrentSetting=function(){var t,e={commonParams:Xe.getClientCommonParams(this.finderSetting),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:Xe.getClientMonitorsSetting({})},t={commonParams:Xe.getClientCommonParams({}),flags:Xe.getClientFlags({}),custom:Xe.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=D(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=D(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=D(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=D(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Xe.getClientMonitorsSetting({})},n={commonParams:Xe.getClientCommonParams(this.userConfig),flags:Xe.getClientFlags(this.userConfig),custom:Xe.getClientCustom(this.userConfig),monitors:Xe.getClientMonitorsSetting(this.userConfig)};this.currentSetting=p({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Xe.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==T(document.cookie,ke)&&(document.cookie=ke+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Xe.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new Me;return i.push(n),i.push(new pe),a.enableCatchJSError&&i.push(new Ce),a.hookXHR&&i.push(new _e({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new Ee({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new je),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new Pe({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new Pe({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Se),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new Te({observe:!0,checkIgnore:function(t){return t.name===Ue(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Xe.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(M):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Xe.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Xe.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Xe.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Xe.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:Ue(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Xe.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Xe.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},we=Xe;function Xe(){var n=this;this.version="0.2.47",this.serverDomain="",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){U(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=De(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var Ke=M;return h()&&(Re=new we,Ke=Re.instance,null!==(we=window.RangersSiteHybridSDK)&&void 0!==we&&we.q&&(u(we=window.RangersSiteHybridSDK.q)&&we.forEach(function(t){Ke.apply(void 0,c([],J(t)))}),delete window.RangersSiteHybridSDK.q),window.RangersSiteHybridSDK=Re.instance),Ke}(); | ||
var RangersSiteHybridSDK=function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var q=function(){return(q=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function a(t,e){var n={};for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n}function C(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&r>=t.length?void 0:t)&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||0<e--)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function s(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||((r=r||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(r||e)}function l(t){return"object"==typeof t&&null!==t&&!u(t)}function o(t){return"[object Object]"===Object.prototype.toString.call(t)}function y(t){return"function"==typeof t}function b(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t){return"number"==typeof t}function i(t){return"undefined"!=typeof Event&&function(t,e){try{return t instanceof e}catch(t){return}}(t,Event)}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function e(t,e){if(l(t))for(var n in t)f(t,n)&&e.call(null,n,t[n])}function p(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=function(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(e[n])?r[n]=e[n].slice():r[n]=e[n]);return r}(n,t[r]),r++;return n}function d(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n={},r=0;r<t.length;)n=m(n,t[r]),r++;return n}var n=Object.getPrototypeOf?Object.getPrototypeOf({}):null;function v(t){return Object.getPrototypeOf?Object.getPrototypeOf(t)===n:t.constructor===Object}function m(t,e){var n,r=q({},t);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==e[n]&&(l(e[n])&&v(e[n])?r[n]=m(l(t[n])?t[n]:{},e[n]):u(t[n])||u(e[n])?r[n]=function e(t,n){t=u(t)?t:[];n=u(n)?n:[];return Array.prototype.concat.call(t,n).map(function(t){return!(t instanceof RegExp)&&(u(t)||l(t)&&v(t))?u(t)?e([],t):m({},t):t})}(t[n],e[n]):r[n]=e[n]);return r}function h(t,e){if(u(t)&&0!==t.length)for(var n=0;n<t.length;){if(t[n]===e)return 1;n++}}function g(){return!!l(window)}function w(t){var n,t=function(t){if(!l(t))return{};var n={};return e(t,function(t,e){l(e)||u(e)?n[t]=JSON.stringify(e):n[t]=e}),n}(t),t=(n={},e(t,function(t,e){n[encodeURIComponent(t)]=encodeURIComponent(e)}),n),r=[];return e(t,function(t,e){r.push(t+"="+e)}),r.join("&")}function _(t){var e=document.createElement("a");e.href=t;t=e.pathname||"/";return"/"!==t[0]&&(t="/"+t),{href:e.href,protocol:e.protocol.slice(0,-1),hostname:e.hostname,host:e.host,search:e.search,pathname:t,hash:e.hash}}var S=new RegExp("("+["cookie","auth","jwt","token","key","ticket","secret","credential","session","password"].join("|")+")","i"),E=new RegExp("("+["bearer","session"].join("|")+")","i"),M=function(t,e){return!(!t||!e)&&(S.test(t)||E.test(e))};function x(){}function N(t){"complete"!==document.readyState?window.addEventListener("load",function(){setTimeout(function(){t()},0)},!1):t()}function P(t){var e="[object String]"===Object.prototype.toString.call(t);return t?e?t.length:ArrayBuffer&&t instanceof ArrayBuffer?t.byteLength:window.Blob&&t instanceof Blob?t.size:t.length||0:0}function j(t){if(!t)return"";if(!y(t.forEach))return"";var n=[];return t.forEach(function(t){var e;u(t)&&t[0]&&!M(t[0],t[1])&&(e=t[0],t=t[1]||"",n.push(e+": "+t))}),n.join("\r\n")}function T(t){var e={},n=_(t);return e.ax_protocol=n.protocol,e.ax_domain=n.hostname,e.ax_path=n.pathname,e.ax_url=(n.href||t).split("?")[0],e.ax_search=n.search,e.ax_href=n.href,e}function R(t,e){var n,r;if(!t||!e)return"";var t=t.split(";"),o={};try{for(var i=C(t),a=i.next();!a.done;a=i.next()){var u=a.value.split("="),c=b(u[0])&&u[0].trim();c&&b(u[1])&&(o[c]=u[1].trim())}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o[e]||""}function O(t){return u(t)&&t.length?function(t){for(var e=[],n=t.length,r=0;r<n;r++){var o=t[r];b(o)?e.push(o.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")):o&&o.source&&e.push(o.source)}return new RegExp(e.join("|"),"i")}(t):null}function U(e,n){y(e)&&(y(window.addEventListener)&&(window.addEventListener("unload",e),window.addEventListener("beforeunload",e),window.addEventListener("pagehide",e)),y(document.addEventListener)&&document.addEventListener("visibilitychange",function(t){y(n)?n(t):"hidden"===document.visibilityState&&e(t)}))}var k=function(t){var e,n;return void 0===t&&(t=window),g()&&null!==(e=t.screen)&&void 0!==e&&e.width&&null!==(n=t.screen)&&void 0!==n&&n.height?t.screen.width+"x"+t.screen.height:"0x0"},D=function(){var t="unknown",e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&b(e.effectiveType)?e.effectiveType:t};function A(t){return!!t&&Math.random()<Number(t)}var L=(H.post=function(t,e,n){var r=n&&n.success||x,o=n&&n.fail||x,n=new XMLHttpRequest;n.open("POST",t,!0),n.setRequestHeader("Content-Type","application/json"),n.send(JSON.stringify(e)),n.onload=function(){try{var t;this.responseText?(t=JSON.parse(this.responseText),r(t)):r({})}catch(t){o()}},n.onerror=function(){o()},n.onabort=function(){o()}},H.get=function(t,e){var n=e&&e.success||x,r=e&&e.fail||x,o=e&&e.getResponse||x,i=e&&e.getResponseText||x,a=new XMLHttpRequest;e&&e.withCredentials&&(a.withCredentials=e.withCredentials),a.open("GET",t),a.send(),a.onload=function(){o(null==this?void 0:this.response),i(this.responseText);try{var t;this.responseText?(t=JSON.parse(this.responseText),n(t)):n({})}catch(t){r()}},a.onerror=function(){r()},a.onabort=function(){r()}},H.prototype.getCommonParams=function(){return{timestamp:Date.now()}},H);function H(t){var e=this;this.postEvent=function(t){t=q(q({},t),e.getCommonParams());H.post(e.url,t)},this.getEvent=function(t){t=w(q(q({},t),e.getCommonParams())),t=e.url+"?"+t;H.get(t)},this.getURL=function(){return e.url},this.options=t,this.url=this.options.reportURL}function B(t,e,n){if(1<(n=void 0===n?"0":n).length)throw new TypeError("expect the length of pad to be 1, but got "+t.length);return t.length>=e?t:""+Array.from({length:e-t.length}).fill(n).join("")+t}function I(t){return t?Math.floor(Math.random()*Math.pow(10,12)).toString(16).substr(0,t):""}var F="x-tt-trace-id",V="x-tt-trace-host",z="x-tt-logid";function G(t,e,n){void 0===n&&(n="01");e=""+B((Date.now()%4294967295).toString(16),8)+function(t){if("number"==typeof t)n=t;else{var e=t.replace(/-/g,"");if(!/^[0-9]+$/.test(e)){if(18<e.length)return"18"+I(18);t=22-e.length-4;return""+B(""+e.length,2)+e+I(t)}n=parseInt(e,10)}var n=22-(e=n.toString(16)).length-4;return""+B(""+e.length,2)+e+I(n)}(t)+("string"==typeof e?I(4):B(e.toString(16),4));return"00-"+e+"-"+e.substr(0,16)+"-"+n}function Q(){var t=function(){for(var t=new Array(16),e=0,n=0;n<16;n++)0==(3&n)&&(e=4294967296*Math.random()),t[n]=e>>>((3&n)<<3)&255;return t}();return t[6]=15&t[6]|64,t[8]=63&t[8]|128,function(t){for(var e=[],n=0;n<256;++n)e[n]=(n+256).toString(16).substr(1);var r=0,o=e;return[o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],"-",o[t[r++]],o[t[r++]],o[t[r++]],o[t[r++]],o[t[+r]],o[t[15]]].join("")}(t)}var X=.1,K=["/log/sentry/","/monitor_browser/collect"],W=8e3,$=4e3;Q(),Q();function Y(e){return function(t){return e===t}}function Z(t){return t}function tt(){return y(Date)?Math.round(Date.now()/1e3):0}function et(t,n){if(!l(t))return{};if(!y(n))return{};var r={};return e(t,function(t,e){n(e)&&(r[t]=e)}),r}function nt(t){var e,n,r,o,i=null;return l(t)?("timer"===t.type&&(i=l(e=t.event)&&b(e.name)&&c(e.value)?{metrics_type:"timer",event_name:"default",metrics:((n={})[e.name]=e.value,n),category:et(e.tags,b),timestamp:tt()}:{}),"counter"===t.type&&(i=l(o=t.event)&&b(o.name)&&c(o.value)?{metrics_type:"counter",event_name:"default",metrics:((r={})[o.name]=o.value,r),category:et(o.tags,b),timestamp:tt()}:{}),"log"===t.type&&(i=l(r=t.event)&&b(r.value)?{metrics_type:"log",event_name:"default",log_content:r.value,log_level:null!==(o=r.level)&&void 0!==o?o:"info",category:et(r.tags,b),timestamp:tt()}:{}),"custom"===t.type?l(t=t.event)&&b(t.event_name)?{metrics_type:"custom",event_name:t.event_name,metrics:et(t.metrics,c),category:et(t.tags,b),timestamp:tt()}:{}:i):i}function rt(r){var o=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=r.apply(void 0,s([],J(t)));return o.returns=n,o.resolved=!0,o.subs&&o.subs.forEach(function(t){return t()}),n};return o.then=ot(o).then,o}var ot=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];function a(){return e.every(function(t){return t.resolved})}return Object.defineProperty({then:function(n){function r(){return t.apply(void 0,s([],J(e.map(function(t){return t.returns}))))}var o,i,t=rt(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return i?o:(i=!0,o=n.apply(void 0,s([],J(t))))});return a()?setTimeout(r):e.forEach(function(t){function e(){return a()&&r()}t.subs?t.subs.push(e):t.subs=[e]}),ot(t)}},"resolved",{get:a})};function it(t){try{for(var e,n=t,r=[],o=0,i=0,a=" > ".length;n&&o++<5&&!("html"===(e=function(t){var e,n,r,o,i=t,a=[];if(!i||!i.tagName)return"";a.push(i.tagName.toLowerCase()),i.id&&a.push("#"+i.id);t=i.className;if(t&&b(t))for(e=t.split(/\s+/),o=0;o<e.length;o++)a.push("."+e[o]);var u=["type","name","title","alt"];for(o=0;o<u.length;o++)n=u[o],(r=i.getAttribute(n))&&a.push("["+n+'="'+r+'"]');return a.join("")}(n))||1<o&&80<=i+r.length*a+e.length);)r.push(e),i+=e.length,n=n.parentNode;return r.reverse().join(" > ")}catch(t){return"<unknown>"}}function t(){try{return new Headers,new Request(""),new Response,window.fetch}catch(t){}}function at(){if(l(window))return window}function ut(){if(l(document))return document}function ct(){if(at()&&l(window.performance))return window.performance}function st(){if(y(XMLHttpRequest))return XMLHttpRequest}function lt(){if(at()&&y(window.MutationObserver))return window.MutationObserver}function ft(){if(at()&&y(window.PerformanceObserver))return window.PerformanceObserver}function pt(t,e,n){var r=t.commonParams,o=t.ajaxMonitorOptions,r=(t=r||{}).bid,t=t.web_id,o=(o||{}).sampleHitTrace,e=(e=e,n=_(n=n),e=_(e),n.protocol===e.protocol&&n.host===e.host);return r&&t&&o&&e}function dt(i,a,u){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!i)return x;var n=i[a],r=u.apply(void 0,s([n],J(t))),o=r;return y(o)&&(o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return r.apply(this,e)}catch(t){return y(n)&&n.apply(this,e)}}),i[a]=o,function(t){t&&o!==i[a]||(i[a]=n)}}}function vt(t,e){return t instanceof e}function mt(t,e){return t instanceof e}function ht(t){return null!==(t=null===(t=t.ajaxMonitorOptions)||void 0===t?void 0:t.errorRequestCollect)&&void 0!==t&&t}function gt(t){function e(){return Object.keys(n).forEach(function(t){return!(t in r)&&Object.defineProperty(r,t,{get:function(){return n[t]}})})}var n=t,r={};return e(),[r,function(t){n=d({},n,t),e()}]}function yt(t,e,n,r){void 0===e&&(e={}),void 0===r&&(r=[]);try{var o=t.apply(void 0,s([],J(r)));return o&&o(e,n)||[]}catch(t){return[]}}function bt(t,e){var n=t&&new t(e);return[function(t,e){n&&t&&n.observe(t,e)},function(){return n&&n.disconnect()}]}function wt(n,o,e,i){var r=n&&new n(function(t,r){t.getEntries?t.getEntries().forEach(function(t,e,n){return o(t,e,n,r)}):i&&i(),e&&r.disconnect()});return[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(!n||!r)return i&&i();try{e.forEach(function(t){-1<n.supportedEntryTypes.indexOf(t)&&r.observe({type:t,buffered:!0})})}catch(t){try{r.observe({entryTypes:e})}catch(t){}}},function(){return r&&r.disconnect()}]}function _t(n){var t=n&&n.timing||void 0;return[t,function(){return n&&n.now?n.now():(Date.now?Date.now():+new Date)-(t&&t.navigationStart||0)},function(t){var e=(n||{}).getEntriesByType;return y(e)&&e.call(n,t)||[]},function(){var t=(n||{}).clearResourceTimings;y(t)&&t.call(n)},function(t){var e=(n||{}).getEntriesByName;return y(e)&&e.call(n,t)||[]}]}function St(t,e){return void 0===e&&(e=ct()),(0,J(_t(e),5)[4])(t).pop()}function Et(t,e,n,r){var o=t._method,i=t._requestHeaders,a=t._url,u=t._start,c=t._data,o={ev_type:"ajax",ax_status:(t.status||0).toString(),ax_type:o,ax_request_header:j(i||[]),ax_domain:"",ax_duration:0,ax_path:"",ax_protocol:"",ax_response_header:"",ax_size:0,ax_url:"",ax_href:""};return"function"==typeof t.getAllResponseHeaders&&(o.ax_response_header=function(e){if(b(e)){var t=e.split("\r\n"),n=[];return t.forEach(function(t,e){t&&y(t.split)&&(t=t.split(": "),M(t[0],t[1])||n.push([t[0],t[1]]))}),j(n)}return l(e)?j(Object.keys(e).filter(function(t){return!M(t,e[t])}).map(function(t){return[t,e[t]]})):e}(t.getAllResponseHeaders())),!pt(e,a,r)||(n=n||t.getResponseHeader(F))&&(o.trace_id=n,o.trace_host=t.getResponseHeader(V)||void 0,o.log_id=t.getResponseHeader(z)||void 0),o.ax_duration=Date.now()-u,200===t.status&&(o.ax_size=function(t){if(""===t.responseType||"text"===t.responseType)return P(t.responseText);if(t.response)return P(t.response);try{return P(t.responseText)}catch(t){return 0}}(t)),(o=q(q({},o),T(a))).resource_timing=St(o.ax_href),t=o.ax_status,ht(e)&&"2"!==t[0]&&"3"!==t[0]&&(o.ax_request={body:c?""+c:void 0,search:_(a).search,content_type:i&&(null===(i=i.find(function(t){return"content-type"===t[0].toLowerCase()}))||void 0===i?void 0:i[1])}),o}function Mt(o){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=J(t,2),r=n[0],n=n[1];return this._url=n||"",this._method=r&&r.toLowerCase()||"",o.apply(this,t)}}function xt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._requestHeaders=this._requestHeaders||[],this._requestHeaders.push(t),n&&n.apply(this,t)}}function Ct(o,i,a,u){var c=null;return function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return pt(i,this._url,u)&&(t=(e=i.commonParams||{}).bid,e=e.web_id,t&&e&&(c=G(e,t),this.setRequestHeader(F,c))),Tt(this)(i,c,a,u),this._start=Date.now(),this._data=null==n?void 0:n[0],o.apply(this,n)}}function Pt(t,e,n){var r="",r=vt(t,n)?t.url:t;return r=!(e=void 0===e?!1:e)?b(r)?r.split("?")[0]:r:r}var jt="AjaxMonitor",Tt=function(u){return dt(u,"onreadystatechange",function(n,r,o,i,a){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 4===this.readyState&&i&&i({name:jt,type:"get",event:Et(u,r,o,a)}),n&&n.apply(this,t)}})};function Rt(t,e){if(!t)return"";var n=[];return mt(t,e)?t.forEach(function(t,e){n.push([e,t])}):u(t)?n.push.apply(n,s([],J(t))):n.push.apply(n,s([],J(Object.entries(t)))),j(n)}function Ot(t,e,n,r,o,i){var a=e.ax_status;ht(t)&&"2"!==a[0]&&"3"!==a[0]&&(a=Pt(n,!0,o),e.ax_request={body:null===(e=r,e=vt(n=n,o)?n.body:null==e?void 0:e.body)||void 0===e?void 0:e.toString(),search:_(a).search,content_type:function(t,e,n){if(t){if(mt(t,n))return t.get(e)||void 0;if(u(t)){n=t.find(function(t){return e===t[0]});return null==n?void 0:n[1]}return t[e]}}(r.headers,"Content-Type",i)})}function kt(i,v,a,m,h,g){return function(c,s){void 0===s&&(s={});var l=Pt(c,void 0,h);if(!function(t){if(b(t)){var e=J(t.split(":"),2),t=e[0];return!e[1]||("http"===t||"https"===t)}}(l))return i(c,s);var t,e,n,r=v.commonParams||{},o=r.bid,r=r.web_id,f=Date.now(),p={ev_type:"ajax",ax_size:0};try{pt(v,l,g)&&(s.headers||(s.headers=[]),o&&r&&(p.trace_id=G(o,r),t=s.headers,e=F,n=p.trace_id,mt(t,m)?t.append(e,n):u(t)?t.push([e,n]):t[e]=n))}catch(t){}p.ax_type=function(t,e,n){e=e&&e.method||"get";return(e=vt(t,n)?t.method||e:e).toLowerCase()}(c,s,h);function d(){p.resource_timing=St(p.ax_href),Ot(v,p,c,s,h,m),null!=a&&a({name:Wt,type:"get",event:p})}p=q(q({},p),T(Pt(c,!0,h)));return i(c,s).then(function(n){var t,e,r,o,i,a;try{p.ax_status=(n.status||0).toString(),p.ax_duration=Date.now()-f,p.ax_response_header=Rt(n.headers,m),p.ax_request_header=Rt((e=c,r=s,i=h,a=new(o=m),vt(e,i)&&e.headers&&y(e.headers.forEach)&&e.headers.forEach(function(t,e){a.append(e,t)}),r.headers&&new o(r.headers).forEach(function(t,e){a.append(e,t)}),a),m);var u=function(t,e){n.headers.has(t)&&(p[e]=n.headers.get(t)||void 0)};y(null===(t=n.headers)||void 0===t?void 0:t.has)&&(n.headers.has("content-length")&&(p.ax_size=Number(n.headers.get("content-length"))||0),pt(v,l,g)&&(u(V,"trace_host"),u(F,"trace_id"),u(z,"log_id"))),setTimeout(function(){d()},100)}catch(t){}return n},function(t){try{p.ax_status="0",p.ax_duration=Date.now()-f,d()}catch(t){}return Promise.reject(t)})}}function Dt(d,v,m){var t;return void 0===d&&(d=ut()),void 0===v&&(v=lt()),void 0===m&&(m=null===(t=function(){var t=ct();if(t&&l(t.timing))return t.timing}())||void 0===t?void 0:t.navigationStart),function(t,r){function e(){return u.push({time:Date.now()-a,score:Zt(d&&d.body,1,!1,c)})}var n,o,i,a=Date.now(),u=[],c=Yt.concat(t.ignoreTags||[]),s=J((l=!0,f=window.requestAnimationFrame,t=window.cancelAnimationFrame,o=!y(f)||l&&document&&document.hidden?function(t){return t(0),0}:f,i=y(t)?t:x,[function(t){n&&i(n),n=o(t)},o,i]),1)[0],l=J(bt(v,function(){return s(e)}),2),f=l[0],p=l[1],t=function(t){void 0===t&&(t=0),p();var e,n,e=(e=(n=J(void 0===(e=u)?[]:e))[0],(n=n.slice(1))&&n.reduce(function(t,e){var n=J(t,2),r=n[0],t=n[1],n=e.score-r.score;return[e,e.time>=r.time&&t.rate<n?{time:e.time,rate:n}:t]},[e,{time:null==e?void 0:e.time,rate:0}])[1].time||0),t={name:$t,type:"post",event:{ev_type:"fmp",fmp:e?e+t:0}};return r&&r(t),t},l=a-(m||0);return f(d,{subtree:!0,childList:!0}),[p,t,t.bind(null,l)]}}function At(e){function n(){return window.clearTimeout(a)}function r(t){t<i||!o||(n(),a=window.setTimeout(o,t-e()),i=t)}var o,i=-1/0,a=void 0;return[function(t,e){o=t,r(e)},function(){n(),o=void 0},r]}function Lt(t,a){var u=["img","script","iframe","link","audio","video","source"],e=(t=J(bt(t,function(t){var e,n;try{for(var r=C(t),o=r.next();!o.done;o=r.next()){var i=o.value;("childList"===i.type&&function t(e,n){var r,o;try{for(var i=C(e),a=i.next();!a.done;a=i.next()){var u=a.value;if(h(n,u.nodeName.toLowerCase())||u.children&&t(u.children,n))return 1}}catch(t){r={error:t}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}}(i.addedNodes,u)||"attributes"===i.type&&h(u,i.target.nodeName.toLowerCase()))&&a(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}}),2))[0];return[function(){return e(document,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["href","src"]})},t[1]]}function Ht(t){var t=(e=t||{}).domContentLoadedEventEnd,e=e.navigationStart;return t?t-(void 0===e?0:e):null}function Bt(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this._method=t[0],n.apply(this,t)}}function It(r,o,i){var a=0;return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("GET"!==this._method)return r.apply(this,t);var n=a+=2;return o(n,Date.now()),dt(this,"onreadystatechange",function(e){return function(t){e&&e.call(this,t),4===this.readyState&&i(n)}})(),r.apply(this,t)}}function qt(i,a,u){var c=1;return function(){for(var t,o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];return"GET"!==((null===(t=o[0])||void 0===t?void 0:t.method)||(null===(t=o[1])||void 0===t?void 0:t.method)||"GET")?i.apply(void 0,s([],J(o))):new Promise(function(e,n){var r=c+=2;a(r,Date.now()),i.apply(void 0,s([],J(o))).then(function(t){u(r),e(t)},function(t){u(r,t),n(t)})})}}function Jt(S,E,M,x){return function(t,n,e){var c,s,r,o,i,a,u,l,f=J([c=[],s=[],function(a,u){return function(t){var e=t.startTime,n=t.duration,r=t.fetchStart,o=t.responseEnd,i=t.entryType;"longtask"===i?(c.push({start:e,end:e+n}),a&&a(t)):"resource"===i&&(s.push({start:r,end:o}),u&&u(t))}}],3),p=f[0],d=f[1],v=f[2],m=J((r=S,o=E,m=J([i={},function(t,e){return i[t]=e},function(t){return delete i[t]}],3),y=m[0],f=m[1],m=m[2],a=o&&dt(o.prototype,"open",Bt)(),u=o&&dt(o.prototype,"send",It)(f,m),l=r&&dt(r,"fetch",qt)(f,m),[y,function(){a&&a(!0),u&&u(!0),l&&l(!0)}]),2),h=m[0],g=m[1],y=J(Lt(x,function(){return n(e()+5e3)})||[],2),m=y[0],b=y[1];m&&m();function w(){return function(t,e,n){var r,o,i,a;if(2<t.length)return n();var u=[];try{for(var c=C(e),s=c.next();!s.done;s=c.next()){var l=s.value;u.push([l.start,0],[l.end,1])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}try{for(var f=C(t),p=f.next();!p.done;p=f.next()){var d=p.value;u.push([d,0])}}catch(t){i={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}u.sort(function(t,e){return t[0]-e[0]});for(var v=t.length,m=u.length-1;0<=m;m--){var h=J(u[m],2),g=h[0];switch(h[1]){case 0:v--;break;case 1:if(2<++v)return g}}return 0}(function(t){for(var e=Object.keys(t),n=[],r=0;r<e.length;r++){var o=t[e[r]];"number"==typeof o&&n.push(o)}return n}(h),d,e)}var y=J(wt(M,v(function(t){var e=t.startTime,t=t.duration;return n(e+t+5e3)},function(){return n(w()+5e3)}),!1,function(){return p.notSupport=!0}),2),m=y[0],_=y[1];return m("longtask","resource"),t.forEach(v()),[p,function(){g(),_(),b&&b()},w]}}function Nt(b,w,_,S,E){return void 0===b&&(b=st()),void 0===w&&(w=t()&&at()),void 0===_&&(_=ft()),void 0===S&&(S=lt()),void 0===E&&(E=ct()),function(t,e,n){function r(t){var e=function(t,e,n,r,o){if(r-n<5e3)return null;o=0===o.length?t:o[o.length-1].end;return r-o<5e3?null:Math.max(o,e)}(((e=f("first-contentful-paint")[0])?e.startTime:Ht(s))||0,a||Ht(s)||0,g(),l()+(t?0:5e3),m);return t?e?(y(),void t(Math.round(e))):v(l()+1e3):(y(),e)}var o=t.prePerformanceObserver,i=t.isAsync,i=void 0===i?0:i,t=t.minValue,a=void 0===t?null:t,t=o||{},o=t.precollect,u=void 0===o?[]:o,c=t.observer,t=J(_t(E),5),s=t[0],l=t[1],f=t[4],t=J(At(l),3),p=t[0],d=t[1],v=t[2],i=J(Jt(w,b,_,S)(i?[]:u,v,l),3),m=i[0],h=i[1],g=i[2],y=function(){d(),h(),n&&n(),c&&c.disconnect(),u.length=0};return[function(t){if(m.notSupport)return t();var e=m[m.length-1];p(function(){return r(t)},Math.max(g()+5e3,e?e.end:0))},m,v,function(){return!m.notSupport&&r()||0}]}}function Ut(e,o){return void 0===e&&(e=ft()),void 0===o&&(o=ct()),function(t,n){var r=J(_t(o),3)[2];return(0,J(wt(e,function(t){var e=t.processingStart,t=t.startTime;return n&&n({name:"FIDMonitor",fid:Math.round(e-t)})},!0),1)[0])(te),[function(){var t=r(te)[0]||{},e=t.processingStart,t=t.startTime;return t?Math.round(e-t):0}]}}function Ft(u){return void 0===u&&(u=ft()),function(t,e){var n=t.prePerformanceObserver,r=0;(n.precollect||[]).forEach(function(t){var e=t.entryType,t=t.startTime;e===ee&&(r=t)});var t=J(wt(u,function(t){t=t.startTime;r=t}),2),n=t[0],o=t[1];n(ee);function i(){o(),ne.forEach(function(t){window.removeEventListener(t,a,!0)})}var a=function(){e&&e({name:"LCPMonitor",lcp:r}),i()};ne.forEach(function(t){window.addEventListener(t,a,!0)}),U(i);return[function(){return{lcp:r}}]}}function Vt(a){return void 0===a&&(a=ft()),function(t){var e=[],n=t.isAsync,r=t.prePerformanceObserver,o=J(wt(a,function(t){return e.push(t)}),2),t=o[0],i=o[1];return!n&&r&&(r.precollect||[]).forEach(function(t){"longtask"===t.entryType&&e.push(t)}),t("longtask"),[function(){i();var t=e.reduce(function(t,e){e=e.duration;return t<e?e:t},0);return{name:"MPFIDMonitor",mpfid:Math.round(t)}}]}}function zt(e,t){return(t=t.filter(function(t){return t.name===e})[0])?Math.round(t.startTime):0}function Gt(o,u){return void 0===o&&(o=ft()),void 0===u&&(u=ct()),function(t,i){function e(){var t=n("paint");return{fp:zt(oe,t),fcp:zt(re,t)}}var a={},n=J(_t(u),3)[2],r=e();return r.fcp&&r.fp?i&&i(r):(0,J(wt(o,function(t,e,n,r){var o=t.name,t=t.startTime;a[o]=Math.round(t),a[oe]&&a[re]&&(i&&i({fp:a[oe],fcp:a[re]}),r.disconnect())},!1,function(){return i&&i(e())}),1)[0])("paint"),[e]}}function Qt(t,e){var n=[];if(t.forEach(function(t){y(e)&&e(t)||n.push(t)}),n.length)return{name:ie,type:"post",event:{ev_type:"resource_performance",resources:n}}}function Xt(c,s){return void 0===c&&(c=ct()),void 0===s&&(s=ft()),function(t,e){function r(t){(t=Qt(t,a))&&e&&e(t)}function n(){return u("resource")}var o=(t=void 0===t?{}:t).isAsync,i=void 0===o?0:o,o=t.observe,o=void 0!==o&&o,a=t.checkIgnore,t=J(_t(c),4),u=t[2],t=t[3];return i&&t(),o&&(r(n()),(0,J(wt(s,function(t,e,n){return 0===e&&r(n)}),1)[0])("resource")),[function(){return Qt(n())}]}}function Kt(t){var e=q({},t);return[function(t){t=(e=t?q(q({},e),t):e).fmp;e.fmp=t?Math.max(Math.round(t),e.fcp||0):void 0},function(){return{name:ue,type:"post",event:e}},function(t){return e=q({},t)}]}var Wt="FetchMonitor",$t="FMPMonitor",Yt=["SCRIPT","STYLE","META","HEAD"],Zt=function(t,n,e,r){if(!t||-1<r.indexOf(t.tagName))return 0;var o=t.children,o=[].slice.call(void 0===o?[]:o).reduceRight(function(t,e){return t+Zt(e,n+1,0<t,r)},0);if(o<=0&&!e){if(!y(t.getBoundingClientRect))return 0;e=t.getBoundingClientRect()||{},t=e.top,e=e.height;if(t>window.innerHeight||e<=0)return 0}return o+1+.5*n},te="first-input",ee="largest-contentful-paint",ne=["keydown","click"],re="first-contentful-paint",oe="first-paint",ie="ResourcePerformanceMonitor",ae={ev_type:"perf",isAsync:0,dns:0,tcp:0,request:0,response:0,processing:0,blank:0,domready:0,load:0,has_resource:0,domparse:0,resource:0,ttfb:0,redirect:0,tti:0,upload_reason:"sample",network_type:"",timing:{},navigation_timing:{},navigation:{},resources:[]},ue="PerformanceMonitor",ce="StaticErrorMonitor";function se(t){return t="link"===(e=t).tagName.toLowerCase()?"href":"src",y(e.getAttribute)?e.getAttribute(t)||"":e[t]||"";var e}function le(t,e,n){e=e||window.event||{};try{r=e.target||e.srcElement||{}}catch(t){return}if(b(e=r.tagName)){var r=se(r);if(r&&r!==n)return{name:ce,type:"get",event:fe(r,e.toLowerCase(),t)}}}var fe=function(t,e,n){var r=_(t),t={ev_type:"static",st_type:e,st_src:t,st_protocol:r.protocol,st_domain:r.hostname,st_path:r.pathname},n=n&&function(t,e){var n=e.length;if(n)for(var r=n-1;-1<r;r--){var o=e[r];if(o.name===t)return o}}(r.href,n);return n&&(t.timing=n),t};var pe="EmitMonitor",de=(ve.prototype.setup=function(t){this.callback=t||x},ve.prototype.buildCustomTimeLog=function(t,e,n){return function(t){var e=t.name,n=t.tag,t=t.value;if(e&&t){t={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"time",cm_value:t=+t};return n&&(n=y(n.toString)?n.toString():"",t.cm_tag=n),{name:"SentCustomTime",type:"get",event:t}}}({name:t,tag:e,value:n})},ve.prototype.buildCustomCountLog=function(t,e){return function(t){var e=t.name,t=t.tag;if(e){e={ev_type:"custom",cm_name:e=y(e.toString)?e.toString():"",cm_type:"count"};return t&&(t=y(t.toString)?t.toString():"",e.cm_tag=t),{name:"SentCustomCount",type:"get",event:e}}}({name:t,tag:e})},ve.prototype.buildEmitSingleEvent=function(t){t=nt(t);if(t&&(!t||t.event_name))return{name:this.name,type:"post",event:{ev_type:"flexible",flexible_data_list:[t]}}},ve.monitorName=pe,ve);function ve(){var o=this;this.name=pe,this.callback=x,this.handOut=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=o.buildEvent.apply(o,s([],J(t)));o.callback(n)},this.buildEvent=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if("sendCustomCountLog"===t[0])return o.buildCustomCountLog(t[1],t[2]);if("sendCustomTimeLog"===t[0])return o.buildCustomTimeLog(t[1],t[2],t[3]);if("send"===t[0]){if("count"===t[1])return o.buildCustomCountLog(t[2].category,t[2].action);if("timing"===t[1])return o.buildCustomTimeLog(t[2].category,t[2].action,t[2].value)}if("emit"===t[0]&&t[1]&&t[2]){var n={type:t[1],event:t[2]};return o.buildEmitSingleEvent(n)}},this.send=function(t,e,n){var r=n.action,n=n.value;"count"===t&&o.sendCustomCountLog(e,r),"timing"===t&&o.sendCustomTimeLog(e,r,n)},this.sendCustomTimeLog=function(t,e,n){n=o.buildCustomTimeLog(t,e,n);o.callback(n)},this.sendCustomCountLog=function(t,e){e=o.buildCustomCountLog(t,e);return o.callback(e),e},this.emitEvent=function(t){t=o.buildEmitSingleEvent(t);o.callback(t)}}function me(o){function i(e,n){var r;return function(t){a=void 0,t&&r!==t&&n({event:r=t,name:e})}}var a;return[i,function(r){return function(t){var e;try{e=t.target}catch(t){return}var n=e&&e.tagName;n&&("INPUT"===n||"TEXTAREA"===n||e.isContentEditable)&&(a||i("input",r)(t),clearTimeout(a),a=window.setTimeout(function(){a=void 0},o))}}]}function he(e,n){return function(t){if(n)try{e(t)}catch(t){}}}function ge(e){void 0===e&&(e=20);var n=[];return[function(){return n},function(t){t=q(q({},t),{timestamp:(new Date).getTime()});n=0<=e?s(s([],J(n)),[t]).slice(-e):s(s([],J(n)),[t])}]}function ye(t){if(t=t.error)return t}function be(t){var e;try{"reason"in t?e=t.reason:"detail"in t&&"reason"in t.detail&&(e=t.detail.reason)}catch(t){}if(e)return e}function we(n,r){return function(t){var e;if(function(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMError]":case"[object DOMException]":return 1;default:return t instanceof Error}}(t))e=t;else{if(o(t)||i(t))try{e={message:JSON.stringify(t)}}catch(t){}b(t)&&(e={message:t})}if(e){t={ev_type:"js_exception",exception:{message:(t=e).message,name:t.name,fileName:t.fileName,lineNumber:t.lineNumber,columnNumber:t.columnNumber,stack:t.stack,stacktrace:t.stacktrace,framesToPop:t.framesToPop},release:n,breadcrumbs:r()};return{name:Ce,type:"post",event:t}}}}var _e=function(e,n,t,r){var i=(o.prototype.setup=function(t){this.monitor=yt(n,this.props,t,r)},o.monitorName=e,o);function o(t){this.props=t,this.name=e}return t.forEach(function(t,o){return i.prototype[t]=function(){for(var t,e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return null===(e=null===(t=this.monitor)||void 0===t?void 0:t[o])||void 0===e?void 0:e.call.apply(e,s([t],J(n)))}}),i},Se=_e(jt,function(t,r){void 0===t&&(t=st()),void 0===r&&(r=null===location||void 0===location?void 0:location.href);var o=t&&t.prototype;if(o)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(o,"open",Mt)(),dt(o,"send",Ct)(t,e,r||""),dt(o,"setRequestHeader",xt)(),[n]}},["updateConfig"]),Ee=_e("BreadcrumbMonitor",function(i){return void 0===i&&(i=ut()),function(t){var n,e=J(me(100),2),r=e[0],o=e[1],e=J(ge(t.maxBreadcrumbs),2),t=e[0],e=e[1],e=(n=e,function(t){var e;try{e=t.event.target?it(t.event.target):it(t.event)}catch(t){e="<unknown>"}0!==e.length&&n({category:"ui."+t.name,message:e})});return i&&(i.addEventListener("click",r("click",he(e,"dom"))),i.addEventListener("keypress",o(he(e,"dom")))),[t]}},["getBreadcrumbs"]),Me=_e(Wt,function(r,o,i,a){if(void 0===r&&(r=t()&&at()),void 0===o&&(o=window.Headers),void 0===i&&(i=window.Request),void 0===a&&(a=null===location||void 0===location?void 0:location.href),r&&o&&i)return function(t,e){var n=J(gt(t),2),t=n[0],n=n[1];return dt(r,"fetch",kt)(t,e,o,i,a||""),[n]}},["updateConfig"]),xe=_e($t,Dt,["disconnect","getFmp","getLoadFmp"]),Ce="JSExceptionMonitor",Pe=_e(Ce,function(a){return void 0===a&&(a=at()),function(t,n){var e=t.getBreadcrumbs,r=t.enableCatchGlobalJSError,o=t.catchUnhandledRejection,o=void 0===o||o,t=t.release,i=we(void 0===t?"":t,function(){return e&&e()||[]}),t=function(e){return function(t){t=e(t),t=t&&i(t);t&&n&&n(t)}};a&&(void 0!==r&&!r||a.addEventListener("error",t(ye)),o&&a.addEventListener("unhandledrejection",t(be)));return[function(t){var e=null;return(e="[object ErrorEvent]"===Object.prototype.toString.call(t)?ye(t):"[object PromiseRejectionEvent]"===Object.prototype.toString.call(t)?be(t):t)&&i(e)}]}},["buildEvent"]),je=_e(ue,function(I){return void 0===I&&(I=ct()),function(t,c){function r(t){if(clearTimeout(g),g=0,c){h=!1;var e=p.isAsync;_(p);var n=P().mpfid,r=C(),o=r&&r.event.resources,i=J(_t(I),3),a=function(t,e){if(t&&e){var n=t.domainLookupEnd,r=t.domainLookupStart,o=t.connectEnd,i=t.connectStart,a=t.responseEnd,u=t.responseStart,c=t.requestStart,s=t.domComplete,l=t.domLoading,f=t.domInteractive,p=t.navigationStart,d=t.loadEventEnd,v=t.loadEventStart,m=t.secureConnectionStart,c={dns:n-r,tcp:o-i,request:u-c,response:a-u,processing:s-l,blank:a-p,domready:f-p,load:d-p,domparse:f-a,resource:v-t.domContentLoadedEventEnd,ttfb:u-c,redirect:t.redirectEnd-t.redirectStart};m&&(c.ssl=o-m);e=e("navigation")[0];return(e||t)&&(c.navigation=e||t),t&&(c.timing=t),e&&(c.navigation_timing=e),c}}(i[0],i[2]),r=function(t,e,n,r){if(!t)return 0;var o,i=J(t,3),a=i[0],t=i[1],u=i[2];if(a(),e)return t().event.fmp||0;try{return o=[[Y(1),function(){return u().event.fmp}],[Y(2),function(){return r()}]],function(t){for(var e=0;e<o.length;){if(o[e][0](t))return o[e][1](t);e+=1}}(n)||0}catch(t){return 0}}(l,e,s,function(){return k().fcp}),i=j().lcp;b(q(q(q({},p),a),{mpfid:n,resources:o,has_resource:o?1:0,fmp:r,lcp:i})),p.load&&b({load:p.load}),e||null!==(i=null==a?void 0:a.timing)&&void 0!==i&&i.loadEventEnd||0!==(null===(a=null==a?void 0:a.timing)||void 0===a?void 0:a.loadEventEnd)||b({bounced:!0});var u=function(){y=null,M(e,w())};if(y=function(){b({fid:R()}),b(k()),L&&b({tti:Math.round(L()-v)}),u()},T.then(function(t){return b({fid:t})}),O.then(b),D.then(function(t){return b({tti:t})}),t)return b(k()),j&&b(j()),u();A&&A(D),H.then(function(){return setTimeout(u)})}}var n,o,e,i=t.prePerformanceObserver,a=t.TTIMonitor,s=t.renderType,u=t.report,l=t.fmpMonitor,t=t.performanceAuto,f=void 0===t||t,p=q({},ae),d=a||Nt,v=0,m="",h=!0,g=0,y=null,t={isAsync:0,prePerformanceObserver:i},a=J(Kt(p),3),b=a[0],w=a[1],_=a[2],S=J(_t(I),2)[1],a=J((n=c,o=!1,[function(){return o},function(t,e){if(!t){if(o)return;o=!0}n&&n(e)}]),2),E=a[0],M=a[1],x=(e=!1,N(function(){return e=!0}),function(){return e}),C=J(yt(Xt),1)[0],P=J(yt(Vt,t),1)[0],j=J(yt(Ft,{prePerformanceObserver:i},function(t){t=t.lcp;return b({lcp:t})}),1)[0],T=rt(function(t){return t.fid}),R=J(yt(Ut,0,T),1)[0],O=rt(Z),k=J(yt(Gt,0,O),1)[0],D=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)}),t=J(yt(d,t),4),A=t[0],L=t[3],H=ot(D,O);N(function(){return f&&(g=setTimeout(r,200))}),U(function(){E()||(r(!0),u&&u())});var B=function(){f=!1,clearTimeout(g),g=0};return[function(t){void 0===t&&(t=""),y?y():!g&&E()||(x()||B(),r(),y()),p.isAsync=1,e=J(Kt(p),3),b=e[0],w=e[1],_=e[2],h=!0,v=Math.round(S()),m=t;var e={isAsync:1,prePerformanceObserver:i},t=J(yt(Xt,e),1);C=t[0],t=J(yt(Vt,e),1),P=t[0],e=J(yt(d,q(q({},e),{minValue:v})),4),A=e[0],L=e[3],D=rt(function(t){if(t&&0<t)return Math.max(Math.round(t-v),0)});var n={fp:0,fcp:0};k=function(){return n},(O=rt(Z))(n),H=ot(D,O),l=yt(Dt)},function(){h&&x()&&!g&&(p.isAsync&&(p.load=Math.round(S()-v),p.route_from=m),g=setTimeout(r,200))},function(){return H.resolved||r(!("complete"===document.readyState)),w()},B]}},["initAsync","send","getPerformance","stopAutoPerf"]),Te=_e(ce,function(o,i,a){return void 0===o&&(o=at()),void 0===i&&(i=ct()),void 0===a&&(a=null===location||void 0===location?void 0:location.href),function(t,e){function n(){return r("resource")}var r=J(_t(i),3)[2];return o&&o.addEventListener("error",function(t){t=le(n(),t,a||"");t&&e&&e(t)},!0),[function(t){return le(n(),t,a||"")}]}},["buildEvent"]),Re=_e(ie,Xt,["getResourcePerformance"]),Oe=(ke.prototype.sendEvent=function(t){t=this.getEventToBeSent(t);t&&this.idleSendEvent(t)},ke.prototype.getEventToBeSent=function(t){t=this._modifyEvent(t);if(this._shouldSend(t))return t},ke.prototype._modifyEvent=function(t){return t},ke.prototype._shouldSend=function(t){return!0},ke.prototype._send=function(t){},ke.prototype.idleSendEvent=function(t){this._send(t)},ke);function ke(){}var De="RANGERS_WEB_ID";function Ae(){var t={flags:{hookPath:!0,hookXHR:!0,hookFetch:!0,enableSizeStats:!0,enableFMP:!0,enablePerformance:!0,enableResourcePerformance:!0,enableStaticError:!0,enableCatchJSError:!0,enableCatchGlobalJSError:!0,enableCatchJSErrorV2:!1,enableCrash:!1,enableMemoryRecord:!1,enableFPSJankTimesMonitor:!1,enableBreadcrumb:!0,catchUnhandledRejection:!0,catchUnhandledRejectionV2:!0,hookConsole:!1,hookDom:!0}};return t.monitors={BaseMonitor:{appTypeSetting:{type:0,SPA:"",renderType:0},sampleHit:A(1)},JSErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitBehavior:!1,sampleHitBehavior:!1,ignoreErrors:[],whitelistUrls:[],blacklistUrls:[],download_link:""},AjaxMonitor:{enable:!0,enableError:!1,webIDHit:!0,sampleHit:A(1),sampleRate:1,sampleHitTrace:!1,ignore:K,abort:!1,whitelistUrls:[],statusCodeSample:{},requestUrlSample:[],errorRequestCollect:!1},PerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1,webIDHitStaticResource:!1,sampleHitStaticResource:A(X),slowSessionTime:W,spaSlowSessionTime:$,geckoUrls:[],interval:0,checkPoint:[]},StaticErrorMonitor:{enable:!0,webIDHit:!0,sampleRate:1,ignore:K},ResourcePerformanceMonitor:{enable:!0,webIDHit:!0,sampleRate:1},BreadcrumbMonitor:{enable:!0},EmitMonitor:{enable:!0}},t.custom={},t.commonParams={aid:0,pid:"",version:"0.2.48",hostname:window.location.hostname,protocol:window.location.protocol.slice(0,-1),rangers_web_id:qe(Q()),rangers_session_id:Q(),context:{},url:window.location.href,timestamp:Date.now(),screen_resolution:k(),network_type:D()},t}var Le,He,Be,Ie,qe=function(t){return t=null!==document&&void 0!==document&&document.cookie?R(document.cookie,De):t},Je=(Le="/v2/user/webid",He="/v2/user/ssid",Be="/v2/event/list",Ie=[],["https://mcs.ctobsnssdk.com","https://mcs.itobsnssdk.com","https://mcs.tobsnssdk.com"].forEach(function(e){[Le,He,Be].forEach(function(t){Ie.push(e+t)})}),Ie);function Ne(t){var e,n,r,o=t.sendParams,t=t.monitorsSetting;if(!o||!l(o)||!o.event)return!1;if("AjaxMonitor"===o.name||"FetchMonitor"===o.name){var i=O(s(["/monitor_browser/collect"],J(Je))||[]);if(i&&i.test(o.event.ax_url))return!1}return!(null==t||!t.BaseMonitor.sampleHit)&&("AjaxMonitor"===o.name||"FetchMonitor"===o.name?function(t){var n=t.sendParams,e=t.option;if(!e)return!0;if("2"!==n.event.ax_status[0]&&"3"!==n.event.ax_status[0])return e.enableError;if(!e.enable)return!1;if(!e.webIDHit)return!1;if(!e.sampleHit||!A(e.sampleRate))return!1;if(u(t=e.whitelistUrls)&&0<t.length){var r=O(e.whitelistUrls||[]);return r&&r.test(n.event.ax_url)?!0:!1}if((r=O(e.ignore||[]))&&r.test(n.event.ax_url))return!1;if((r=e.statusCodeSample)&&f(r,n.event.ax_status))return A(r[n.event.ax_status]);if(e=e.requestUrlSample){var o=!1,i=!1;if(e.forEach(function(t){var e;o||null!=(e=O([t.url]))&&e.test(n.event.ax_url)&&(o=!0,i=A(t.sampleRate))}),o)return i}return!0}({sendParams:o,option:t.AjaxMonitor}):"PerformanceMonitor"===o.name?!(i=(i={option:t.PerformanceMonitor}).option)||!!i.enable&&(!!i.webIDHit&&A(i.sampleRate)):"StaticErrorMonitor"===o.name?(e={sendParams:o,option:t.StaticErrorMonitor},n=e.sendParams,!(e=e.option)||!!e.enable&&(!!e.webIDHit&&(!!A(e.sampleRate)&&!((e=O(e.ignore||[]))&&e.test(n.event.st_src))))):"JSExceptionMonitor"===o.name?(e={sendParams:o,option:t.JSErrorMonitor},n=e.sendParams,!(r=e.option)||!!r.enable&&(!!r.webIDHit&&((!(e=O(null!==(e=r.ignoreErrors)&&void 0!==e?e:[]))||!e.test(n.event.exception.message))&&A(r.sampleRate)))):"ResourcePerformanceMonitor"===o.name?!(r=(r={option:t.ResourcePerformanceMonitor}).option)||!!r.enable&&(!!r.webIDHit&&A(r.sampleRate)):"EmitMonitor"!==o.name||!!{option:t.EmitMonitor}.option)}function Ue(t){var n,e=t.sendParams,r=t.commonParams,o=t.custom,t=t.breadcrumbMonitor,t=function(t){var e=t.sendParams,n=t.commonParams,r=t.breadcrumbMonitor;if((t={}).ev_type=e.event.ev_type,t.common=n,"PageViewMonitor"===e.name&&t)return t;if(("AjaxMonitor"===e.name||"FetchMonitor"===e.name)&&t){n=e.event;n.ev_type;n=a(n,["ev_type"]);return t.event=n,t}if("PerformanceMonitor"===e.name&&t){e.event.navigation=e.event.navigation_timing;var o=e.event;o.ev_type;o=a(o,["ev_type"]);t.ev_type="performance";o=o;return t.event={fp:o.fp,fcp:o.fcp,fmp:o.fmp,tti:o.tti,fid:o.fid,mpfid:o.mpfid,lcp:o.lcp&&parseInt(o.lcp),isAsync:o.isAsync,timing:o.timing,navigation:o.navigation_timing,bounced:o.bounced},t}if("StaticErrorMonitor"===e.name&&t){t.ev_type="resource_error";o=e.event;o.ev_type;o=a(o,["ev_type"]);return t.event=o,t}if("ResourcePerformanceMonitor"===e.name&&t){t.ev_type="resource";var i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i,t}if("JSExceptionMonitor"===e.name&&t){t.ev_type="js_error";i=e.event;i.ev_type;i=a(i,["ev_type"]);return t.event=i.exception,t.breadcrumbs=null!==(r=null==r?void 0:r.getBreadcrumbs())&&void 0!==r?r:[],t}return"EmitMonitor"===e.name&&t&&(t.ev_type="flexible",t.flexible_data_list=e.event.flexible_data_list),t}({sendParams:e,commonParams:q(q({},n=null!=r?r:{}),{context:Object.keys(n.context).reduce(function(t,e){return t[e]=l(n.context[e])?JSON.stringify(n.context[e]):String(n.context[e]),t},{}),url:window.location.href}),breadcrumbMonitor:t});return t=o&&y(o.beforeSend)?o.beforeSend(t||{}):t}function Fe(t,e){return void 0===e&&(e="/monitor_browser/collect"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+e}var Ve,ze={cover:x,accumulate:x,reportDirectly:x,average:x},Ge=function(t){var n=this;this.cover=function(t,e){n.log.cover(t,e)},this.accumulate=function(t,e){n.log.accumulate(t,e)},this.reportDirectly=function(t,e){n.log.reportDirectly(t,e)},this.average=function(t,e){n.log.average(t,e)},this.log=null!==(t=t.transport)&&void 0!==t?t:ze},Qe=(function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(Xe,Ve=Oe),Xe.prototype.uploadQueue=function(){},Xe.prototype._shouldSend=function(t){return Ne({sendParams:t,monitorsSetting:this.options.monitorsSetting})},Xe.prototype._modifyEvent=function(t){return(t=(t={sendParams:t}).sendParams)&&l(t)?t:{}},Xe.prototype.buildParams=function(t){var e,n=null===(e=null===(e=this.options.monitorsSetting)||void 0===e?void 0:e.BreadcrumbMonitor)||void 0===e||!e.enable||null===(n=this.options.monitors)||void 0===n?void 0:n.BreadcrumbMonitor;return Ue({sendParams:t,commonParams:this.options.commonParams,custom:this.options.custom,breadcrumbMonitor:n})},Xe.prototype._send=function(t){t&&t.event&&t.name&&this.transport&&this.sendByTypes(t)},Xe.prototype.sendByTypes=function(t){var e;this.transport&&(e={jsBase:null!==(e=this.options.commonParams)&&void 0!==e?e:{},jsInfo:this.buildParams(t)},"PerformanceMonitor"===t.name&&this.transport.cover(e,e.jsInfo.ev_type),"StaticErrorMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"ResourcePerformanceMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"AjaxMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"FetchMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"JSExceptionMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type),"PageViewMonitor"===t.name&&this.transport.reportDirectly(e,e.jsInfo.ev_type))},Xe);function Xe(t){var o=Ve.call(this)||this;return o.options={},o.setTransport=function(t){o.transport=new Ge({transport:t.transport}),o.preQueue.forEach(function(t){Ve.prototype.sendEvent.call(o,t)})},o.getConfig=function(){return q({},o.options)},o.updateConfig=function(t){var e,n,r;o.options=(e={previousOptions:o.options,newOptions:t},n=e.previousOptions,r=e.newOptions,(t=q(q({},n),r)).commonParams=p({},null!==(e=n.commonParams)&&void 0!==e?e:{},null!==(e=r.commonParams)&&void 0!==e?e:{}),t.monitorsSetting=p({},null!==(e=n.monitorsSetting)&&void 0!==e?e:{},null!==(e=r.monitorsSetting)&&void 0!==e?e:{}),t.monitors=q(q({},null!==(e=n.monitors)&&void 0!==e?e:{}),null!==(e=r.monitors)&&void 0!==e?e:{}),t.custom=q(q({},null!==(n=n.custom)&&void 0!==n?n:{}),null!==(r=r.custom)&&void 0!==r?r:{}),t)},o.sendEvent=function(t){o.transport?Ve.prototype.sendEvent.call(o,t):o.preQueue.push(t)},o.getEventToBeSent=function(t){return null!==(t=Ve.prototype.getEventToBeSent.call(o,t))&&void 0!==t?t:{}},o.options=t,o.preQueue=[],o}Ke.getClientCommonParams=function(n){var r={};if(!l(n=void 0===n?{}:n))return r;var o=["context","pid"];e(n,function(t,e){h(o,t)&&(r[t]=e)});return e({user_unique_id:"rangers_web_id",app_id:"aid",uuid:"uuid",ssid:"ssid",ab_sdk_version:"ab_sdk_version"},function(t,e){f(n,t)&&(r[e]=n[t])}),r},Ke.getClientFlags=function(t){var n={};if(!l(t=void 0===t?{}:t))return n;var r=["hookPath","hookXHR","hookFetch","enableSizeStats","enableFMP","enablePerformance","enableStaticError","enableCatchJSError","enableCatchJSErrorV2","enableCatchGlobalJSError","enableResourcePerformance","enableCrash","enableMemoryRecord","enableFPSJankTimesMonitor","enableBreadcrumb","hookConsole"];return e(t,function(t,e){h(r,t)&&(n[t]=e)}),n},Ke.getClientCustom=function(t){var e={};return t.beforeSend&&y(t.beforeSend)&&(e.beforeSend=t.beforeSend),e},Ke.getClientMonitorsSetting=function(t){return t=(e={setting:t}).setting,e={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},ResourcePerformanceMonitor:{},BaseMonitor:{appTypeSetting:{}},AjaxMonitor:{}},t.ajaxWhitelistUrls&&u(t.ajaxWhitelistUrls)&&(e.AjaxMonitor.whitelistUrls=(e.AjaxMonitor.whitelistUrls||[]).concat(t.ajaxWhitelistUrls)),t.ignoreAjax&&u(t.ignoreAjax)&&(e.AjaxMonitor.ignore=(e.AjaxMonitor.ignore||[]).concat(t.ignoreAjax)),t.ignoreStatic&&u(t.ignoreStatic)&&(e.StaticErrorMonitor.ignore=(e.StaticErrorMonitor.ignore||[]).concat(t.ignoreStatic)),t.ignoreErrors&&u(t.ignoreErrors)&&(e.JSErrorMonitor.ignoreErrors=t.ignoreErrors),t.errorBlacklistUrls&&u(t.errorBlacklistUrls)&&(e.JSErrorMonitor.blacklistUrls=t.errorBlacklistUrls),t.errorWhitelistUrls&&u(t.errorWhitelistUrls)&&(e.JSErrorMonitor.whitelistUrls=t.errorWhitelistUrls),f(t,"sampleRate")&&(e.BaseMonitor.sampleHit=A(t.sampleRate)),e;var e},Ke.prototype.configure=function(t){l(t)&&(this.userConfig=q(q({},this.userConfig||{}),t||{}),this.serverDomain||this.userConfig.serverDomain?(this.userConfig.serverDomain&&(this.serverDomain=this.userConfig.serverDomain),this.updateCurrentSetting(),this.client?this.updateClientConfig(this.getClientOptions()):this.init()):console.error('"serverDomain" must be configured'))},Ke.prototype.captureException=function(t){var e,n;!this.monitors.JSExceptionMonitor||(t=this.monitors.JSExceptionMonitor.buildEvent(t[1]))&&null!==(n=null===(e=this.client)||void 0===e?void 0:e.sendEvent)&&void 0!==n&&n.call(e,t)},Ke.prototype.emitEvent=function(t){var e;this.monitors.EmitMonitor&&(e=this.monitors.EmitMonitor).handOut.apply(e,s([],J(t)))},Ke.prototype.handlePrecollect=function(t){var e={pid:this.currentSetting.commonParams.pid,url:this.currentSetting.commonParams.url,context:this.currentSetting.commonParams.context},n=t[2][0]||{};"error"===n.type&&((n.error||n.message)&&this.collect.jsError.push({event:n,params:e}),null!==(t=n.target)&&void 0!==t&&t.tagName&&this.collect.staticError.push({event:n,params:e})),"unhandledrejection"===n.type&&this.collect.jsError.push({event:n,params:e}),this.client&&this.consumePrecollect()},Ke.prototype.consumePrecollect=function(){var r=this;this.monitors.JSExceptionMonitor&&this.collect.jsError.forEach(function(t){var e,n;t&&t.event&&t.params&&(n=t.event,e=t.params,(n=null===(t=r.monitors.JSExceptionMonitor)||void 0===t?void 0:t.buildEvent(n.error))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.jsError.length=0,this.monitors.StaticErrorMonitor&&this.collect.staticError.forEach(function(t){var e,n;null!=t&&t.event&&(n=t.event,e=t.params,(n=null===(t=r.monitors.StaticErrorMonitor)||void 0===t?void 0:t.buildEvent(n))&&(n=q(q({},n),{overrides:e}),null!==(e=r.client)&&void 0!==e&&e.sendEvent(n)))}),this.collect.staticError.length=0},Ke.prototype.init=function(){var t=this.getClientOptions();this.client=new Qe(t),this.updateClientConfig(t),this.sendPageview(),this.setupMonitors(this.setMonitors()),this.afterServerSetting()},Ke.prototype.getServerSetting=function(){var e=this;if(this.serverSetting)return this.updateCurrentSetting(),void this.afterServerSetting();var t,n,n=(t=this.serverDomain,void 0===n&&(n="/settings/get/web"),(0<=t.indexOf("//")?"":location.protocol+"//")+t+n+"?aid="+this.currentSetting.commonParams.aid);L.get(n,{success:function(t){try{e.serverSetting=t.data,e.updateCurrentSetting(),e.afterServerSetting()}catch(t){e.afterServerSetting()}},fail:function(){e.afterServerSetting()}})},Ke.prototype.afterServerSetting=function(){this.updateClientConfig(this.getClientOptions()),this.client.setTransport({transport:this.userConfig.transport})},Ke.prototype.updateCurrentSetting=function(){var t,e={commonParams:Ke.getClientCommonParams(this.finderSetting),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:Ke.getClientMonitorsSetting({})},t={commonParams:Ke.getClientCommonParams({}),flags:Ke.getClientFlags({}),custom:Ke.getClientCustom({}),monitors:this.serverSetting?(t=this.serverSetting,n={JSErrorMonitor:{},PerformanceMonitor:{},BreadcrumbMonitor:{},StaticErrorMonitor:{},BaseMonitor:{},ResourcePerformanceMonitor:{},AjaxMonitor:{}},(t=t.setting).jserr&&(n.JSErrorMonitor.enable=t.jserr.enable,n.JSErrorMonitor.webIDHit=A(t.jserr.enable_user_rate),n.JSErrorMonitor.sampleRate=t.jserr.enable_sample_rate),t.performance&&(n.PerformanceMonitor.enable=t.performance.enable,n.PerformanceMonitor.webIDHit=A(t.performance.enable_user_rate),n.PerformanceMonitor.sampleRate=t.performance.enable_sample_rate),t.breadcrumb&&(n.BreadcrumbMonitor.enable=t.breadcrumb.enable),t.static_resource_error&&(n.StaticErrorMonitor.enable=t.static_resource_error.enable),t.static_resource&&(n.ResourcePerformanceMonitor.enable=t.static_resource.enable,n.ResourcePerformanceMonitor.webIDHit=A(t.static_resource.enable_user_rate),n.ResourcePerformanceMonitor.sampleRate=t.static_resource.enable_sample_rate),t.request&&(n.AjaxMonitor.enable=t.request.enable,n.AjaxMonitor.enableError=t.request.enableError,n.AjaxMonitor.webIDHit=A(t.request.enable_user_rate),n.AjaxMonitor.sampleRate=t.request.enable_sample_rate),n):Ke.getClientMonitorsSetting({})},n={commonParams:Ke.getClientCommonParams(this.userConfig),flags:Ke.getClientFlags(this.userConfig),custom:Ke.getClientCustom(this.userConfig),monitors:Ke.getClientMonitorsSetting(this.userConfig)};this.currentSetting=d({},this.defaultSetting,t,n,e),this.currentSetting.commonParams.pid=this.currentSetting.commonParams.pid||location.pathname,this.settingEffect(this.currentSetting)},Ke.prototype.settingEffect=function(t){(t=t.commonParams.rangers_web_id)!==R(document.cookie,De)&&(document.cookie=De+"="+t+";max-age=7776000;domain="+location.hostname+";path=/")},Ke.prototype.setMonitors=function(){var t,e,n=this.currentSetting.commonParams,r=n.aid,o=n.rangers_web_id,i=[],a=this.currentSetting.flags,n=new xe;return i.push(n),i.push(new de),a.enableCatchJSError&&i.push(new Pe),a.hookXHR&&i.push(new Se({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.hookFetch&&i.push(new Me({commonParams:{bid:r+"",web_id:o},ajaxMonitorOptions:this.currentSetting.monitors.AjaxMonitor})),a.enableStaticError&&i.push(new Te),a.enablePerformance&&(a.enableFMP?(t=n&&[n.disconnect.bind(n),n.getFmp.bind(n),n.getLoadFmp.bind(n)],i.push(new je({fmpMonitor:t,renderType:1,prePerformanceObserver:{precollect:[],observer:void 0}}))):i.push(new je({renderType:1,prePerformanceObserver:{precollect:(null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.e)||[],observer:null===(t=window.RangersSiteHybridSDK.lt)||void 0===t?void 0:t.o}}))),a.enableBreadcrumb&&i.push(new Ee),a.enableResourcePerformance&&(e=this.serverDomain,i.push(new Re({observe:!0,checkIgnore:function(t){return t.name===Fe(e)||("xmlhttprequest"===t.initiatorType||"fetch"===t.initiatorType||"beacon"===t.initiatorType||"navigation"===t.initiatorType||0===t.decodedBodySize)}}))),i},Ke.prototype.setupMonitors=function(t){var e=this;this.client&&this.client.sendEvent&&(t.forEach(function(t){"FMPMonitor"===(e.monitors[t.name]=t).name?t.setup(x):t.setup(null===(t=e.client)||void 0===t?void 0:t.sendEvent)}),this.updateClientConfig({monitors:this.monitors}),this.consumePrecollect())},Ke.prototype.getUserIDFromRangers=function(e){window.collectEvent&&y(window.collectEvent)&&window.collectEvent("getToken",function(t){e(t)})},Ke.prototype.getAbSdkVersionFromTester=function(e){window.collectEvent&&y(window.collectEvent)&&(window.collectEvent("getAbSdkVersion",function(t){e(t)}),window.collectEvent("onAbSdkVersionChange",function(t){e(t)}))},Ke.prototype.sendPageview=function(){var t;null!==(t=this.client)&&void 0!==t&&t.sendEvent({name:"PageViewMonitor",event:{ev_type:"pageview"},type:"post"})},Ke.prototype.getClientOptions=function(){var t=this.currentSetting;return{reportURL:Fe(this.serverDomain),monitorsSetting:t.monitors,commonParams:t.commonParams,custom:t.custom}},Ke.prototype.uploadClientQueue=function(){var t;null!==(t=this.client)&&void 0!==t&&t.uploadQueue()},Ke.prototype.updateClientConfig=function(t){var e,n,r=null===(e=this.client)||void 0===e?void 0:e.getConfig();null!==(e=this.client)&&void 0!==e&&e.updateConfig(t),null!==(e=null==r?void 0:r.commonParams)&&void 0!==e&&e.pid&&null!==(n=t.commonParams)&&void 0!==n&&n.pid&&r.commonParams.pid!==t.commonParams.pid&&this.sendPageview()},_e=Ke;function Ke(){var n=this;this.version="0.2.48",this.serverDomain="",this.collect={jsError:[],staticError:[]},this.instance=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"config"!==t[0]?"emit"!==t[0]?"report"!==t[0]?"captureException"!==t[0]?"precollect"!==t[0]?n.initOnCloseCallback():"error"===t[1]&&n.handlePrecollect(t):n.captureException(t):n.uploadClientQueue():n.emitEvent(t):n.configure(t[1])},this.initOnCloseCallback=function(){U(n.onCloseReport,n.visibilityChange)},this.visibilityChange=function(){"hidden"===document.visibilityState&&n.onCloseReport(),"visible"===document.visibilityState&&n.updateClientReportType("xhr")},this.onCloseReport=function(){n.updateClientReportType("beacon"),n.uploadClientQueue()},this.updateClientReportType=function(t){var e;null!==(e=n.client)&&void 0!==e&&e.updateConfig({reportType:t})},this.userConfig={},this.defaultSetting=Ae(),this.currentSetting=this.defaultSetting,this.serverSetting=void 0,this.finderSetting={},this.client=void 0,this.monitors={}}var We=x;return g()&&(Oe=new _e,We=Oe.instance,null!==(_e=window.RangersSiteHybridSDK)&&void 0!==_e&&_e.q&&(u(_e=window.RangersSiteHybridSDK.q)&&_e.forEach(function(t){We.apply(void 0,s([],J(t)))}),delete window.RangersSiteHybridSDK.q),window.RangersSiteHybridSDK=Oe.instance),We}(); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
4264696
33198