1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).UniversalReport=e()}(this,(function(){"use strict";var t=function(e,n){return t=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,n)};function e(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=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},n.apply(this,arguments)};function r(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(n[r[o]]=t[r[o]])}return n}function o(t,e,n,r){var o,i=arguments.length,a=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(i<3?o(a):i>3?o(e,n,a):o(e,n))||a);return i>3&&a&&Object.defineProperty(e,n,a),a}function i(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function a(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}function s(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;var r=Array(t),o=0;for(e=0;e<n;e++)for(var i=arguments[e],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function u(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(t,e){if(null==this)throw new TypeError('"this" is null or not defined');var n=Object(this),r=n.length>>>0;if(0===r)return!1;var o,i,a=0|e,s=Math.max(a>=0?a:r-Math.abs(a),0);for(;s<r;){if((o=n[s])===(i=t)||"number"==typeof o&&"number"==typeof i&&isNaN(o)&&isNaN(i))return!0;s++}return!1}}),Object.entries||(Object.entries=function(t){for(var e=Object.keys(t),n=e.length,r=new Array(n);n--;)r[n]=[e[n],t[e[n]]];return r}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},writable:!0,configurable:!0});var l=setTimeout;function c(t){return Boolean(t&&void 0!==t.length)}function p(){}function d(t){if(!(this instanceof d))throw new TypeError("$Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],y(t,this)}function f(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,d._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void v(e.$Promise,t)}h(e.$Promise,r)}else(1===t._state?h:v)(e.$Promise,t._value)}))):t._deferreds.push(e)}function h(t,e){try{if(e===t)throw new TypeError("A $Promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof d)return t._state=3,t._value=e,void g(t);if("function"==typeof n)return void y((r=n,o=e,function(){r.apply(o,arguments)}),t)}t._state=1,t._value=e,g(t)}catch(e){v(t,e)}var r,o}function v(t,e){t._state=2,t._value=e,g(t)}function g(t){2===t._state&&0===t._deferreds.length&&d._immediateFn((function(){t._handled||d._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)f(t,t._deferreds[e]);t._deferreds=null}function m(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.$Promise=n}function y(t,e){var n=!1;try{t((function(t){n||(n=!0,h(e,t))}),(function(t){n||(n=!0,v(e,t))}))}catch(t){if(n)return;n=!0,v(e,t)}}d.prototype.catch=function(t){return this.then(null,t)},d.prototype.then=function(t,e){var n=new this.constructor(p);return f(this,new m(t,e,n)),n},d.prototype.finally=u,d.all=function(t){return new d((function(e,n){if(!c(t))return n(new TypeError("$Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var o=r.length;
1function i(t,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,(function(e){i(t,e)}),n)}r[t]=a,0==--o&&e(r)}catch(t){n(t)}}for(var a=0;a<r.length;a++)i(a,r[a])}))},d.resolve=function(t){return t&&"object"==typeof t&&t.constructor===d?t:new d((function(e){e(t)}))},d.reject=function(t){return new d((function(e,n){n(t)}))},d.race=function(t){return new d((function(e,n){if(!c(t))return n(new TypeError("$Promise.race accepts an array"));for(var r=0,o=t.length;r<o;r++)d.resolve(t[r]).then(e,n)}))},d._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){l(t,0)},d._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console};var b,w=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();"function"!=typeof w.Promise?w.Promise=d:w.Promise.prototype.finally||(w.Promise.prototype.finally=u),function(t){t.PGIN="dt_pgin",t.PGOUT="dt_pgout",t.IMP="dt_imp",t.IMPEND="dt_imp_end",t.CLCK="dt_clck"}(b||(b={}));var P,_,E={dt_mainlogin_h5:""};!function(t){t.ENABLE_FEATURE="1"}(P||(P={})),function(t){t.REPORT_VIEW="reportView",t.REALTIME_DEBUG="realTimeDebug",t.REPORT_VIEW_SET_TOKEN="setToken",t.REPORT_VIEW_PLUGIN_TOKEN="pluginToken",t.REALTIME_DEBUG_ID="dt_debugid",t.REALTIME_APP_ID="dt_appid"}(_||(_={}));var k="function",S="object",R="model",I="name",O="type",T="vendor",C="version",x="console",N="phone",A="tablet",D="tv",j={has:function(t,e){return"string"==typeof t&&-1!==e.toLowerCase().indexOf(t.toLowerCase())},lowerize:function(t){return t.toLowerCase()}},M={rgx:function(t,e){for(var n,r,o,i,a,s,u=0;u<e.length&&!a;){var l=e[u],c=e[u+1];for(n=r=0;n<l.length&&!a;)if(a=l[n++].exec(t))for(o=0;o<c.length;o++)s=a[++r],typeof(i=c[o])===S&&i.length>0?2==i.length?typeof i[1]==k?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3==i.length?typeof i[1]!==k||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4==i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;u+=2}},str:function(t,e){for(var n in e)if(typeof e[n]===S&&e[n].length>0){for(var r=0;r<e[n].length;r++)if(j.has(e[n][r],t))return"?"===n?void 0:n}else if(j.has(e[n],t))return"?"===n?void 0:n;return t}},B={os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},U={device:[[/\((ipad|playbook);[\w\s\),;-]+(rim|apple)/i],[R,T,[O,A]],[/applecoremedia\/[\w\.]+ \((ipad)/],[R,[T,"Apple"],[O,A]],[/(apple\s{0,1}tv)/i],[[R,"Apple TV"],[T,"Apple"],[O,D]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad)/i,/(hp).+(tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i],[T,R,[O,A]],[/(kf[A-z]+)(\sbuild\/|\)).+silk\//i],[R,[T,"Amazon"],[O,A]],[/android.+aft([bms])\sbuild/i],[R,[T,"Amazon"],[O,D]],[/\((ip[honed|\s\w*]+);.+(apple)/i],[R,T,[O,N]],[/\((ip[honed|\s\w*]+);/i],[R,[T,"Apple"],[O,N]],[/(blackberry)[\s-]?(\w+)/i,/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i],[T,R,[O,N]],[/\
1(bb10;\s(\w+)/i],[R,[T,"BlackBerry"],[O,N]],[/android.+(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus 7|padfone|p00c)/i],[R,[T,"Asus"],[O,A]],[/(sony)\s(tablet\s[ps])\sbuild\//i,/(sony)?(?:sgp.+)\sbuild\//i],[[T,"Sony"],[R,"Xperia Tablet"],[O,A]],[/android.+\s([c-g]\d{4}|so[-l]\w+)(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[R,[T,"Sony"],[O,N]],[/\s(ouya)\s/i,/(nintendo)\s([wids3u]+)/i],[T,R,[O,x]],[/android.+;\s(shield)\sbuild/i],[R,[T,"Nvidia"],[O,x]],[/(playstation\s[34portablevi]+)/i],[R,[T,"Sony"],[O,x]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[T,[R,/_/g," "],[O,N]],[/(nexus\s9)/i],[R,[T,"HTC"],[O,A]],[/d\/huawei([\w\s-]+)[;\)]/i,/android.+\s(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?)/i],[R,[T,"Huawei"],[O,N]],[/android.+(bah2?-a?[lw]\d{2})/i],[R,[T,"Huawei"],[O,A]],[/(microsoft);\s(lumia[\s\w]+)/i],[T,R,[O,N]],[/[\s\(;](xbox(?:\sone)?)[\s\);]/i],[R,[T,"Microsoft"],[O,x]],[/(kin\.[onetw]{3})/i],[[R,/\./g," "],[T,"Microsoft"],[O,N]],[/android.+\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[R,[T,"Motorola"],[O,A]],[/hbbtv.+maple;(\d+)/i],[[R,/^/,"SmartTV"],[T,"Samsung"],[O,D]],[/\(dtv[\);].+(aquos)/i],[R,[T,"Sharp"],[O,D]],[/android.+((sch-i[89]0\d|shw-m380s|SM-P605|SM-P610|gt-p\d{4}|gt-n\d+|sgh-t8[56]9|nexus 10))/i,/((SM-T\w+))/i],[[T,"Samsung"],R,[O,A]],[/smart-tv.+(samsung)/i],[T,[O,D],R],[/((s[cgp]h-\w+|gt-\w+|galaxy\snexus|sm-\w[\w\d]+))/i,/(sam[sung]*)[\s-]*(\w+-?[\w-]*)/i,/sec-((sgh\w+))/i],[[T,"Samsung"],R,[O,N]],[/sie-(\w*)/i],[R,[T,"Siemens"],[O,N]],[/(maemo|nokia).*(n900|lumia\s\d+)/i,/(nokia)[\s_-]?([\w-]*)/i],[[T,"Nokia"],R,[O,N]],[/android[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[R,[T,"Acer"],[O,A]],[/android.+([vl]k\-?\d{3})\s+build/i],[R,[T,"LG"],[O,A]],[/android\s3\.[\s\w;-]{10}(lg?)-([06cv9]{3,4})/i],[[T,"LG"],R,[O,A]],[/linux;\snetcast.+smarttv/i,/lg\snetcast\.tv-201\d/i],[[T,"LG"],R,[O,D]],[/(nexus\s[45])/i,/lg[e;\s\/-]+(\w*)/i,/android.+lg(\-?[\d\w]+)\s+build/i],[R,[T,"LG"],[O,N]],[/(lenovo)\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+))/i],[T,R,[O,A]],[/android.+(ideatab[a-z0-9\-\s]+)/i],[R,[T,"Lenovo"],[O,A]],[/(lenovo)[_\s-]?([\w-]+)/i],[T,R,[O,N]],[/android.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[T,R,[O,N]],[/(HM\sNOTE)/i,/(HM\s\w+)/i,/(MI\s\w+)/i,/(MI-ONE\sPlus)/i,/(M1)\sBuild/i,/(HM\d+)/i,/Xiaomi[\s_]?([\w_]+)/i],[[R,/_/g," "],[T,"Xiaomi"],[O,N]],[/android.+(mi[\s\-_]?(?:pad)(?:[\s_]?[\w\s]+))(?:\sbuild|\))/i],[[R,/_/g," "],[T,"Xiaomi"],[O,A]],[/android.+;\s(m[1-5]\snote)\sbuild/i],[R,[T,"Meizu"],[O,N]],[/(mz)-([\w-]{2,})/i],[[T,"Meizu"],R,[O,N]],[/android.+a000(1)\s+build/i,/android.+oneplus\s(a\d{4})[\s)]/i],[R,[T,"OnePlus"],[O,N]],[/android .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[R,[O,N]],[/android .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[R,[O,A]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[O,j.lowerize],T,R],[/[\s\/\(](smart-?tv)[;\)]/i],[[O,D]],[/(android[\w\.\s\-]{0,9});.+build/i],[R,[T,"Generic"]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[C,[I,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[C,[I,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[I,C],[/rv\:([\w\.]{1,9}).+(gecko)/i],[C,I]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[I,C],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)/i],[I,[C,M.str,B.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[I,"windows"],[C,M.str,B.os.windows.version]],[/(android)[\/\s-]?([\w\.]*)/i],[I,C],[/cfnetwork\/.+darwin/i,/ip[honead]{2,4}(?:.*os\s([\w]+)\slike\smac|;\sopera)/i],[[C,/_/g,"."],[I,"ios"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)/i],[[I,"macos"],[C,/_/g,"."]]]},L=function(){function t(t,e){var n,r;this.ua=t||(null!==(r=null===(n=null===window||void 0===window?void 0:window.navigator)||void 0===n?void 0:n.userAgent)&&void 0!==r?r:""),this.rgxmap=U}return t.prototype.getDevice=function(){var t={vendor:void 0,model:void 0,type:void 0};return M.rgx.call(t,this.ua,this.rgxmap.device),t},t.prototype.getEngine=function(){var t={name:void 0,version:void 0};return M.rgx.call(t,this.ua,this.rgxmap.engine),t},t.prototype.getOS=function(){var t={name:void 0,version:void 0};return M.rgx.call(t,this.ua,this.rgxmap.os),t},t.prototype.getResult=function(){return{engine:this.getEngine(),os:this.getOS(),device:this.getDevice()}},t}(),V=function(t){var e=t.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),n=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(window.location.search);return null===n?"":decodeURIComponent(n[1].replace(/\+/g," "))},H=function(t,e){return Object.keys(t).filter((function(t){return!e.includes(t)})).map((function(e){var n;return e in t?((n={})[e]=t[e],n):{}})).reduce((function(t,e){return Object.assign(t,e)}),{})},q=function(t){var e,n=t;return"string"==typeof n&&(n=document.querySelector(n)),e=n,("object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName)?n:null},W=function(){if(!document.body)return 0;var t=document.createElement("div");t.style.height="1in",t.style.width="1in",t.style.top="-100%",t.style.left="-100%",t.style.position="absolute",document.body.appendChild(t);var e=t.offsetHeight;return document.body.removeChild(t),e},J=function(t){var e;if("string"==typeof t||"object"==typeof t&&(null===(e=t.baseInfo)||void 0===e?void 0:e.appkey)&&t.onUserAction&&t.onDirectUserAction)return!0},F=function(t,e){var r,o;return void 0===e&&(e="udf_kv"),[b.PGIN,b.PGOUT].includes(t.eventName)?n(n({},t.publicParams),((r={})[e]=JSON.stringify(n({},t.pageParams)),r)):n(n({},t.publicParams),((o={})[e]=JSON.stringify(n({cur_pg:n({},t.pageParams)},t.businessParams)),o))},z=function(t,e,r){var o;void 0===e&&(e=1),void 0===r&&(r={});for(var i=r.eid?[r.eid]:[],a=r.eid?[r]:[],s=r,u=t;u;){var l=null===(o=u.data)||void 0===o?void 0:o.eid;l&&(e?s=n(n({eid:l},u.data.params),s):(i.push(l),a.push(n({eid:l},u.data.params)))),u=u.parent}return e?s:{element_path:i,element_params:a}},G=function(t){return t&&"[object Object]"===Object.prototype.toString.call(t)?Object.entries(t).reduce((function(t,e){var n,r=e[0].substring(3);return Object.assign(t,((n={})[r]=e[1],n))}),{}):{}};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function K(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Q(t,e){return t(e={exports:{}},e.exports),e.exports}var $=Q((function(t,e){t.exports=function(){var t=function(e,n){return t=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,n)},e=function(){return e=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},e.apply(this,arguments)};
1function n(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function r(t,e){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!((o=(o=i.trys).length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=e.call(t,i)}catch(t){s=[6,t],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}"function"==typeof SuppressedError&&SuppressedError;var o="__BEACON_",i="__BEACON_deviceId",a="last_report_time",s="sending_event_ids",u="beacon_config",l="beacon_config_request_time",c=new Set(["rqd_js_init","rqd_applaunched"]),p=function(){function t(){var t=this;this.emit=function(e,n){if(t){var r,o=t.__EventsList[e];if(null==o?void 0:o.length){o=o.slice();for(var i=0;i<o.length;i++){r=o[i];try{var a=r.callback.apply(t,[n]);if(1===r.type&&t.remove(e,r.callback),!1===a)break}catch(t){throw t}}}return t}},this.__EventsList={}}return t.prototype.indexOf=function(t,e){for(var n=0;n<t.length;n++)if(t[n].callback===e)return n;return-1},t.prototype.on=function(t,e,n){if(void 0===n&&(n=0),this){var r=this.__EventsList[t];if(r||(r=this.__EventsList[t]=[]),-1===this.indexOf(r,e)){var o={name:t,type:n||0,callback:e};return r.push(o),this}return this}},t.prototype.one=function(t,e){this.on(t,e,1)},t.prototype.remove=function(t,e){if(this){var n=this.__EventsList[t];if(!n)return null;if(!e){try{delete this.__EventsList[t]}catch(t){}return null}if(n.length){var r=this.indexOf(n,e);n.splice(r,1)}return this}},t}();function d(t,e){for(var n={},r=0,o=Object.keys(t);r<o.length;r++){var i=o[r],a=t[i];if("string"==typeof a)n[f(i)]=f(a);else{if(e)throw new Error("value mast be string !!!!");n[f(String(i))]=f(String(a))}}return n}function f(t){if("string"!=typeof t)return t;try{return t.replace(new RegExp("\\|","g"),"%7C").replace(new RegExp("\\&","g"),"%26").replace(new RegExp("\\=","g"),"%3D").replace(new RegExp("\\+","g"),"%2B")}catch(t){return""}}function h(t){return String(t.A99)+String(t.A100)}var v=function(){},g=function(){function t(t){var n=this;this.lifeCycle=new p,this.uploadJobQueue=[],this.additionalParams={},this.delayTime=0,this._normalLogPipeline=function(t){if(!t||!t.reduce||!t.length)throw new TypeError("createPipeline method needs to pass in an array with at least one pipe");return 1===t.length?function(e,n){t[0](e,n||v)}:t.reduce((function(t,e){return function(n,r){return void 0===r&&(r=v),t(n,(function(t){return null==e?void 0:e(t,r)}))}}))}([function(t){n.send({url:n.strategy.getUploadUrl(),data:t,method:"post",contentType:"application/json;charset=UTF-8"},(function(){var e=n.config.onReportSuccess;"function"==typeof e&&e(JSON.stringify(t.events))}),(function(){var e=n.config.onReportFail;"function"==typeof e&&e(JSON.stringify(t.events))}))}]),function(t,e){if(!t)throw e instanceof Error?e:new Error(e)}(Boolean(t.appkey),"appkey must be initial"),this.config=e(e({},t),{needReportRqdEvent:null==t.needReportRqdEvent||t.needReportRqdEvent})}return t.prototype.onUserAction=function(t,e){this.preReport(t,e,!1)},t.prototype.onDirectUserAction=function(t,e){this.preReport(t,e,!0)},t.prototype.preReport=function(t,e,n){t?this.strategy.isEventUpOnOff()&&(this.strategy.isBlackEvent(t)||this.strategy.isSampleEvent(t)||!this.config.needReportRqdEvent&&c.has(t)||this.onReport(t,e,n)):this.errorReport.reportError("602"," no eventCode")},t.prototype.addAdditionalParams=function(t){for(var e=0,n=Object.keys(t);e<n.length;e++){var r=n[e];this.additionalParams[r]=t[r]}},t.prototype.setChannelId=function(t){this.commonInfo.channelID=String(t)},t.prototype.setOpenId=function(t){this.commonInfo.openid=String(t)},t.prototype.setUnionid=function(t){this.commonInfo.unid=String(t)},t.prototype.getDeviceId=function(){return this.commonInfo.deviceId},t.prototype.getCommonInfo=function(){return this.commonInfo},t.prototype.removeSendingId=function(t){try{var e=JSON.parse(this.storage.getItem(s)),n=e.indexOf(t);-1!=n&&(e.splice(n,1),this.storage.setItem(s,JSON.stringify(e)))}catch(t){}},t}
1(),m=function(){function t(t,e,n,r){this.requestParams={},this.network=r,this.requestParams.attaid="00400014144",this.requestParams.token="6478159937",this.requestParams.product_id=t.appkey,this.requestParams.platform=n,this.requestParams.uin=e.deviceId,this.requestParams.model="",this.requestParams.os=n,this.requestParams.app_version=t.appVersion,this.requestParams.sdk_version=e.sdkVersion,this.requestParams.error_stack="",this.uploadUrl=t.isOversea?"https://r.cdnpure.com/webReport":"https://h.trace./kv"}return t.prototype.reportError=function(t,e){this.requestParams._dc=Math.random(),this.requestParams.error_msg=e,this.requestParams.error_code=t,this.network.get(this.uploadUrl,{params:this.requestParams}).catch((function(t){}))},t}(),y=function(){function t(t,e,n,r,o){this.strategy={isEventUpOnOff:!0,httpsUploadUrl:"https://otheve.beacon./analytics/v2_upload",requestInterval:30,blacklist:[],samplelist:[]},this.realSample={},this.appkey="",this.needQueryConfig=!0,this.appkey=e.appkey,this.storage=r,this.needQueryConfig=t;try{var i=JSON.parse(this.storage.getItem(u));i&&this.processData(i)}catch(t){}e.isOversea&&(this.strategy.httpsUploadUrl="https://svibeacon.onezapp.com/analytics/v2_upload"),!e.isOversea&&this.needRequestConfig()&&this.requestConfig(e.appVersion,n,o)}return t.prototype.requestConfig=function(t,e,n){var r=this;this.storage.setItem(l,Date.now().toString()),n.post("https://oth.str.beacon./trpc.beacon.configserver.BeaconConfigService/QueryConfig",{platformId:"undefined"==typeof wx?"3":"4",mainAppKey:this.appkey,appVersion:t,sdkVersion:e.sdkVersion,osVersion:e.userAgent,model:"",packageName:"",params:{A3:e.deviceId}}).then((function(t){if(0==t.data.ret)try{var e=JSON.parse(t.data.beaconConfig);e&&(r.processData(e),r.storage.setItem(u,t.data.beaconConfig))}catch(t){}else r.processData(null),r.storage.setItem(u,"")})).catch((function(t){}))},t.prototype.processData=function(t){var e,n,r,o,i;this.strategy.isEventUpOnOff=null!==(e=null==t?void 0:t.isEventUpOnOff)&&void 0!==e?e:this.strategy.isEventUpOnOff,this.strategy.httpsUploadUrl=null!==(n=null==t?void 0:t.httpsUploadUrl)&&void 0!==n?n:this.strategy.httpsUploadUrl,this.strategy.requestInterval=null!==(r=null==t?void 0:t.requestInterval)&&void 0!==r?r:this.strategy.requestInterval,this.strategy.blacklist=null!==(o=null==t?void 0:t.blacklist)&&void 0!==o?o:this.strategy.blacklist,this.strategy.samplelist=null!==(i=null==t?void 0:t.samplelist)&&void 0!==i?i:this.strategy.samplelist;for(var a=0,s=this.strategy.samplelist;a<s.length;a++){var u=s[a].split(",");2==u.length&&(this.realSample[u[0]]=u[1])}},t.prototype.needRequestConfig=function(){if(!this.needQueryConfig)return!1;var t=Number(this.storage.getItem(l));return Date.now()-t>60*this.strategy.requestInterval*1e3},t.prototype.getUploadUrl=function(){return this.strategy.httpsUploadUrl+"?appkey="+this.appkey},t.prototype.isBlackEvent=function(t){return-1!=this.strategy.blacklist.indexOf(t)},t.prototype.isEventUpOnOff=function(){return this.strategy.isEventUpOnOff},t.prototype.isSampleEvent=function(t){return!!Object.prototype.hasOwnProperty.call(this.realSample,t)&&this.realSample[t]<Math.floor(Math.random()*Math.floor(1e4))},t}(),b="session_storage_key",w=function(){function t(t,e,n){this.getSessionStackDepth=0,this.beacon=n,this.storage=t,this.duration=e,this.appkey=n.config.appkey}return t.prototype.getSession=function(){this.getSessionStackDepth+=1;var t=this.storage.getItem(b);if(!t)return this.createSession();var e="",n=0;try{var r=JSON.parse(t)||{sessionId:void 0,sessionStart:void 0};if(!r.sessionId||!r.sessionStart)return this.createSession();var o=Number(this.storage.getItem(a));if(Date.now()-o>this.duration)return this.createSession();e=r.sessionId,n=r.sessionStart,this.getSessionStackDepth=0}catch(t){}return{sessionId:e,sessionStart:n}},t.prototype.createSession=function(){var t=Date.now(),e={sessionId:this.appkey+"_"+t.toString(),sessionStart:t};this.storage.setItem(b,JSON.stringify(e)),this.storage.setItem(a,t.toString());var n="is_new_user",r=this.storage.getItem(n);return this.getSessionStackDepth<=1&&this.beacon.onDirectUserAction("rqd_applaunched",{A21:r?"N":"Y"}),this.storage.setItem(n,JSON.stringify(!1)),e},t}();function P(){var t=navigator.userAgent,e=t.indexOf("compatible")>-1&&t.indexOf("MSIE")>-1,n=t.indexOf("Edge")>-1&&!e,r=t.indexOf("Trident")>-1&&t.indexOf("rv:11.0")>-1;if(e){new RegExp("MSIE (\\d+\\.\\d+);").test(t);var o=parseFloat(RegExp.$1);return 7==o?7:8==o?8:9==o?9:10==o?10:6}return n?-2:r?11:-1}function _(t,e){var n,r;return(n="https://static-sg.winudf.com/static/report-libs/fp.js",void 0===r&&(r=Date.now()+"-"+Math.random()),new Promise((function(t,e){if(document.getElementById(r))t(void 0);else{var o=document.getElementsByTagName("head")[0],i=document.createElement("script");i.onload=function(){return function(){i.onload=null,t(void 0)}},i.onerror=function(t){i.onerror=null,o.removeChild(i),e(t)},i.src=n,i.id=r,o.appendChild(i)}}))).then((function(){(new Fingerprint).getQimei36(t,e)}
1)).catch((function(t){})),""}var E,k=function(){function t(t){this.config=t}return t.canUseDB=function(){return"undefined"!=typeof indexedDB},t.prototype.openDB=function(){var e=this;return new Promise((function(n,r){if(!t.canUseDB())return r({message:"not supported indexeddb"});var o=e.config,i=o.name,a=o.version,s=o.stores,u=indexedDB.open(i,a);u.onsuccess=function(){e.db=u.result,n()},u.onerror=function(t){r(t)},u.onupgradeneeded=function(){e.db=u.result;try{null==s||s.forEach((function(t){e.createStore(t)}))}catch(t){r(t)}}}))},t.prototype.useStore=function(t){return this.storeName=t,this},t.prototype.deleteDB=function(){var t=this;return this.closeDB(),new Promise((function(e,n){var r=indexedDB.deleteDatabase(t.config.name);r.onsuccess=function(){return e()},r.onerror=n}))},t.prototype.closeDB=function(){var t;null===(t=this.db)||void 0===t||t.close(),this.db=null},t.prototype.getStoreCount=function(){var t=this;return new Promise((function(e,n){var r=t.getStore("readonly").count();r.onsuccess=function(){return e(r.result)},r.onerror=n}))},t.prototype.clearStore=function(){var t=this;return new Promise((function(e,n){var r=t.getStore("readwrite").clear();r.onsuccess=function(){return e()},r.onerror=n}))},t.prototype.add=function(t,e){var n=this;return new Promise((function(r,o){var i=n.getStore("readwrite").add(t,e);i.onsuccess=function(){r(i.result)},i.onerror=o}))},t.prototype.put=function(t,e){var n=this;return new Promise((function(r,o){var i=n.getStore("readwrite").put(t,e);i.onsuccess=function(){r(i.result)},i.onerror=o}))},t.prototype.get=function(t,e){var n=this;return new Promise((function(r,o){var i=n.getStore().index(t).get(e);i.onsuccess=function(){r(i.result)},i.onerror=o}))},t.prototype.remove=function(t,e){var n=this;return new Promise((function(r,o){var i=n.getStore("readwrite").index(t).objectStore.delete(e);i.onsuccess=function(){r(i.result)},i.onerror=o}))},t.prototype.removeList=function(t,e){var n=this;return new Promise((function(r){var o=n.getStore("readwrite").index(t),i=[];e.forEach((function(t){o.objectStore.delete(t).onerror=function(){i.push(t)}})),r(i)}))},t.prototype.getStoreAllData=function(t){var e=this;return void 0===t&&(t=1/0),new Promise((function(n,r){var o=e.getStore("readonly").openCursor(),i=[];o.onsuccess=function(){var e=o.result;if(e&&i.length<t)try{e.value&&i.push(e.value),e.continue()}catch(t){n(i)}else n(i)},o.onerror=r}))},t.prototype.getDataRangeByIndex=function(t,e,n,r,o){var i=this;return new Promise((function(a,s){var u=i.getStore().index(t),l=IDBKeyRange.bound(e,n,r,o),c=[],p=u.openCursor(l);p.onsuccess=function(){var t;(null===(t=null==p?void 0:p.result)||void 0===t?void 0:t.value)?(c.push(null==p?void 0:p.result.value),null==p||p.result.continue()):a(c)},p.onerror=s}))},t.prototype.removeDataByIndex=function(t,e,n,r,o){var i=this;return new Promise((function(a,s){var u=i.getStore("readwrite").index(t),l=IDBKeyRange.bound(e,n,r,o),c=u.openCursor(l),p=0;c.onsuccess=function(t){var e=t.target.result;e?(p+=1,e.delete(),e.continue()):a(p)},c.onerror=s}))},t.prototype.createStore=function(t){var e=t.name,n=t.indexes,r=void 0===n?[]:n,o=t.options;if(this.db){this.db.objectStoreNames.contains(e)&&this.db.deleteObjectStore(e);var i=this.db.createObjectStore(e,o);r.forEach((function(t){i.createIndex(t.indexName,t.keyPath,t.options)}))}},t.prototype.getStore=function(t){var e;return void 0===t&&(t="readonly"),null===(e=this.db)||void 0===e?void 0:e.transaction(this.storeName,t).objectStore(this.storeName)},t}(),S="event_table_v3",R="eventId",I=function(){function t(t){this.isReady=!1,this.taskQueue=Promise.resolve(),this.db=new k({name:"Beacon_"+t+"_V3",version:1,stores:[{name:S,options:{keyPath:R},indexes:[{indexName:R,keyPath:R,options:{unique:!0}}]}]}),this.open()}return t.prototype.getCount=function(){var t=this;return this.readyExec((function(){return t.db.getStoreCount()}))},t.prototype.setItem=function(t,e){var n=this;return this.readyExec((function(){return n.db.add({eventId:t,value:e})}))},t.prototype.getItem=function(t){return n(this,void 0,void 0,(function(){var e=this;return r(this,(function(n){return[2,this.readyExec((function(){return e.db.getDataRangeByIndex(R,t,t)}))]}))}))},t.prototype.removeItem=function(t){var e=this;return this.readyExec((function(){return e.db.removeDataByIndex(R,t,t)}))},t.prototype.updateItem=function(t,e){var n=this;return this.readyExec((function(){return n.db.put({eventId:t,value:e})}))},t.prototype.iterate=function(t){var e=this;return this.readyExec((function(){return e.db.getStoreAllData().then((function(e){e.forEach((function(e){t(e.value)}))}))}))},t.prototype.open=function(){return n(this,void 0,void 0,(function(){var t=this;return r(this,(function(e){switch(e.label){case 0:return this.taskQueue=this.taskQueue.then((function(){return t.db.openDB()})),[4,this.taskQueue];case 1:return e.sent(),this.isReady=!0,this.db.useStore(S),[2]}}))}))},t.prototype.readyExec=function(t){return this.isReady?t():(this.taskQueue=this.taskQueue.then((function(){return t()})),this.taskQueue)},t}(),O=function(){function t(t){this.keyObject={},this.storage=t}return t.prototype.getCount=function(){return this.storage.getStoreCount()},t.prototype.removeItem=function(t){this.storage.removeItem(t),delete this.keyObject[t]},t.prototype.setItem=function(t,e){var n=JSON.stringify(e);this.storage.setItem(t,n),this.keyObject[t]=e},t.prototype.iterate=function(t){for(var e=Object.keys(this.keyObject),n=0;n<e.length;n++){var r=this.storage.getItem(e[n]);t(JSON.parse(r))}},t}(),T=function(){function t(t,e){var n=this;this.dbEventCount=0,P()>0||!window.indexedDB||/X5Lite/.test(navigator.userAgent)?(this.store=new O(e),this.dbEventCount=this.store.getCount()):(this.store=new I(t),this.getCount().then((function(t){n.dbEventCount=t})).catch((function(t){})))}return t.prototype.getCount=function(){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.store.getCount()];case 1:return[2,t.sent()];case 2:return t.sent(),[2,Promise.reject()];case 3:return[2]}}
1))}))},t.prototype.insertEvent=function(t,e){return n(this,void 0,void 0,(function(){var n,o;return r(this,(function(r){switch(r.label){case 0:if(this.dbEventCount>=1e4)return[2,Promise.reject()];n=h(t.mapValue),r.label=1;case 1:return r.trys.push([1,3,,4]),this.dbEventCount++,[4,this.store.setItem(n,t)];case 2:return[2,r.sent()];case 3:return o=r.sent(),e&&e(o,t),this.dbEventCount--,[2,Promise.reject()];case 4:return[2]}}))}))},t.prototype.getEvents=function(){return n(this,void 0,void 0,(function(){var t;return r(this,(function(e){switch(e.label){case 0:t=[],e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.store.iterate((function(e){t.push(e)}))];case 2:case 3:return e.sent(),[2,Promise.all(t)];case 4:return[2]}}))}))},t.prototype.removeEvent=function(t){return n(this,void 0,void 0,(function(){var e;return r(this,(function(n){switch(n.label){case 0:e=h(t.mapValue),n.label=1;case 1:return n.trys.push([1,3,,4]),this.dbEventCount--,[4,this.store.removeItem(e)];case 2:return[2,n.sent()];case 3:return n.sent(),this.dbEventCount++,[2,Promise.reject()];case 4:return[2]}}
1))}))},t}(),C=function(){return(C=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 x(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function N(t,e){var n=[null,void 0,"",NaN].includes(t);if(e.isSkipEmpty&&n)return null;var r=!e.isSkipEmpty&&n?"":t;try{return e.encode?encodeURIComponent(r):r}catch(t){return null}}function A(t,e){void 0===e&&(e={encode:!0,isSkipEmpty:!1});var n=t.url,r=t.query,o=void 0===r?{}:r,i=t.hash,a=n.split("#"),s=a[0],u=a[1],l=void 0===u?"":u,c=s.split("?")[0],p=[],d=N(i||l,e),f=C(C({},function(t){var e=t.split("#"),n=e[0],r=e[1],o=void 0===r?"":r,i=n.split("?"),a=i[0],s=i[1],u=void 0===s?"":s,l=x(o),c=Object.create(null);return u.split("&").forEach((function(t){var e=t.split("="),n=e[0],r=e[1],o=void 0===r?"":r,i=x(n),a=x(o);null===i||null===a||""===i&&""===a||c[i]||(c[i]=a)})),{url:a,query:c,hash:l}}(n).query),o);return Object.keys(f).forEach((function(t){var n=N(t,e),r=N(f[t],e);null!==n&&null!==r&&p.push(n+"="+r)})),c+(p.length?"?"+p.join("&"):"")+(d?"#"+d:"")}function D(t,e){return new Promise((function(n,r){if(e&&document.querySelectorAll("script[data-tag="+e+"]").length)return n();var o=document.createElement("script"),i=C({type:"text/javascript",charset:"utf-8"},t);
1Object.keys(i).forEach((function(t){return function(t,e,n){if(t)return void 0===n?t.getAttribute(e):t.setAttribute(e,n)}(o,t,i[t])})),e&&(o.dataset.tag=e),o.onload=function(){return n()},o.onreadystatechange=function(){var t=o.readyState;["complete","loaded"].includes(t)&&(o.onreadystatechange=null,n())},o.onerror=r,document.body.appendChild(o)}))}!function(t){t[t.equal=0]="equal",t[t.low=-1]="low",t[t.high=1]="high"}(E||(E={}));var j=function(){return(j=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 M(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{u(r.next(t))}catch(t){i(t)}}function s(t){try{u(r.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))}function B(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}var U=function(){function t(){this.interceptors=[]}return t.prototype.use=function(t,e){return this.interceptors.push({resolved:t,rejected:e}),this.interceptors.length-1},t.prototype.traverse=function(t,e){void 0===e&&(e=!1);var n=Promise.resolve(t);return(e?Array.prototype.reduceRight:Array.prototype.reduce).call(this.interceptors,(function(t,e){if(e){var r=e.resolved,o=e.rejected;n=n.then(r,o)}return t}),""),n},t.prototype.eject=function(t){this.interceptors[t]&&(this.interceptors[t]=null)},t}(),L={defaults:{timeout:0,method:"GET",mode:"cors",redirect:"follow",credentials:"same-origin"},headers:{common:{Accept:"application/json, text/plain, */*"},POST:{"Content-Type":"application/x-www-form-urlencoded"},PUT:{"Content-Type":"application/x-www-form-urlencoded"},PATCH:{"Content-Type":"application/x-www-form-urlencoded"}},baseURL:"",polyfillUrl:"https://static-sg.winudf.com/static/report-libs/fetch.min.js",interceptors:{request:new U,response:new U}},V=/^([a-z][a-z\d+\-.]*:)?\/\//i,H=Object.prototype.toString;function q(t){return M(this,void 0,void 0,(function(){var e;return B(this,(function(n){switch(n.label){case 0:if(window.fetch)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,D({src:t})];case 2:return n.sent(),[3,4];case 3:throw e=n.sent(),new Error("load polyfill "+t+" fail: "+e.message);case 4:return[2]}}
1))}))}function W(t){return["Accept","Content-Type"].forEach((function(e){return n=e,void((r=t.headers)&&Object.keys(r).forEach((function(t){t!==n&&t.toUpperCase()===n.toUpperCase()&&(r[n]=r[t],delete r[t])})));var n,r})),function(t){if("[object Object]"!==H.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}(t.body)&&(t.body=JSON.stringify(t.body),t.headers&&(t.headers["Content-Type"]="application/json;charset=utf-8")),t}function J(t){return M(this,void 0,void 0,(function(){var e,n,r,o,i,a,s,u,l,c,p,d,f,h,v,g,m;return B(this,(function(y){switch(y.label){case 0:return e=L.baseURL,n=L.defaults,r=L.interceptors,[4,q(L.polyfillUrl)];case 1:return y.sent(),(o=j(j({},n),t)).headers||(o.headers=function(t){void 0===t&&(t="GET");var e=L.headers[t]||{};return j(j({},L.headers.common),e)}(o.method)),W(o),[4,r.request.traverse(o,!0)];case 2:if((i=y.sent())instanceof Error)throw i;return i.url=function(t,e){return!t||V.test(e)?e:t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,"")}(e,i.url),a=i.url,s=i.timeout,u=i.params,l=i.method,c=["GET","DELETE","OPTIONS","HEAD"].includes(void 0===l?"GET":l)&&!!u,p=c?A({url:a,query:u}):a,d=[],s&&!i.signal&&(v=new Promise((function(t){f=setTimeout((function(){t(new Error("timeout"))}),s)})),d.push(v),h=new AbortController,i.signal=h.signal),d.push(fetch(p,i).catch((function(t){return t}))),[4,Promise.race(d)];case 3:return g=y.sent(),f&&clearTimeout(f),[4,r.response.traverse(g)];case 4:if((m=y.sent())instanceof Error)throw null==h||h.abort(),m;return[2,m]}}))}))}var F=function(){function t(t){L.interceptors.request.use((function(n){var r=n.url,o=n.method,i=n.body,a=i;if(t.onReportBeforeSend){var s=t.onReportBeforeSend({url:r,method:o,data:i?JSON.parse(i):null});a=(null==s?void 0:s.data)?JSON.stringify(s.data):null}return"GET"!=o&&a?e(e({},n),{body:a}):n}))}return t.prototype.get=function(t,o){return n(this,void 0,void 0,(function(){var n,i;return r(this,(function(r){switch(r.label){case 0:return[4,J(e({url:t},o))];case 1:return[4,(n=r.sent()).json()];case 2:return i=r.sent(),[2,Promise.resolve({data:i,status:n.status,statusText:n.statusText,headers:n.headers})]}}))}))},t.prototype.post=function(t,o,i){return n(this,void 0,void 0,(function(){var n,a;return r(this,(function(r){switch(r.label){case 0:return[4,J(e({url:t,body:o,method:"POST"},i))];case 1:return[4,(n=r.sent()).json()];case 2:return a=r.sent(),[2,Promise.resolve({data:a,status:n.status,statusText:n.statusText,headers:n.headers})]}}))}))},t}(),z=function(){function t(t){this.appkey=t}return t.prototype.getItem=function(t){try{return window.localStorage.getItem(this.getStoreKey(t))}catch(t){return""}},t.prototype.removeItem=function(t){try{window.localStorage.removeItem(this.getStoreKey(t))}catch(t){}},t.prototype.setItem=function(t,e){try{window.localStorage.setItem(this.getStoreKey(t),e)}catch(t){}},t.prototype.setSessionItem=function(t,e){try{window.sessionStorage.setItem(this.getStoreKey(t),e)}catch(t){}},t.prototype.getSessionItem=function(t){try{return window.sessionStorage.getItem(this.getStoreKey(t))}catch(t){return""}},t.prototype.getStoreKey=function(t){return o+this.appkey+"_"+t},t.prototype.createDeviceId=function(){try{var t=window.localStorage.getItem(i);return t||(t=function(t){for(var e="ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz0123456789",n="",r=0;r<t;r++)n+=e.charAt(Math.floor(51*Math.random()));return n}(32),window.localStorage.setItem(i,t)),t}catch(t){return""}},t.prototype.clear=function(){try{for(var t=window.localStorage.length,e=0;e<t;e++){var n=window.localStorage.key(e);(null==n?void 0:n.substr(0,9))==o&&window.localStorage.removeItem(n)}}catch(t){}},t.prototype.getStoreCount=function(){var t=0;try{t=window.localStorage.length}catch(t){}return t},t}(),G="logid_start",K="4.5.18-web";return function(n){function r(t){var e=n.call(this,t)||this;e.qimei36="",e.uselessCycleTaskNum=0,e.underWeakNet=!1,e.pauseSearching=!1,e.reportEsHost="r.cdnpure.com",e.send=function(t,n,r){var o=function(r){var o;100==(null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.result)?e.delayTime=1e3*r.data.delayTime:e.delayTime=0,n&&n(t.data),t.data.events.forEac
1h((function(t){e.store.removeEvent(t).then((function(){e.removeSendingId(h(t.mapValue))})).catch((function(t){}))})),e.doCustomCycleTask()},i=function(n){var o=t.data.events;e.errorReport.reportError(n.code?n.code.toString():"600",n.message),r&&r(t.data);var i=JSON.parse(e.storage.getItem(s));o.forEach((function(t){i&&-1!=i.indexOf(h(t))&&e.store.insertEvent(t,(function(t,n){t&&e.errorReport.reportError("604","insertEvent fail!")})),e.removeSendingId(h(t))})),e.monitorUploadFailed()},u=e.sendPlainText?JSON.stringify(t.data):t.data,l=e.sendPlainText?{headers:{Accept:"application/json, text/plain, */*","Content-Type":"text/plain; charset=utf-8"}}:{};e.storage.setItem(a,Date.now().toString()),e.useBeacon&&e.network.post(e.uploadUrl||e.strategy.getUploadUrl(),u,l).then(o).catch(i),e.useEs&&e.network.post("https://"+e.reportEsHost+"/webReport",u,l).then(o).catch(i)};var r,o,i=P();return e.isUnderIE8=i>0&&i<8,e.isUnderIE8||(e.isUnderIE=i>0,t.needInitQimei&&_(t.appkey,(function(t){e.qimei36=t.q36})),e.network=new F(t),e.storage=new z(t.appkey),e.initCommonInfo(t),e.store=new T(t.appkey,e.storage),e.errorReport=new m(e.config,e.commonInfo,"web",e.network),e.strategy=new y(null==t.needQueryConfig||t.needQueryConfig,e.config,e.commonInfo,e.storage,e.network),e.logidStartTime=e.storage.getItem(G),e.logidStartTime||(e.logidStartTime=Date.now().toString(),e.storage.setItem(G,e.logidStartTime)),r=e.logidStartTime,o=Date.now()-parseFloat(r),Math.floor(o/864e5)>=365&&e.storage.clear(),e.initSession(t),e.onDirectUserAction("rqd_js_init",{}),setTimeout((function(){return e.lifeCycle.emit("init")}),0),e.initDelayTime=t.delay?t.delay:1e3,e.cycleTask(e.initDelayTime),e.useEs=!!t.useES,e.useBeacon=!!t.useBeacon,e.reportEsHost=t.reportEsHost||"r.cdnpure.com",e.sendPlainText=!!t.sendPlainText),e}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(r,n),r.prototype.initSession=function(t){var e=18e5;t.sessionDuration&&t.sessionDuration>3e4&&(e=t.sessionDuration),this.beaconSession=new w(this.storage,e,this)},r.prototype.initCommonInfo=function(t){var e=Number(this.storage.getItem(a));try{var n=JSON.parse(this.storage.getItem(s));(Date.now()-e>3e4||!n)&&this.storage.setItem(s,JSON.stringify([]))}catch(t){}t.uploadUrl&&(this.uploadUrl=t.uploadUrl+"?appkey="+t.appkey);var r=[window.screen.width,window.screen.height];window.devicePixelRatio&&r.push(window.devicePixelRatio),this.commonInfo={deviceId:this.storage.createDeviceId(),language:navigator&&navigator.language||"zh_CN",query:window.location.search,userAgent:navigator.userAgent,pixel:r.join("*"),channelID:t.channelID?String(t.channelID):"",openid:t.openid?String(t.openid):"",unid:t.unionid?String(t.unionid):"",sdkVersion:K},this.config.appVersion=t.versionCode?String(t.versionCode):"",this.config.strictMode=t.strictMode},r.prototype.cycleTask=function(t){var e=this;this.intervalID=window.setInterval((function(){e.pauseSearching||e.store.getEvents().then((function(t){0==t.length&&(e.pauseSearching=!0);var n=[],r=JSON.parse(e.storage.getItem(s));r||(r=[]),t&&t.forEach((function(t){var e=h(t.mapValue);-1==r.indexOf(e)&&(n.push(t),r.push(e))})),r.length>1e3&&(r=[]),0!=n.length&&(e.storage.setItem(s,JSON.stringify(r)),e._normalLogPipeline(e.assembleData(n)))})).catch((function(t){}))}),t)},r.prototype.onReport=function(t,e,n){var r=this;if(this.isUnderIE8)this.errorReport.reportError("601","UnderIE8");else{this.pauseSearching=!1;var o=this.generateData(t,e,n);if(n&&0==this.delayTime&&!this.underWeakNet)this._normalLogPipeline(this.assembleData(o));else{var i=o.shift();i&&this.store.insertEvent(i,(function(t){t&&r.errorReport.reportError("604","insertEvent fail!")})).catch((function(t){r._normalLogPipeline(r.assembleData(o))}))}}},r.prototype.onSendBeacon=function(t,e){if(this.isUnderIE)this.errorReport.reportError("605","UnderIE");else{this.pauseSearching=!1;var n=this.assembleData(this.generateData(t,e,!0));"function"==typeof navigator.sendBeacon&&(this.useBeacon&&navigator.sendBeacon(this.uploadUrl||this.strategy.getUploadUrl(
1),JSON.stringify(n)),this.useEs&&navigator.sendBeacon("https://"+this.reportEsHost+"/webReport",JSON.stringify(n)))}},r.prototype.generateData=function(t,n,r){var o=[],i=K+"_"+(r?"direct_log_id":"normal_log_id"),a=Number(this.storage.getItem(i));return a=a||1,n=e(e({},n),{A99:r?"Y":"N",A100:a.toString(),A72:K,A88:this.logidStartTime}),a++,this.storage.setItem(i,a.toString()),o.push({eventCode:t,eventTime:Date.now().toString(),mapValue:d(n,this.config.strictMode)}),o},r.prototype.assembleData=function(t){var n=this.beaconSession.getSession();return{appVersion:this.config.appVersion?f(this.config.appVersion):"",sdkId:"js",sdkVersion:K,mainAppKey:this.config.appkey,platformId:3,common:d(e(e({},this.additionalParams),{A2:this.commonInfo.deviceId,A8:this.commonInfo.openid,A12:this.commonInfo.language,A17:this.commonInfo.pixel,A23:this.commonInfo.channelID,A50:this.commonInfo.unid,A76:n.sessionId,A101:this.commonInfo.userAgent,A102:window.location.href,A104:document.referrer,A119:this.commonInfo.query,A153:this.qimei36}),!1),events:t}},r.prototype.monitorUploadFailed=function(){this.uselessCycleTaskNum++,this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(6e4),this.underWeakNet=!0)},r.prototype.doCustomCycleTask=function(){this.uselessCycleTaskNum>=5&&(window.clearInterval(this.intervalID),this.cycleTask(this.initDelayTime)),this.uselessCycleTaskNum=0,this.underWeakNet=!1},r}(g)}()})),X=function(){function t(){this.events=new Map}return t.prototype.on=function(t,e){var n=this.events.get(t)||[];n.push(e),this.events.set(t,n)},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];(this.events.get(t)||[]).forEach((function(t){try{t.apply(void 0,e)}catch(t){}}))},t.prototype.off=function(t,e){if(e){var n=this.events.get(t)||[],r=n.indexOf(e);r>-1&&n.splice(r,1),0===n.length?this.events.delete(t):this.events.set(t,n)}else this.events.delete(t)},t}();function Y(){return window._ReportEventBus||(window._ReportEventBus=new X),window._ReportEventBus}var Z=function(){function t(t){if(this.type="beacon",!J(t.beacon))throw new Error("\n [universalReport] beacon must be a beacon application appkey or a beacon instance")}return t.prototype.init=function(t){var e=this;return new Promise((function(n,r){var o;"object"==typeof t.beacon?(e.beacon=t.beacon,t.beaconOptions.useEventBus&&Y(),n()):"string"==typeof t.beacon?(window.BeaconAction=null!==(o=window.BeaconAction)&&void 0!==o?o:$,n(e.initBeacon(t))):r(new Error("\n [universalReport] beacon must be a beacon application appkey or a beacon instance"))}))},t.prototype.initBeacon=function(t){var e;try{this.beacon=new window.BeaconAction(n({appkey:t.beacon,versionCode:null!==(e=t.version)&&void 0!==e?e:"",delay:1e3,isDebug:t.debug,needQueryConfig:!1,onReportFail:function(t){},isOversea:!0},t.beaconOptions)),t.beaconOptions.useEventBus&&Y()}catch(e){null==t||t.beaconFailCallback({err_message:e,result:1,fail_case:"beaconInitFail"})}},t.prototype.report=function(t){var e;if(t.eventName){var r=F(t);(null===window||void 0===window?void 0:window._ReportEventBus)&&(null===window||void 0===window||window._ReportEventBus.emit("report",n(n({},r),{eventName:t.eventName}))),t.isSendBeacon?null===(e=this.beacon)||void 0===e||e.onSendBeacon(t.eventName,r):~[b.PGIN,b.PGOUT].indexOf(t.eventName)&&this.beacon.onDirectUserAction?this.beacon.onDirectUserAction(t.eventName,r):this.beacon.onUserAction&&this.beacon.onUserAction(t.eventName,r)}},t}();function tt(t){return new Z(t)}var et={},nt=0,rt=1,ot=2,it=3,at=["imei","imsi","idfa"],st=function(){function t(t){if(this.type="app",this.beaconReportPool=[],!J(t.beacon))throw new Error("\n [universalReport] beacon must be a beacon application appkey or a beacon instance");this.appkey="string"==typeof t.beacon?t.beacon:t.beacon.baseInfo.appkey,this.options=t,this.enableBeaconReportRetry=t.enableBeaconReportRetry;try{this.topWindow=window.top,this.topWindow.dtResponseCallbacks={}}catch(t){this.topWindow=window,window.dtResponseCallbacks={}}}return t.prototype.init=function(){var t,e,n,r,o,s,u,l,c,p;return i(this,void 0,void 0,(function(){var i,d,f;return a(this,(function(a){switch(a.label){case 0:return[4,this.waitForDtJsReporterReady()];case 1:return a.sent(),"android"===this.hardwareOS&&(null===(e=null===(t=this.topWindow)||void 0===t?void 0:t.dtBridge)||void 0===e?void 0:e.postMessage)&&(this.nativeReportBridge=this.topWindow.dtBridge),"ios"===this.hardwareOS&&(null===(s=null===(o=null===(r=null===(n=this.topWindow)||void 0===n?void 0:n.webkit)||void 0===r?void 0:r.messageHandlers)||void 0===o?void 0:o.dtBridge)||void 0===s?void 0:s.postMessage)&&(this.nativeReportBridge=this.topWindow.webkit.messageHandlers.dtBridge),(null===(l=null===(u=this.topWindow)||void 0===u?void 0:u.DtJsReporter)||void 0===l?void 0:l.reportEvent)?"android"===this.hardwareOS?[3,3]:(i=this,[4,this.getJsApiCallbackAccess()]):this.nativeReportBridge?[2,Promise.resolve({reason:"native_fallback"})]:[2,Promise.reject({channel:"beacon",reason:"report_event_nil"})];case 2:return i.hasJsApiCallback=a.sent()||!1,this.initFallbackChannel
1(),[2,Promise.resolve({reason:"report_event_exist"})];case 3:return(null==(d=null===(p=null===(c=this.topWindow)||void 0===c?void 0:c.DtJsReporter)||void 0===p?void 0:p.isSupport)?void 0:d())?(f=this,[4,this.getJsApiCallbackAccess()]):[3,5];case 4:return f.hasJsApiCallback=a.sent()||!1,this.initFallbackChannel(),[2,Promise.resolve({reason:"report_event_exist"})];case 5:return[2,Promise.reject({channel:"beacon",reason:"andorid_not_support"})]}}))}))},t.prototype.initFallbackChannel=function(){this.initBeaconChannel(this.options),this.beaconChannelStatus="init"},t.prototype.getJsApiCallbackAccess=function(){var t=this;return new Promise((function(e){var n;setTimeout((function(){e(!1)}),500),null===(n=t.topWindow.DtJsReporter)||void 0===n||n.getSdkVersion({onCallback:function(t){var n=t.data;e((null==n?void 0:n.sdkVersion)>2100)}})})).catch((function(t){}))},t.prototype.initBeaconChannel=function(t){var e=this;return this.beaconChannel=tt(t),Promise.resolve(this.beaconChannel.init(t)).then((function(){e.beaconChannelStatus="ready";for(var t=null;t=e.beaconReportPool.shift();)e.beaconChannel.report(t)})).catch((function(t){}))},t.prototype.waitForDtJsReporterReady=function(){var t=this;return new Promise((function(e){var n,r;if(null===(r=null===(n=t.topWindow)||void 0===n?void 0:n.DtJsReporter)||void 0===r?void 0:r.reportEvent)e();else{var o=setTimeout((function(){e()}),1e3),i=function(){t.topWindow.document.removeEventListener("onDtJsReporterReady",i),clearTimeout(o),e()};t.topWindow.document.addEventListener("onDtJsReporterReady",i)}}))},t.prototype.report=function(t){var e,n,r=this;if(t.isSendBeacon&&"ready"===this.beaconChannelStatus)this.beaconChannel.report(t);else{var o=null===(n=null===(e=this.topWindow)||void 0===e?void 0:e.DtJsReporter)||void 0===n?void 0:n.reportEvent;if(o){var i,a=F(t);this.hasJsApiCallback&&(i=setTimeout((function(){i=null,r.callbackTimeoutHandler(t,ot)}),1e3)),o({params:a,eventId:t.eventName,appKey:this.appkey,onCallback:this.nativeCallback(t,i,ot)})}else this.nativeReportBridge&&this.nativeReport(t)}},t.prototype.nativeReport=function(t){var e=this;if(this.nativeReportBridge){var n,r=""+Date.now()+Math.random().toString().slice(2,5),o=F(t);n=setTimeout((function(){n=null,e.callbackTimeoutHandler(t,it),delete e.topWindow.dtResponseCallbacks[r]}),1e3);this.topWindow.dtResponseCallbacks[r]=function(o){n&&(e.nativeCallback(t,n,it)(o),delete e.topWindow.dtResponseCallbacks[r])};var i=JSON.stringify({handlerName:"vr_reportEvent",callbackId:r,data:{params:o,eventId:t.eventName,appKey:this.appkey}});this.nativeReportBridge.postMessage(i)}},t.prototype.beaconReport=function(t){this.enableBeaconReportRetry&&("ready"!==this.beaconChannelStatus?this.beaconReportPool.push(t):this.beaconChannel.report(t))},t.prototype.callbackTimeoutHandler=function(t,e){var n,r;this.fallbackReport(t,e),null===(n=this.options)||void 0===n||n.jsApiReportCallback({code:"504",msg:"timeout",step:e,event_type:t.eventName,event_id:null===(r=null==t?void 0:t.publicParams)||void 0===r?void 0:r.dt_eventid_h5})},t.prototype.fallbackReport=function(t,e){e===ot&&this.nativeReportBridge?this.nativeReport(t):this.beaconReport(t)},t.prototype.nativeCallback=function(t,e,n){var r=this;return function(o){var i,a,s;e&&clearTimeout(e);var u={ret:"",msg:""};try{u="string"==typeof o?JSON.parse(o):o}catch(t){u={ret:"500",msg:"callback result parse error"}}var l=u.ret,c=u.msg;"200"!==l&&r.fallbackReport(t,n),null===(i=r.options)||void 0===i||i.jsApiReportCallback({code:l,msg:c,step:n,event_type:t.eventName,pgid:null==t?void 0:t.pgid,eid:null===(a=null==t?void 0:t.businessParams)||void 0===a?void 0:a.eid,event_id:null===(s=null==t?void 0:t.publicParams)||void 0===s?void 0:s.dt_eventid_h5})}},t}();var ut=function(t,e,n,r,o){var i="";if("string"===typeof n)i="; expires="+n;else if(n instanceof Date)i="; expires="+n.toUTCString();else{i="; expires="+new Date(Date.now()+6048e5).toUTCString()}var a=r||location.hostname,s=o||"/";document.cookie=[t,"=",escape(e),i,";domain=",a,";path=",s].join("")},lt=function(t){for(var e={},n=document.cookie.split(";"),r=0,o=n.length;r<o;r++){var i=n[r].replace(/^\s+/,"").split("="),a=i[0],s=i[1];e[a]=s}return t?e[t]:e};function ct(t,e){var n=new XMLHttpRequest;n.open("POST",t,!0),n.timeout=1e4,n.setRequestHeader("content-type","application/x-www-form-urlencoded"),n.onreadystatechange=function(){4===n.readyState&&200!==n.status&&n.status},n.ontimeout=function(){n.abort()},n.send(e)}var pt=function(){function t(t){if(this.options=t,this.type="boss",!t.bossSet)throw new Error("[universalReport] please specify the bossSet");this.bossSet=t.bossSet}return t.prototype.init=function(){if(!lt("txv_boss_uuid")){ut("txv_boss_uuid",(t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)})()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t(),new Date(Date.now()+31536e6))}var t},t.prototype.report=function(t){var e=this.bossSet[t.eventName];
1if(e&&(this.isBeehive(e)||this.isAtta(e))){var n=this.formatBossData(e,t);ct(n.url,n.data)}},t.prototype.formatBossData=function(e,r){var o=[],i=Math.random().toString(36).substr(2,8),a="";this.isBeehive(e)?a=t.bossUrl+"?BossId="+e.BossId+"&Pwd="+e.Pwd+"&_dc="+i:this.isAtta(e)&&(a=t.attaUrl+"?attaid="+e.AttaId+"&token="+e.token+"&_dc="+i);var s=n(n(n({},e),F(r,"kv")),{dc:i});return Object.keys(s).forEach((function(t){o.push(t+"="+encodeURIComponent(s[t]))})),{url:a,data:o.join("&")}},t.prototype.isBeehive=function(t){return void 0!==t.BossId&&void 0!==t.Pwd},t.prototype.isAtta=function(t){return void 0!==t.AttaId&&void 0!==t.token},t.bossUrl="https://btrace./kvcollect",t.attaUrl="https://h.trace./kv",t}();var dt,ft,ht={app:function(t){return new st(t)},beacon:tt,boss:function(t){return new pt(t)}},vt=Object.keys(ht);(ft=dt||(dt={}))[ft.equal=0]="equal",ft[ft.low=-1]="low",ft[ft.high=1]="high";var gt=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z-]+(?:\.[\da-z-]+)*)?(?:\+[\da-z-]+(?:\.[\da-z-]+)*)?)?)?$/i;function mt(t){var e,n=t.replace(/^v/,"").replace(/\+.*$/,""),r=("-",-1===(e=n).indexOf("-")?e.length:e.indexOf("-")),o=n.substring(0,r).split(".");return o.push(n.substring(r+1)),o}function yt(t){return isNaN(Number(t))?t:Number(t)}function bt(t){if("string"!=typeof t)throw new TypeError("Invalid argument expected string");if(!gt.test(t))throw new Error("Invalid argument not valid semver
1('"+t+"' received)")}var wt=function(){function t(){this.eventsMap={}}return t.prototype.on=function(t,e){var n=this;t.split(",").forEach((function(t){n.eventsMap[t]||(n.eventsMap[t]=[]),n.eventsMap[t].push(e)}))},t.prototype.off=function(t,e){var n=this;t.split(",").forEach((function(t){n.removeListener(t,e)}))},t.prototype.emit=function(t){for(var e=this,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=[];this.eventsMap[t]&&this.eventsMap[t].slice().forEach((function(r){try{o.push(r.apply(e,n))}catch(n){o.push(null),e.processError(n,t)}}));return o},t.prototype.use=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t.slice(1);return n.apply(void 0,s([this],r))},t.prototype.processError=function(t,e){},t.prototype.removeListener=function(t,e){if(this.eventsMap[t]){var n=this.eventsMap[t].findIndex((function(t){return t===e}));n>-1&&this.eventsMap[t].splice(n,1)}},t}(),Pt=function(){},_t=function(t){function o(e,n,r,o){void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o="");var i=t.call(this)||this;return i.options=e,i.scenePlat=n,i.sceneVersion=r,i.hardwareOS=o,i.channelReady=!1,i.pool=[],i.loadChannel(e),i}return e(o,t),o.prototype.loadChannel=function(t){this.setChannel(t),this.initChannel(t)},o.prototype.setChannel=function(t){var e=t.channel,n=void 0===e?"app":e;if(~vt.indexOf(n))this.curChannel=ht[n](t);else if("function"==typeof n)this.curChannel=n(t);else{if("object"!=typeof n)throw new Error("[universalReport] channel must be "+vt.map((function(t){return'"'+t+'"'})).join(", ")+", a function or a object");this.curChannel=n}if("app"===n&&(this.curChannel.hardwareOS=this.hardwareOS),!this.curChannel.report)throw new Error("[universalReport] no report function found in channel")},o.prototype.isLowerThanRequiredVersion=function(){var t,e=null===(t=et[this.scenePlat])||void 0===t?void 0:t[this.hardwareOS];return!!e&&function(t,e){[t,e].forEach(bt);for(var n=mt(t),r=mt(e),o=0;o<Math.max(n.length-1,r.length-1);o++){var i=parseInt(n[o]||"0",10),a=parseInt(r[o]||"0",10);if(i>a)return dt.high;if(a>i)return dt.low}var s=n[n.length-1],u=r[r.length-1];if(s&&u){var l=s.split(".").map(yt),c=u.split(".").map(yt);for(o=0;o<Math.max(l.length,c.length);o++){if(void 0===l[o]||"string"==typeof c[o]&&"number"==typeof l[o])return-1;if(void 0===c[o]||"string"==typeof l[o]&&"number"==typeof c[o])return 1;if(l[o]>c[o])return dt.high;if(c[o]>l[o])return dt.low}}else if(s||u)return s?dt.low:dt.high;return dt.equal}(this.sceneVersion,e)<0},o.prototype.initChannel=function(t){var e,r=this,o=t.channel;Object.assign(t,{beaconFailCallback:function(t){var e=t.fail_case;r.emit(e,t)},jsApiReportCallback:function(t){r.emit("jsApiReport",t)}}),this.curChannel.init=null!==(e=this.curChannel.init)&&void 0!==e?e:Pt,Promise.resolve(this.curChannel.init(t)).then((function(t){var e;r.emit("initChannel",{report_type:o,result:0,deviceId:(null===(e=r.curChannel.beacon)||void 0===e?void 0:e.getDeviceId())||""}),"app"===r.curChannel.type&&r.emit("jsApiReport",n({step:nt,result:"success"},null!=t?t:{})),r.channelReady=!0;for(var i=null;i=r.pool.shift();)i.call(r)})).catch((function(t){var e,o=t,i=o.channel,a=o.reason;if("app"===r.curChannel.type&&r.emit("jsApiReport",{step:nt,result:"fail",reason:a}),!("string"==typeof(e=i)&&~vt.indexOf(e)||"function"==typeof e||"object"==typeof e&&"report"in e))throw t;r.loadChannel(n(n({},r.options),{channel:i}))})).catch((function(t){r.emit("initChannel",{report_type:o,result:1,err_message:t})}))},o.prototype.report=function(t){var e=this,o=t.uid,i=r(t,["uid"]),a=n({uid:o},i),s=function(){var t,n,r;e.curChannel.report(i),e.emit("report",a),i.monitoringReport&&e.emit("monitoringReport",{device_id:null===(t=e.curChannel.beacon)||void 0===t?void 0:t.getDeviceId(),report_type:e.curChannel.type,event_type:(null==i?void 0:i.eventName)||"",publicParams:null==i?void 0:i.publicParams}),i.monitoringJsApiReport&&e.emit("jsApiReport",{pgid:null==i?void 0:i.pgid,eid:null===(n=null==i?void 0:i.businessParams)||void 0===n?void 0:n.eid,step:rt,event_type:null==i?void 0:i.eventName,report_type:e.curChannel.type,event_id:null===(r=null==i?void 0:i.publicParams)||void 0===r?void 0:r.dt_eventid_h5})};this.channelReady?s():this.pool.push(s)},o}(wt),Et=Q((function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}
1Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualNode=void 0;var o=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=e||{},this.parent=null,this.children=[]}return r(t,null,[{key:"childIterator",value:function(t,e){for(var n=[t];n.length>0;){var r=n.shift(),o=e(r);if(!0===o)return o;!1!==o&&(r.children.length>0&&(n=r.children.concat(n)))}}},{key:"parentIterator",value:function(t,e,n){for(;t&&(n=e(t,n),t=t.parent,"boolean"!=typeof n||!n););}},{key:"parentReverseIterator",value:function(t,e,n,r){for(var o=[];t&&(o.push(t),t!==r);)t=t.parent;for(var i=o.length-1;i>=0&&("boolean"!=typeof(n=e(o[i],n))||!n);i--);}}]),r(t,[{key:"setData",value:function(t){Object.assign(this.data,t)}},{key:"mapParent",value:function(t){var e=[];if(this.parent)for(var n=this.parent;n;){var r=n;if("function"==typeof t&&(r=t(n)),"boolean"==typeof r&&r)break;e.push(r),n=n.parent}return e}},{key:"index",value:function(){var t=this.parent;return t?t.children.indexOf(this):0}},{key:"append",value:function(t){t&&(t.remove(),t.parent=this,this.children.push(t))}},{key:"insert",value:function(t,e){var n=this;e&&(e.forEach((function(t){t.remove(),t.parent=n})),Array.prototype.splice.apply(this.children,[t,0].concat(e)))}},{key:"remove",value:function(){var t=this.parent;this.parent=null,t&&(t.children=t.children.filter((function(e){return e.parent===t})))}},{key:"clear",value:function(){if(this.children.length>0){var t=this.children;this.children=[];for(var e=0,n=t.length;e<n;e++){t[e].parent=null}}}},{key:"destroy",value:function(){this.remove()}}]),t}();e.VirtualNode=o}));K(Et);Et.VirtualNode;var kt=Q((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.domIterator=function t(e,n,r,o){var i=n(e,r),a=e.childNodes;if("boolean"==typeof i)return i;for(var s=0,u=a.length;s<u;s++){var l=a[s];if(l&&1===l.nodeType)if(t(l,n,i))return!0}},e.domReverseIterator=function t(e,n,r,o){var i=n(e,r),a=e.childNodes;if("boolean"==typeof i)return i;for(var s=a.length-1;s>=0;s--){var u=a[s];if(u&&1===u.nodeType)if(t(u,n,i))return!0}},e.parentIterator=function(t,e,n){for(;t&&(n=e(t,n),t=t.parentNode,"boolean"!=typeof n||!n););},e.parentReverseIterator=function(t,e,n,r){var o=[];for(;t&&(o.push(t),t!==r);)t=t.parentNode;for(var i=o.length-1;i>=0&&("boolean"!=typeof(n=e(o[i],n))||!n);i--);},e.onlyElements=function(t){var e=[];if(t&&t[0])for(var n=t.length-1;n>=0;n--){var r=t[n];1===r.nodeType&&e.unshift(r)}return e}}));K(kt);kt.domIterator,kt.domReverseIterator,kt.parentIterator,kt.parentReverseIterator,kt.onlyElements;var St=Q((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.genHash=function(){return(new Date).getTime()+""+n++},e.debounce=function(t,e){var n=0;return e=e||0,function(){var r=this,o=arguments;clearTimeout(n),n=setTimeout((function(){t.apply(r,o)}),e)}},e.supportIntersectionObserver=void 0;var n=0;var r="undefined"!=typeof window&&window.IntersectionObserver&&window.IntersectionObserverEntry&&("isIntersecting"in window.IntersectionObserverEntry.prototype||"intersectionRatio"in window.IntersectionObserverEntry.prototype);e.supportIntersectionObserver=r}));K(St);St.genHash,St.debounce,St.supportIntersectionObserver;var Rt=Q((function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=void 0;var r=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.context=e,this.events={}}var e,r,o;return e=t,(r=[{key:"on",value:function(t,e){var n=this.events[t]||[];return n.push(e),this.events[t]=n,this}},{key:"off",value:function(t,e){if(void 0===e)this.events[t]=[];else for(var n=this.events[t]||[],r=n.length-1;r>=0;r--)if(n[r]===e){n[r]=null;break}return this}},{key:"emit",value:function(t,e,n){var r="click"===t,o=this.events[t]||[];"boolean"==typeof n&&(r=n);for(var i=o.length-1;i>=0;i--){var a=o[i];if("function"==typeof a)if(r)setTimeout((function(t,e,n){t.call(e,n)}),0,a,this.context,e);else try{a.call(this.context,e)}catch(t){}}return this}},{key:"clear",value:function(){this.events={}}},{key:"listeners",value:function(t){return this.events[t]||[]}}])&&n(e.prototype,r),o&&n(e,o),t}();e.Emitter=r}));K(Rt);Rt.Emitter;var It=Q((function(t,e){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e,n){return r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},r(t,e,n||t)}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),t}
1function a(t,e){return a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},a(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=l(t);if(e){var i=l(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;return u(t)}(this,r)}}function u(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.getWindowNode=y,e.VirtualElNode=void 0;var c="__doid",p={},d=new WeakMap,f=1,h=Math.random().toString(36).substring(2),v={click:!0,scroll:!0},g={click:!0},m=null;function y(){return m||((m=new w).scrollLeft=window.scrollX,m.scrollTop=window.scrollY,m.top=0,m.left=0,m.width=window.innerWidth,m.height=window.innerHeight,m.isScroller=!0,m.viewport=m.rect={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight},m.getScrollParent=function(){return null},m.attachScroller=function(t,e){t=t||window;var n=(e=e||{}).throttle,r=function(){var e=t.scrollX-m.scrollLeft,n=t.scrollY-m.scrollTop;m.scrollLeft=t.scrollX,m.scrollTop=t.scrollY,m.moveTree(e,n,!0),m.scrolling=!1,m.emitter.emit("scrollend")};if(n>0){var o=(0,St.debounce)(r,n);r=function(){m.scrolling=!0,o()}}t.addEventListener("scroll",r)},window.addEventListener("resize",(function(){m.width=window.innerWidth,m.height=window.innerHeight,m.viewport=m.rect={top:0,left:0,right:window.innerWidth,bottom:window.innerHeight},m.emit("resize")})),m)}var b=null;St.supportIntersectionObserver&&(b=new IntersectionObserver((function(t){t.forEach((function(t){var e=t.target,n=w.getNode(e);if(n){n.rect={top:t.boundingClientRect.top,bottom:t.boundingClientRect.bottom,left:t.boundingClientRect.left,right:t.boundingClientRect.right};var r=void 0!==t.isIntersecting?t.isIntersecting:t.intersectionRatio>0;n.visible!==r&&(n.visible=r,n.width=t.boundingClientRect.width,n.height=t.boundingClientRect.height,n.emit("visibilityChanged",r)),n.recalc()}}))})));var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&a(t,e)}(n,t);var e=s(n);function n(t,r,o){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(i=e.call(this,o)).uid=0,i.emitter=new Rt.Emitter(u(i)),i.unbinds={},i.width=0,i.height=0,i.effectiveWidth=0,i.effectiveHeight=0,i.top=0,i.left=0,i.scrollTop=0,i.scrollLeft=0,i.maxScrollTop=0,i.maxScrollLeft=0,i.maxIntersectArea=0,i.tree=t,i.el=r,i.lazy=!0,i.delegates={},i.visible=!1,i.pt=0,i.pl=0,i.overflowHide=!0,i.isScroller=!1,i.scrolling=!1,i.rect={top:0,left:0,right:0,bottom:0},i.viewport={top:0,left:0,right:0,bottom:0},i.attach(r),i}return i(n,null,[{key:"shouldBeNode",value:function(t){return t&&t.dataset.v}},{key:"getNode",value:function(t){return p[t[c]]}}]),i(n,[{key:"attach",value:function(t){var e=!1;if(this.detach(!0),t){var n=t[c];e=!n,this.el=t,e&&(n=h+"_"+f++,this.uid=t[c]=n,p[n]=this),this.updateData(t)}return e}},{key:"detach",value:function(t){var e=this.el,n=this.unbinds;if(this.unbinds={},e){var r=e[c];r&&(this.data.keepReport&&d.set(e,p[r]),p[r]=null,e[c]=null)}t&&this.emitter.clear(),Object.keys(n).forEach((function(t){try{n[t]()}catch(t){}}))}},{key:"updateData",value:function(t,e){if(t=t||this.el)if(e){var n=/data-([\w-]+)/.exec(e),r=n&&n[1];if(r){var o={};o[r]=t.dataset[r],this.setData(o)}}else this.setData(t.dataset),t.dataset.scroller&&this.attachScroller(t)}},{key:"attachScroller",value:function(t,e){var n=this;if(!St.supportIntersectionObserver){var r=function(){var e=t.scrollLeft-n.scrollLeft,r=t.scrollTop-n.scrollTop;n.scrollTop=t.scrollTop,n.scrollLeft=t.scrollLeft,n.maxScrollTop=Math.max(n.maxScrollTop,n.scrollTop),n.maxScrollLeft=Math.max(n.maxScrollLeft,n.scrollLeft),n.moveTree(e,r,!0),n.scrolling=!1,n.emitter.emit("scrollend")},o=(e=e||{}).throttle;if(o>0){var i=(0,St.debounce)(r,o);r=function(){n.scrolling=!0,i()}}this.scrollTop=t.scrollTop,this.scrollLeft=t.scrollLeft,this.isScroller=!0,this.on("scroll",r)}}},{key:"getScrollParent",value:function(){for(var t=this.parent;t&&!t.isScroller;)t=t.parent;return t||y()}},{key:"getScrollingParent",value:function(){for(var t=this.getScrollParent();t&&!t.scrolling;)t=t.getScrollParent();return t&&t.scrolling?t:void 0}},{key:"getRect",value:function(){return this.rect}},{key:"recalc",value:function(){var t=this;if(!St.supportIntersectionObserver){var e=this.el;if(e){var n=this.getScrollParent(),r=this.getScrollingParent();if(r)return this.scrollEndHandle&&r.emitter.off("scrollend",this.scrollEndHandle),this.scrollEndHandle=function(){t.recalc(),r.emitter.off("scrollend",t.scrollEndHandle),t.scrollEndHandle=null},void r.emitter.on("scrollend",this.scrollEndHandle);var o=e.getBoundingClientRect(),i=n.getRect(),a=this.top=o.top-i.top+n.scrollTop,s=this.left=o.left-i.left+n.scrollLeft;
1this.width=o.width,this.height=o.height,this.isScroller?(this.scrollTop=this.el.scrollTop,this.scrollLeft=this.el.scrollLeft,this.pt=n.pt+a-this.scrollTop,this.pl=n.pl+s-this.scrollLeft,this.effectiveWidth=e.scrollWidth||this.effectiveWidth,this.effectiveHeight=e.scrollHeight||this.effectiveHeight):(this.effectiveWidth=o.width||this.effectiveWidth,this.effectiveHeight=o.height||this.effectiveHeight);var u=this.rect.top!==o.top||this.rect.left!==o.left||this.rect.right!==o.right||this.rect.bottom!==o.bottom;return this.rect.top=o.top,this.rect.left=o.left,this.rect.right=o.right,this.rect.bottom=o.bottom,this.calcViewPort(),this.syncVisible(),u}}}},{key:"move",value:function(t,e){this.isScroller&&(this.pt=this.pt-e,this.pl=this.pl-t);var n=this.rect;n.top=n.top-e,n.left=n.left-t,n.right=n.right-t,n.bottom=n.bottom-e,this.calcViewPort(),this.syncVisible()}},{key:"calcViewPort",value:function(){if(!St.supportIntersectionObserver){var t=this.rect,e=this.parent||y(),n=this.viewport,r=e.viewport;this.overflowHide?(n.top=Math.max(t.top,r.top),n.left=Math.max(t.left,r.left),n.right=Math.min(t.right,r.right),n.bottom=Math.min(t.bottom,r.bottom)):(n.top=r.top,n.left=r.left,n.right=r.right,n.bottom=r.bottom)}}},{key:"calcExposeArea",value:function(){var t=this.rect,e=this.viewport,n=Math.max(t.left,e.left),r=Math.min(t.right,e.right),o=Math.max(e.bottom-t.top,0);return Math.max(o*(r-n),0)}},{key:"updateNode",value:function(){this.maxScrollTop=this.scrollTop,this.maxScrollLeft=this.scrollLeft,this.effectiveWidth=this.width,this.effectiveHeight=this.height,this.maxIntersectArea=this.calcExposeArea()}},{key:"syncVisible",value:function(){if(!St.supportIntersectionObserver){var t=this.calcVisible();return t!==this.visible?(this.visible=t,t&&this.updateNode(),this.emitter.emit("visibilityChanged",t),!0):void 0}}},{key:"moveTree",value:function(t,e,r){var o,i=this;if(this.el&&!r&&((0,kt.parentIterator)(this.el,(function(t){if(i.el!==t&&n.getNode(t))return!0;if(1!==t.nodeType)return!0;var e=getComputedStyle(t);return("fixed"===e.position||"sticky"===e.position)&&(o=t,!0)})),o))return;r||this.move(t,e);for(var a=this.children.length-1;a>=0;a--)this.children[a].moveTree(t,e)}},{key:"calcVisible",value:function(){var t=this.rect,e=(this.parent||y()).viewport,n=Math.max(this.calcExposeArea(),this.maxIntersectArea||0);return this.maxIntersectArea=Math.max(n,0),!(t.left>=e.right||t.right<=e.left||t.top>=e.bottom||t.bottom<=e.top)}},{key:"destroy",value:function(){r(l(n.prototype),"destroy",this).call(this),this.detach()}},{key:"on",value:function(t,e){var r=this,o=this.emitter;if(o.on(t,e),v[t]){var i=this.unbinds,a=this.el;if(!i[t]){if(g[t]){var s=this.tree.root;if(s&&!s.delegates[t]&&s.el){var u=s.delegates[t]=function(e){var r=e.target,o=n.getNode(r)||d.get(r);!o||o.lazy||e["_vn_id_"+o.uid]||(o.emitter.emit(t,e,o.lazy),e["_vn_id_"+o.uid]=!0)};s.el.addEventListener(t,u)}}var l=function(e){if(!e["_vn_id_"+r.uid]){if(r.stopBubbleFlag){if(e.reported)return;e.reported=!0}o.emit(t,e,r.lazy),e["_vn_id_"+r.uid]=!0}};a.addEventListener(t,l),i[t]=function(){a.removeEventListener(t,l)}}}else if(St.supportIntersectionObserver&&"visibilityChanged"===t){var c=this.unbinds;if(!c[t]){var p=this.el;b.observe(p),c[t]=function(){b.unobserve(p)}}}return this}},{key:"off",value:function(t,e){return this.emitter.off(t,e),this}},{key:"emit",value:function(t,e){return this.emitter.emit(t,e),this}}]),n}(Et.VirtualNode);e.VirtualElNode=w}));K(It);It.getWindowNode,It.VirtualElNode;var Ot=Q((function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}Object.defineProperty(e,"__esModule",{value:!0}),e.VirtualElTree=e.ATTR_MUT_REFLOW_HASH=e.ATTR_MUT_UPDATE_HASH=e.RECALC_HASH=e.TMP_ID=void 0;var o="__tmpid";e.TMP_ID=o;var i="__rechash";e.RECALC_HASH=i;var a="__atmuhash";e.ATTR_MUT_UPDATE_HASH=a;var s="__atmrhash";e.ATTR_MUT_REFLOW_HASH=s;var u=new WeakMap,l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.NodeClass=e||It.VirtualElNode,this.root=null,this.observer=null,this.rootDom=null}return r(t,null,[{key:"getVtreeMap",value:function(){return u}}]),r(t,[{key:"attach",value:function(t){var e=this,n=this.NodeClass;if(!n.shouldBeNode(t))throw new Error("root should be a node");this.rootDom=t,this.root=n.getNode(t)||new n(this,t),this.update({el:t}),this.reflow({el:t}),this.observer=new MutationObserver((function(t){var n=e.mut(t),r=n.updateArr,o=n.reflowArr;r&&r.length>0&&e.update(r),o&&o.length>0&&e.reflow(o)})),this.observer.observe(t,{characterData:!0,attributes:!0,childList:!0,subtree:!0})}},{key:"detach",value:function(){t.getVtreeMap().delete(this.rootDom),this.remove({all:[this.root.el]},Date.now())}},{key:"update",value:function(t){var e=this,n=(0,St.genHash)();
1(t instanceof Array?t:[t]).forEach((function(t){e[t.action||"add"](t,n)}))}},{key:"createTree",value:function(t,e,n){var r=this,o=this.NodeClass,i=[];return(0,kt.domIterator)(t,(function(t,e){if(o.shouldBeNode(t)){var n=o.getNode(t);return n?n.clear():n=new o(r,t),e?e.append(n):i.push(n),n}return e}),n),i}},{key:"add",value:function(t,e){var n=this.NodeClass,r=t.el,o=[];t.all=t.all||[t.el];for(var i=0,a=t.all.length;i<a;i++){var s=t.all[i];o=o.concat(this.createTree(s,e))}if(0!==o.length){var u=null,l=null;(0,kt.parentIterator)(r,(function(t){if(r!==t&&(u=n.getNode(t)))return!0;for(var e=t.previousElementSibling;e&&((0,kt.domReverseIterator)(e,(function(t){if(l=n.getNode(t))return!0})),!l);)e=e.previousElementSibling;return!!l})),!l&&u?u.insert(0,o):l&&(u=u||l.parent)&&u.insert(u.children.indexOf(l)+1,o)}}},{key:"remove",value:function(t){var e=this.NodeClass;t.all=t.all||[t.el];for(var n=0,r=t.all.length;n<r;n++){var o=t.all[n];(0,kt.domIterator)(o,(function(t){var n=e.getNode(t);n&&n.destroy()}))}}},{key:"reflow",value:function(t){var e=this;if(!St.supportIntersectionObserver){var n=null,r=(0,St.genHash)(),a=this.NodeClass,s=1===(n=t instanceof Array?t:[t]).length&&a.getNode(n[0]);if(!s){var u={},l=0,c=Math.floor(1e4*Math.random())+"";n.forEach((function(t){var e=t&&t.el;if(e){var n=c+l++;e[o]=n,u[n]=t}}));for(var p=[this.root.el];p.length>0;){var d=p.shift();if(s=a.getNode(d)||s,u[d[o]]&&s)break;d&&d.children&&d.children.length>0&&(p=[].slice.call(d.children).concat(p))}}s&&(Et.VirtualNode.parentReverseIterator(s,(function(t){if(t.el&&t.el[i]!==r&&(t.el[i]=r,t.recalc(),e.root!==t))for(var n=t.parent?t.parent.children:[],o=n.indexOf(t),a=n.length;o<a;){var s=n[o];if(Et.VirtualNode.childIterator(s,(function(t){t.el[i]!==r&&(t.el[i]=r,t.recalc())})))break;o++}}),null,this.root),Et.VirtualNode.childIterator(s,(function(t){s!==t&&t.el[i]!==r&&(t.el[i]=r,t.recalc())})))}}},{key:"getNearReportNodes",value:function(t){var e=this;return t.map((function(t){var n=t.el,r=e.getSiblingReportNode(n);return r||(0,kt.parentIterator)(n,(function(t){if(r=e.getSiblingReportNode(t))return!0})),r||t}))}},{key:"getSiblingReportNode",value:function(t){for(var e=t,n=null;e&&!(n=this.NodeClass.getNode(e));)e=e.nextElementSibling;return n}},{key:"mut",value:function(t){for(var e=[],n=[],r=(0,St.genHash)(),o=this.NodeClass,i=0;i<t.length;i++){var u=t[i],l=u.target;if("childList"===u.type){var c=(0,kt.onlyElements)(u.addedNodes),p=(0,kt.onlyElements)(u.removedNodes),d=u.previousSibling;if(c[0]&&e.push({el:c[0],action:"add",all:c}),p[0]&&e.push({el:p[0],action:"remove",all:p}),d&&1!==d.nodeType&&(d=d.previousElementSibling),d){var f=d.nextElementSibling;f?n.push({el:f}):l&&n.push({el:l,ignoreChild:!0})}else l&&n.push({el:l})}else if("attributes"===u.type){if(!l)return;var h=u.attributeName;l[s]===r||"class"!==h&&"style"!==h||(l[s]=r,n.push({el:l}));var v=o.getNode(l),g=o.shouldBeNode(l);v&&!g||!v&&g&&(l[a]!==r&&(l[a]=r,e.push({el:l,action:"add",all:[l]})),l[s]!==r&&(l[s]=r,n.push({el:l}))),v&&v.updateData(l,h,r)}else{if(!l)return;1!==l.nodeType&&(l=l.parentNode),n.push({el:l})}}return{updateArr:e,reflowArr:n}}}]),t}();e.VirtualElTree=l}));K(Ot);Ot.VirtualElTree,Ot.ATTR_MUT_REFLOW_HASH,Ot.ATTR_MUT_UPDATE_HASH,Ot.RECALC_HASH,Ot.TMP_ID;var Tt={VirtualNode:Et.VirtualNode,VirtualElTree:Ot.VirtualElTree,VirtualElNode:It.VirtualElNode,ATTR_MUT_HASH:Ot.ATTR_MUT_HASH,getWindowNode:It.getWindowNode,Emitter:Rt.Emitter,domHelper:kt},Ct=Q((function(t,e){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.kvStringToObject=function(t){var e={};if("string"==typeof t)for(var n=t.split("&"),r=0,o=n.length;r<o;r++){var i=n[r],a=/^([^=]+)=(.*)$/.exec(i);if(a)try{e[a[1]]=decodeURIComponent(a[2])}catch(t){}}return e},e.objectToKvString=function(t){return Object.keys(t).map((function(e){return e+"="+encodeURIComponent(t[e])})).join("&")},e.isDom=function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":n(HTMLElement))?t instanceof HTMLElement:t&&"object"===n(t)&&1===t.nodeType&&"string"==typeof t.nodeName}}));K(Ct);Ct.kvStringToObject,Ct.objectToKvString,Ct.isDom;var xt=Q((function(t,e){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},o(t,e,n||t)}
1function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.ReportNode=void 0;var u=[],l=[],c="data-ofhide",p="data-scroller",d="data-lazy",f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(g,t);var e,f,h,v=a(g);function g(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),(r=v.call(this,t,e,n)).lazy=!1,r.lastHash=0,r}return e=g,h=[{key:"addConfig",value:function(t){t instanceof Array||(t=[t]);var e={},r=[],o={};u=u.concat(t.map((function(t){var i=t.attrs,a=t.events,s=[];return t.overflowHide&&(c=t.overflowHide),t.isScroller&&(p=t.isScroller),t.lazy&&(d=t.lazy),i&&Object.keys(i).forEac
1h((function(t){var a;e[t]||(e[t]=!0,l.push(t));var s=i[t];if("boolean"==typeof s?a=function(e){var n=!1;return s&&(n=this.data[t]!==e,this.data[t]=e),n}:"JSON"==s?a=function(t){try{this.setData(JSON.parse(t))}catch(t){}return!0}:"KV"==s?a=function(t){return this.setData((0,Ct.kvStringToObject)(t)),!0}:"string"==typeof s?a=function(t){var e=this.data[s]!==t;return this.data[s]=t,e}:"object"==n(s)?a=function(e){var n,r=s.prop||t,o=s.dataType;if("JSON"==o)try{n=JSON.parse(e)}catch(t){}else n="KV"==o?(0,Ct.kvStringToObject)(e):e;return this.data[r]=n||{},!0}:"function"==typeof s&&(a=s),a){var u={name:t,func:a};r.push(u),o[t]=u}})),a&&(s=Object.keys(a).map((function(t){var e=a[t],n={name:t,action:e.action},r=e.condition;return"string"==typeof r?(n.condition=function(t){return t[r]},"click"!=t&&(n.keyAttrs=[r])):r instanceof Array?(n.condition=function(t){for(var e=0;r[e];){if(t[r[e]])return!0;e++}return!1},"click"!=t&&(n.keyAttrs=r)):n.condition="function"==typeof r?r:function(){return!0},e.keyAttrs&&(n.keyAttrs=e.keyAttrs),n}))),{arr:r,map:o,events:s,stopBubbleFlag:t.stopBubbleFlag}})))}},{key:"shouldBeNode",value:function(t){var e=t.attributes;return!!Tt.VirtualElTree.getVtreeMap().get(t)||!!(e[c]||e[p]||e[d])||l.some((function(t){return e[t]}))}}],(f=[{key:"updateData",value:function(t,e,n){var r=this,o=t.attributes,i=function(e){var n=o[e.name];if(n)return e.func.call(r,n.value,t)};u.forEach((function(a){var s=!1;if(r.stopBubbleFlag=a.stopBubbleFlag,void 0===e)a.arr.forEach(i);else{var u=a.map[e];u&&(s=i(u))}a.events.forEach((function(i){var a=i.name;r.off(a,i.action),i.condition.call(r,o,t)&&r.on(a,i.action);var u=i.keyAttrs;u instanceof Array&&e&&s&&u.indexOf(e)>-1&&(!n||n!=r.lastHash)&&(r.lastHash=n,"expose"===a?r.visible&&r.emit(a):r.emit(a))}))})),void 0===e?(this.updateOfData(o,t),this.updateScrollData(o,t),this.updateLazyData(o,t)):e==c?this.updateOfData(o,t):e==p?this.updateScrollData(o,t):e==d&&this.updateLazyData(o,t),this.update(t,e,n)}},{key:"update",value:function(t,e,n){}},{key:"updateOfData",value:function(t,e){var n=t[c];this.overflowHide=!(n&&"false"===n.value)}},{key:"updateScrollData",value:function(t,e){t[p]?this.attachScroller(e):this.off("scroll")}},{key:"updateLazyData",value:function(t,e){var n=t[d];this.lazy=!(!n||"true"!==n.value)}},{key:"on",value:function(t,e){var n=this,r="expose"==t&&this.emitter.listeners("expose").length<=0;return o(s(g.prototype),"on",this).call(this,t,e),r&&o(s(g.prototype),"on",this).call(this,"visibilityChanged",(function(t){t?n.emit("expose"):n.emit("hide")})),this}},{key:"getParam",value:function(t,e){var n=this,r=e||{},o=[];return t.forEach((function(t){(r[t]=r[t]||n.data[t])||o.push(t)})),o.length>=0&&this.mapParent((function(t){var e=t.data||{};return 0===(o=o.filter((function(t){return!(r[t]=e[t])}))).length})),r}}])&&r(e.prototype,f),h&&r(e,h),g}(Tt.VirtualElNode);e.ReportNode=f}));K(xt);xt.ReportNode;var Nt=Q((function(t,e){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function o(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}function i(t,e){return i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},i(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=u(t);if(e){var i=u(this).constructor;r=Reflect.construct(o,arguments,i)}else r=o.apply(this,arguments);return function(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function s(t,e,n){return s="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},s(t,e,n||t)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}
1Object.defineProperty(e,"__esModule",{value:!0}),e.ReportTree=void 0;var l=null,c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(n,t);var e=a(n);function n(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=e.call(this,t||xt.ReportNode)).commonData={},r.pageData={},r.lastPageData={},r}return o(n,null,[{key:"attachGlobal",value:function(t){return l=this.attachDom(document.body,t)}},{key:"attachDom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,e=arguments.length>1?arguments[1]:void 0;if(!(0,Ct.isDom)(t))throw new Error('parameter 1 is not of type "Node"');var r=s(u(n),"getVtreeMap",this).call(this).get(t)||null;return r||(r=new this(e),s(u(n),"getVtreeMap",this).call(this).set(t,r),r.attach(t),(0,Tt.getWindowNode)().on("resize",(function(){r.reflow(r.root)})),(0,Tt.getWindowNode)().attachScroller(window,{throttle:200}),(0,Tt.getWindowNode)().append(r.root),r)}},{key:"detachDom",value:function(t){if(!(0,Ct.isDom)(t))throw new Error('parameter 1 is not of type "Node"');var e=s(u(n),"getVtreeMap",this).call(this).get(t)||null;e&&(e.observer.disconnect(),e.detach())}},{key:"getGlobalTree",value:function(){return l}}]),o(n,[{key:"pv",value:function(){}},{key:"setCommon",value:function(t){Object.assign(this.commonData,t)}},{key:"setPage",value:function(t){Object.assign(this.pageData,t)}},{key:"setLastPage",value:function(t){Object.assign(this.lastPageData,t)}}]),n}(Tt.VirtualElTree);e.ReportTree=c}));K(Nt);Nt.ReportTree;var At=Nt.ReportTree,Dt=xt.ReportNode,jt={ReportTree:At,ReportNode:Dt,getWindowNode:Tt.getWindowNode,init:function(t){Dt.addConfig(t),At.attachGlobal()}},Mt=function(t,e,n){void 0===e&&(e="expose"),t&&t.length&&t.forEach((function(t){t&&(t.visible&&(n?n(t):t.emit(e)),Mt(t.children,e,n))}))},Bt=function(t){return{top:Math.round(t.top),bottom:Math.round(t.bottom),left:Math.round(t.left),right:Math.round(t.right)}};var Ut=function(t){var e,n=null==t?void 0:t.el;return null===(e=null==n?void 0:n.hasAttribute)||void 0===e?void 0:e.call(n,"dt-pgid")},Lt=function(t,e){var n,r,o,i;if(t){for(var a=null,s=t;!a&&s;)if(a=null!==(r=null===(n=s.data)||void 0===n?void 0:n[e])&&void 0!==r?r:"",s=s.parent,!a&&Ut(s)){a=null!==(i=null===(o=s.data)||void 0===o?void 0:o[e])&&void 0!==i?i:"";break}return a}},Vt=function(t){return t?jt.ReportNode.getNode(t):null};function Ht(t,e){var r;Object.assign(t,{observer:jt}),function(t){var e=t.observer,n=t.isEnablePlugin;if(e){var r=e.ReportNode.prototype,o=r.update;if(r.update=function(e,n,r){var i,a;o.call(this,e,n,r);var s=this.data.pgid||"",u=null===(a=null===(i=this.data)||void 0===i?void 0:i.cmd)||void 0===a?void 0:a.hold;"dt-pgid"===n&&this.oldPgid&&s!==this.oldPgid?t.emit("pageIdChange",e,this.oldPgid):"dt-params"===n&&s?t.emit("pageParamsChange",e,s):"dt-cmd"===n&&"false"===u&&u!==this.oldHold&&Mt([this],"expose",null),this.oldPgid=s,this.oldHold=u||"false"},n){var i=[],a=!1;t.on("viewPluginReady",(function(){a=!0;for(var t=null;t=i.shift();)t()}));var s=function(t){a?t():i.push(t)},u=r.append;r.append=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=u.apply(this,n);return s((function(){t.emit("mutation",{action:"append",node:e})})),o};var l=r.insert;r.insert=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=l.apply(this,n),i=n[1]||[];return s((function(){t.emit("mutation",{action:"insert",node:e,data:i})})),o};var c=r.updateData;r.updateData=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=c.apply(this,n);return s((function(){var n=e.emitter,r=n.events.click,o=n.events.expose;t.emit("mutation",{action:"updateData",node:e,data:{data:e.data,exp:o?1:void 0,cli:r?1:void 0,of:e.overflowHide?void 0:1}})})),o};var p=r.calcViewPort;r.calcViewPort=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=p.apply(this,n);return s((function(){t.emit("mutation",{action:"calcViewPort",node:e,data:{viewport:Bt(e.viewport)}})})),o};var d=r.recalc;r.recalc=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=d.apply(this,n);return s((function(){t.emit("mutation",{action:"recalc",node:e,data:{viewport:Bt(e.viewport)}})})),o};var f=r.move;r.move=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=f.apply(this,n);return s((function(){t.emit("mutation",{action:"move",node:e,data:{viewport:Bt(e.viewport),rect:Bt(e.rect)}})})),o};var h=r.remove;r.remove=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return s((function(){t.emit("mutation",{action:"remove",node:e})})),h.apply(this,n)};var v=r.clear;r.clear=function(){for(var e=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return s((function(){t.emit("mutation",{action:"clear",node:e})})),v.apply(this,n)}}}}(t);var o={click:{condition:["dt-eid"],action:function(){var e=Lt(this,"pgid")||t.pageManager.fixPgid(),r=this.data.eid,o=Lt(this,"cmd")||{},i="true"===this.data.clckIgnore,a="true"===this.data.sendBeacon,s=t.pageManager.hasPage(e);e&&r&&"true"!==o.hold&&!i&&s&&t.reportElement(this.el,{pgid:e,eventName:b.CLCK,eventTime:Date.now(),businessParams:n({eid:r},this.data.params),isSendBeacon:a})}},expose:{condition:["dt-pgid","dt-eid"],action:function(){var e=Lt(this,"pgid"),r=Lt(this,"cmd")||{};if(e&&"true"!==r.hold)if(Ut(this)){var o="true"===this.data.pgIgnore,i="true"===this.data.pginIgnore;if(o||i)return;var a=t.firstPVReportMap[e];if(t.setFirstPVFlag(e,"reported"),"first_reported"===a)return;t.reportPV(e)}else{var s=this.data.eid,u="true"===this.data.impIgnore||"true"===this.data.impStartIgnore,l="true"===this.data.impOnce,c=t.pageManager.hasPage(e);if(!s||u||l&&this.data.impReported||!c)return;this.data.impReported=!0,t.reportElement(this.el,{pgid:e,eventName:b.IMP,eventTime:Date.now(),businessParams:n({eid:s},this.data.params)})}}},hide:{condition:["dt-pgid","dt-eid"],action:function(){var e=Lt(this,"pgid"),r=Lt(this,"cmd")||{};if(e&&"true"!==r.hold)if(Ut(this)){var o="true"===this.data.pgIgnore,i="true"===this.data.pgoutIgnore;if(o||i)return;t.reportPgOut(e)}else{var a=this.data.eid,s="true"===this.data.impIgnore||"true"===this.data.impEndIgnore,u="true"===this.data.impOnce,l=t.pageManager.hasPage(e);if(!a||s||u&&this.data.impEndReported||!l)return;this.data.impEndReported=!0;var c=this.effectiveWidth*this.effectiveHeight,p=this.isScroller?
1(this.maxScrollLeft+this.width)*(this.maxScrollTop+this.height):this.maxIntersectArea,d=c?Math.min(p/c,1):0,f=this.el.showTime,h={dt_element_area:c.toFixed(2),dt_ele_imp_area:p.toFixed(2),dt_element_lvtm:f?Date.now()-this.el.showTime:0,dt_ele_imp_rate:d.toFixed(2)};t.reportElement(this.el,{pgid:e,eventName:b.IMPEND,eventTime:Date.now(),publicParams:n({},h),businessParams:n(n({eid:a},G(h)),this.data.params)})}}}};jt.ReportNode.addConfig({isScroller:"dt-scroll",overflowHide:"dt-overflow-hide",lazy:"dt-lazy",stopBubbleFlag:e,attrs:(r={},r["dt-pgid"]="pgid",r["dt-eid"]="eid",r["dt-params"]={prop:"params",dataType:"KV"},r["dt-cmd"]={prop:"cmd",dataType:"KV"},r["dt-pg-ignore"]="pgIgnore",r["dt-pgin-ignore"]="pginIgnore",r["dt-pgout-ignore"]="pgoutIgnore",r["dt-imp-ignore"]="impIgnore",r["dt-imp-end-ignore"]="impEndIgnore",r["dt-imp-start-ignore"]="impStartIgnore",r["dt-clck-ignore"]="clckIgnore",r["dt-send-beacon"]="sendBeacon",r["dt-imp-once"]="impOnce",r["dt-keep-report"]="keepReport",r),events:o}),Object.assign(t,{eventsConfig:o})}var qt=Object.prototype.hasOwnProperty;function Wt(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}var Jt,Ft,zt,Gt,Kt,Qt,$t={stringify:function(t,e){e=e||"";var n,r,o=[];for(r in"string"!=typeof e&&(e="?"),t)if(qt.call(t,r)){if((n=t[r])||null!=n&&!isNaN(n)||(n=""),r=encodeURIComponent(r),n=encodeURIComponent(n),null===r||null===n)continue;o.push(r+"="+n)}return o.length?e+o.join("&"):""},parse:function(t){for(var e,n=/([^=?&]+)=?([^&]*)/g,r={};e=n.exec(t);){var o=Wt(e[1]),i=Wt(e[2]);null===o||null===i||o in r||(r[o]=i)}return r}},Xt=function(){function t(){this.pageMap={}}return t.prototype.hasPage=function(t){return t&&!!this.pageMap[t]},t.prototype.addPage=function(t){var e,r=null===(e=null==t?void 0:t.pageParams)||void 0===e?void 0:e.pgid,o=q(null==t?void 0:t.pageRoot);if(r&&o){var i=$t.parse(V("ref_pg")||""),a=$t.parse(V("ref_ele")||"");this.pageMap[r]=n(n({},t),{pageParams:n({ref_pg:i.pgid?i:{},ref_ele:a.eid?a:{}},t.pageParams),pageRoot:o})}else;},t.prototype.getPage=function(t){return this.hasPage(t)?this.pageMap[t]:null},t.prototype.setPage=function(t){var e,r=null===(e=null==t?void 0:t.pageParams)||void 0===e?void 0:e.pgid,o=this.pageMap[r];this.hasPage(r)&&(this.pageMap[r]=n(n(n({},o),t),{pageParams:n(n({},o.pageParams),t.pageParams)}))},t.prototype.removePage=function(t){this.hasPage(t)&&delete this.pageMap[t]},t.prototype.updatePage=function(t){var e,n;if(this.hasPage(t)){var r=Number(null!==(n=null===(e=this.getPage(t).pageParams)||void 0===e?void 0:e.pg_stp)&&void 0!==n?n:0)+1;this.setPage({pageParams:{pgid:t,pg_stp:r},showTime:Date.now(),clckFlag:"0"})}},t.prototype.fixPgid=function(t){if(t)return t;var e=Object.keys(this.pageMap);return 1===e.length?e[0]:""},t}(),Yt=["dt_omgid"],Zt=function(){function t(t){void 0===t&&(t={}),this.clientInfo=new L(navigator.userAgent).getResult(),this.init();var e=function(t){void 0===t&&(t={});var e=n({weibo:/Weibo/i},t),r="",o="";return{scenePlat:Object.keys(e).some((function(t){r=t;var n=navigator.userAgent.match(e[t]);return n&&2===n.length&&(o=n[1]),n}))?r:"",sceneVersion:o}}(t.scenePlat);this.set(n(n({},t.publicParams),{web_version:t.version||"",scenes_plat:e.scenePlat,scenes_version:e.sceneVersion}),"publicParams").set(t.accountInfo||E,"accountInfo")}return t.prototype.init=function(){var t,e,n,r,o,i,a=this.clientInfo,s=a.os,u=a.device,l=a.engine;this.publicParams={platform:(i=this.clientInfo,void 0===i.device.type?"pc":i.device.type),hardware_os:(null===(t=s.name)||void 0===t?void 0:t.toLowerCase())||"",os_version:s.version||"",target_sdk:parseInt(s.version,10)||0,resolution:window.screen.width*window.devicePixelRatio,dpi:W(),brand:(null===(e=u.vendor)||void 0===e?void 0:e.toLowerCase())||"",mf:(null===(n=u.vendor)||void 0===n?void 0:n.toLowerCase())||"",model:(null===(r=u.model)||void 0===r?void 0:r.toLowerCase())||"",web_version:"",web_core_type:(null===(o=l.name)||void 0===o?void 0:o.toLowerCase())||"",web_core_version:l.version||"",web_channel:V("web_channel")||"",scenes_plat:"",network_type:navigator.connection?navigator.connection.effectiveType:"unknown",dt_sdkversion_h5:"1.0.14",dt_omgid:lt("video_omgid")||"",dt_omgbzid:"",dt_sessionid_h5:(new Date).getTime()+Math.random().toString().slice(2,5)}},t.prototype.get=function(t){return t?this.publicParams[t]:this.publicParams},t.prototype.set=function(e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n="publicParams");var o=t.checkRules[n];if(o)return Object.keys(e).filter((function(t){return o(t)}
1)).forEach((function(t){r.publicParams[t]=e[t]})),this},t.prototype.remove=function(e){var n=this;void 0===e&&(e="");var r=t.checkRules.publicParams;(Array.isArray(e)?e:[e]).forEach((function(t){r(t,'[universalReport] "'+t+'" cannot be deleted')&&delete n.publicParams[t]}))},t.prototype.getPublicPageParams=function(t){var e,n,r,o;return{url:window.location.href,ref_url:document.referrer,dt_pgid:null!==(e=t.pgid)&&void 0!==e?e:"",dt_ref_pgid:null!==(r=null===(n=t.ref_pg)||void 0===n?void 0:n.pgid)&&void 0!==r?r:"",dt_pgstp:null!==(o=t.pg_stp)&&void 0!==o?o:1}},t.checkRules=((Jt={}).publicParams=function(t,e){var n=-1!==String(t).indexOf("dt_")&&Yt.indexOf(t)<0;return!n},Jt.accountInfo=function(t){return Object.keys(E).includes(t)},Jt),t}(),te=function(){function t(){this.privateParams={}}return t.prototype.set=function(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=[]),t&&n.length?(this.privateParams[t]={value:e,events:n},this):this},t.prototype.get=function(t){return t?this.privateParams[t]:this.privateParams},t.prototype.remove=function(t){t&&delete this.privateParams[t]},t.prototype.getEventPrivateParams=function(t){return Object.entries(this.privateParams).filter((function(e){return e[1].events.includes(t)})).reduce((function(t,e){var n;return Object.assign(t,((n={})[e[0]]=e[1].value,n))}),{})},t}(),ee=(Ft=new Promise((function(t,e){return e()})),zt=!1,Gt=null,Kt=[],Qt=function(){for(var t=null;t=Kt.shift();)t(Gt);zt=!0},Ft.then((function(){return i(void 0,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,new Promise((function(t){if(!window.TenvideoJSBridge)return t(null);window.TenvideoJSBridge.invoke("getDeviceInfo",null,(function(e){var n,r="";try{r=JSON.parse(e)}catch(t){}r.result||t(null),t({os_vrsn:null!==(n=r.result.systemVersion)&&void 0!==n?n:""})}))}))];case 1:return Gt=t.sent(),Qt(),[2]}}))}))})).catch((function(){Qt()})),function(t,e,r){return n(n({},r),{value:function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=r.value;zt?o.apply(this,e):Kt.push((function(n){o.apply(t,s(e,[n]))}))}})}),ne=function(){function t(t,e){this.options=t,this.channel=new _t(n(n({},this.options),{channel:"boss"})),this.init(e)}return t.prototype.init=function(t,e){void 0===e&&(e={}),this.convertPublicParams(t,n(n({},e),this.options.publicParams))},t.prototype.report=function(t){var e=this.convertContext(t);this.channel.report(e)},t.prototype.convertContext=function(t){var e,r,o=t.publicParams,i=this.publicParams,a=null!==(e=t.pageParams)&&void 0!==e?e:{},s=null!==(r=t.businessParams)&&void 0!==r?r:{};return i=n(n({},i),{url:o.url,ref_url:o.ref_url,ei:t.eventName.replace("dt_",""),ctime:t.eventTime,eventid:o.dt_eventid_h5}),!this.options.formatMode&&s.element_params&&(s=s.element_params.reduce((function(t,e){return n(n({},e),t)}),{})),a=H(a,at.concat(["pg_stp"])),i=H(i,at),s=H(s,at),n(n({},t),{publicParams:i,pageParams:a,businessParams:s})},t.prototype.convertPublicParams=function(t,e){var r=["android","ios"].indexOf(t.hardware_os)+1;this.publicParams=n({os:r||"",os_vrsn:r?t.os_version:"",jlbrk:"",network_type:["wifi","2g","3g","4g"].indexOf(t.network_type)+1||5,pt:this.transformPlatform(t.platform,t.hardware_os),ptag:V("ptag")||"",sharesource:V("sharesource")||V("shareSource")||"",second_share:V("second_share")||"",bucket_id:lt("plat_bucketid")||"",h5_ver:t.web_version,lm_experiment_id:"",sessionid:t.dt_sessionid_h5},e)},t.prototype.transformPlatform=function(t,e){var n=0;return"phone"===t?"android"===e?n=8:"ios"===e&&(n=7):"tablet"===t&&("android"===e?n=6:"ios"===e&&(n=5)),"android"===e&&0===n&&(n=8),n},o([ee],t.prototype,"init",null),o([ee],t.prototype,"report",null),t}();function re(t){var e=t;e.options.videoReport&&(e.videoReport=new ne(e.options,e.getPublicParams()))}var oe={attaUrl:"https://h.trace./kv",attaId:"0b300050665",token:"6554817333"},ie={attaUrl:"https://h.trace./kv",attaId:"01600053974",token:"9671122527"};function ae(t,e){void 0===e&&(e=oe);try{var r=function(t,e){var r,o=[],i=Math.random().toString(36).substr(2,8);r=e.attaUrl+"?attaid="+e.attaId+"&token="+e.token+"&_dc="+i;var a=encodeURIComponent((""+window.location.host+window.location.pathname).replace(/\./g,"_")),s=n(n({Attaid:e.attaId,token:e.token,url:encodeURIComponent(window.location.href),path:a},t),{dc:i});
1return Object.keys(s).forEach((function(t){o.push(t+"="+encodeURIComponent(s[t]))})),{url:r,data:o.join("&")}}(t,e);ct(r.url,r.data)}catch(t){throw new Error("[universalReport] atta report fail")}}var se=new Promise((function(t){"undefined"!=typeof document&&"loading"===document.readyState?document.addEventListener("DOMContentLoaded",(function(){t()})):t()})),ue=function(t){var e=[],r=!1;return t.then((function(){var t;for(r=!0;t=e.shift();)null==t||t()})),function(t,o,i){return n(n({},i),{value:function(){for(var t=this,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var a=i.value;return r?a.apply(this,n):(e.push((function(){a.apply(t,n)})),this)}})}}(se),le=function(t){function i(e){var r=t.call(this)||this;return r.options=e,r.videoReport=null,r.deviceId="",r.monitoringReportId="",r.monitoringReport=!1,r.monitoringJsApiReport=!1,r.enableBeaconReportRetry=!1,r.isEnablePlugin=!1,r.attaPublicParams={},r.firstPVReportMap={},r.eventsConfig={},r.isRealTimeDebug=!1,r.eventId=0,r.checkBrowserEnvironment()?(r.monitoringReportId=e.monitoringReportId,r.monitoringReport=e.monitoringReport,r.monitoringJsApiReport=e.monitoringJsApiReport,r.monitoringReport&&ae({step:4,monitoring_id:r.monitoringReportId,monitoring_report_id:r.monitoringReportId}),r.setEventHandler(),function(){var t;null===(t=null===document||void 0===document?void 0:document.body)||void 0===t||t.hasAttribute("_eid")}(),r.init().initPlugin().initObserver().initPage().onPageAttrChange().onChannelReport().addPageVisibilityChangeListener(),r.monitoringReport&&(r.bindSdkMonitoringEvent(),ae(n({step:5},r.attaPublicParams))),r.monitoringJsApiReport&&r.bindJsApiMonitoringEvent(),e.enableSPAMode&&r.addHistoryProxy(),r):r}return e(i,t),i.prototype.init=function(){this.publicParams=new Zt(this.options),this.attaPublicParams=this.getAttaReportPublicParams(),this.privateParams=new te,this.pageManager=new Xt;var t=[this.publicParams.get("scenes_plat"),this.publicParams.get("scenes_version"),this.publicParams.get("hardware_os")];return this.channel=new(_t.bind.apply(_t,s([void 0,this.options],t))),this.extraChannel=this.options.extraDefaultChannel&&this.getExtraChannel(t),this.use(re),this.monitoringReport&&ae(n({step:1},this.attaPublicParams)),this},i.prototype.getExtraChannel=function(t){return"function"==typeof this.options.channel||"object"==typeof this.options.channel?new(_t.bind.apply(_t,s([void 0,Object.assign(this.options,{channel:this.options.extraDefaultChannel})],t))):null},i.prototype.addHistoryProxy=function(){var t=this,e=history&&"function"==typeof history.pushState&&"function"==typeof history.replaceState;e&&["pushState","replaceState"].forEach((function(e){var n=history[e];history[e]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.switchPage(),n.apply(history,e)}})),window.addEventListener(e?"popstate":"hashchange",(function(){t.switchPage()}))},i.prototype.switchPage=function(t){var e;void 0===t&&(t="");var n=this.pageManager.fixPgid(t),r=null===(e=this.pageManager.getPage(n))||void 0===e?void 0:e.pageRoot;n&&r&&(this.traverseReportHide(r),this.unobserve(n))},i.prototype.bindSdkMonitoringEvent=function(){var t=this;return this.channel&&(this.channel.on("initChannel",(function(e){ae(n(n({step:0},t.attaPublicParams),e));var r=e.deviceId;t.deviceId=r,t.emit("initChannel",e)})),this.channel.on("beaconInitFail",(function(e){ae(n(n({step:2},t.attaPublicParams),e))})),this.channel.on("monitoringReport",(function(e){var o=e.publicParams,i=r(e,["publicParams"]);ae(n(n(n({step:6},t.attaPublicParams),i),{is_return:null==o?void 0:o.dt_pg_isreturn,eid:null==o?void 0:o.dt_eid,event_id:null==o?void 0:o.dt_eventid_h5,omgid:null==o?void 0:o.dt_omgi
1d}))}))),this},i.prototype.bindJsApiMonitoringEvent=function(){var t=this;this.channel.on("jsApiReport",(function(e){ae(n(n(n({},t.attaPublicParams),e),{appkey:t.options.beacon}),ie)}))},i.prototype.getAttaReportPublicParams=function(){return{platform:this.publicParams.get("platform"),hardware_os:this.publicParams.get("hardware_os"),os_version:this.publicParams.get("os_version"),session_id:this.publicParams.get("dt_sessionid_h5"),sdk_version:this.publicParams.get("dt_sdkversion_h5"),omgid:this.publicParams.get("dt_omgid"),monitoring_id:this.monitoringReportId,monitoring_report_id:this.monitoringReportId,ua:null===navigator||void 0===navigator?void 0:navigator.userAgent,scenes_plat:this.publicParams.get("scenes_plat"),scenes_version:this.publicParams.get("scenes_version")}},i.prototype.checkBrowserEnvironment=function(){return!!navigator.cookieEnabled},i.prototype.setFirstPVFlag=function(t,e){this.firstPVReportMap[t]=e},i.prototype.initPlugin=function(){if(this.options.isDisableDtPlugin)return this;var t=V(_.REALTIME_DEBUG);if(V(_.REPORT_VIEW)===P.ENABLE_FEATURE)return this.loadDtPlugin(),this.setPluginTokenByParam(),this;var e=lt(_.REALTIME_DEBUG_ID),n=lt(_.REALTIME_APP_ID);return t===P.ENABLE_FEATURE||e&&n?(e=V(_.REALTIME_DEBUG_ID)||e,n=V(_.REALTIME_APP_ID)||n,this.dtDebugId=e,this.dtAppId=n,this.setRealTimeCookie(_.REALTIME_DEBUG_ID,e),this.setRealTimeCookie(_.REALTIME_APP_ID,n),this.isRealTimeDebug=!0,this.loadDtPlugin(),this):(this.loadDtPluginByToken(),this)},i.prototype.setPluginTokenByParam=function(){var t=Date.now()+6048e5;V(_.REPORT_VIEW_SET_TOKEN)===P.ENABLE_FEATURE&&localStorage.setItem(_.REPORT_VIEW_PLUGIN_TOKEN,""+t)},i.prototype.loadDtPluginByToken=function(){var t=localStorage.getItem(_.REPORT_VIEW_PLUGIN_TOKEN);t&&(Date.now()<parseInt(t,10)?this.loadDtPlugin():localStorage.removeItem(_.REPORT_VIEW_PLUGIN_TOKEN))},i.prototype.loadDtPlugin=function(){var t,e=this;this.monitoringReport=!0,this.isEnablePlugin=!0;var n,r,o=this.options.beacon;"string"==typeof o?this.beaconAppkey=o:"object"==typeof o&&(this.beaconAppkey=null===(t=null==o?void 0:o.baseInfo)||void 0===t?void 0:t.appkey),(n="https://static-sg.winudf.com/static/report-libs/universal-report-plugin-view.min.js",void 0===r&&(r=Date.now()+"-"+Math.random()),new Promise((function(t,e){if(document.getElementById(r))t(null);else{var o=document.getElementsByTagName("head")[0],i=document.createElement("script"),a=function(){i.onload=null,i.onreadystatechange=null,this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||t(null)};i.onload=a,i.onreadystatechange=a,i.onerror=function(t){i.onerror=null,o.removeChild(i),e(t)},i.src=n,i.id=r,o.appendChild(i)}}))).then((function(){e.use(window.universalReportPluginView,e.isRealTimeDebug)})).catch((function(t){}))},i.prototype.initObserver=function(){return this.options.isDisableObserver||this.use(Ht,this.options.isDisableBubble),this},i.prototype.initPage=function(t){var e=this,r=t?[t]:document.querySelectorAll("[dt-pgid]");if(!r.length)return this;var o=this.options.contentidSet;return[].slice.call(r).forEach((function(t){var r,i,a=null===(r=t.getAttribute("dt-pgid"))||void 0===r?void 0:r.trim();if(a&&!e.pageManager.hasPage(a)){var s=o?o[a]:"",u=$t.parse(null!==(i=t.getAttribute("dt-params"))&&void 0!==i?i:"");if(u.ref_pg){var l=$t.parse(u.ref_pg);u.ref_pg=l.pgid?l:{}}if(u.ref_ele){var c=$t.parse(u.ref_ele);u.ref_ele=c.eid?c:{}}s&&(u.contentid=s);var p=n({pgid:a},u);e.setPage(p,t),e.observe(a)}})),this},i.prototype.onPageAttrChange=function(){var t=this;return this.on("pageIdChange",(function(e,n){t.pageManager.removePage(n),null==t||t.observer.ReportTree.detachDom(e),t.initPage(e)})),this.on("pageParamsChange",(function(e,r){var o,i=$t.parse(null!==(o=e.getAttribute("dt-params"))&&void 0!==o?o:""),a=i.ref_pg,s=i.ref_ele;a&&(i.ref_pg=$t.parse(a)),s&&(i.ref_ele=$t.parse(s)),t.setPageParams(n({pgid:r},i))})),this},i.prototype.setEventHandler=function(){var t=this;this.pageVisibilityHandler=function(){"hidden"===document.visibilityState&&t.reportPgOut(),"visible"===document.visibilityState&&t.reportPV()}},i.prototype.addPageVisibilityChangeListener=function(){return!this.options.isDisableVisibilitychangeListener&&document.addEventListener("visibilitychange",this.pageVisibilityHandler),this},i.prototype.removePageVisibilityChangeListener=function(){return document.removeEventListener("visibilitychange",this.pageVisibilityHandler),this},i.prototype.onChannelReport=function(){var t=this;return this.channel.on("report",(function(e){t.emit("report",{type:"dt",event:e.eventName,data:F(e),uid:e.uid,eventTime:e.eventTime})})),this},i.prototype.setPage=function(t,e){var r,o=null==t?void 0:t.pgid;if(this.pageManager.hasPage(o))return this;var i=null===(r=this.options.contentidSet)||void 0===r?void 0:r[o];return this.pageManager.addPage({pageParams:n(n({},i?{contentid:i}:null),t),pageRoot:e}),this},i.prototype.reportPV=function(t){var e,n,r,o=this.pageManager.fixPgid(t),i=null===(e=this.pageManager.getPage(o))||void 0===e?void 0:e.pageRoot,a=Vt(i),s=null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.pgIgnore,u=null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.pginIgnore,l=null==a?void 0:a.uid;if(!o||!a||s||u)return this;a.updateNode(),this.pageManager.updatePage(o);var c=this.pageManager.getPage(o).pageParams,p=c.contentid,d=c.last_contentid;if(p){var f=0;d===p?f=1:this.pageManager.setPage({pageParams:{pgid:o,last_contentid:p}}),this.privateParams.set("dt_pg_isreturn",f,[b.PGIN])}else this.privateParams.remove("dt_pg_isreturn");return this.reportEvent({pgid:o,uid:l,eventName:b.PGIN,eventTime:Date.now()}),this},i.prototype.reportPgOut=function(t,e,n){var r,o,i,a,s;void 0===n&&(n={});var u=this.pageManager.fixPgid(t),l=this.pageManager.getPage(u),c=Vt(null==l?void 0:l.pageRoot),p=null===(r=null==c?void 0:c.data)||void 0===r?void 0:r.pgIgnore,d=null===(o=null==c?void 0:c.data)||void 0===o?void 0:o.pgoutIgnore,f
1=null==c?void 0:c.uid;if(!u||!l||!c||p||d)return this;var h=null!==(i=null==n?void 0:n.area)&&void 0!==i?i:c.effectiveWidth*c.effectiveHeight,v=null!==(a=null==n?void 0:n.impArea)&&void 0!==a?a:c.maxIntersectArea,g=h?Math.min(v/h,1):0,m={dt_pg_area:h.toFixed(2),dt_pg_imp_area:v.toFixed(2),dt_lvtm:l.showTime?Date.now()-l.showTime:0,dt_clck_flag:null!==(s=l.clckFlag)&&void 0!==s?s:"0",dt_pg_imp_rate:g.toFixed(2)};return this.reportEvent({pgid:u,uid:f,eventName:b.PGOUT,eventTime:Date.now(),publicParams:m,pageParams:G(m),isSendBeacon:e}),this},i.prototype.traverseReport=function(t,e){var n=this,r=q(t),o=Vt(r);o&&Mt([o],e,(function(t){var r;null===(r=null==n?void 0:n.eventsConfig[e])||void 0===r||r.action.apply(t)}))},i.prototype.traverseReportHide=function(t){this.traverseReport(t,"hide")},i.prototype.traverseReportExpose=function(t){this.traverseReport(t,"expose")},i.prototype.reportElement=function(t,e){var r,o=q(t),i=null===(r=null==e?void 0:e.businessParams)||void 0===r?void 0:r.eid;if(!i||!o)return this;var a=this.pageManager.fixPgid(null==e?void 0:e.pgid),s=null==e?void 0:e.eventName,u=this.pageManager.hasPage(a),l=[b.IMP,b.IMPEND,b.CLCK].includes(s),c={};if(!u||!l)return this;var p=function(t){for(var e=t,n=null;!n&&e&&e.hasAttribute&&!e.hasAttribute("dt-pgid");)e=e.parentNode,n=Vt(e);return n}(o),d=z(p,this.options.formatMode,n({},e.businessParams));s===b.CLCK?this.pageManager.getPage(a).clckFlag="1":s===b.IMP?o.showTime=Date.now():c=function(t){if(!t)return{};var e=t.scrollWidth*t.scrollHeight,n=(t.scrollLeft+t.clientWidth)*(t.scrollTop+t.clientHeight),r=e?Math.min(n/e,1):0,o=t.showTime;return{dt_element_area:e.toFixed(2),dt_ele_imp_area:n.toFixed(2),dt_element_lvtm:o?Date.now()-o:0,dt_ele_imp_rate:r.toFixed(2)}}(o);var f=Vt(o),h=null==f?void 0:f.uid;return this.reportEvent(n(n({pgid:a,uid:h,eventTime:Date.now()},e),{publicParams:n(n({dt_eid:i},c),e.publicParams),businessParams:n(n({},G(c)),d)})),this},i.prototype.reportEvent=function(t){var e,n,r,o,i;void 0===t&&(t={});var a=t;this.monitoringReport&&Object.assign(a,{monitoringReport:!0}),this.monitoringJsApiReport&&Object.assign(a,{monitoringJsApiReport:!0});var s=null==a?void 0:a.eventName,u=null==a?void 0:a.uid;if(a.eventTime=(null==a?void 0:a.eventTime)||Date.now(),a.publicParams=null!==(e=a.publicParams)&&void 0!==e?e:{},a.publicParams.dt_eventid_h5=this.eventId,this.isRealTimeDebug&&Object.assign(a.publicParams,{dt_debugid:this.dtDebugId,dt_uid:u,dt_appid:this.dtAppId}),this.eventId+=1,!s)return this;s===b.PGOUT&&"app"!==(null===(r=null===(n=this.channel)||void 0===n?void 0:n.curChannel)||void 0===r?void 0:r.type)&&(a.isSendBeacon=!0);var l=this.formatContext(a);return this.channel.report(l),null===(o=this.extraChannel)||void 0===o||o.report(l),null===(i=this.videoReport)||void 0===i||i.report(l),this},i.prototype.reportBeaconEvent=function(t){return void 0===t&&(t={}),Object.assign(t,{isSendBeacon:!0}),this.reportEvent(t)},i.prototype.observe=function(t){var e,n=this.pageManager.fixPgid(t),r=null===(e=this.pageManager.getPage(n))||void 0===e?void 0:e.pageRoot;return n&&r?(r.hasAttribute("dt-pgid")||r.setAttribute("dt-pgid",n),null==this||this.observer.ReportTree.attachDom(r),this.firstPVReportMap[n]||"true"===r.getAttribute("dt-pg-ignore")||"true"===r.getAttribute("dt-pgin-ignore")||"hold=true"===r.getAttribute("dt-cmd")||(this.setFirstPVFlag(n,"first_reported"),this.reportPV(n)),this):this},i.prototype.unobserve=function(t){var e,n=this.pageManager.fixPgid(t),r=null===(e=this.pageManager.getPage(n))||void 0===e?void 0:e.pageRoot;return n&&r?(this.options.enableSPAMode||r.removeAttribute("dt-pgid"),this.pageManager.removePage(n),null==this||this.observer.ReportTree.detachDom(r),this.firstPVReportMap[n]=null,this):this},i.prototype.formatContext=function(t){var e,r=this.pageManager.fixPgid(null==t?void 0:t.pgid),o=null==t?void 0:t.eventName,i=null===(e=null==t?void 0:t.businessParams)||void 0===e?void 0:e.eid,a=this.getPageParams(r),s=this.getPublicParams(),u=this.privateParams.getEventPrivateParams(o),l=this.publicParams.getPublicPageParams(a),c=H(n(n(n(n(n(n({},i?{dt_eid:i}:null),s),u),l),{dt_pgid:r}),t.publicParams),at),p=H(n(n({},a),t.pageParams),at),d=H(t.businessParams||{},at);return n(n({},t),{eventName:o,pgid:r,publicParams:c,pageParams:p,businessParams:d})},i.prototype.getReportParams=function(t,e){void 0===e&&(e=this.options.formatMode);var r=q(t);if(!r)return"";var o=Vt(r);if(!o)return"";var i=Lt(o,"pgid"),a=o.data.eid;if(!i||!a)return"";var s=z(o,e,n({eid:a},o.data.params)),u=this.formatContext({pgid:i,businessParams:s});return F(u).udf_kv},i.prototype.setPageParams=function(t){var e;return null===(e=this.pageManager)||void 0===e||e.setPage({pageParams:t}),this},i.prototype.getPageParams=function(t,e){var n,r,o,i=this.pageManager.fixPgid(t);if(!i)return{};var a=null!==(r=null===(n=this.pageManager.getPage(i))||void 0===n?void 0:n.pageParams)&&void 0!==r?r:{};return e?null!==(o=a[e])&&void 0!==o?o:"":a},i.prototype.getPublicParams=function(t){return this.publicParams.get(t)},i.prototype.setPublicParams=function(t,e){var n;return void 0===t&&(t={}),void 0===e&&(e="publicParams"),this.publicParams.set(t,e),null===(n=this.videoReport)||void 0===n||n.convertPublicParams(this.getPublicParams(),"publicParams"===e?t:{}),this},i.prototype.removePublicParams=function(t){return void 0===t&&(t=""),this.publicParams.remove(t),this},i.prototype.setAccountInfo=function(t){return this.setPublicParams(t,"accountInfo"),this},i.prototype.clearAccountInfo=function(){return this.setPublicParams(E,"accountInfo"),this},i.prototype.setCommand=function(t,e){var r,o=q(t);if(!o||!e)return this;var i=$t.parse(null!==(r=o.getAttribute("dt-cmd"))&&void 0!==r?r:"");o.setAttribute("dt-cmd",$t.stringify(n(n({},i),e)))},i.prototype.setPageContentId=function(t){if(t)return this.privateParams.set("dt_pg_contentid",t,[b.PGIN,b.PGOUT,b.IMP,b.IMPEND,b.CLCK]),this},i.prototype.setMultiPageContentids=function(t){var e=this;if(t)return Object.keys(t).forEach((function(n){if(e.pageManager.hasPage(n)){var r=t[n];e.pageManager.setPage({pageParams:{pgid:n,contentid:r}})}})),this},i.prototype.setRealTimeCookie=function(t,e,n,r){ut(t,e,null!=n?n:""+new Date(Date.now()+18e5).toUTCString(),(null!=r?r:location.hostname.indexOf("")>-1)?"":location.hostname)},o([ue],i.prototype,"initObserver",null),o([ue],i.prototype,"initPage",null),o([ue],i.prototype,"reportPV",null),o([ue],i.prototype,"reportEvent",null),o([ue],i.prototype,"reportBeaconEvent",null),o([ue],i.prototype,"observe",null),o([ue],i.prototype,"unobserve",null),i}(wt);return le}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.