!function(){function e(){this.isSubmitPerformance=!1,this.ttsr_end_time=0,this.firstSendError=!1,this.initScrollHeight()}Number.prototype.mul=function(e){var t=0,o=this.toString(),e=e.toString();try{t+=o.split(".")[1].length}catch(e){}try{t+=e.split(".")[1].length}catch(e){}return Number(o.replace(".",""))*Number(e.replace(".",""))/Math.pow(10,t)},e.prototype.initScrollHeight=function(){const e=this;let t=0;const o=setInterval(function(){(document.body&&0e+"="+i[e]).join("&");if(o&&"beforeunload"===o){console.log("发送页面卸载请求");try{navigator.sendBeacon?navigator.sendBeacon(t):n.fireBeaconImg(t)}catch(e){}}try{fetch("/homeapi/collect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i),keepalive:!0})}catch(e){n.fireBeaconImg(t)}}},e.prototype.isRecordError=function(t,e){window.localStorage.removeItem(t);var o=JSON.parse(window.sessionStorage.getItem(t)||"[]");if(o.includes(e))return!0;o.push(e);try{window.sessionStorage.setItem(t,JSON.stringify(o))}catch(e){window.sessionStorage.removeItem(t)}return!1},e.prototype.filterTiming=function(e){if("BACK_FORWARD"===e.navigation_type_enum)return!1;for(var t=Object.keys(e),o=["ttfl_time","ttfb_time","ttdc_time","ttsr_time","execution_time","request_time","dom_resource_time","dom_content_load_time","dom_proccessing_time","dom_parse_time"],n=0;n{t.getPerformanceTiming(e)},200)}else console.log("你的浏览器不支持 performance 接口")};const r=new e;window.oemcartCollect=r,(window._G_COLLECT=r).saveCookieClient(),window.exec_collect=function(e){r.oemcartCollect.apply(r,e)},window.exec_oemcart_collect=exec_collect;let t=!1;window.addEventListener("load",function(){t=!0,r.getPerformanceTiming("load")}),window.addEventListener("beforeunload",function(){t||r.getPerformanceTiming("beforeunload")}),document.addEventListener("DOMContentLoaded",e=>{$(document).ajaxError(function(e,t,o,n){if(t.getResponseHeader("content-type")&&-1{var t=JSON.stringify({themeType:window._GET_C_SETTING_?_GET_C_SETTING_("current_theme_type"):window.oemcartCurrentThemeType,stack:e.reason.stack&&e.reason.stack.toString(),message:e.reason.toString()});r.isRecordError("error_ajax",e.reason&&e.reason.toString())||r.oemcartCollect("error",{hit_type_name:"ajax",hit_type_category:"promise",hit_type_label:t,hit_type_action:window.oemcart_page_ca||"",hit_type_value:"",hit_type_id:window._GET_C_SETTING_?_GET_C_SETTING_("current_theme_name"):window.oemcartCurrentThemeName})})});location.host,window.oemcart_app_view_domain;window.addEventListener("error",e=>{var t,o,n,i=e.target;if(i===window){if(e.error)return t="",n=e.filename,n=(n=/^http(s)?:\/\/(.*?)\//.exec(n))?n[2]:"",o="current_domain",!(200<=e.message.length||-1