!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():t()}(this,function(){function e(e){if(!e)return!1;var t=Object.prototype.toString.call(e);return"[object Function]"==t||"[object AsyncFunction]"==t}function t(){return Date.now&&e(Date.now)?Date.now():(new Date).getTime()}function r(e){return null!=e&&"[object Object]"==Object.prototype.toString.call(e)}function n(){if("function"==typeof Uint32Array){var e="";if("undefined"!=typeof crypto?e=crypto:"undefined"!=typeof msCrypto&&(e=msCrypto),r(e)&&e.getRandomValues){var t=new Uint32Array(1),n=e.getRandomValues(t)[0],i=Math.pow(2,32);return n/i}}return Xi(1e19)/1e19}function i(e){var t=null;try{t=JSON.parse(e)}catch(r){}return t}function a(e,t){this.lockGetPrefix=e||"lock-get-prefix",this.lockSetPrefix=t||"lock-set-prefix"}function s(e){return"function"==typeof e||!(!e||"object"!=typeof e)&&s(e.listener)}function l(){this._events={}}function u(e){var t=e;try{t=decodeURIComponent(e)}catch(r){t=e}return t}function c(e){e=e||"";for(var t={},r=e.substring(1),n=r.split("&"),i=0;i Invalid URL");var r=e.split("#"),n=r[0],i=r.slice(1).join("#");t=this._regex.exec(n);for(var a in this._fields)"undefined"!=typeof t[this._fields[a]]&&(this._values[a]=t[this._fields[a]]);this._values.Hostname=this._values.Host.replace(/:\d+$/,""),this._values.Origin=this._values.Protocol+"://"+this._values.Hostname,this._values.Fragment=i},new t(e)}function g(e){var t={},r=function(){var e;try{return e=new URL("https://www.sensorsdata.cn/"),"https://www.sensorsdata.cn/"===e.href}catch(t){return!1}};if("function"==typeof window.URL&&r())t=new URL(e),t.searchParams||(t.searchParams=function(){var e=c(t.search);return{get:function(t){return e[t]}}}());else{p(e)||(e=String(e)),e=d(e);var n=/^https?:\/\/.+/;if(n.test(e)===!1)return void Wi.log("Invalid URL");var i=f(e);t.hash=i._values.Fragment,t.host=i._values.Host?i._values.Host+(i._values.Port?":"+i._values.Port:""):"",t.href=i._values.URL,t.password=i._values.Password,t.pathname=i._values.Path,t.port=i._values.Port,t.search=i._values.QueryString?"?"+i._values.QueryString:"",t.username=i._values.Username,t.hostname=i._values.Hostname,t.protocol=i._values.Protocol?i._values.Protocol+":":"",t.origin=i._values.Origin?i._values.Origin+(i._values.Port?":"+i._values.Port:""):"",t.searchParams=function(){var e=c("?"+i._values.QueryString);return{get:function(t){return e[t]}}}()}return t}function _(e){return!(!e||1!==e.nodeType)}function h(e){return void 0===e}function v(t){return Array.isArray&&e(v)?Array.isArray(t):"[object Array]"===Object.prototype.toString.call(t)}function y(e){return new Gi(e)}function b(e,t,r,n){function i(e){return e&&(e.preventDefault=i.preventDefault,e.stopPropagation=i.stopPropagation,e._getPath=i._getPath),e}function a(e,t,r,n){var a=function(a){if(a=a||i(window.event)){a.target=a.srcElement||a.target;var o,s,l=!0;return"function"==typeof r&&(o=r(a)),s=t.call(e,a),"beforeunload"!==n?(!1!==o&&!1!==s||(l=!1),l):void 0}};return a}i._getPath=function(){var e=this;return this.path||this.composedPath&&this.composedPath()||y(e.target).getParents()},i.preventDefault=function(){this.returnValue=!1},i.stopPropagation=function(){this.cancelBubble=!0};var o=function(e,t,r){if(void 0===n&&"click"===t&&(n=!0),e&&e.addEventListener)e.addEventListener(t,function(e){e._getPath=i._getPath,r.call(this,e)},n);else{var o="on"+t,s=e[o];e[o]=a(e,r,s,t)}};o.apply(null,arguments)}function w(e){var t="pushState"in window.history?"popstate":"hashchange";b(window,t,e)}function S(e){if(e)return"undefined"!=typeof window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest?new XMLHttpRequest:"undefined"!=typeof XDomainRequest?new XDomainRequest:null;if("undefined"!=typeof window.XMLHttpRequest)return new XMLHttpRequest;if(window.ActiveXObject)try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){Wi.log(t)}}}function k(e,t,r){if(null==e)return!1;if(Yi&&e.forEach===Yi)e.forEach(t,r);else if(v(e))for(var n=0,i=e.length;n=200&&i.status<300||304==i.status?e.success(t(i.responseText)):e.error(t(i.responseText),i.status),i.onreadystatechange=null,i.onload=null)}catch(r){i.onreadystatechange=null,i.onload=null}},i.open(e.type,e.url,!0);try{e.credentials&&(i.withCredentials=!0),r(e.header)&&k(e.header,function(e,t){i.setRequestHeader&&i.setRequestHeader(t,e)}),e.data&&(e.cors||i.setRequestHeader&&i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"application/json"===e.contentType?i.setRequestHeader&&i.setRequestHeader("Content-type","application/json; charset=UTF-8"):i.setRequestHeader&&i.setRequestHeader("Content-type","application/x-www-form-urlencoded"))}catch(l){Wi.log(l)}i.send(e.data||null)}function O(e,t){var r=[];return null==e?r:Array.prototype.map&&e.map===Array.prototype.map?e.map(t):(k(e,function(e,n,i){r.push(t(e,n,i))}),r)}function N(e){var t=[];try{t=O(atob(e).split(""),function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})}catch(r){t=[]}try{return decodeURIComponent(t.join(""))}catch(r){return t.join("")}}function j(e){var t="";try{t=btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)}))}catch(r){t=e}return t}function T(e,t){t=t||window;var r=!1,n=!0,i=t.document,a=i.documentElement,o=i.addEventListener,s=o?"addEventListener":"attachEvent",l=o?"removeEventListener":"detachEvent",u=o?"":"on",c=function(n){"readystatechange"==n.type&&"complete"!=i.readyState||(("load"==n.type?t:i)[l](u+n.type,c,!1),!r&&(r=!0)&&e.call(t,n.type||n))},p=function(){try{a.doScroll("left")}catch(e){return void setTimeout(p,50)}c("poll")};if("complete"==i.readyState)e.call(t,"lazy");else{if(!o&&a.doScroll){try{n=!t.frameElement}catch(d){Wi.log(d)}n&&p()}i[s](u+"DOMContentLoaded",c,!1),i[s](u+"readystatechange",c,!1),t[s](u+"load",c,!1)}}function I(e){return k(Array.prototype.slice.call(arguments,1),function(t){for(var r in t)void 0!==t[r]&&void 0===e[r]&&(e[r]=t[r])}),e}function $(e){var t=e;try{t=decodeURI(e)}catch(r){t=e}return t}function A(e){var t="t6KJCZa5pDdQ9khoEM3Tj70fbP2eLSyc4BrsYugARqFIw1mzlGNVXOHiWvxUn8",r=t.length-1,n={},i=0;for(i=0;i=2&&!/^(\d+\.)+\d+$/.test(r))for(var i="."+n.splice(n.length-1,1);n.length>0;)if(i="."+n.splice(n.length-1,1)+i,document.cookie=t+"=true; path=/; domain="+i,document.cookie.indexOf(t+"=true")!==-1){var a=new Date;return a.setTime(a.getTime()-1e3),document.cookie=t+"=true; expires="+a.toGMTString()+"; path=/; SameSite=Lax; domain="+i,i}return""}function J(e){function t(e,t){e=d(e);var r;if("body"===e)return document.getElementsByTagName("body")[0];if(0===e.indexOf("#"))e=e.slice(1),r=document.getElementById(e);else if(e.indexOf(":nth-of-type")>-1){var n=e.split(":nth-of-type");if(!n[0]||!n[1])return null;var i=n[0],a=n[1].match(/\(([0-9]+)\)/);if(!a||!a[1])return null;var o=Number(a[1]);if(!(_(t)&&t.children&&t.children.length>0))return null;for(var s=t.children,l=0;l0)return null}return r?r:null}function r(e){var i,a=n.shift();if(!a)return e;try{i=t(a,e)}catch(o){Wi.log(o)}return i&&_(i)?r(i):null}if(!p(e))return null;var n=e.split(">"),i=null;return i=r(),i&&_(i)?i:null}function M(e,t){var r="",n="";return e.textContent?r=d(e.textContent):e.innerText&&(r=d(e.innerText)),r&&(r=r.replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)),n=r||"","input"!==t&&"INPUT"!==t||(n=e.value||""),n}function q(e,t){t&&"string"==typeof t||(t="hostname\u89e3\u6790\u5f02\u5e38");var r=null;try{r=g(e).hostname}catch(n){Wi.log("getHostname\u4f20\u5165\u7684url\u53c2\u6570\u4e0d\u5408\u6cd5\uff01")}return r||t}function K(){try{var e=navigator.appVersion.match(/OS (\d+)[._](\d+)[._]?(\d+)?/);return e&&e[1]?Number.parseInt(e[1],10):""}catch(t){return""}}function F(e){var t={},r=e.split("?"),n=r[1]||"";return n&&(t=c("?"+n)),t}function V(e,t){var r=g(e),n=r.searchParams.get(t)||"";if(!n){var i=r.hash;if(i){var a=F(i);n=a[t]||""}}return n}function W(){return"undefined"!=typeof window.matchMedia||"undefined"!=typeof window.msMatchMedia}function z(){var e=screen.msOrientation||screen.mozOrientation||(screen.orientation||{}).type,t="\u672a\u53d6\u5230\u503c";if(e)t=e.indexOf("landscape")>-1?"landscape":"portrait";else if(W()){var r=window.matchMedia||window.msMatchMedia;r("(orientation: landscape)").matches?t="landscape":r("(orientation: portrait)").matches&&(t="portrait")}return t}function X(){var e,t={},r=navigator.userAgent.toLowerCase();return(e=r.match(/ qq\/([\d.]+)/))?t.qqBuildinBrowser=Number(e[1].split(".")[0]):(e=r.match(/mqqbrowser\/([\d.]+)/))?t.qqBrowser=Number(e[1].split(".")[0]):(e=r.match(/opera.([\d.]+)/))?t.opera=Number(e[1].split(".")[0]):(e=r.match(/msie ([\d.]+)/))?t.ie=Number(e[1].split(".")[0]):(e=r.match(/edge.([\d.]+)/))?t.edge=Number(e[1].split(".")[0]):(e=r.match(/firefox\/([\d.]+)/))?t.firefox=Number(e[1].split(".")[0]):(e=r.match(/chrome\/([\d.]+)/))?t.chrome=Number(e[1].split(".")[0]):(e=r.match(/version\/([\d.]+).*safari/))?t.safari=Number(e[1].match(/^\d*.\d*/)):(e=r.match(/trident\/([\d.]+)/))&&(t.ie=11),t}function Z(e){return p(e)?(e=d(e),$(e)):$(location.href)}function G(e){return p(e)?(e=d(e),$(e)):$(location.pathname)}function Q(e,t){return e.hasAttribute?e.hasAttribute(t):e.attributes?!(!e.attributes[t]||!e.attributes[t].specified):void 0}function Y(e,t){if("string"==typeof t)return Q(e,t);if(v(t)){for(var r=!1,n=0;n0)for(var a=e.split(""),o=0;ot)for(i=r+i;l=n*i+s,lt;)i=i/2+s;i=n*i+s}return i}function re(e,t){var r=e.indexOf;if(r)return r.call(e,t);for(var n=0;n41||t.firefox>30||t.opera>25||t.safari>12)&&(e=!0):(t.chrome>41||t.firefox>30||t.opera>25||t.safari>11.3)&&(e=!0)}else(t.chrome>38||t.edge>13||t.firefox>30||t.opera>25||t.safari>11)&&(e=!0);return e}function de(){return"undefined"!=typeof window.XMLHttpRequest&&("withCredentials"in new XMLHttpRequest||"undefined"!=typeof XDomainRequest)}function fe(t){if(!r(t)||!p(t.callbackName))return Wi.log("JSONP \u8bf7\u6c42\u7f3a\u5c11 callbackName"),!1;t.success=e(t.success)?t.success:function(){},t.error=e(t.error)?t.error:function(){},t.data=t.data||"";var n=document.createElement("script"),i=document.getElementsByTagName("head")[0],a=null,o=!1;if(n.defer="defer",i.appendChild(n),ce(t.timeout)){var s=Math.min(t.timeout,3e5);a=setTimeout(function(){return!o&&(t.error("timeout"),window[t.callbackName]=function(){Wi.log("call jsonp error")},a=null,i.removeChild(n),void(o=!0))},s)}if(window[t.callbackName]=function(){clearTimeout(a),a=null,t.success.apply(null,arguments),window[t.callbackName]=function(){Wi.log("call jsonp error")},i.removeChild(n)},t.url.indexOf("?")>-1?t.url+="&callbackName="+t.callbackName:t.url+="?callbackName="+t.callbackName,r(t.data)){var l=[];k(t.data,function(e,t){l.push(t+"="+e)}),t.data=l.join("&"),t.url+="&"+t.data}n.onerror=function(e){return!o&&(window[t.callbackName]=function(){Wi.log("call jsonp error")},clearTimeout(a),a=null,i.removeChild(n),t.error(e),void(o=!0))},n.src=encodeURI(t.url)}function ge(t){var r={visibleHandler:e(t.visible)?t.visible:function(){},hiddenHandler:e(t.hidden)?t.hidden:function(){},visibilityChange:null,hidden:null,isSupport:function(){return"undefined"!=typeof document[this.hidden]},init:function(){"undefined"!=typeof document.hidden?(this.hidden="hidden",this.visibilityChange="visibilitychange"):"undefined"!=typeof document.mozHidden?(this.hidden="mozHidden",this.visibilityChange="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this.hidden="msHidden",this.visibilityChange="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this.hidden="webkitHidden",this.visibilityChange="webkitvisibilitychange"),this.listen()},listen:function(){if(this.isSupport()){var e=this;b(document,this.visibilityChange,function(){document[e.hidden]?e.hiddenHandler():e.visibleHandler()},1)}else b(window,"focus",this.visibleHandler),b(window,"blur",this.hiddenHandler)}};r.init()}function _e(e){e=P({success:function(){},error:function(){},appendCall:function(e){document.getElementsByTagName("head")[0].appendChild(e)}},e);var t=null;"css"===e.type&&(t=document.createElement("link"),t.rel="stylesheet",t.href=e.url),"js"===e.type&&(t=document.createElement("script"),t.async="async",t.setAttribute("charset","UTF-8"),t.src=e.url,t.type="text/javascript"),t.onload=t.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(e.success(),t.onload=t.onreadystatechange=null)},t.onerror=function(){e.error(),t.onerror=null},e.appendCall(t)}function he(e){if("string"!=typeof e)return"";for(var t=/^\s*javascript/i;t.test(e);)e=e.replace(t,"");return e}function me(e,t){e=String(e),t="number"==typeof t?t:13;for(var r=126,n=e.split(""),i=0,a=n.length;ir?(s&&(clearTimeout(s),s=null),l=c,o=e.apply(i,a),s||(i=a=null)):s||n.trailing===!1||(s=setTimeout(u,p)),o}}function ke(e){var t=[];return null==e?t:(k(e,function(e){t[t.length]=e}),t)}function Pe(e){return e?e.toArray?e.toArray():v(e)||ie(e)?Array.prototype.slice.call(e):ke(e):[]}function Ce(e){for(var t,r=[],n={},i=0;i-1;if(r(i)&&"$option"!==a&&!s)try{t[a]=JSON.stringify(i)}catch(l){delete t[a],Ne("\u60a8\u7684\u6570\u636e-",a,i,"\u6570\u636e\u503c\u6709\u9519\u8bef\uff0c\u5df2\u5c06\u5176\u5220\u9664")}else p(i)||ce(i)||D(i)||ae(i)||v(i)||e(i)||"$option"===a||s||(Ne("\u60a8\u7684\u6570\u636e-",a,i,"-\u683c\u5f0f\u4e0d\u6ee1\u8db3\u8981\u6c42\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664"),delete t[a])}),t):t}function rt(e,t){return ce(t)&&e.length>t?(Ne("\u5b57\u7b26\u4e32\u957f\u5ea6\u8d85\u8fc7\u9650\u5236\uff0c\u5df2\u7ecf\u505a\u622a\u53d6--"+e),e.slice(0,t)):e}function nt(e,t){var n=["distinct_id","user_id","id","date","datetime","event","events","first_id","original_id","device_id","properties","second_id","time","users"];r(e)&&k(n,function(r,n){r in e&&(re(t||[],r)>-1||(n<3?(delete e[r],Ne("\u60a8\u7684\u5c5e\u6027- "+r+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u6211\u4eec\u5df2\u7ecf\u5c06\u5176\u5220\u9664")):Ne("\u60a8\u7684\u5c5e\u6027- "+r+"\u662f\u4fdd\u7559\u5b57\u6bb5\uff0c\u8bf7\u907f\u514d\u5176\u4f5c\u4e3a\u5c5e\u6027\u540d")))})}function it(e){var t=["$element_selector","$element_path"],n=["sensorsdata_app_visual_properties"];r(e)&&k(e,function(i,a){if(r(i))it(e[a]);else if(p(i)){if(re(n,a)>-1)return;e[a]=rt(i,re(t,a)>-1?1024:pa.max_string_length)}})}function at(e){"undefined"!=typeof e.properties.$project&&(e.project=e.properties.$project,delete e.properties.$project),"undefined"!=typeof e.properties.$token&&(e.token=e.properties.$token,delete e.properties.$token)}function ot(e){if("item_type"in e){var t=e.item_type,r=function(t){return t||delete e.item_type,!0};et({item_type:t},r)}if("item_id"in e){var n=e.item_id,i=function(t,r,n){return t||"string"!==n||delete e.item_id,!0};et({item_id:n},i)}}function st(e,t){k(e,function(r,n){var i=function(t,r,i){return t||"keyLength"===i||delete e[n],!0};re(t||[],n)===-1&&et({propertyKey:n},i)})}function lt(e){var t=e.properties;ye(e),r(t)?(tt(t),nt(t),at(e),st(t),it(t)):"properties"in e&&(e.properties={}),ot(e)}function ut(e,t){var r=t.sensors;return e._track_id=Number(String(n()).slice(2,5)+String(n()).slice(2,4)+String((new Date).getTime()).slice(-4)),e._flush_time=(new Date).getTime(),r.events.tempAdd("send",e),e}function ct(e,t){var n=t.sensors,i={};r(e)&&r(e.identities)&&!oe(e.identities)?P(i,e.identities):P(i,$a._state.identities);var a={identities:i,distinct_id:$a.getDistinctId(),lib:{$lib:"js",$lib_method:"code",$lib_version:String(n.lib_version)},properties:{}};return r(e)&&r(e.properties)&&!oe(e.properties)&&(e.properties.$lib_detail&&(a.lib.$lib_detail=e.properties.$lib_detail,delete e.properties.$lib_detail),e.properties.$lib_method&&(a.lib.$lib_method=e.properties.$lib_method,delete e.properties.$lib_method)),L(a,$a.getUnionId(),e),r(e.properties)&&!oe(e.properties)&&P(a.properties,e.properties),e.type&&"profile"===e.type.slice(0,7)||(a.properties=P({},ba.properties(),$a.getProps(),$a.getSessionProps(),ba.currentProps,a.properties),n.para.preset_properties.latest_referrer&&!p(a.properties.$latest_referrer)&&(a.properties.$latest_referrer="\u53d6\u503c\u5f02\u5e38"),n.para.preset_properties.latest_search_keyword&&!p(a.properties.$latest_search_keyword)&&(n.para.preset_properties.search_keyword_baidu&&p(a.properties.$search_keyword_id)&&ce(a.properties.$search_keyword_id_hash)&&p(a.properties.$search_keyword_id_type)||(a.properties.$latest_search_keyword="\u53d6\u503c\u5f02\u5e38")),n.para.preset_properties.latest_traffic_source_type&&!p(a.properties.$latest_traffic_source_type)&&(a.properties.$latest_traffic_source_type="\u53d6\u503c\u5f02\u5e38"),n.para.preset_properties.latest_landing_page&&!p(a.properties.$latest_landing_page)&&(a.properties.$latest_landing_page="\u53d6\u503c\u5f02\u5e38"),"not_collect"===n.para.preset_properties.latest_wx_ad_click_id?(delete a.properties._latest_wx_ad_click_id,delete a.properties._latest_wx_ad_hash_key,delete a.properties._latest_wx_ad_callbacks):n.para.preset_properties.latest_wx_ad_click_id&&!p(a.properties._latest_wx_ad_click_id)&&(a.properties._latest_wx_ad_click_id="\u53d6\u503c\u5f02\u5e38",a.properties._latest_wx_ad_hash_key="\u53d6\u503c\u5f02\u5e38",a.properties._latest_wx_ad_callbacks="\u53d6\u503c\u5f02\u5e38"),p(a.properties._latest_wx_ad_click_id)&&(a.properties.$url=Z())),a.properties.$time&&D(a.properties.$time)?(a.time=1*a.properties.$time,delete a.properties.$time):a.time=1*new Date,function(e){if(n.bridge&&"success"===n.bridge.bridge_info.verify_success){var t=Ua.customProp.geth5Props(JSON.parse(JSON.stringify(e)));r(t)&&!oe(t)&&(e.properties=P(e.properties,t))}var i=Ba.customProp.getVtrackProps(JSON.parse(JSON.stringify(e)));r(i)&&!oe(i)&&(e.properties=P(e.properties,i))}(a),Me(a),Sa.checkIsAddSign(a),Sa.checkIsFirstTime(a),Fe(a),Ve(a),a}function pt(e){return Ma.stage.process("basicProps",e)}function dt(e){return Ma.stage.process("formatData",e)}function ft(e,t,r,n){function i(e){function i(){o||(o=!0,location.href=a.href)}e.stopPropagation(),e.preventDefault();var o=!1;setTimeout(i,1e3),n(t,r,i)}e=e||{};var a=null;return e.ele&&(a=e.ele),e.event&&(a=e.target?e.target:e.event.target),r=r||{},!(!a||"object"!=typeof a)&&(!a.href||/^javascript/.test(a.href)||a.target||a.download||a.onclick?(n(t,r),!1):(e.event&&i(e.event),void(e.ele&&He(e.ele,"click",function(e){i(e)}))))}function gt(){var e=location.protocol;return"http:"===e||"https:"===e?e:"http:"}function _t(e){return Ka.stage.process("webClickEvent",e)}function ht(e){return Ka.stage.process("webStayEvent",e)}function mt(){var e=ba.campaignParams(),t={};return k(e,function(e,r,n){(" "+Fi.source_channel_standard+" ").indexOf(" "+r+" ")!==-1?t["$"+r]=n[r]:t[r]=n[r]}),t}function vt(e,t,r){if(Fi.is_first_visitor&&r){var n={};Fi.para.preset_properties.search_keyword_baidu&&xe(document.referrer)&&Ie()&&(n.$search_keyword_id=va.id(),n.$search_keyword_id_type=va.type(),n.$search_keyword_id_hash=te(n.$search_keyword_id));var i=De(null,t);e(P({$first_visit_time:new Date,$first_referrer:i,$first_referrer_host:i?q(i,"\u53d6\u503c\u5f02\u5e38"):"",$first_browser_language:p(navigator.language)?navigator.language.toLowerCase():"\u53d6\u503c\u5f02\u5e38",$first_browser_charset:p(document.charset)?document.charset.toUpperCase():"\u53d6\u503c\u5f02\u5e38",$first_traffic_source_type:Be(),$first_search_keyword:Ee()},mt(),n)),Fi.is_first_visitor=!1}}function yt(t){var r=location.href,n=window.history.pushState,i=window.history.replaceState;e(window.history.pushState)&&(window.history.pushState=function(){n.apply(window.history,arguments),t(r),r=location.href}),e(window.history.replaceState)&&(window.history.replaceState=function(){i.apply(window.history,arguments),t(r),r=location.href});var a;a=window.document.documentMode?"hashchange":n?"popstate":"hashchange",b(window,a,function(){t(r),r=location.href})}function bt(e,t){var r=[];"string"==typeof e&&e in Za.EVENT_LIST&&(r=Za.EVENT_LIST[e],Za[r[0]].on(r[1],t))}function wt(e,t){var n=e.id,i=e.callback,a=e.name,o=$a.getFirstId(),s=$a.getOriginDistinctId();if(!et({distinct_id:n}))return je("login id is invalid"),!1;if(n===$a.getOriginDistinctId()&&!o)return je("login id is equal to distinct_id"),!1;if(r($a._state.identities)&&$a._state.identities.hasOwnProperty(a)&&n===$a._state.first_id)return!1;var l=$a._state.history_login_id.name!==a||n!==$a._state.history_login_id.value; if(l){$a._state.identities[a]=n,$a.set("history_login_id",{name:a,value:n}),o||$a.set("first_id",s),t(n,"$SignUp",{},i);var u={$identity_cookie_id:$a._state.identities.$identity_cookie_id};return u[a]=n,St(u),!0}return!1}function St(e){var t={};for(var r in e)t[r]=e[r];$a._state.identities=t,$a.save()}function kt(e,t){if(!et({unbindKey:e,bindValue:t}))return!1;if(r($a._state.identities)&&$a._state.identities.hasOwnProperty(e)&&$a._state.identities[e]===t){var n=$a.getUnionId().login_id;n&&e+"+"+t===n&&($a._state.distinct_id=$a._state.first_id,$a._state.first_id="",$a.set("history_login_id",{name:"",value:""})),"$identity_cookie_id"!==e&&(delete $a._state.identities[e],$a.save())}var i={};return i[e]=t,i}function Pt(){Fi._t=Fi._t||1*new Date,Fi.is_first_visitor=!1,Fi.source_channel_standard=fa}function Ct(e){P(pa,e||Fi.para||{}),Fi.para=pa;var t={};if(r(Fi.para.is_track_latest))for(var n in Fi.para.is_track_latest)t["latest_"+n]=Fi.para.is_track_latest[n];Fi.para.preset_properties=P({},da.preset_properties,t,Fi.para.preset_properties||{});var i;for(i in da)void 0===Fi.para[i]&&(Fi.para[i]=da[i]);"string"!=typeof Fi.para.web_url||"://"!==Fi.para.web_url.slice(0,3)&&"//"!==Fi.para.web_url.slice(0,2)||("://"===Fi.para.web_url.slice(0,3)?Fi.para.web_url=location.protocol.slice(0,-1)+Fi.para.web_url:Fi.para.web_url=location.protocol+Fi.para.web_url),ya.protocol.serverUrl(),Fi.bridge&&Fi.bridge.initPara();var a=["utm_source","utm_medium","utm_campaign","utm_content","utm_term"],o=["www.baidu.","m.baidu.","m.sm.cn","so.com","sogou.com","youdao.com","google.","yahoo.com/","bing.com/","ask.com/"],s=["weibo.com","renren.com","kaixin001.com","douban.com","qzone.qq.com","zhihu.com","tieba.baidu.com","weixin.qq.com"],l={baidu:["wd","word","kw","keyword"],google:"q",bing:"q",yahoo:"p",sogou:["query","keyword"],so:"q",sm:"q"};"object"==typeof Fi.para.source_type&&(Fi.para.source_type.utm=v(Fi.para.source_type.utm)?Fi.para.source_type.utm.concat(a):a,Fi.para.source_type.search=v(Fi.para.source_type.search)?Fi.para.source_type.search.concat(o):o,Fi.para.source_type.social=v(Fi.para.source_type.social)?Fi.para.source_type.social.concat(s):s,Fi.para.source_type.keyword=r(Fi.para.source_type.keyword)?P(l,Fi.para.source_type.keyword):l);var u={div:!1},c=["mark","/mark","strong","b","em","i","u","abbr","ins","del","s","sup"];if(Fi.para.heatmap&&!r(Fi.para.heatmap)&&(Fi.para.heatmap={}),r(Fi.para.heatmap)){Fi.para.heatmap.clickmap=Fi.para.heatmap.clickmap||"default",Fi.para.heatmap.scroll_notice_map=Fi.para.heatmap.scroll_notice_map||"default",Fi.para.heatmap.scroll_delay_time=Fi.para.heatmap.scroll_delay_time||4e3,Fi.para.heatmap.scroll_event_duration=Fi.para.heatmap.scroll_event_duration||18e3,Fi.para.heatmap.renderRefreshTime=Fi.para.heatmap.renderRefreshTime||1e3,Fi.para.heatmap.loadTimeout=Fi.para.heatmap.loadTimeout||1e3,Fi.para.heatmap.get_vtrack_config!==!0&&(Fi.para.heatmap.get_vtrack_config=!1);var p=v(Fi.para.heatmap.track_attr)?U(Fi.para.heatmap.track_attr,function(e){return e&&"string"==typeof e}):[];if(p.push("data-sensors-click"),Fi.para.heatmap.track_attr=p,r(Fi.para.heatmap.collect_tags))if(Fi.para.heatmap.collect_tags.div===!0)Fi.para.heatmap.collect_tags.div={ignore_tags:c,max_level:1};else if(r(Fi.para.heatmap.collect_tags.div)){if(Fi.para.heatmap.collect_tags.div.ignore_tags?v(Fi.para.heatmap.collect_tags.div.ignore_tags)||(Ne("ignore_tags \u53c2\u6570\u5fc5\u987b\u662f\u6570\u7ec4\u683c\u5f0f"),Fi.para.heatmap.collect_tags.div.ignore_tags=c):Fi.para.heatmap.collect_tags.div.ignore_tags=c,Fi.para.heatmap.collect_tags.div.max_level){var d=[1,2,3];re(d,Fi.para.heatmap.collect_tags.div.max_level)===-1&&(Fi.para.heatmap.collect_tags.div.max_level=1)}}else Fi.para.heatmap.collect_tags.div=!1;else Fi.para.heatmap.collect_tags=u}Fi.para.server_url=Ge(Fi.para.server_url),Fi.para.noCache===!0?Fi.para.noCache="?"+(new Date).getTime():Fi.para.noCache="",Fi.para.callback_timeout>Fi.para.datasend_timeout&&(Fi.para.datasend_timeout=Fi.para.callback_timeout),Fi.para.heatmap&&Fi.para.heatmap.collect_tags&&r(Fi.para.heatmap.collect_tags)&&k(Fi.para.heatmap.collect_tags,function(e,t){"div"!==t&&e&&Fi.heatmap.otherTags.push(t)}),Fi.para.heatmap&&"default"===Fi.para.heatmap.clickmap&&Fi.heatmap.initUnlimitedTags()}function Ot(){var e=Array.prototype.slice.call(arguments),t=e[0],r=e.slice(1);return"string"==typeof t&&Wa[t]?Wa[t].apply(Wa,r):void("function"==typeof t?t.apply(Fi,r):Ne("quick\u65b9\u6cd5\u4e2d\u6ca1\u6709\u8fd9\u4e2a\u529f\u80fd"+e[0]))}function Nt(t,n){function i(){return!a.plugin_is_init&&a.init(Fi,n),a.plugin_is_init=!0,Fi.modules=Fi.modules||{},Fi.modules[a.plugin_name||"unnamed_"+Qa++]=a,a}if(!p(t)&&!r(t))return void je("use's first arguments must be string or object.");var a;if(r(t)){var o=Fi.modules&&Fi.modules[t.plugin_name];o&&o!==t&&Ne(t.name+" is conflict with builtin plugin, and sdk uses builtin plugin."),a=o||t}return p(t)&&(r(Fi.modules)&&r(Fi.modules[t])?a=Fi.modules[t]:r(window.SensorsDataWebJSSDKPlugin)&&r(window.SensorsDataWebJSSDKPlugin[t])?a=window.SensorsDataWebJSSDKPlugin[t]:window.sensorsDataAnalytic201505&&window.sensorsDataAnalytic201505.modules[t]&&(a=window.sensorsDataAnalytic201505.modules[t])),a&&e(a.init)?a.plugin_is_init?a:(a.plugin_name||Ne("warning: invalid plugin, plugin_name required."),a.plugin_version?a.plugin_version!==Fi.lib_version&&Ne("warning: plugin version not match SDK version. plugin may not work correctly. "):Ne("warning: invalid plugin, plugin version required."),i()):(Ne((t.plugin_name||t)+" is not found or it's not a standard plugin. Please check sensorsdata official documents."),a)}function jt(e,t,r){et({event:e,properties:t})&&qa.send({type:"track",event:e,properties:t},r)}function Tt(e,t){return!!et({bindKey:e,bindValue:t})&&($a._state.identities[e]=t,$a.save(),void qa.send({type:"track_id_bind",event:"$BindID",properties:{}}))}function It(e,t){var r=kt(e,t);r&&qa.send({identities:r,type:"track_id_unbind",event:"$UnbindID",properties:{}})}function $t(e,t,r){"object"==typeof e&&e.tagName?ft({ele:e},t,r,Fi.track):"object"==typeof e&&e.target&&e.event&&ft(e,t,r,Fi.track)}function At(e,t,r){return r=r||{},!(!e||"object"!=typeof e)&&(!(!e.href||/^javascript/.test(e.href)||e.target)&&void He(e,"click",function(n){function i(){a||(a=!0,location.href=e.href)}n.preventDefault();var a=!1;setTimeout(i,1e3),Fi.track(t,r,i)}))}function Dt(e,t,r){et({item_type:e,item_id:t,properties:r})&&qa.sendItem({type:"item_set",item_type:e,item_id:t,properties:r||{}})}function xt(e,t){et({item_type:e,item_id:t})&&qa.sendItem({type:"item_delete",item_type:e,item_id:t})}function Et(e,t){et({propertiesMust:e})&&qa.send({type:"profile_set",properties:e},t)}function Lt(e,t){et({propertiesMust:e})&&qa.send({type:"profile_set_once",properties:e},t)}function Ut(e,t){et({propertiesMust:e})&&(k(e,function(t,r){p(t)?e[r]=[t]:v(t)?e[r]=t:(delete e[r],Ne("appendProfile\u5c5e\u6027\u7684\u503c\u5fc5\u987b\u662f\u5b57\u7b26\u4e32\u6216\u8005\u6570\u7ec4"))}),oe(e)||qa.send({type:"profile_append",properties:e},t))}function Rt(e,t){function r(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&!/-*\d+/.test(String(e[t])))return!1;return!0}var n=e;p(e)&&(e={},e[n]=1),et({propertiesMust:e})&&(r(e)?qa.send({type:"profile_increment",properties:e},t):je("profile_increment\u7684\u503c\u53ea\u80fd\u662f\u6570\u5b57"))}function Ht(e){qa.send({type:"profile_delete"},e),$a.set("distinct_id",Zi()),$a.set("first_id","")}function Bt(e,t){var r=e,n={};p(e)&&(e=[],e.push(r)),v(e)?(k(e,function(e){p(e)?n[e]=!0:Ne("profile_unset\u7ed9\u7684\u6570\u7ec4\u91cc\u9762\u7684\u503c\u5fc5\u987b\u65f6string,\u5df2\u7ecf\u8fc7\u6ee4\u6389",e)}),qa.send({type:"profile_unset",properties:n},t)):je("profile_unset\u7684\u53c2\u6570\u5fc5\u987b\u662f\u6570\u7ec4")}function Jt(e,t){"number"==typeof e&&(e=String(e));var r=$a.getFirstId();if("undefined"==typeof e){var n=Zi();r?$a.set("first_id",n):$a.set("distinct_id",n)}else et({distinct_id:e})&&(t===!0?r?$a.set("first_id",e):$a.set("distinct_id",e):r?$a.change("first_id",e):$a.change("distinct_id",e))}function Mt(e,t,r,n){var i=$a.getFirstId()||$a.getDistinctId();$a.set("distinct_id",e),qa.send({original_id:i,distinct_id:$a.getDistinctId(),type:"track_signup",event:t,properties:r},n)}function qt(e,t,r,n){"number"==typeof e&&(e=String(e)),et({distinct_id:e,event:t,properties:r})&&Mt(e,t,r,n)}function Kt(e){et({properties:e})?P(ba.currentProps,e):je("register\u8f93\u5165\u7684\u53c2\u6570\u6709\u8bef")}function Ft(e){$a.clearAllProps(e)}function Vt(e){var t;if(v(e)&&e.length>0)for(t=0;t-1?i:"https:",_e({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_app_define_mode&&window.sa_jssdk_app_define_mode(Fi,e)},0)},error:function(){},type:"js",url:i+"//static.sensorsdata.cn/sdk/"+Fi.lib_version+"/vapph5define.min.js"})}else t();else t()}function ur(t){Fi.para.is_track_single_page&&za.on("switch",function(n){var i=function(r){if(r=r||{},n!==location.href){ba.pageProp.referrer=Z(n);var i=P({$url:Z(),$referrer:Z(n)},r);e(t)?t(i):Fi.quick&&Fi.quick("autoTrack",i)}};if("boolean"==typeof Fi.para.is_track_single_page)i();else if("function"==typeof Fi.para.is_track_single_page){var a=Fi.para.is_track_single_page();r(a)?i(a):a===!0&&i()}})}function cr(){Fi._q&&v(Fi._q)&&Fi._q.length>0&&k(Fi._q,function(e){Fi[e[0]].apply(Fi,Array.prototype.slice.call(e[1]))}),r(Fi.para.heatmap)&&(Va.initHeatmap(),Va.initScrollmap())}function pr(){Fi.readyState.setState(3),new Fi.SDKJSBridge("visualized").onAppNotify(function(){lr("undefined"!=typeof sa_jssdk_app_define_mode?!0:!1)}),lr(!1),Fi.bridge.app_js_bridge_v1(),ba.initPage(),ur(),$a.init(),or(),fr(),Fi.readyState.setState(4),cr()}function dr(){ro.isSeachHasKeyword()?ro.hasKeywordHandle():window.parent!==self&&no.isSearchHasKeyword()?no.verifyVtrackMode():ro.isWindowNameHasKeyword()?ro.windowNameHasKeywordHandle():ro.isStorageHasKeyword()?ro.storageHasKeywordHandle():window.parent!==self&&no.isStorageHasKeyword()?no.verifyVtrackMode():(pr(),no.notifyUser())}function fr(){Ba.init(),"success"===Fi.bridge.bridge_info.verify_success&&Ua.init()}function gr(){k(io,function(t){var r=Fi[t];Fi[t]=function(){if(Fi.readyState.state<3)return v(Fi._q)||(Fi._q=[]),Ne("calling sdk api before init is deprecated."),Fi._q.push([t,arguments]),!1;if(!e(Fi.getDisabled)||!Fi.getDisabled())return Fi.readyState.getState()?r.apply(Fi,arguments):void je("\u8bf7\u5148\u521d\u59cb\u5316\u795e\u7b56JS SDK")}})}function _r(e,t){this.cancel=function(){e=!0},this.getCanceled=function(){return e||!1},this.stop=function(){t=!0},this.getStopped=function(){return t||!1}}function hr(e,t,r){var n=null;try{n=JSON.parse(JSON.stringify(e||null))}catch(i){}this.getOriginalData=function(){return n},this.getPosition=function(){return t},this.cancellationToken=new _r,this.sensors=r}function mr(e){if(!r(e))throw"error: Stage constructor requires arguments.";this.processDef=e,this.registeredInterceptors={}}function vr(e){e&&e.buildDataStage&&so.registerStageImplementation(e.buildDataStage),e&&e.businessStage&&po.registerStageImplementation(e.businessStage),e&&e.sendDataStage&&uo.registerStageImplementation(e.sendDataStage),e&&e.viewStage&&go.registerStageImplementation(e.viewStage)}function yr(e,t){_o[e]&&_o[e](t)}function br(){return ho.stage&&ho.stage.process("getUtmData")}function wr(e){return mo.stage.process("send",e)}function Sr(e){e.kit=vo,e.saEvent=qa,this.buildDataStage=Ma,this.sendDataStage=mo,this.businessStage=ho}function kr(e){e.heatmap=Va,this.viewStage=Ka}function Pr(t){if(!e(t.properties))return void je("registerPropertyPlugin arguments error, properties must be function");if(t.isMatchedWithFilter&&!e(t.isMatchedWithFilter))return void je("registerPropertyPlugin arguments error, isMatchedWithFilter must be function");var r={finalAdjustData:{priority:100,entry:function(r){try{if(e(t.isMatchedWithFilter))return t.isMatchedWithFilter(r)&&t.properties(r);t.properties(r)}catch(n){je("execute registerPropertyPlugin callback error:"+n)}}}};yr("buildDataStage",r)}function Cr(e){e&&(Fi.events=Ia,Fi.bridge=to,Fi.SDKJSBridge=rr,Fi.JSBridge=ar,Fi.store=$a,Fi.unlimitedDiv=Ra,Fi.customProp=Ha,Fi.vtrackcollect=Ba,Fi.vapph5collect=Ua,Fi.detectMode=dr,Fi.registerFeature=vr,Fi.registerInterceptor=yr,Fi.commonWays=Wa,vr(new Sr(Fi)),vr(new kr(Fi)),yr("viewStage",yo));var t=e?Ya:ao;for(var r in t)Fi[r]=t[r];Fi.logger=ca,Fi.log=Oe,Fi._=eo,Fi.on=bt,Fi.ee=Za,Fi.use=Nt,Fi.lib_version=ga,Fi.registerPropertyPlugin=Pr}function Or(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Nr(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Nr(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function jr(e,t,r){return Or(e,t,r),e.plugin_version=Bo,e}function Tr(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Ir(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Ir(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function $r(e,t,r){return Tr(e,t,r),e.plugin_version=qo,e}function Ar(e){return zo&&zo.call(Vo,JSON.stringify(e))}function Dr(e){return Wo.call(Vo)&&Xo&&Xo.call(Vo,JSON.stringify(e))}function xr(e,t){return t&&"function"==typeof t[e.callType]&&t[e.callType]()}function Er(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Lr(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Lr(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function Ur(e,t,r){return Er(e,t,r),e.plugin_version=Go,e}function Rr(){if(So=window.SensorsData_APP_New_H5_Bridge,ko=So&&So.sensorsdata_track,Po=ko&&So.sensorsdata_get_server_url&&So.sensorsdata_get_server_url(),Co&&!Co.bridge.activeBridge&&Po){if(Co.bridge.activeBridge=Qo,Co.para.app_js_bridge&&!Co.para.app_js_bridge.is_mui&&(Co.bridge.is_verify_success=Po&&Co.bridge.validateAppUrl(Po)),Co.bridge.bridge_info={touch_app_bridge:!0,platform:"android",verify_success:Co.bridge.is_verify_success?"success":"fail",support_two_way_call:!!So.sensorsdata_js_call_app},!Co.para.app_js_bridge)return void No("app_js_bridge is not configured, data will not be sent by android bridge.");Co.registerInterceptor("sendDataStage",{send:{priority:60,entry:Hr}}),No("Android bridge inits succeed.")}}function Hr(e,t){if(Co.para.app_js_bridge.is_mui||"item_set"===e.data.type||"item_delete"===e.data.type)return e;var r=e.callback;return Co.bridge.is_verify_success?(ko&&ko.call(So,JSON.stringify(Oo.extend({server_url:Co.para.server_url},e.data))),Oo.isFunction(r)&&r(),t.cancellationToken.cancel(),e):Co.para.app_js_bridge.is_send?(Co.debug.apph5({data:e.data,step:"4.2",output:"all"}),e):(Oo.isFunction(r)&&r(),t.cancellationToken.cancel(),e)}function Br(e){var t=e.callType;return t in Zo.commands?Zo.commands[t](e,So):void(So&&Oo.isFunction(So.sensorsdata_js_call_app)&&So.sensorsdata_js_call_app(JSON.stringify(e)))}function Jr(e){return rs&&rs.call(es,JSON.stringify(e))}function Mr(e){return ts.call(es)&&ns&&ns.call(es,JSON.stringify(e))}function qr(e,t){return t&&"function"==typeof t[e.callType]&&t[e.callType]()}function Kr(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Fr(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Fr(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function Vr(e,t,r){return Kr(e,t,r),e.plugin_version=as,e}function Wr(){if(jo=window.SensorsData_APP_JS_Bridge,To=jo&&jo.sensorsdata_track,Io=jo&&jo.sensorsdata_verify,$o=jo&&jo.sensorsdata_visual_verify,Ao&&!Ao.bridge.activeBridge&&(Io||To||$o)){Ao.bridge.activeBridge=os;var e=Io||To;if($o&&(e=!!$o.call(jo,JSON.stringify({server_url:Ao.para.server_url}))),Ao.bridge.bridge_info={touch_app_bridge:!0,platform:"android",verify_success:e?"success":"fail"},!Ao.para.app_js_bridge)return void xo("app_js_bridge is not configured, data will not be sent by android obsolete bridge.");Ao.registerInterceptor("sendDataStage",{send:{priority:80,entry:zr}}),xo("Android obsolete bridge inits succeed.")}}function zr(e,t){if(Ao.para.app_js_bridge.is_mui||"item_set"===e.data.type||"item_delete"===e.data.type)return e;var r=e.callback;if(Io){var n=Io&&Io.call(jo,JSON.stringify(Do.extend({server_url:Ao.para.server_url},e.data)));return n?(Do.isFunction(r)&&r(),t.cancellationToken.cancel(),e):Ao.para.app_js_bridge.is_send?(Ao.debug.apph5({data:e.data,step:"3.1",output:"all"}),e):(Do.isFunction(r)&&r(),t.cancellationToken.cancel(),e)}return To&&To.call(jo,JSON.stringify(Do.extend({server_url:Ao.para.server_url},e.data))),Do.isFunction(r)&&r(),t.cancellationToken.cancel(),e}function Xr(e){var t=e.callType;return t in is.commands?is.commands[t](e,jo):jo&&Do.isFunction(jo.sensorsdata_js_call_app)?jo.sensorsdata_js_call_app(JSON.stringify(e)):void 0}function Zr(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Gr(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Gr(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function Qr(e,t,r){return Zr(e,t,r),e.plugin_version=ls,e}function Yr(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return en(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function en(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function tn(e,t,r){return Yr(e,t,r),e.plugin_version=ps,e}function rn(){return"undefined"!=typeof Ho&&document[Ho]}function nn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return an(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function an(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function on(e,t,r){return nn(e,t,r),e.plugin_version=As,e}function sn(){if(fs=window.SensorsData_iOS_JS_Bridge&&window.SensorsData_iOS_JS_Bridge.sensorsdata_app_server_url,gs=function(){return window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.sensorsdataNativeTracker},_s&&!_s.bridge.activeBridge&&gs()&&gs().postMessage){if(_s.bridge.activeBridge=Ds,_s.para.app_js_bridge&&!_s.para.app_js_bridge.is_mui&&(_s.bridge.is_verify_success=fs&&_s.bridge.validateAppUrl(fs)),_s.bridge.bridge_info={touch_app_bridge:!0,platform:"ios",verify_success:_s.bridge.is_verify_success?"success":"fail",support_two_way_call:!0},!_s.para.app_js_bridge)return void ms("app_js_bridge is not configured, data will not be sent by iOS bridge.");_s.registerInterceptor("sendDataStage",{send:{priority:70,entry:ln}}),ms("IOS bridge inits succeed.")}}function ln(e,t){if(_s.para.app_js_bridge.is_mui||"item_set"===e.data.type||"item_delete"===e.data.type)return e;var r=e.callback;return _s.bridge.is_verify_success?(gs()&&gs().postMessage(JSON.stringify({callType:"app_h5_track",data:hs.extend({server_url:_s.para.server_url},e.data)})),hs.isFunction(r)&&r(),t.cancellationToken.cancel(),e):_s.para.app_js_bridge.is_send?(_s.debug.apph5({data:e.data,step:"4.1",output:"all"}),e):(hs.isFunction(r)&&r(),t.cancellationToken.cancel(),e)}function un(e){var t=e.callType;return"page_info"!==t&&"visualized_track"!==t||_s.bridge.hasVisualModeBridge()?"sensorsdata_get_app_visual_config"===t?hs.isObject(window.SensorsData_APP_New_H5_Bridge)&&window.SensorsData_APP_New_H5_Bridge[t]:gs()&&gs().postMessage(JSON.stringify(e)):null}function cn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return pn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function pn(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function dn(e,t,r){return cn(e,t,r),e.plugin_version=Es,e}function fn(){if(vs&&!vs.bridge.activeBridge&&gn()){if(vs.bridge.activeBridge=Ls,vs.bridge.bridge_info={touch_app_bridge:!0,platform:"ios",verify_success:_n()?"success":"fail"},!vs.para.app_js_bridge)return void bs("app_js_bridge is not configured, data will not be sent by iOS obsolete bridge.");vs.registerInterceptor("sendDataStage",{send:{priority:90,entry:hn}}),bs("IOS obsolete bridge inits succeed.")}}function gn(){return(/sensors-verify/.test(navigator.userAgent)||/sa-sdk-ios/.test(navigator.userAgent))&&!window.MSStream}function _n(){if(/sensors-verify/.test(navigator.userAgent)){var e=navigator.userAgent.match(/sensors-verify\/([^\s]+)/);if(e&&e[0]&&"string"==typeof e[1]&&2===e[1].split("?").length){e=e[1].split("?");var t=null,r=null;try{t=ys.URL(vs.para.server_url).hostname,r=ys.URL(vs.para.server_url).searchParams.get("project")||"default"}catch(n){vs.log(n)}return!(!t||t!==e[0]||!r||r!==e[1])}return!1}return!!/sa-sdk-ios/.test(navigator.userAgent)}function hn(e,t){function r(e){var t=JSON.stringify(ys.extend({server_url:vs.para.server_url},e));return t=t.replace(/\r\n/g,""),t=encodeURIComponent(t),"sensorsanalytics://trackEvent?event="+t}if(vs.para.app_js_bridge.is_mui||"item_set"===e.data.type||"item_delete"===e.data.type)return e;var n=e.callback;if(vs.bridge.bridge_info.verify_success){var i=document.createElement("iframe"),a=r(e.data);return i.setAttribute("src",a),document.documentElement.appendChild(i),i.parentNode.removeChild(i),i=null,ys.isFunction(n)&&n(),t.cancellationToken.cancel(),!0}return vs.para.app_js_bridge.is_send?(vs.debug.apph5({data:e.data,step:"3.2",output:"all"}),e):(ys.isFunction(n)&&n(),t.cancellationToken.cancel(),e)}function mn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return vn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function vn(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function yn(e,t,r){return mn(e,t,r),e.plugin_version=Rs,e}function bn(){this.sd=null,this.start_time=+new Date,this.page_show_status=!0,this.page_hidden_status=!1,this._={},this.timer=null,this.current_page_url=document.referrer,this.url=location.href,this.title=document.title||"",this.option={},this.heartbeat_interval_time=5e3,this.heartbeat_interval_timer=null,this.page_id=null,this.storage_name="sawebjssdkpageleave",this.max_duration=Bs}function wn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Sn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Sn(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function kn(e,t,r){return wn(e,t,r),e.plugin_version=qs,e}function Pn(e,t){if("track"!==e.type)return e;var r=t.sd,n=r._,i=r.saEvent.check,a=n.extend2Lev({properties:{}},e),o=t.customRegister,s=a.properties,l=a.event,u={};return n.each(o,function(e){if(n.isObject(e))n.indexOf(e.events,l)>-1&&i({properties:e.properties})&&(u=n.extend(u,e.properties));else if(n.isFunction(e)){var t=e({event:l,properties:s,data:a});n.isObject(t)&&!n.isEmptyObject(t)&&i({properties:t})&&(u=n.extend(u,t))}}),e.properties=n.extend(s,u),e}function Cn(){this.sd=null,this.log=window.console&&window.console.log||function(){},this.customRegister=[]}function On(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Nn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Nn(e,t,r){ function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function jn(e,t,r){return On(e,t,r),e.plugin_version=Ws,e}function Tn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return In(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function In(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function $n(e,t,r){return Tn(e,t,r),e.plugin_version=Qs,e}function An(e){try{if("$pageview"!==e.event&&(!e.type||"profile"!==e.type.slice(0,7))){var t=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,r=document.documentElement.scrollHeight||0,n={$page_height:Math.max(t,r)||0};e.properties=zs._.extend(e.properties||{},n)}}catch(i){Ys("\u9875\u9762\u9ad8\u5ea6\u83b7\u53d6\u5f02\u5e38\u3002")}return Xs.call(zs.kit,e)}function Dn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return xn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function xn(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function En(e,t,r){return Dn(e,t,r),e.plugin_version=rl,e}function Ln(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Un(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Un(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function Rn(e,t,r){return Ln(e,t,r),e.plugin_version=yl,e}function Hn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Bn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Bn(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function Jn(e,t,r){return Hn(e,t,r),e.plugin_version=Sl,e}function Mn(){kl=!0}function qn(){kl=!1}function Kn(){return kl}function Fn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Vn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Vn(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function Wn(e,t,r){return Fn(e,t,r),e.plugin_version=Nl,e}function zn(e){var t=e,r="";r=al.para.debug_mode_url.indexOf("?")!==-1?al.para.debug_mode_url+"&"+al.kit.encodeTrackData(e):al.para.debug_mode_url+"?"+al.kit.encodeTrackData(e),ol.ajax({url:r,type:"GET",cors:!0,header:{"Dry-Run":String(al.para.debug_mode_upload)},success:function(e){ol.isEmptyObject(e)===!0?alert("debug\u6570\u636e\u53d1\u9001\u6210\u529f"+t):alert("debug\u5931\u8d25 \u9519\u8bef\u539f\u56e0"+JSON.stringify(e))}})}function Xn(e,t){if(al.para.debug_mode===!0){var r=e.data;e.callback;zn(JSON.stringify(r)),t.cancellationToken.stop()}return e}function Zn(){al.para.debug_mode===!0&&(al.para.debug_mode_upload=al.para.debug_mode_upload||!1,ol.isString(al.para.debug_mode_url)||(ol.isString(al.para.server_url)?al.para.debug_mode_url=al.para.server_url.replace("sa.gif","debug"):ol.isArray(al.para.server_url)&&ol.isString(al.para.server_url[0])?al.para.debug_mode_url=al.para.server_url[0].replace("sa.gif","debug"):al.para.debug_mode=!1))}function Gn(){al.on("sdkInitPara",function(){Zn()}),al.on("sdkAfterInitPara",function(){al.registerInterceptor("sendDataStage",{send:{priority:30,entry:Xn}})})}function Qn(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Yn(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Yn(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function ei(e,t,r){return Qn(e,t,r),e.plugin_version=Il,e}function ti(e,t){if(ll.isObject(sl.para.jsapp)&&!sl.para.jsapp.isOnline&&"function"==typeof sl.para.jsapp.setData){var r=e;delete r.callback,r=JSON.stringify(r),sl.para.jsapp.setData(r),t.cancellationToken.stop()}return e}function ri(){sl.on("sdkAfterInitAPI",function(){ll.isObject(sl.commonWays)&&(sl.commonWays.setOnlineState=ni),sl.registerInterceptor("sendDataStage",{send:{priority:40,entry:ti}})})}function ni(e){if(e===!0&&ll.isObject(sl.para.jsapp)&&"function"==typeof sl.para.jsapp.getData){sl.para.jsapp.isOnline=!0;var t=sl.para.jsapp.getData();ll.isArray(t)&&t.length>0&&ll.each(t,function(e){ll.isJSONString(e)&&sl.kit.sendData(JSON.parse(e))})}else sl.para.jsapp.isOnline=!1}function ii(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return ai(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function ai(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function oi(e,t,r){return ii(e,t,r),e.plugin_version=Dl,e}function si(e,t){return!ul.para.app_js_bridge&&ul.para.batch_send&&cl.localStorage.isSupport()&&localStorage.length=3||!i.on?o():void i.on(r,o)}}return e}function pi(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function di(e,t,r){return ci(e,t,r),e.plugin_version=Ul,e}function fi(e){var t=new dl.BeaconSend(e);t.start()}function gi(e,t){var r=null,n=null;dl.isObject(e.config)&&(r=e.config.send_type,n=dl.optimizeServerUrl(e.config.server_url));var i="beacon"===r||!r&&"beacon"===pl.para.send_type;if(i&&dl.isSupportBeaconSend()){var a=n||e.server_url;e.server_url=a,e.data=pl.kit.encodeTrackData(e.data),dl.isArray(a)&&a.length?dl.each(a,function(t){e.callback=null,e.server_url=t,fi(e)}):"string"==typeof a&&""!==a?fi(e):pl.log("\u5f53\u524d server_url \u4e3a\u7a7a\u6216\u4e0d\u6b63\u786e\uff0c\u53ea\u5728\u63a7\u5236\u53f0\u6253\u5370\u65e5\u5fd7\uff0cnetwork \u4e2d\u4e0d\u4f1a\u53d1\u6570\u636e\uff0c\u8bf7\u914d\u7f6e\u6b63\u786e\u7684 server_url\uff01"),t.cancellationToken.stop()}return e}function _i(){"beacon"!==pl.para.send_type||dl.isSupportBeaconSend()||(pl.para.send_type="image")}function hi(){pl.on("sdkInitPara",function(){_i()}),pl.on("sdkAfterInitPara",function(){pl.registerInterceptor("sendDataStage",{send:{priority:110,entry:gi}})})}function mi(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return vi(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function vi(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function yi(e,t,r){return mi(e,t,r),e.plugin_version=Bl,e}function bi(e){var t=new gl.AjaxSend(e);t.start()}function wi(e,t){var r=null,n=null;gl.isObject(e.config)&&(r=e.config.send_type,n=gl.optimizeServerUrl(e.config.server_url));var i="ajax"===r||!r&&"ajax"===fl.para.send_type;if(i&&gl.isSupportCors()){var a=n||e.server_url;e.server_url=a,e.data=fl.kit.encodeTrackData(e.data),gl.isArray(a)&&a.length?gl.each(a,function(t){e.callback=null,e.server_url=t,bi(e)}):"string"==typeof a&&""!==a?bi(e):fl.log("\u5f53\u524d server_url \u4e3a\u7a7a\u6216\u4e0d\u6b63\u786e\uff0c\u53ea\u5728\u63a7\u5236\u53f0\u6253\u5370\u65e5\u5fd7\uff0cnetwork \u4e2d\u4e0d\u4f1a\u53d1\u6570\u636e\uff0c\u8bf7\u914d\u7f6e\u6b63\u786e\u7684 server_url\uff01"),t.cancellationToken.stop()}return e}function Si(){"ajax"!==fl.para.send_type||gl.isSupportCors()||(fl.para.send_type="image")}function ki(){fl.on("sdkInitPara",function(){Si()}),fl.on("sdkAfterInitPara",function(){fl.registerInterceptor("sendDataStage",{send:{priority:120,entry:wi}})})}function Pi(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Ci(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Ci(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function Oi(e,t,r){return Pi(e,t,r),e.plugin_version=ql,e}function Ni(e,t){var r=_l.kit.encodeTrackData(t);return e.indexOf("?")!==-1?e+"&"+r:e+"?"+r}function ji(e){var t=new hl.ImageSend(e);t.start()}function Ti(e,t){var r=null;hl.isObject(e.config)&&(r=hl.optimizeServerUrl(e.config.server_url));var n=r||e.server_url,i=e.data;e.server_url=n,hl.isArray(n)&&n.length?hl.each(n,function(t){t&&(e.data=Ni(t,i),e.callback=null,e.server_url=t,ji(e))}):"string"==typeof n&&""!==n?(e.data=Ni(n,i),ji(e)):_l.logger&&_l.logger.msg("\u5f53\u524d server_url \u4e3a\u7a7a\u6216\u4e0d\u6b63\u786e\uff0c\u53ea\u5728\u63a7\u5236\u53f0\u6253\u5370\u65e5\u5fd7\uff0cnetwork \u4e2d\u4e0d\u4f1a\u53d1\u6570\u636e\uff0c\u8bf7\u914d\u7f6e\u6b63\u786e\u7684 server_url\uff01").level("warn").log(),t.cancellationToken.stop()}function Ii(){"image"!==_l.para.send_type&&"ajax"!==_l.para.send_type&&"beacon"!==_l.para.send_type&&(_l.para.send_type="image")}function $i(){_l.on("sdkInitPara",function(){Ii()}),_l.on("sdkAfterInitPara",function(){_l.registerInterceptor("sendDataStage",{send:{priority:130,entry:Ti}})})}function Ai(e,t,r){if(t&&(e.plugin_name=t),r&&e.init){var n=e.init;e.init=function(i,a){function o(){n.call(e,i,a)}return Di(i,e,t),i.readyState&&i.readyState.state>=3||!i.on?o():void i.on(r,o)}}return e}function Di(e,t,r){function n(t,n){e.logger?e.logger.msg.apply(e.logger,n).module(r+""||"").level(t).log():e.log&&e.log.apply(e,n)}t.log=function(){n("log",arguments)},t.warn=function(){n("warn",arguments)},t.error=function(){n("error",arguments)}}function xi(e,t,r){return Ai(e,t,r),e.plugin_version=ga,e}function Ei(e){return null===zl?void Li(e):void zl.push(e)}function Li(e){try{if("log"===e.level&&Ui())return void Bi(e);if("warn"===e.level&&Ri())return void Bi(e);if("error"===e.level&&Hi())return void Bi(e)}catch(t){}}function Ui(){return!!Ki()||(Vl.para.show_log===!0||Wl.isObject(Vl.para.show_log)&&"log"===Vl.para.show_log.level)}function Ri(){return!!Ki()||(Ui()||Wl.isObject(Vl.para.show_log)&&"warn"===Vl.para.show_log.level)}function Hi(){return!!Ki()||(!Wl.isObject(Vl.para.show_log)||"none"!==Vl.para.show_log.level)}function Bi(e){var t=e.content,r=Wl.isObject(t[0])?Wl.formatJsonString(t[0]):t[0],n=Ji(e);t[0]=n+(n.length>0?": ":"")+r;try{console&&(Wl.isFunction(console[e.level])?console[e.level].apply(console,t):Wl.isObject(console[e.level])&&console[e.level](t[0]))}catch(i){}}function Ji(e){var t="",r="",n=Vl.para.show_log;return Wl.isObject(n)&&n.show_brand===!1||(t+=e.brand),Wl.isObject(n)&&n.show_level===!1||(t+=(t.length>0?"-":"")+e.level),t.length>0&&(t="["+t+"]"),Wl.isObject(n)&&n.show_module===!1||(r=e.module),t+r}function Mi(){Wl.sessionStorage.isSupport()&&sessionStorage.setItem(Gl,"true")}function qi(){Wl.sessionStorage.isSupport()&&sessionStorage.removeItem(Gl)}function Ki(){return Wl.sessionStorage.isSupport()&&"true"===sessionStorage.getItem(Gl)}var Fi={};(function(){function e(n,i){function a(e,t){try{e()}catch(r){t&&t()}}function o(e){if(null!=o[e])return o[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=o("json-stringify")&&o("date-serialization")&&o("json-parse");else if("date-serialization"==e){if(t=o("json-stringify")&&b){var r=i.stringify;a(function(){t='"-271821-04-20T00:00:00.000Z"'==r(new p((-864e13)))&&'"+275760-09-13T00:00:00.000Z"'==r(new p(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new p((-621987552e5)))&&'"1969-12-31T23:59:59.999Z"'==r(new p((-1)))})}}else{var n,s='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=i.stringify,c="function"==typeof r;c&&((n=function(){return 1}).toJSON=n,a(function(){c="0"===r(0)&&"0"===r(new l)&&'""'==r(new u)&&r(v)===h&&r(h)===h&&r()===h&&"1"===r(n)&&"[1]"==r([n])&&"[null]"==r([h])&&"null"==r(null)&&"[null,null,null]"==r([h,v,null])&&r({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==s&&"1"===r(null,n)&&"[\n 1,\n 2\n]"==r([1,2],null,1)},function(){c=!1})),t=c}if("json-parse"==e){var d,f=i.parse;"function"==typeof f&&a(function(){0!==f("0")||f(!1)||(n=f(s),d=5==n.a.length&&1===n.a[0],d&&(a(function(){d=!f('"\t"')}),d&&a(function(){d=1!==f("01")}),d&&a(function(){d=1!==f("1.")})))},function(){d=!1}),t=d}}return o[e]=!!t}function s(e){return A(this)}n||(n=r.Object()),i||(i=r.Object());var l=n.Number||r.Number,u=n.String||r.String,c=n.Object||r.Object,p=n.Date||r.Date,d=n.SyntaxError||r.SyntaxError,f=n.TypeError||r.TypeError,g=n.Math||r.Math,_=n.JSON||r.JSON;if("object"==typeof _&&_)return i.stringify=_.stringify,i.parse=_.parse,i.runInContext=e,i;var h,m=c.prototype,v=m.toString,y=m.hasOwnProperty,b=new p((-0xc782b5b800cec));if(a(function(){b=b.getUTCFullYear()==-109252&&0===b.getUTCMonth()&&1===b.getUTCDate()&&10==b.getUTCHours()&&37==b.getUTCMinutes()&&6==b.getUTCSeconds()&&708==b.getUTCMilliseconds()}),o["bug-string-char-index"]=o["date-serialization"]=o.json=o["json-stringify"]=o["json-parse"]=null,!o("json")){var w="[object Function]",S="[object Date]",k="[object Number]",P="[object String]",C="[object Array]",O="[object Boolean]",N=o("bug-string-char-index"),j=function(e,r){var n,i,a,o=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(a in i)y.call(i,a)&&o++;return n=i=null,o?j=function(e,t){var r,n,i=v.call(e)==w;for(r in e)i&&"prototype"==r||!y.call(e,r)||(n="constructor"===r)||t(r);(n||y.call(e,r="constructor"))&&t(r)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],j=function(e,r){var n,a,o=v.call(e)==w,s=!o&&"function"!=typeof e.constructor&&t[typeof e.hasOwnProperty]&&e.hasOwnProperty||y;for(n in e)o&&"prototype"==n||!s.call(e,n)||r(n);for(a=i.length;n=i[--a];)s.call(e,n)&&r(n)}),j(e,r)};if(!o("json-stringify")&&!o("date-serialization")){var T={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},I="000000",$=function(e,t){return(I+(t||0)).slice(-e)},A=function(e){var t,r,n,i,a,o,s,l,u;if(b)t=function(e){r=e.getUTCFullYear(),n=e.getUTCMonth(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),l=e.getUTCSeconds(),u=e.getUTCMilliseconds()};else{var c=g.floor,p=[0,31,59,90,120,151,181,212,243,273,304,334],d=function(e,t){return p[t]+365*(e-1970)+c((e-1969+(t=+(t>1)))/4)-c((e-1901+t)/100)+c((e-1601+t)/400)};t=function(e){for(i=c(e/864e5),r=c(i/365.2425)+1970-1;d(r+1,0)<=i;r++);for(n=c((i-d(r,0))/30.42);d(r,n+1)<=i;n++);i=1+i-d(r,n),a=(e%864e5+864e5)%864e5,o=c(a/36e5)%24,s=c(a/6e4)%60,l=c(a/1e3)%60,u=a%1e3}}return(A=function(e){return e>-1/0&&e<1/0?(t(e),e=(r<=0||r>=1e4?(r<0?"-":"+")+$(6,r<0?-r:r):$(4,r))+"-"+$(2,n+1)+"-"+$(2,i)+"T"+$(2,o)+":"+$(2,s)+":"+$(2,l)+"."+$(3,u)+"Z",r=n=i=o=s=l=u=null):e=null,e})(e)};if(o("json-stringify")&&!o("date-serialization")){var D=i.stringify;i.stringify=function(e,t,r){var n=p.prototype.toJSON;p.prototype.toJSON=s;var i=D(e,t,r);return p.prototype.toJSON=n,i}}else{var x="\\u00",E=function(e){var t=e.charCodeAt(0),r=T[t];return r?r:x+$(2,t.toString(16))},L=/[\x00-\x1f\x22\x5c]/g,U=function(e){return L.lastIndex=0,'"'+(L.test(e)?e.replace(L,E):e)+'"'},R=function(e,t,r,n,i,o,s){var l,u,c,d,g,_,m,y,b;if(a(function(){l=t[e]}),"object"==typeof l&&l&&(l.getUTCFullYear&&v.call(l)==S&&l.toJSON===p.prototype.toJSON?l=A(l):"function"==typeof l.toJSON&&(l=l.toJSON(e))),r&&(l=r.call(t,e,l)),l==h)return l===h?l:"null";switch(u=typeof l,"object"==u&&(c=v.call(l)),c||u){case"boolean":case O:return""+l;case"number":case k:return l>-1/0&&l<1/0?""+l:"null";case"string":case P:return U(""+l)}if("object"==typeof l){for(m=s.length;m--;)if(s[m]===l)throw f();if(s.push(l),d=[],y=o,o+=i,c==C){for(_=0,m=l.length;_0)for(n>10&&(n=10),i="";i.length=48&&i<=57||i>=97&&i<=102||i>=65&&i<=70||q();e+=J("0x"+a.slice(t,H));break;default:q()}else{if(34==i)break;for(i=a.charCodeAt(H),t=H;i>=32&&92!=i&&34!=i;)i=a.charCodeAt(++H);e+=a.slice(t,H)}if(34==a.charCodeAt(H))return H++,e;q();default:if(t=H,45==i&&(n=!0,i=a.charCodeAt(++H)),i>=48&&i<=57){for(48==i&&(i=a.charCodeAt(H+1),i>=48&&i<=57)&&q(),n=!1;H=48&&i<=57);H++);if(46==a.charCodeAt(H)){for(r=++H;r57));r++);r==H&&q(),H=r}if(i=a.charCodeAt(H),101==i||69==i){for(i=a.charCodeAt(++H),43!=i&&45!=i||H++,r=H;r57));r++);r==H&&q(),H=r}return+a.slice(t,H)}n&&q();var s=a.slice(H,H+4);if("true"==s)return H+=4,!0;if("fals"==s&&101==a.charCodeAt(H+4))return H+=5,!1;if("null"==s)return H+=4,null;q()}return"$"},F=function(e){var t,r;if("$"==e&&q(),"string"==typeof e){if("@"==(N?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=K(),"]"!=e;)r?","==e?(e=K(),"]"==e&&q()):q():r=!0,","==e&&q(),t.push(F(e));return t}if("{"==e){for(t={};e=K(),"}"!=e;)r?","==e?(e=K(),"}"==e&&q()):q():r=!0,","!=e&&"string"==typeof e&&"@"==(N?e.charAt(0):e[0])&&":"==K()||q(),t[e.slice(1)]=F(K());return t}q()}return e},V=function(e,t,r){var n=W(e,t,r);n===h?delete e[t]:e[t]=n},W=function(e,t,r){var n,i=e[t];if("object"==typeof i&&i)if(v.call(i)==C)for(n=i.length;n--;)V(v,j,i,n,r);else j(i,function(e){V(i,e,r)});return r.call(e,t,i)};i.parse=function(e,t){var r,n;return H=0,B=""+e,r=F(K()),"$"!=K()&&q(),H=B=null,t&&v.call(t)==w?W((n={},n[""]=r,n),"",t):r}}}return i.runInContext=e,i}var t={"function":!0,object:!0},r=t[typeof window]&&window||this,n=r.JSON,i=r.JSON3,a=!1,o=e(r,r.JSON3={noConflict:function(){return a||(a=!0,r.JSON=n,r.JSON3=i,n=i=null),o}});r.JSON?(r.JSON.parse=o.parse,r.JSON.stringify=o.stringify):r.JSON={parse:o.parse,stringify:o.stringify}}).call(window),function(e,t){t(e)}(window,function(e){if(e.atob)try{e.atob(" ")}catch(t){e.atob=function(e){var t=function(t){return e(String(t).replace(/[\t\n\f\r ]+/g,""))};return t.original=e,t}(e.atob)}else{var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;e.btoa=function(e){e=String(e);for(var t,n,i,a,o="",s=0,l=e.length%3;s255||(i=e.charCodeAt(s++))>255||(a=e.charCodeAt(s++))>255)return"";t=n<<16|i<<8|a,o+=r.charAt(t>>18&63)+r.charAt(t>>12&63)+r.charAt(t>>6&63)+r.charAt(63&t)}return l?o.slice(0,l-3)+"===".substring(l):o},e.atob=function(e){if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!n.test(e))return"";e+="==".slice(2-(3&e.length));for(var t,i,a,o="",s=0;s>16&255):64===a?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return o}}});var Vi,Wi={setup:function(e){Vi=e},log:function(){(Vi||console&&console.log||function(){}).apply(null,arguments)}},zi={get:function(e){return window.localStorage.getItem(e)},parse:function(e){var t;try{t=JSON.parse(zi.get(e))||null}catch(r){Wi.log("parse localStorage failed")}return t},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){Wi.log("localStorage is not support")}},remove:function(e){window.localStorage.removeItem(e)},isSupport:function(){var e=!0;try{var t="__local_store_support__",r="testIsSupportStorage";zi.set(t,r),zi.get(t)!==r&&(e=!1),zi.remove(t)}catch(n){e=!1}return e}},Xi=function(){function e(){return r=(9301*r+49297)%233280,r/233280}var t=new Date,r=t.getTime();return function(t){return Math.ceil(e()*t)}}();a.prototype.get=function(e,r,a,o){if(!e)throw new Error("key is must");r=r||1e4,a=a||1e3,o=o||function(){};var s=this.lockGetPrefix+e,l=zi.get(s),u=String(n());return l&&(l=i(l)||{randomNum:0,expireTime:0},l.expireTime>t())?o(null):(zi.set(s,JSON.stringify({randomNum:u,expireTime:t()+r})),void setTimeout(function(){l=i(zi.get(s))||{randomNum:0,expireTime:0},l&&l.randomNum===u?(o(zi.get(e)),zi.remove(e),zi.remove(s)):o(null)},a))},a.prototype.set=function(e,r,a,o,s){if(!e||!r)throw new Error("key and val is must");a=a||1e4,o=o||1e3,s=s||function(){};var l=this.lockSetPrefix+e,u=zi.get(l),c=String(n());return u&&(u=i(u)||{randomNum:0,expireTime:0},u.expireTime>t())?s({status:"fail",reason:"This key is locked"}):(zi.set(l,JSON.stringify({randomNum:c,expireTime:t()+a})),void setTimeout(function(){u=i(zi.get(l))||{randomNum:0,expireTime:0},u.randomNum===c?zi.set(e,r)&&s({status:"success"}):s({status:"fail",reason:"This key is locked"})},o))},l.prototype.on=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].push(r?t:{listener:t,once:!1}),this},l.prototype.prepend=function(e,t){if(!e||!t)return!1;if(!s(t))throw new Error("listener must be a function");this._events[e]=this._events[e]||[];var r="object"==typeof t;return this._events[e].unshift(r?t:{listener:t,once:!1}),this},l.prototype.prependOnce=function(e,t){return this.prepend(e,{listener:t,once:!0})},l.prototype.once=function(e,t){return this.on(e,{listener:t,once:!0})},l.prototype.off=function(e,t){var r=this._events[e];if(!r)return!1;if("number"==typeof t)r.splice(t,1);else if("function"==typeof t)for(var n=0,i=r.length;n=4&&(a=e(a,i),i=[]);return i.length>0&&(a=e(a,i)),a.toString(16)};return function(){var i=String(screen.height*screen.width);i=i&&/\d{5,}/.test(i)?i.toString(16):String(31242*n()).replace(".","").slice(0,8);var a=e()+"-"+t()+"-"+r()+"-"+i+"-"+e();return a?a:(String(n())+String(n())+String(n())).slice(2,15)}}(),Gi=function(e){this.ele=e},Qi=function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r};Gi.prototype={addClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")===-1&&(this.ele.className=this.ele.className+(""===this.ele.className?"":" ")+e),this},removeClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1&&(this.ele.className=t.replace(" "+e+" "," ").slice(1,-1)),this},hasClass:function(e){var t=" "+this.ele.className+" ";return t.indexOf(" "+e+" ")!==-1},attr:function(e,t){return"string"==typeof e&&h(t)?this.ele.getAttribute(e):("string"==typeof e&&(t=String(t),this.ele.setAttribute(e,t)),this)},offset:function(){try{var e=this.ele.getBoundingClientRect(),t=this.ele.ownerDocument,r=t.documentElement;return{top:e.top+window.pageYOffset-r.clientTop,left:e.left+window.pageXOffset-r.clientLeft}}catch(n){return{top:0,left:0}}},getSize:function(){if(!window.getComputedStyle)return{width:this.ele.offsetWidth,height:this.ele.offsetHeight};try{var e=this.ele.getBoundingClientRect();return{width:e.width,height:e.height}}catch(t){return{width:0,height:0}}},getStyle:function(e){return this.ele.currentStyle?this.ele.currentStyle[e]:this.ele.ownerDocument.defaultView.getComputedStyle(this.ele,null).getPropertyValue(e)},wrap:function(e){var t=document.createElement(e);return this.ele.parentNode.insertBefore(t,this.ele),t.appendChild(this.ele),y(t)},getCssStyle:function(e){var t=this.ele.style.getPropertyValue(e);if(t)return t;var r=null;if("function"==typeof window.getMatchedCSSRules&&(r=window.getMatchedCSSRules(this.ele)),!r||!v(r))return null;for(var n=r.length-1;n>=0;n--){var i=r[n];if(t=i.style.getPropertyValue(e))return t}},sibling:function(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e},next:function(){return this.sibling(this.ele,"nextSibling")},prev:function(){return this.sibling(this.ele,"previousSibling")},siblings:function(){return Qi((this.ele.parentNode||{}).firstChild,this.ele)},children:function(){return Qi(this.ele.firstChild)},parent:function(){var e=this.ele.parentNode;return e=e&&11!==e.nodeType?e:null,y(e)},previousElementSibling:function(){var e=this.ele;if("previousElementSibling"in document.documentElement)return y(e.previousElementSibling);for(;e=e.previousSibling;)if(1===e.nodeType)return y(e);return y(null)},getSameTypeSiblings:function(){for(var e=this.ele,t=e.parentNode,r=e.tagName.toLowerCase(),n=[],i=0;it._expirationTimestamp_?null:t.value:t},set:function(e,t,r){if(r){var n,i=new Date;n="s"===String(r).slice(-1)?i.getTime()+1e3*Number(String(r).slice(0,-1)):i.getTime()+24*r*60*60*1e3,t={value:t,_expirationTimestamp_:n}}this.data[e]=t},getNewUserFlagMemoryKey:function(e){return"sajssdk_2015_"+pa.sdk_id+e}},Sa={checkIsAddSign:function(e){"track"===e.type&&(Re()?e.properties.$is_first_day=!0:e.properties.$is_first_day=!1)},is_first_visit_time:!1,is_page_first_visited:!1,checkIsFirstTime:function(e){"track"===e.type&&"$pageview"===e.event&&(this.is_first_visit_time?(e.properties.$is_first_time=!0,this.is_first_visit_time=!1):e.properties.$is_first_time=!1)},setDeviceId:function(e,t){var r=null,n=ma.get("sensorsdata2015jssdkcross"+Fi.para.sdk_id);n=Fi.kit.userDecryptIfNeeded(n);var i={};null!=n&&ue(n)&&(i=JSON.parse(n),i.$device_id&&(r=i.$device_id)),r=r||e,Fi.para.cross_subdomain===!0?t.set("$device_id",r):(i.$device_id=r,i=JSON.stringify(i),Fi.para.encrypt_cookie&&(i=Fi.kit.userEncrypt(i)),ma.set("sensorsdata2015jssdkcross"+Fi.para.sdk_id,i,null,!0)),Fi.para.is_track_device_id&&(ba.currentProps.$device_id=r)},storeInitCheck:function(){if(Fi.is_first_visitor){var e=new Date,t={h:23-e.getHours(),m:59-e.getMinutes(),s:59-e.getSeconds()};ma.isSupport()?ma.set(Ue("new_user"),"1",3600*t.h+60*t.m+t.s+"s"):wa.set(wa.getNewUserFlagMemoryKey("new_user"),"1",3600*t.h+60*t.m+t.s+"s"),this.is_first_visit_time=!0,this.is_page_first_visited=!0}else Re()||(this.checkIsAddSign=function(e){"track"===e.type&&(e.properties.$is_first_day=!1)}),this.checkIsFirstTime=function(e){"track"===e.type&&"$pageview"===e.event&&(e.properties.$is_first_time=!1)}}},ka=function(){this._events=[],this.pendingEvents=[]};ka.prototype={emit:function(e){var t=[].slice.call(arguments,1);k(this._events,function(r){r.type===e&&r.callback.apply(r.context,t)}),this.pendingEvents.push({type:e,data:t}),this.pendingEvents.length>20?this.pendingEvents.shift():null},on:function(t,r,n,i){e(r)&&(this._events.push({type:t,callback:r,context:n||this}),i=i!==!1,this.pendingEvents.length>0&&i&&k(this.pendingEvents,function(e){e.type===t&&r.apply(n,e.data)}))},tempAdd:function(e,t){if(t&&e)return this.emit(e,t)},isReady:function(){}};var Pa=function(e){this.callback=e.callback,this.server_url=e.server_url,this.data=e.data};Pa.prototype.start=function(){var e=this;Ze({url:this.server_url,type:"POST",data:this.data,credentials:!1,timeout:pa.datasend_timeout,cors:!0,success:function(){e.end()},error:function(){e.end()}})},Pa.prototype.end=function(){if(this.callback){if(Oe("warning: sdk callback is deprecated."),!e(this.callback))return void Oe("error: sdk callback must be function.");this.callback()}};var Ca="sawebjssdk-",Oa="tab-sawebjssdk-";Ye.prototype={batchInterval:function(){""===this.serverUrl&&this.getServerUrl(),this.hasTabStorage||(this.generateTabStorage(),this.hasTabStorage=!0);var e=this;e.timer=setTimeout(function(){e.updateExpireTime(),e.recycle(),e.send(),clearTimeout(e.timer),e.batchInterval()},pa.batch_send.send_interval)},getServerUrl:function(){return p(pa.server_url)&&""!==pa.server_url||v(pa.server_url)&&pa.server_url.length?void(this.serverUrl=v(pa.server_url)?pa.server_url[0]:pa.server_url):je("\u5f53\u524d server_url \u4e3a\u7a7a\u6216\u4e0d\u6b63\u786e\uff0c\u53ea\u5728\u63a7\u5236\u53f0\u6253\u5370\u65e5\u5fd7\uff0cnetwork \u4e2d\u4e0d\u4f1a\u53d1\u6570\u636e\uff0c\u8bf7\u914d\u7f6e\u6b63\u786e\u7684 server_url\uff01")},send:function(){if(!(this.sendTimeStamp&&t()-this.sendTimeStamp-1&&r.splice(a,1),zi.remove(e[n])}r=Ce(r),zi.set(this.tabKey,JSON.stringify(this.generateTabStorageVal(r)))}},add:function(e){var r=Ca+String(n()),a=zi.get(this.tabKey);null===a?(this.tabKey=Oa+String(n()),a=this.generateTabStorageVal()):a=i(a)||this.generateTabStorageVal(),a.data.push(r),a.expireTime=t()+2*pa.batch_send.send_interval,zi.set(this.tabKey,JSON.stringify(a)),Fi.store.saveObjectVal(r,e),"track_signup"!==e.type&&"$pageview"!==e.event||this.sendImmediately()},generateTabStorage:function(){this.tabKey=Oa+String(n()),zi.set(this.tabKey,JSON.stringify(this.generateTabStorageVal()))},generateTabStorageVal:function(e){return e=e||[],{data:e,expireTime:t()+2*pa.batch_send.send_interval,serverUrl:this.serverUrl}},sendImmediately:function(){this.send()},recycle:function(){for(var e={},r=1e4,n="sajssdk-lock-get-",o=0;ou.expireTime&&this.serverUrl===u.serverUrl){var p=new a(n);p.get(s,r,1e3,function(e){if(e){null===zi.get(l.tabKey)&&l.generateTabStorage();var t=i(e)||l.generateTabStorageVal(),r=i(zi.get(l.tabKey))||l.generateTabStorageVal();r.data=Ce(r.data.concat(t.data)),zi.set(l.tabKey,JSON.stringify(r))}})}}else if(0===s.indexOf(n)){var d=i(zi.get(s))||{expireTime:0};t()-d.expireTime>r&&zi.remove(s)}}for(var f=0;f0)for(t=0;tpa.max_id_length)},keyLength:function(e){return!(!p(e)||e.length>pa.max_key_length)},stringLength:function(e){return!(!p(e)||e.length>pa.max_string_length)},voidZero:function(e){return void 0!==e},reservedLoginId:function(e){return!(re(this.loginIDReservedNames,e)>-1)},reservedUnbind:function(e){return!(re(this.unbindReservedNames,e)>-1)},reservedBind:function(e){var t=$a._state.history_login_id;return(!t||!t.name||t.name!==e)&&!(re(this.bindReservedNames,e)>-1)}},xa={distinct_id:{rules:["string","emptyString","idLength"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Id"),e(Aa[n])&&Aa[n](r),"idLength"===n)||t}},event:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="eventName"),e(Aa[n])&&Aa[n](r)),!0}},propertyKey:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="Property key"),e(Aa[n])&&Aa[n](r)),!0}},propertyValue:{rules:["voidZero"],onComplete:function(t,r,n){return t||(r="Property Value",e(Aa[n])&&Aa[n](r)),!0}},properties:function(t){return r(t)?k(t,function(t,r){et({propertyKey:r});var n=function(t,n,i){return t||(n=r+"'s Value",e(Aa[i])&&Aa[i](n)),!0};et({propertyValue:t},n)}):Da.voidZero(t)&&Ne("properties\u53ef\u4ee5\u6ca1\u6709\uff0c\u4f46\u6709\u7684\u8bdd\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},propertiesMust:function(e){return void 0!==e&&r(e)&&!oe(e)?this.properties.call(this,e):Ne("properties\u5fc5\u987b\u662f\u5bf9\u8c61"),!0},item_type:{rules:["string","emptyString","keyLength","regexTest"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="item_type"),e(Aa[n])&&Aa[n](r)),!0}},item_id:{rules:["string","emptyString","stringLength"],onComplete:function(t,r,n){return t||("emptyString"===n&&(r="item_id"),e(Aa[n])&&Aa[n](r)),!0}},loginIdKey:{rules:["string","emptyString","keyLength","regexTest","reservedLoginId"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="login_id_key"),e(Aa[n])&&Aa[n](r),"keyLength"===n)||t}},bindKey:{rules:["string","emptyString","keyLength","regexTest","reservedBind"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Key"),e(Aa[n])&&Aa[n](r),"keyLength"===n)||t}},unbindKey:{rules:["string","emptyString","keyLength","regexTest","reservedUnbind"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Key"),e(Aa[n])&&Aa[n](r),"keyLength"===n)||t}},bindValue:{rules:["string","emptyString","idLength"],onComplete:function(t,r,n){return!t&&("emptyString"===n&&(r="Value"),e(Aa[n])&&Aa[n](r),"idLength"===n)||t}},check:function(t,r,n){var i=this[t];if(e(i))return i.call(this,r);if(!i)return!1;for(var a=0;a"),r=d(t.pop());if("div"!==r.slice(0,3))return!1}return!0},Ea.configIsMatchNew=function(e,t){if(p(e.$element_selector)&&p(t.element_selector)){if("element_selector"===t.element_field&&"equal"===t["function"])return e.$element_selector===t.element_selector;if("element_selector"===t.element_field&&"contain"===t["function"])return e.$element_selector.indexOf(t.element_selector)>-1}if(p(e.$element_path)&&p(t.element_path)){if("element_path"===t.element_field&&"equal"===t["function"])return e.$element_path===t.element_path;if("element_path"===t.element_field&&"contain"===t["function"])return e.$element_path.indexOf(t.element_path)>-1}return!1},Ea.configIsMatch=function(e,t){return(!t.limit_element_content||t.element_content===e.$element_content)&&((!t.limit_element_position||t.element_position===String(e.$element_position))&&(t.element_field&&t["function"]?Ea.configIsMatchNew(e,t):Ea.configIsMatchOldVersion(e,t)))},Ea.configIsMatchOldVersion=function(e,t){if(!t.element_path)return!1;if(void 0!==e.$element_position){if(t.element_path!==e.$element_path)return!1}else if(Ea.isDiv({element_path:t.element_path})){if(e.$element_path.indexOf(t.element_path)<0)return!1}else if(t.element_path!==e.$element_path)return!1;return!0},Ea.filterConfig=function(e,t,n){var i=[];if(!n){var a=Ea.initUrl();if(!a)return[];n=a.page_url}return"$WebClick"===e.event&&k(t,function(t){r(t)&&("webclick"===t.event_type||"appclick"===t.event_type)&&r(t.event)&&t.event.url_host===n.host&&t.event.url_path===n.pathname&&Ea.configIsMatch(e.properties,t.event)&&i.push(t)}),i},Ea.getPropElInLi=function(e,t){if(!(e&&_(e)&&p(t)))return null;if("li"!==e.tagName.toLowerCase())return null;var r,n=Fi.heatmap.getDomSelector(e);if(n){r=n+t;var i=J(r);return i?i:null}return Ne("----custom---\u83b7\u53d6\u540c\u7ea7\u5c5e\u6027\u5143\u7d20\u5931\u8d25\uff0cselector\u4fe1\u606f\u5f02\u5e38",n,t),null},Ea.getProp=function(e,t){if(!r(e))return!1;if(!(p(e.name)&&e.name.length>0))return Ne("----vcustom----\u5c5e\u6027\u540d\u4e0d\u5408\u6cd5,\u5c5e\u6027\u629b\u5f03",e.name),!1;var n,i,a={};if("content"===e.method){var o;if(p(e.element_selector)&&e.element_selector.length>0)o=J(e.element_selector);else{if(!t||!p(e.list_selector))return Ne("----vcustom----\u5c5e\u6027\u914d\u7f6e\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var s=J(t.properties.$element_selector);if(!s)return Ne("----vcustom----\u70b9\u51fb\u5143\u7d20\u83b7\u53d6\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;var l=Fi.heatmap.getClosestLi(s);o=Ea.getPropElInLi(l,e.list_selector)}if(!o||!_(o))return Ne("----vcustom----\u5c5e\u6027\u5143\u7d20\u83b7\u53d6\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1;if("input"===o.tagName.toLowerCase())n=o.value||"";else if("select"===o.tagName.toLowerCase()){var u=o.selectedIndex;ce(u)&&_(o[u])&&(n=Xe(o[u],"select"))}else n=Xe(o,o.tagName.toLowerCase());if(e.regular){try{i=new RegExp(e.regular).exec(n)}catch(c){return Ne("----vcustom----\u6b63\u5219\u5904\u7406\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name),!1}if(null===i)return Ne("----vcustom----\u5c5e\u6027\u89c4\u5219\u5904\u7406\uff0c\u672a\u5339\u914d\u5230\u7ed3\u679c,\u5c5e\u6027\u629b\u5f03",e.name),!1;if(!v(i)||!p(i[0]))return Ne("----vcustom----\u6b63\u5219\u5904\u7406\u5f02\u5e38\uff0c\u5c5e\u6027\u629b\u5f03",e.name,i),!1;n=i[0]}if("STRING"===e.type)a[e.name]=n;else if("NUMBER"===e.type){if(n.length<1)return Ne("----vcustom----\u672a\u83b7\u53d6\u5230\u6570\u5b57\u5185\u5bb9\uff0c\u5c5e\u6027\u629b\u5f03",e.name,n),!1;if(isNaN(Number(n)))return Ne("----vcustom----\u6570\u5b57\u7c7b\u578b\u5c5e\u6027\u8f6c\u6362\u5931\u8d25\uff0c\u5c5e\u6027\u629b\u5f03",e.name,n),!1;a[e.name]=Number(n)}return a}return je("----vcustom----\u5c5e\u6027\u4e0d\u652f\u6301\u6b64\u83b7\u53d6\u65b9\u5f0f",e.name,e.method),!1},Ea.getAssignConfigs=function(e,t){var n=Ea.initUrl();if(!n||!n.page_url)return[];if(!r(t))return[];var i=[];return t.events=t.events||t.eventList,v(t.events)&&t.events.length>0?(k(t.events,function(t){r(t)&&r(t.event)&&t.event.url_host===n.page_url.host&&t.event.url_path===n.page_url.pathname&&e(t)&&i.push(t)}),i):[]};var La={events:[],getAssignConfigs:Ea.getAssignConfigs,filterConfig:Ea.filterConfig,getProp:Ea.getProp,initUrl:Ea.initUrl,updateEvents:function(e){v(e)&&(this.events=e)},init:function(){this.initAppGetPropsBridge()},geth5Props:function(e){var t={},n=[],i=this;if(!this.events.length)return{};if("$WebClick"===e.event){var a=this.filterConfig(e,this.events);if(!a.length)return{};k(a,function(a){r(a)&&(v(a.properties)&&a.properties.length>0&&k(a.properties,function(n){if(r(n))if(n.h5===!1)v(t.sensorsdata_app_visual_properties)||(t.sensorsdata_app_visual_properties=[]),t.sensorsdata_app_visual_properties.push(n);else{var a=i.getProp(n,e);r(a)&&(t=P(t,a))}}),p(a.event_name)&&n.push(a.event_name))}),Fi.bridge.hasVisualModeBridge()&&(t.sensorsdata_web_visual_eventName=n)}return t.sensorsdata_app_visual_properties&&(t.sensorsdata_app_visual_properties=j(JSON.stringify(t.sensorsdata_app_visual_properties))),t},initAppGetPropsBridge:function(){var e=this,t=new Fi.SDKJSBridge("getJSVisualProperties");return t.onAppNotify(function(n){var i={};try{n=JSON.parse(N(n))}catch(a){je("getJSVisualProperties data parse error!")}if(r(n)){var o=n.sensorsdata_js_visual_properties,s=e.initUrl();s&&(s=s.page_url,v(o)&&o.length>0&&k(o,function(t){if(r(t)&&t.url_host===s.host&&t.url_path===s.pathname&&t.h5){var n=e.getProp(t);r(n)&&(i=P(i,n))}}))}var l=Fi.bridge.bridge_info.platform;return"android"===l&&t.notifyApp({data:i},n.message_id),i}),t}},Ua={events:[],customProp:La,getAssignConfigs:Ea.getAssignConfigs,initUrl:Ea.initUrl,init:function(){if(this.initUrl()){var e=this.getConfigFromApp();e&&this.updateConfigs(e),this.customProp.init(),this.initAppUpdateConfigBridge()}},initAppUpdateConfigBridge:function(){var e=this;return new Fi.SDKJSBridge("updateH5VisualConfig").onAppNotify(function(t){if(t){try{t=JSON.parse(N(t))}catch(r){return void je("updateH5VisualConfig result parse error\uff01")}e.updateConfigs(t)}})},getConfigFromApp:function(){var e=new Fi.SDKJSBridge("sensorsdata_get_app_visual_config").notifyApp();if(e)try{e=JSON.parse(N(e))}catch(t){e=null,je("getAppVisualConfig result parse error\uff01")}return e},updateConfigs:function(e){this.events=this.filterConfigs(e),this.customProp.updateEvents(this.events)},filterConfigs:function(e){return this.getAssignConfigs(function(e){return!(!r(e)||e.h5===!1)},e)}},Ra={events:[],init:function(e){this.filterWebClickEvents(e)},filterWebClickEvents:function(e){this.events=Ba.getAssignConfigs(function(e){return!(!r(e)||e.event.unlimited_div!==!0||"webclick"!==e.event_type)},e)},isTargetEle:function(e){var t=Fi.heatmap.getEleDetail(e);if(!r(t)||!p(t.$element_path))return!1;for(var n=0;n0)},e),this.events.length?this.configSwitch=!0:this.configSwitch=!1},getVtrackProps:function(e){var t={};return this.collectAble()?("$WebClick"===e.event&&(t=this.clickCustomPropMaker(e,this.events)),t):{}},clickCustomPropMaker:function(e,t,n){var i=this;n=n||this.filterConfig(e,t,Ba.url_info.page_url);var a={};return n.length?(k(n,function(t){v(t.properties)&&t.properties.length>0&&k(t.properties,function(t){var n=i.getProp(t,e);r(n)&&P(a,n)})}),a):{}},getProp:Ea.getProp,getPropElInLi:Ea.getPropElInLi,filterConfig:Ea.filterConfig},Ba={unlimitedDiv:Ra,config:{},storageEnable:!0,storage_name:"webjssdkvtrackcollect",para:{session_time:18e5,timeout:5e3,update_interval:18e5},url_info:{},timer:null,update_time:null,customProp:Ha,initUrl:function(){var e=Ea.initUrl();if(e){var t;try{t=new f(Fi.para.server_url),t._values.Path="/config/visualized/Web.conf",e.api_url=t.getUrl()}catch(r){return je("----vtrackcollect---API\u5730\u5740\u89e3\u6790\u5f02\u5e38",r),!1}this.url_info=e}return e},init:function(){if(!r(Fi.para.heatmap)||!Fi.para.heatmap.get_vtrack_config)return!1;if(zi.isSupport()||(this.storageEnable=!1),!this.initUrl())return je("----vtrackcustom----\u521d\u59cb\u5316\u5931\u8d25\uff0curl\u4fe1\u606f\u89e3\u6790\u5931\u8d25"),!1;if(this.storageEnable){var e=$a.readObjectVal(this.storage_name);if(r(e)&&r(e.data))if(this.serverUrlIsSame(e.serverUrl)){this.config=e.data,this.update_time=e.updateTime,this.updateConfig(e.data);var t=(new Date).getTime(),n=t-this.update_time;if(ce(n)&&n>0&&n0&&r-1)return n;if("area"===i&&"map"===a.tagName.toLowerCase()&&y(a).prev().tagName&&"img"===y(a).prev().tagName.toLowerCase())return y(a).prev();if("div"===i&&Fi.para.heatmap.collect_tags.div&&r.isDivLevelValid(n)){var s=Fi.para.heatmap&&Fi.para.heatmap.collect_tags&&Fi.para.heatmap.collect_tags.div&&Fi.para.heatmap.collect_tags.div.max_level||1; if(s>1||r.isCollectableDiv(n))return n}if(r.isStyleTag(i)&&Fi.para.heatmap.collect_tags.div){var l=r.getCollectableParent(n);if(l&&r.isDivLevelValid(l))return l}var u=r.hasElement({event:t&&t.originalEvent||t,element:e},function(e){return r.isUnlimitedTag(e)});return u||null},getDivLevels:function(e,t){var r=Va.getElementPath(e,!0,t),n=r.split(" > "),i=0;return k(n,function(e){"div"===e&&i++}),i},isDivLevelValid:function(e){for(var t=Fi.para.heatmap&&Fi.para.heatmap.collect_tags&&Fi.para.heatmap.collect_tags.div&&Fi.para.heatmap.collect_tags.div.max_level||1,r=e.getElementsByTagName("div"),n=r.length-1;n>=0;n--)if(Va.getDivLevels(r[n],e)>t)return!1;return!0},getElementPath:function(e,t,r){for(var n=[];e.parentNode&&_(e);){if(e.id&&!t&&/^[A-Za-z][-A-Za-z0-9_:.]*$/.test(e.id)){n.unshift(e.tagName.toLowerCase()+"#"+e.id);break}if(r&&e===r){n.unshift(e.tagName.toLowerCase());break}if(e===document.body){n.unshift("body");break}n.unshift(e.tagName.toLowerCase()),e=e.parentNode}return n.join(" > ")},getClosestLi:function(t){var r=function(t,r){for(;t&&t!==document&&1===t.nodeType;t=t.parentNode)if(t.tagName&&e(t.tagName.toLowerCase)&&t.tagName.toLowerCase()===r)return t;return null};return r(t,"li")},getElementPosition:function(e,t,r){function n(e){var t=e.parentNode;if(!t)return"";var r=y(e).getSameTypeSiblings(),n=r.length;if(1===n)return 0;for(var i=0,a=e;y(a).previousElementSibling().ele;a=y(a).previousElementSibling().ele,i++);return i}var i=Fi.heatmap.getClosestLi(e);if(!i||!_(e))return null;var a=e.tagName.toLowerCase(),o=i.getElementsByTagName(a),s=o.length,l=[];if(s>1){for(var u=0;u1)return re(l,e)}return n(i)},setNotice:function(e){Fi.is_heatmap_render_mode=!0,Fi.para.heatmap||(Fi.errorMsg="\u60a8SDK\u6ca1\u6709\u914d\u7f6e\u5f00\u542f\u70b9\u51fb\u56fe\uff0c\u53ef\u80fd\u6ca1\u6709\u6570\u636e\uff01"),e&&"http:"===e.slice(0,5)&&"https:"===location.protocol&&(Fi.errorMsg="\u60a8\u7684\u5f53\u524d\u9875\u9762\u662fhttps\u7684\u5730\u5740\uff0c\u795e\u7b56\u5206\u6790\u73af\u5883\u4e5f\u5fc5\u987b\u662fhttps\uff01"),Fi.para.heatmap_url||(Fi.para.heatmap_url=gt()+"//static.sensorsdata.cn/sdk/"+Fi.lib_version+"/heatmap.min.js")},getDomIndex:function(e){if(!e.parentNode)return-1;for(var t=0,r=e.tagName,n=e.parentNode.children,i=0;i "):this.getDomSelector(e.parentNode,t,r)):(t.unshift("body"),t.join(" > "))},na:function(){var e=document.documentElement.scrollLeft||window.pageXOffset;return parseInt(isNaN(e)?0:e,10)},i:function(){var e=0;try{e=o.documentElement&&o.documentElement.scrollTop||m.pageYOffset,e=isNaN(e)?0:e}catch(t){e=0}return parseInt(e,10)},getBrowserWidth:function(){var e=window.innerWidth||document.body.clientWidth;return isNaN(e)?0:parseInt(e,10)},getBrowserHeight:function(){var e=window.innerHeight||document.body.clientHeight;return isNaN(e)?0:parseInt(e,10)},getScrollWidth:function(){var e=parseInt(document.body.scrollWidth,10);return isNaN(e)?0:e},getEleDetail:function(e){var t=this.getDomSelector(e),r=We({target:e});r.$element_selector=t?t:"",r.$element_path=Fi.heatmap.getElementPath(e,Fi.para.heatmap&&"not_use_id"===Fi.para.heatmap.element_selector);var n=Fi.heatmap.getElementPosition(e,r.$element_path,Fi.para.heatmap&&"not_use_id"===Fi.para.heatmap.element_selector);return ce(n)&&(r.$element_position=n),r},getPointerEventProp:function(e,t){function r(){var e=document.body.scrollLeft||document.documentElement.scrollLeft||0,t=document.body.scrollTop||document.documentElement.scrollTop||0;return{scrollLeft:e,scrollTop:t}}function n(e){if(document.documentElement.getBoundingClientRect){var t=e.getBoundingClientRect();return{targetEleX:t.left+r().scrollLeft||0,targetEleY:t.top+r().scrollTop||0}}}function i(e){return Number(Number(e).toFixed(3))}function a(e){var a=e.pageX||e.clientX+r().scrollLeft||e.offsetX+n(t).targetEleX||0,o=e.pageY||e.clientY+r().scrollTop||e.offsetY+n(t).targetEleY||0;return{$page_x:i(a),$page_y:i(o)}}return e?a(e):{}},start:function(t,n,i,a,o){if(r(Fi.para.heatmap)&&e(Fi.para.heatmap.collect_element)&&!Fi.para.heatmap.collect_element(n))return!1;var s=Va.getBasicEleInfo(t,n,i,a,o);_t(s)},getBasicEleInfo:function(t,n,i,a,o){var s=r(a)?a:{},l=e(o)?o:e(a)?a:void 0,u=this.getEleDetail(n);if(Fi.para.heatmap&&Fi.para.heatmap.custom_property){var c=Fi.para.heatmap.custom_property(n);r(c)&&(u=P(u,c))}return u=P(u,this.getPointerEventProp(t,n),s),{event:t,target:n,props:u,tagName:i,callback:l}},hasElement:function(e,t){var r;if(e.event){var n=e.event;r=n.path||n._getPath&&n._getPath()}else e.element&&(r=y(e.element).getParents());if(r&&v(r)&&r.length>0)for(var i=0;i-1)&&(!t||Fi.para.heatmap&&Fi.para.heatmap.collect_tags&&Fi.para.heatmap.collect_tags.div?!!(r(Fi.para.heatmap)&&r(Fi.para.heatmap.collect_tags)&&r(Fi.para.heatmap.collect_tags.div)&&v(Fi.para.heatmap.collect_tags.div.ignore_tags)&&re(Fi.para.heatmap.collect_tags.div.ignore_tags,e)>-1):re(i,e)>-1)},isCollectableDiv:function(e,t){try{if(0===e.children.length)return!0;for(var r=0;r1||this.isStyleTag(n,t)))return!1;if(!this.isCollectableDiv(e.children[r],t))return!1}return!0}catch(a){je("isCollectableDiv:"+a)}return!1},getCollectableParent:function(e,t){try{var r=e.parentNode,n=r?r.tagName.toLowerCase():"";if("body"===n)return!1;var i=Fi.para&&Fi.para.heatmap&&Fi.para.heatmap.collect_tags&&Fi.para.heatmap.collect_tags.div&&Fi.para.heatmap.collect_tags.div.max_level;if(n&&"div"===n&&(i>1||this.isCollectableDiv(r,t)))return r;if(r&&this.isStyleTag(n,t))return this.getCollectableParent(r,t)}catch(a){je("getCollectableParent:"+a)}return!1},listenUrlChange:function(e){e(),Fi.ee.spa.on("switch",function(){e()})},initScrollmap:function(){if(!r(Fi.para.heatmap)||"default"!==Fi.para.heatmap.scroll_notice_map)return!1;var t=!0;Fi.para.scrollmap&&e(Fi.para.scrollmap.collect_url)&&this.listenUrlChange(function(){t=!!Fi.para.scrollmap.collect_url()});var n=function(e){var t={};return t.timeout=e.timeout||1e3,t.func=e.func,t.hasInit=!1,t.inter=null,t.main=function(e,t){this.func(e,t),this.inter=null},t.go=function(e){var r={};this.inter||(r.$viewport_position=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,r.$viewport_position=Math.round(r.$viewport_position)||0,e?t.main(r,!0):this.inter=setTimeout(function(){t.main(r)},this.timeout))},t},i=n({timeout:1e3,func:function(e,t){var r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||0,n=new Date,i=n-this.current_time;(i>Fi.para.heatmap.scroll_delay_time&&r-e.$viewport_position!==0||t)&&(e.$url=Z(),e.$title=document.title,e.$url_path=G(),e.event_duration=Math.min(Fi.para.heatmap.scroll_event_duration,parseInt(i)/1e3),e.event_duration=e.event_duration<0?0:e.event_duration,ht(e)),this.current_time=n}});i.current_time=new Date,He(window,"scroll",function(){return!!t&&void i.go()}),He(window,"unload",function(){return!!t&&void i.go("notime")})},initHeatmap:function(){var t=this,n=!0;return!(!r(Fi.para.heatmap)||"default"!==Fi.para.heatmap.clickmap)&&(e(Fi.para.heatmap.collect_url)&&this.listenUrlChange(function(){n=!!Fi.para.heatmap.collect_url()}),"all"===Fi.para.heatmap.collect_elements?Fi.para.heatmap.collect_elements="all":Fi.para.heatmap.collect_elements="interact",void("all"===Fi.para.heatmap.collect_elements?He(document,"click",function(e){if(!n)return!1;var r=e||window.event;if(!r)return!1;var i=r.target||r.srcElement;if("object"!=typeof i)return!1;if("string"!=typeof i.tagName)return!1;var a=i.tagName.toLowerCase();if("body"===a||"html"===a)return!1;if(!i||!i.parentNode||!i.parentNode.children)return!1;var o=i.parentNode.tagName.toLowerCase();"a"===o||"button"===o?t.start(r,i.parentNode,o):t.start(r,i,a)}):He(document,"click",function(e){if(!n)return!1;var i=e||window.event;if(!i)return!1;var a=i.target||i.srcElement,o=Fi.heatmap.getTargetElement(a,e);o?t.start(i,o,o.tagName.toLowerCase()):_(a)&&"div"===a.tagName.toLowerCase()&&r(Fi.para.heatmap)&&Fi.para.heatmap.get_vtrack_config&&Ra.events.length>0&&Ra.isTargetEle(a)&&t.start(i,a,a.tagName.toLowerCase(),{$lib_method:"vtrack"})})))}},Wa={autoTrackIsUsed:!1,isReady:function(t){return e(t)?void t():void Fi.log("error: isReady callback must be function")},getUtm:function(){return ba.campaignParams()},getStayTime:function(){return(new Date-Fi._t)/1e3},setProfileLocal:function(e){if(!zi.isSupport())return Fi.setProfile(e),!1;if(!r(e)||oe(e))return!1;var t=$a.readObjectVal("sensorsdata_2015_jssdk_profile"),n=!1;if(r(t)&&!oe(t)){for(var i in e)!(i in t&&t[i]!==e[i])&&i in t||(t[i]=e[i],n=!0);n&&($a.saveObjectVal("sensorsdata_2015_jssdk_profile",t),Fi.setProfile(e))}else $a.saveObjectVal("sensorsdata_2015_jssdk_profile",e),Fi.setProfile(e)},setInitReferrer:function(){var e=De();Fi.setOnceProfile({_init_referrer:e,_init_referrer_host:ba.pageProp.referrer_host})},setSessionReferrer:function(){var e=De();$a.setSessionPropsOnce({_session_referrer:e,_session_referrer_host:ba.pageProp.referrer_host})},setDefaultAttr:function(){ba.register({_current_url:location.href,_referrer:De(),_referring_host:ba.pageProp.referrer_host})},trackHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName&&_(e.parentNode)){var n=e.tagName.toLowerCase(),i=e.parentNode.tagName.toLowerCase(),a=Fi.para.heatmap&&Fi.para.heatmap.track_attr?Fi.para.heatmap.track_attr:["data-sensors-click"];"button"===n||"a"===n||"a"===i||"button"===i||"input"===n||"textarea"===n||Y(e,a)||Va.start(null,e,n,t,r)}},trackAllHeatMap:function(e,t,r){if("object"==typeof e&&e.tagName){var n=e.tagName.toLowerCase();Va.start(null,e,n,t,r)}},autoTrackSinglePage:function(e,t){function n(e,t){Fi.track("$pageview",P({$referrer:i,$url:Z(),$url_path:G(),$title:document.title},e,mt()),t),i=Z()}var i;i=this.autoTrackIsUsed?ba.pageProp.url:ba.pageProp.referrer,e=r(e)?e:{};var a=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile,n(e,t),this.autoTrackSinglePage=n,vt(Fi.setOnceProfile,!1,a)},autoTrackWithoutProfile:function(e,t){e=r(e)?e:{},this.autoTrack(P(e,{not_set_profile:!0}),t)},autoTrack:function(e,t){e=r(e)?e:{};var n=mt(),i=!e.not_set_profile;e.not_set_profile&&delete e.not_set_profile;var a=location.href;Fi.para.is_single_page&&w(function(){var r=De(a,!0);Fi.track("$pageview",P({$referrer:r,$url:Z(),$url_path:G(),$title:document.title},n,e),t),a=Z()}),Fi.track("$pageview",P({$referrer:De(null,!0),$url:Z(),$url_path:G(),$title:document.title},n,e),t),vt(Fi.setOnceProfile,!0,i),this.autoTrackIsUsed=!0},getAnonymousID:function(){return oe($a._state)?"SDK is not initialized.":$a._state._first_id||$a._state.first_id||$a._state._distinct_id||$a._state.distinct_id},setPlugin:function(t){return!!r(t)&&void k(t,function(t,n){e(t)&&(r(window.SensorsDataWebJSSDKPlugin)&&window.SensorsDataWebJSSDKPlugin[n]?t(window.SensorsDataWebJSSDKPlugin[n]):r(Fi.modules)&&Fi.modules[n]?t(window.SensorsDataWebJSSDKPlugin[n]):Ne(n+"is not found,please check sensorsdata documents."))})},useModulePlugin:function(){Fi.use.apply(Fi,arguments)},useAppPlugin:function(){this.setPlugin.apply(this,arguments)}},za=new l,Xa=new l,Za={};Za.spa=za,Za.sdk=Xa,Za.initSystemEvent=function(){yt(function(e){za.emit("switch",e)})},Za.EVENT_LIST={spaSwitch:["spa","switch"],sdkBeforeInit:["sdk","beforeInit"],sdkInitPara:["sdk","initPara"],sdkAfterInitPara:["sdk","afterInitPara"],sdkInitAPI:["sdk","initAPI"],sdkAfterInitAPI:["sdk","afterInitAPI"],sdkAfterInit:["sdk","afterInit"],sdkReady:["sdk","ready"]};var Ga={state:0,historyState:[],stateType:{1:"1-init\u672a\u5f00\u59cb",2:"2-init\u5f00\u59cb",3:"3-store\u5b8c\u6210"},getState:function(){return this.historyState.join("\n")},setState:function(e){String(e)in this.stateType&&(this.state=e),this.historyState.push(this.stateType[e])}},Qa=1,Ya={__proto__:null,setInitVar:Pt,initPara:Ct,quick:Ot,use:Nt,track:jt,bind:Tt,unbind:It,trackLink:$t,trackLinks:At,setItem:Dt,deleteItem:xt,setProfile:Et,setOnceProfile:Lt,appendProfile:Ut,incrementProfile:Rt,deleteProfile:Ht,unsetProfile:Bt,identify:Jt,trackSignup:qt,registerPage:Kt,clearAllRegister:Ft,clearPageRegister:Vt,register:Wt,registerOnce:zt,registerSession:Xt,registerSessionOnce:Zt,login:Gt,loginWithKey:Qt,logout:Yt,getPresetProperties:er,readyState:Ga,debug:ya,on:bt,log:Oe};Wi.setup(Oe);var eo=P({},la,Ta),to={bridge_info:{touch_app_bridge:!1,verify_success:!1,platform:"",support_two_way_call:!1},is_verify_success:!1,initPara:function(){var e={is_send:Fi.para.use_app_track_is_send!==!1&&"only"!==Fi.para.use_app_track,white_list:[],is_mui:"mui"===Fi.para.use_app_track};"object"==typeof Fi.para.app_js_bridge?Fi.para.app_js_bridge=P({},e,Fi.para.app_js_bridge):Fi.para.use_app_track!==!0&&Fi.para.app_js_bridge!==!0&&"only"!==Fi.para.use_app_track&&"mui"!==Fi.para.use_app_track||(Fi.para.app_js_bridge=P({},e)),Fi.para.app_js_bridge.is_send===!1&&Ne("\u8bbe\u7f6e\u4e86 is_send:false,\u5982\u679c\u6253\u901a\u5931\u8d25\uff0c\u6570\u636e\u5c06\u88ab\u4e22\u5f03!")},app_js_bridge_v1:function(){function e(e){n=e,ue(n)&&(n=JSON.parse(n)),i&&(i(n),i=null,n=null)}function t(){"object"==typeof window.SensorsData_APP_JS_Bridge&&window.SensorsData_APP_JS_Bridge.sensorsdata_call_app&&(n=window.SensorsData_APP_JS_Bridge.sensorsdata_call_app(),ue(n)&&(n=JSON.parse(n)))}function r(){if(/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream){var e=document.createElement("iframe");e.setAttribute("src","sensorsanalytics://getAppInfo"),document.documentElement.appendChild(e),e.parentNode.removeChild(e),e=null}}var n=null,i=null;window.sensorsdata_app_js_bridge_call_js=function(t){e(t)},Fi.getAppStatus=function(e){return r(),t(),e?void(null===n?i=e:(e(n),n=null)):n}},hasVisualModeBridge:function(){var e=window.SensorsData_App_Visual_Bridge,t="sensorsdata_visualized_mode";return r(e)&&e[t]&&(e[t]===!0||e[t]())},validateAppUrl:ir};rr.prototype.call=function(e,t){var r=this,i=(new Date).getTime().toString(16)+String(n()).replace(".","").slice(1,8);this.resultCbs[i]=r.resultCbs[i]||{result:null,callbacks:[]},this.timeoutCbs[i]=r.timeoutCbs[i]||{isTimeout:!1,callbacks:[]},e=e.data?e:{data:e},e.data.message_id=i;var a=P({callType:this.type},e);return t&&(this.timerId=setTimeout(function(){r.timeoutCbs[i].isTimeout=!0;for(var e in r.timeoutCbs[i].callbacks)r.timeoutCbs[i].callbacks[e].call(null),r.timeoutCbs[i].callbacks.splice(e,1)},t)),nr(a),{onResult:function(e){return r.resultCbs[i].result?(e(r.resultCbs[i].result),this):(!r.timeoutCbs[i].isTimeout&&r.resultCbs[i].callbacks.push(e),this)},onTimeout:function(e){return r.timeoutCbs[i].isTimeout?(e(),this):(!r.resultCbs[i].result&&r.timeoutCbs[i].callbacks.push(e),this)}}},rr.prototype.onAppNotify=function(e){this.appCallJsCallback=e},rr.prototype.notifyApp=function(e,t){var r=P({callType:this.type},e);return t&&(r.message_id=t),nr(r)},ar.prototype={"double":function(){},getAppData:function(){},hasAppBridge:function(){return Fi.bridge.bridge_info.support_two_way_call},init:function(){},jsCallApp:function(){},requestToApp:function(t){this.bridge.call(t,t.timeout.time).onResult(function(r){e(t.callback)&&t.callback(r)}).onTimeout(function(){e(t.timeout.callback)&&t.timeout.callback()})}};var ro={isSeachHasKeyword:function(){return""!==V(location.href,"sa-request-id")&&("string"==typeof sessionStorage.getItem("sensors-visual-mode")&&sessionStorage.removeItem("sensors-visual-mode"),!0)},hasKeywordHandle:function(){var e=location.href,t=V(e,"sa-request-id")||null,r=V(e,"sa-request-type")||null,n=V(e,"sa-request-url")||null;if(Va.setNotice(n),ia.isSupport())if(null!==n&&sessionStorage.setItem("sensors_heatmap_url",n),sessionStorage.setItem("sensors_heatmap_id",t),null!==r)"1"===r||"2"===r||"3"===r?sessionStorage.setItem("sensors_heatmap_type",r):r=null;else{var i=sessionStorage.getItem("sensors_heatmap_type");r=null!==i?i:null}this.isReady(t,r)},isReady:function(e,t,r){Fi.para.heatmap_url?_e({success:function(){setTimeout(function(){"undefined"!=typeof sa_jssdk_heatmap_render&&(sa_jssdk_heatmap_render(Fi,e,t,r),"object"==typeof console&&"function"==typeof console.log&&(Fi.heatmap_version&&Fi.heatmap_version===Fi.lib_version||Ne("heatmap.js\u4e0esensorsdata.js\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\uff0c\u53ef\u80fd\u5b58\u5728\u98ce\u9669!")))},0)},error:function(){},type:"js",url:Fi.para.heatmap_url}):je("\u6ca1\u6709\u6307\u5b9aheatmap_url\u7684\u8def\u5f84")},isStorageHasKeyword:function(){return ia.isSupport()&&"string"==typeof sessionStorage.getItem("sensors_heatmap_id")},storageHasKeywordHandle:function(){Va.setNotice(),ro.isReady(sessionStorage.getItem("sensors_heatmap_id"),sessionStorage.getItem("sensors_heatmap_type"),location.href)},isWindowNameHasKeyword:function(){try{var e=JSON.parse(window.name),t=p(e["sa-request-page-url"])?u(e["sa-request-page-url"]):null;return e["sa-request-id"]&&p(e["sa-request-id"])&&t===location.href}catch(r){return!1}},windowNameHasKeywordHandle:function(){function e(e){var r=t[e];return p(r)?u(r):null}var t=JSON.parse(window.name),r=e("sa-request-id"),n=e("sa-request-type"),i=e("sa-request-url");Va.setNotice(i),ia.isSupport()&&(null!==i&&sessionStorage.setItem("sensors_heatmap_url",i),sessionStorage.setItem("sensors_heatmap_id",r),null!==n?"1"===n||"2"===n||"3"===n?sessionStorage.setItem("sensors_heatmap_type",n):n=null:n=null!==sessionStorage.getItem("sensors_heatmap_type")?sessionStorage.getItem("sensors_heatmap_type"):null),ro.isReady(r,n)}},no={isStorageHasKeyword:function(){return ia.isSupport()&&"string"==typeof sessionStorage.getItem("sensors-visual-mode")},isSearchHasKeyword:function(){return(sr("sa-visual-mode")===!0||"true"===sr("sa-visual-mode"))&&("string"==typeof sessionStorage.getItem("sensors_heatmap_id")&&sessionStorage.removeItem("sensors_heatmap_id"),!0)},loadVtrack:function(){_e({success:function(){},error:function(){},type:"js",url:Fi.para.vtrack_url?Fi.para.vtrack_url:gt()+"//static.sensorsdata.cn/sdk/"+Fi.lib_version+"/vtrack.min.js"})},messageListener:function(e){if(!e||!e.data||"sa-fe"!==e.data.source)return!1;if("v-track-mode"===e.data.type){if(e.data.data&&e.data.data.isVtrack)if(ia.isSupport()&&sessionStorage.setItem("sensors-visual-mode","true"),e.data.data.userURL&&location.href.match(/sa-visual-mode=true/)){var t=e.data.data.userURL;t&&(window.location.href=encodeURI(t))}else no.loadVtrack();window.removeEventListener("message",no.messageListener,!1)}},removeMessageHandle:function(){window.removeEventListener&&window.removeEventListener("message",no.messageListener,!1)},verifyVtrackMode:function(){window.addEventListener&&window.addEventListener("message",no.messageListener,!1),no.postMessage()},postMessage:function(){try{window.parent&&window.parent.postMessage&&window.parent.postMessage({source:"sa-web-sdk",type:"v-is-vtrack",data:{sdkversion:ga}},"*")}catch(e){je("\u6d4f\u89c8\u5668\u7248\u672c\u8fc7\u4f4e\uff0c\u4e0d\u652f\u6301 postMessage API")}},notifyUser:function(){var e=function(t){return!(!t||!t.data||"sa-fe"!==t.data.source)&&void("v-track-mode"===t.data.type&&(t.data.data&&t.data.data.isVtrack&&alert("\u5f53\u524d\u7248\u672c\u4e0d\u652f\u6301\uff0c\u8bf7\u5347\u7ea7\u90e8\u7f72\u795e\u7b56\u6570\u636e\u6cbb\u7406"),window.removeEventListener("message",e,!1)))};window.addEventListener&&window.addEventListener("message",e,!1),no.postMessage()}},io=["setItem","deleteItem","getAppStatus","track","quick","register","registerPage","registerOnce","trackSignup","setProfile","setOnceProfile","appendProfile","incrementProfile","deleteProfile","unsetProfile","identify","login","logout","trackLink","clearAllRegister","clearPageRegister","bind","unbind","loginWithKey"],ao={track:function(e,t,r){},quick:function(e,t,r,n){},register:function(e){},registerPage:function(e){},registerOnce:function(e){},clearAllRegister:function(e){},trackSignup:function(e,t,r,n){},setProfile:function(e,t){},setOnceProfile:function(e,t){},appendProfile:function(e,t){},incrementProfile:function(e,t){},deleteProfile:function(e){},unsetProfile:function(e,t){},identify:function(e,t){},login:function(e,t){},logout:function(e){},trackLink:function(e,t,r){},deleteItem:function(e,t){},setItem:function(e,t,r){},getAppStatus:function(e){},clearPageRegister:function(e){}};mr.prototype.process=function(e,t){if(!(e&&e in this.processDef))return void je("process ["+e+"] is not supported");var r=this.registeredInterceptors[e];if(r&&v(r)&&r.length>0)for(var n={current:0,total:r.length},i=new hr(t,n,Fi),a=0;a=2)&&(wo&&(Cr(!0),gr()),Za.initSystemEvent(),Fi.setInitVar(),Fi.readyState.setState(2),Fi.initPara(e),Za.sdk.emit("initPara"),Za.sdk.emit("afterInitPara"),Za.sdk.emit("initAPI"),Za.sdk.emit("afterInitAPI"),Fi.detectMode(),tr(),Za.sdk.emit("afterInit"),void Za.sdk.emit("ready"))},wo?Cr(!1):(Cr(!0),gr());var So,ko,Po,Co,Oo,No,jo,To,Io,$o,Ao,Do,xo,Eo,Lo,Uo,Ro,Ho,Bo="1.25.15",Jo={init:function(e){var t=e._.isString,r=e._.rot13defs,n=e._.dfmapping,i="data:enc;",a="dfm-enc-";e.ee.sdk.on("afterInitPara",function(){e.kit.userEncrypt=function(e){return a+n(e)},e.kit.userDecrypt=function(e){return 0===e.indexOf(i)?(e=e.substring(i.length),e=r(e)):0===e.indexOf(a)&&(e=e.substring(a.length),e=n(e)),e},e.kit.userDecryptIfNeeded=function(r){return!t(r)||0!==r.indexOf(i)&&0!==r.indexOf(a)||(r=e.kit.userDecrypt(r)),r}})},plugin_name:"UserEncryptDefault"},Mo=jr(Jo),qo="1.25.15",Ko={sd:null,init:function(e){if(this.sd)return!1;if(this.sd=e,!this.sd||!this.sd._)return!1;var t=this.sd._.cookie.get("sensors_amp_id"),r=this.sd.store._state.distinct_id;if(t&&t.length>0){var n="amp-"===t.slice(0,4);if(t!==r){if(!n)return!1;this.sd.store._state.first_id?(this.sd.identify(t,!0),this.sd.saEvent.send({original_id:t,distinct_id:r,type:"track_signup",event:"$SignUp",properties:{}},null),this.setAmpId(r)):this.sd.identify(t,!0)}}else this.setAmpId(r);this.addListener()},addListener:function(){var e=this;this.sd.events.on("changeDistinctId",function(t){e.setAmpId(t)}),this.sd.events.isReady()},setAmpId:function(e){this.sd._.cookie.set("sensors_amp_id",e)}},Fo=$r(Ko,"Amp","sdkReady"),Vo=window.SensorsData_App_Visual_Bridge,Wo=Vo&&Vo.sensorsdata_visualized_mode,zo=Vo&&Vo.sensorsdata_visualized_alert_info,Xo=Vo&&Vo.sensorsdata_hover_web_nodes,Zo={isVerify:function(){return Wo&&(Wo===!0||Wo.call(Vo))},commands:{app_alert:Ar,visualized_track:Dr,page_info:Dr,sensorsdata_get_app_visual_config:xr}},Go="1.25.15",Qo={init:function(e){Co=e,Oo=Co&&Co._,No=Co&&Co.log||console&&console.log||function(){},Rr()},handleCommand:Br},Yo=Ur(Qo,"AndroidBridge","sdkAfterInitPara"),es=window.SensorsData_App_Visual_Bridge,ts=es&&es.sensorsdata_visualized_mode,rs=es&&es.sensorsdata_visualized_alert_info,ns=es&&es.sensorsdata_hover_web_nodes,is={isVerify:function(){return ts&&(ts===!0||ts.call(es))},commands:{app_alert:Jr,visualized_track:Mr,page_info:Mr,sensorsdata_get_app_visual_config:qr}},as="1.25.15",os={init:function(e){Ao=e,Do=Ao&&Ao._,xo=Ao&&Ao.log||console&&console.log||function(){},Wr()},handleCommand:Xr},ss=Vr(os,"AndroidObsoleteBridge","sdkAfterInitPara"),ls="1.25.15",us={event_list:[],latest_event_initial_time:null,max_save_time:2592e6,init:function(e,t){function r(){return Eo=Lo._,Uo=Lo.store,!!Eo.localStorage.isSupport()&&(Lo.para.max_string_length=1024,n.eventList.init(),n.addLatestChannelUrl(),void n.addIsChannelCallbackEvent())}if(Lo||!e)return!1;t=t||{},Ro=t.cookie_name||"sensorsdata2015jssdkchannel",Lo=e;var n=this;r()},addIsChannelCallbackEvent:function(){Lo.registerPage({$is_channel_callback_event:function(e){if(Eo.isObject(e)&&e.event&&"$WebClick"!==e.event&&"$pageview"!==e.event&&"$WebStay"!==e.event&&"$SignUp"!==e.event)return!us.eventList.hasEvent(e.event)&&(us.eventList.add(e.event),!0)}})},addLatestChannelUrl:function(){var e=this.getUrlDomain(),t=this.cookie.getChannel();if("url\u89e3\u6790\u5931\u8d25"===e)this.registerAndSave({_sa_channel_landing_url:"",_sa_channel_landing_url_error:"url\u7684domain\u89e3\u6790\u5931\u8d25"});else if(Eo.isReferralTraffic(document.referrer)){var r=Eo.getQueryParam(location.href,"sat_cf");Eo.isString(r)&&r.length>0?(this.registerAndSave({_sa_channel_landing_url:location.href}),us.channelLinkHandler()):this.registerAndSave({_sa_channel_landing_url:""})}else t?Lo.registerPage(t):Lo.registerPage({_sa_channel_landing_url:"",_sa_channel_landing_url_error:"\u53d6\u503c\u5f02\u5e38"})},registerAndSave:function(e){Lo.registerPage(e),this.cookie.saveChannel(e)},cookie:{getChannel:function(){var e=Lo.kit.userDecryptIfNeeded(Eo.cookie.get(Ro));return e=Eo.safeJSONParse(e),!(!Eo.isObject(e)||!e.prop)&&e.prop},saveChannel:function(e){var t={prop:e},r=JSON.stringify(t);Lo.para.encrypt_cookie&&(r=Lo.kit.userEncrypt(r)),Eo.cookie.set(Ro,r)}},channelLinkHandler:function(){this.eventList.reset(),Lo.track("$ChannelLinkReaching")},getUrlDomain:function(){var e=Eo.info.pageProp.url_domain;return""===e&&(e="url\u89e3\u6790\u5931\u8d25"),e},eventList:{init:function(){var e=this.get(),t=(new Date).getTime();if(e&&Eo.isNumber(e.latest_event_initial_time)&&Eo.isArray(e.eventList)){var r=t-e.latest_event_initial_time;r>0&&r0&&(1===arguments.length&&Cs(arguments[0])?t=arguments[0]:arguments.length>=2&&Cs(arguments[1])&&(t=arguments[1])),!Ps())return this.log("\u4e0d\u652f\u6301\u5f53\u524d\u7cfb\u7edf\uff0c\u76ee\u524d\u53ea\u652f\u6301Android\u548ciOS"),!1;if(Cs(t)&&this.sd._.isNumber(t.timeout)&&t.timeout>=2500&&(this.timeout=t.timeout),!this.sd.para.server_url)return this.log("\u795e\u7b56JS SDK\u914d\u7f6e\u9879server_url\u672a\u6b63\u786e\u914d\u7f6e"),!1;var r=Ns(this.sd);this.apiURL=this.apiURL.replace("{origin}",r.origin).replace("{project}",r.project);var n=this.sd._.getQueryParam(window.location.href,"deeplink");if(!n)return this.log("\u5f53\u524d\u9875\u9762\u7f3a\u5c11deeplink\u53c2\u6570"),!1;n=window.decodeURIComponent(n);var i=Os(n);return i?(this.key=i[2],this.apiURL=this.apiURL.replace("{key}",window.encodeURIComponent(i[2])),this.sd._.ajax({url:this.apiURL,type:"GET",cors:!0,credentials:!1,success:function(e){return e.errorMsg?(Is.log("API\u62a5\u9519\uff1a"+e.errorMsg),!1):(Is.data=e,Is.log("API\u67e5\u8be2\u6210\u529f\uff0c\u6570\u636e\uff1a"+JSON.stringify(e,null," ")),void(this.data.app_key&&(this.data.android_info&&this.data.android_info.url_schemes&&(this.data.android_info.url_schemes+="://sensorsdata/sd/"+this.data.app_key+"/"+this.key),this.data.ios_info&&this.data.ios_info.url_schemes&&(this.data.ios_info.url_schemes+="://sensorsdata/sd/"+this.data.app_key+"/"+this.key))))}.bind(this),error:function(){Is.log("API\u67e5\u8be2\u51fa\u9519")}}),void this.addListeners()):(this.log("\u5f53\u524d\u9875\u9762\u7684deeplink\u53c2\u6570\u65e0\u6548"),!1)},openDeepLink:function(){if(this.log("openDeeplink()"),!this.data)return this.log("\u6ca1\u6709Deep link\u6570\u636e!"),!1;if("iOS"===ks){this.log("\u5f53\u524d\u7cfb\u7edf\u662fiOS");var e=this.sd&&this.sd._&&this.sd._.getIOSVersion()>=9&&this.data.ios_info.ios_wake_url?this.data.ios_info.ios_wake_url:this.data.ios_info.url_schemes;this.log("\u5524\u8d77APP\u7684\u5730\u5740\uff1a"+e),Ts(this,e,this.data.ios_info.download_url)}else this.log("\u5f53\u524d\u7cfb\u7edf\u662f android"),js(this,this.data.android_info.url_schemes,this.data.android_info.download_url); },log:function(e){this.sd&&this.sd.log(e)},addListeners:function(){var e=ds().visibilityChange,t=this;e&&document.addEventListener(e,function(){clearTimeout(t.timer),t.log("visibilitychange, clear timeout:"+t.timer)},!1),window.addEventListener("pagehide",function(){t.log("page hide, clear timeout:"+t.timer),clearTimeout(t.timer)},!1)}},$s=tn(Is,"Deeplink","sdkReady"),As="1.25.15",Ds={init:function(e){_s=e,hs=_s&&_s._,ms=_s&&_s.log||console&&console.log||function(){},sn()},handleCommand:un},xs=on(Ds,"IOSBridge","sdkAfterInitPara"),Es="1.25.15",Ls={init:function(e){vs=e,ys=vs&&vs._,bs=vs&&vs.log||console&&console.log||function(){},fn()}},Us=dn(Ls,"IOSObsoleteBridge","sdkAfterInitPara"),Rs="1.25.15",Hs=5e3,Bs=432e3;bn.prototype.init=function(e,t){if(e){if(this.sd=e,this._=this.sd._,t){this.option=t;var r=t.heartbeat_interval_time;r&&(this._.isNumber(r)||this._.isNumber(1*r))&&1*r>0&&(this.heartbeat_interval_time=1e3*r);var n=t.max_duration;n&&(this._.isNumber(n)||this._.isNumber(1*n))&&1*n>0&&(this.max_duration=n)}this.page_id=Number(String(this._.getRandom()).slice(2,5)+String(this._.getRandom()).slice(2,4)+String((new Date).getTime()).slice(-4)),this.addEventListener(),document.hidden===!0?this.page_show_status=!1:this.addHeartBeatInterval(),this.log("PageLeave\u521d\u59cb\u5316\u5b8c\u6bd5")}else this.log("\u795e\u7b56JS SDK\u672a\u6210\u529f\u5f15\u5165")},bn.prototype.log=function(e){this.sd&&this.sd.log(e)},bn.prototype.refreshPageEndTimer=function(){var e=this;this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout(function(){e.page_hidden_status=!1},Hs)},bn.prototype.hiddenStatusHandler=function(){clearTimeout(this.timer),this.timer=null,this.page_hidden_status=!1},bn.prototype.pageStartHandler=function(){this.start_time=+new Date,!document.hidden==!0?this.page_show_status=!0:this.page_show_status=!1,this.url=location.href,this.title=document.title},bn.prototype.pageEndHandler=function(){if(this.page_hidden_status!==!0){var e=this.getPageLeaveProperties();this.page_show_status===!1&&delete e.event_duration,this.page_show_status=!1,this.page_hidden_status=!0,this.isCollectUrl(this.url)&&this.sd.track("$WebPageLeave",e),this.refreshPageEndTimer(),this.delHeartBeatData()}},bn.prototype.addEventListener=function(){this.addPageStartListener(),this.addPageSwitchListener(),this.addSinglePageListener(),this.addPageEndListener()},bn.prototype.addPageStartListener=function(){var e=this;"onpageshow"in window&&this._.addEvent(window,"pageshow",function(){e.pageStartHandler(),e.hiddenStatusHandler()})},bn.prototype.isCollectUrl=function(e){return"function"!=typeof this.option.isCollectUrl||("string"!=typeof e||""===e||this.option.isCollectUrl(e))},bn.prototype.addSinglePageListener=function(){var e=this;this.sd.ee&&this.sd.ee.spa.prepend("switch",function(t){t!==location.href&&(e.url=t,e.pageEndHandler(),e.stopHeartBeatInterval(),e.current_page_url=e.url,e.pageStartHandler(),e.hiddenStatusHandler(),e.addHeartBeatInterval())})},bn.prototype.addPageEndListener=function(){var e=this;this._.each(["pagehide","beforeunload","unload"],function(t){"on"+t in window&&e._.addEvent(window,t,function(){e.pageEndHandler(),e.stopHeartBeatInterval()})})},bn.prototype.addPageSwitchListener=function(){var e=this;this._.listenPageState({visible:function(){e.pageStartHandler(),e.hiddenStatusHandler(),e.addHeartBeatInterval()},hidden:function(){e.url=location.href,e.title=document.title,e.pageEndHandler(),e.stopHeartBeatInterval()}})},bn.prototype.addHeartBeatInterval=function(){this._.localStorage.isSupport()&&this.startHeartBeatInterval()},bn.prototype.startHeartBeatInterval=function(){var e=this;this.heartbeat_interval_timer&&this.stopHeartBeatInterval();var t=!0;this.isCollectUrl(this.url)||(t=!1),this.heartbeat_interval_timer=setInterval(function(){t&&e.saveHeartBeatData()},this.heartbeat_interval_time),t&&this.saveHeartBeatData("is_first_heartbeat"),this.reissueHeartBeatData()},bn.prototype.stopHeartBeatInterval=function(){clearInterval(this.heartbeat_interval_timer),this.heartbeat_interval_timer=null},bn.prototype.saveHeartBeatData=function(e){var t=this.getPageLeaveProperties(),r=new Date;t.$time=r,"is_first_heartbeat"===e&&(t.event_duration=3.14);var n=this.sd.kit.buildData({type:"track",event:"$WebPageLeave",properties:t});try{"success"===this.sd.bridge.bridge_info.verify_success&&(n.properties.$time=1*r)}catch(i){this.log(i.message)}n.heartbeat_interval_time=this.heartbeat_interval_time,this.sd.store.saveObjectVal(this.storage_name+"-"+this.page_id,n)},bn.prototype.delHeartBeatData=function(e){this._.localStorage.isSupport()&&this._.localStorage.remove(e||this.storage_name+"-"+this.page_id)},bn.prototype.reissueHeartBeatData=function(){for(var e=window.localStorage.length,t=e-1;t>=0;t--){var r=window.localStorage.key(t);if(r&&r!==this.storage_name+"-"+this.page_id&&0===r.indexOf(this.storage_name+"-")){var n=this.sd.store.readObjectVal(r);this._.isObject(n)&&1*new Date-n.time>n.heartbeat_interval_time+5e3&&(delete n.heartbeat_interval_time,n._flush_time=(new Date).getTime(),this.sd.kit.sendData(n),this.delHeartBeatData(r))}}},bn.prototype.getPageLeaveProperties=function(){var e=(+new Date-this.start_time)/1e3;(isNaN(e)||e<0||e>this.max_duration)&&(e=0),e=Number(e.toFixed(3));var t=this._.getReferrer(this.current_page_url),r=document.documentElement&&document.documentElement.scrollTop||window.pageYOffset||document.body&&document.body.scrollTop||0;r=Math.round(r)||0;var n={$title:this.title,$url:this._.getURL(this.url),$url_path:this._.getURLPath(this._.URL(this.url).pathname),$referrer_host:t?this._.getHostname(t):"",$referrer:t,$viewport_position:r};return 0!==e&&(n.event_duration=e),n=this._.extend(n,this.option.custom_props)};var Js=new bn,Ms=yn(Js,"PageLeave","sdkReady"),qs="1.25.15",Ks=!1,Fs={init:function(e,t){function r(t,r){if(t.getEntries&&"function"==typeof t.getEntries){for(var n=t.getEntries(),i=null,a=0;a=0&&i<10737418240&&(r.$page_resource_size=Number((i/1024).toFixed(3)))}}function n(t){var r=0;if(t.timing){var n=t.timing;0!==n.fetchStart&&e._.isNumber(n.fetchStart)&&0!==n.domContentLoadedEventEnd&&e._.isNumber(n.domContentLoadedEventEnd)?r=n.domContentLoadedEventEnd-n.fetchStart:e.log("performance \u6570\u636e\u83b7\u53d6\u5f02\u5e38")}return r}function i(t){var r=0;if(e._.isFunction(t.getEntriesByType)){var n=t.getEntriesByType("navigation")||[{}];r=(n[0]||{}).domContentLoadedEventEnd||0}return r}function a(){var o=0,s=window.performance||window.webkitPerformance||window.msPerformance||window.mozPerformance,l={$url:e._.getURL(),$title:document.title,$url_path:e._.getURLPath(),$referrer:e._.getReferrer(null,!0)};if(s?(o=i(s)||n(s),r(s,l)):e.log("\u6d4f\u89c8\u5668\u672a\u652f\u6301 performance API."),o>0){var u=e._.isObject(t)&&t.max_duration||1800;o=Number((o/1e3).toFixed(3)),(!e._.isNumber(u)||u<=0||o<=u)&&(l.event_duration=o)}Ks||(e.track("$WebPageLoad",l),Ks=!0),window.removeEventListener?window.removeEventListener("load",a):window.detachEvent&&window.detachEvent("onload",a)}"complete"==document.readyState?a():window.addEventListener?window.addEventListener("load",a):window.attachEvent&&window.attachEvent("onload",a)}},Vs=kn(Fs,"PageLoad","sdkReady");Cn.prototype.init=function(e){if(e){this.sd=e,this._=e._,this.log=e.log;var t=this;e.registerInterceptor("buildDataStage",{extendProps:{priority:0,entry:function(e){return Pn(e,t)}}})}else this.log("\u795e\u7b56JS SDK\u672a\u6210\u529f\u5f15\u5165")},Cn.prototype.register=function(e){return this.sd?void(this._.isObject(e)&&this._.isArray(e.events)&&e.events.length>0&&this._.isObject(e.properties)&&!this._.isEmptyObject(e.properties)?this.customRegister.push(e):this.log("RegisterProperties: register \u53c2\u6570\u9519\u8bef")):void this.log("\u795e\u7b56JS SDK\u672a\u6210\u529f\u5f15\u5165")},Cn.prototype.hookRegister=function(e){return this.sd?void(this._.isFunction(e)?this.customRegister.push(e):this.log("RegisterProperties: hookRegister \u53c2\u6570\u9519\u8bef")):void this.log("\u795e\u7b56JS SDK\u672a\u6210\u529f\u5f15\u5165")};var Ws="1.25.15";Cn.prototype.plugin_name="RegisterProperties";var zs,Xs,Zs=new Cn,Gs=jn(Zs),Qs="1.25.15",Ys=window.console&&window.console.log||function(){},el={init:function(e){return zs=e,Ys=zs&&zs.log||Ys,e&&e.kit&&e.kit.buildData?(Xs=zs.kit.buildData,zs.kit.buildData=An,void Ys("RegisterPropertyPageHeight \u63d2\u4ef6\u521d\u59cb\u5316\u5b8c\u6210")):void Ys("RegisterPropertyPageHeight \u63d2\u4ef6\u521d\u59cb\u5316\u5931\u8d25,\u5f53\u524d\u4e3bsdk\u4e0d\u652f\u6301 RegisterPropertyPageHeight \u63d2\u4ef6\uff0c\u8bf7\u5347\u7ea7\u4e3bsdk")}},tl=$n(el,"RegisterPropertyPageHeight","sdkReady"),rl="1.25.15",nl={};nl.getPart=function(e){var t=!1,r=this.option.length;if(r)for(var n=0;n-1)return!0;return t},nl.getPartHash=function(e){var t=this.option.length,r=!1;if(t)for(var n=0;n-1)return this.option[n].after_hash;return!!r},nl.getCurrenId=function(){var e=this.store.getDistinctId()||"",t=this.store.getFirstId()||"";this._.urlSafeBase64&&this._.urlSafeBase64.encode?e=e?this._.urlSafeBase64.trim(this._.urlSafeBase64.encode(this._.base64Encode(e))):"":this._.rot13obfs&&(e=e?this._.rot13obfs(e):"");var r=t?"f"+e:"d"+e;return encodeURIComponent(r)},nl.rewriteUrl=function(e,t){var r=this,n=/([^?#]+)(\?[^#]*)?(#.*)?/,i=n.exec(e),a="";if(i){var o,s=i[1]||"",l=i[2]||"",u=i[3]||"",c="_sasdk="+this.getCurrenId(),p=function(e){var t=e.split("&"),n=[];return r._.each(t,function(e){e.indexOf("_sasdk=")>-1?n.push(c):n.push(e)}),n.join("&")};if(this.getPartHash(e)){o=u.indexOf("_sasdk");var d=u.indexOf("?");a=d>-1?o>-1?s+l+"#"+u.substring(1,o)+p(u.substring(o,u.length)):s+l+u+"&"+c:s+l+"#"+u.substring(1)+"?"+c}else{o=l.indexOf("_sasdk");var f=/^\?(\w)+/.test(l);a=f?o>-1?s+"?"+p(l.substring(1))+u:s+l+"&"+c+u:s+"?"+c+u}return t&&(t.href=a),a}},nl.getUrlId=function(){var e=location.href.match(/_sasdk=([aufd][^\?\#\&\=]+)/);if(this._.isArray(e)&&e[1]){var t=decodeURIComponent(e[1]);return!t||"f"!==t.substring(0,1)&&"d"!==t.substring(0,1)||(this._.urlSafeBase64&&this._.urlSafeBase64.isUrlSafeBase64&&this._.urlSafeBase64.isUrlSafeBase64(t)?t=t.substring(0,1)+this._.base64Decode(this._.urlSafeBase64.decode(t.substring(1))):this._.rot13defs&&(t=t.substring(0,1)+this._.rot13defs(t.substring(1)))),t}return""},nl.setRefferId=function(e){var t=this.store.getDistinctId(),r=this.getUrlId();if(r&&""!==r){var n="a"===r.substring(0,1)||"d"===r.substring(0,1);r=r.substring(1),r!==t&&(n?(this.sd.identify(r,!0),this.store.getFirstId()&&this.sd.saEvent.send({original_id:r,distinct_id:t,type:"track_signup",event:"$SignUp",properties:{}},null)):this.store.getFirstId()&&!e.re_login||this.sd.login(r))}},nl.addListen=function(){var e=this,t=function(t){var r,n,i=t.target,a=i.tagName.toLowerCase(),o=i.parentNode;if("a"===a&&i.href||o&&o.tagName&&"a"===o.tagName.toLowerCase()&&o.href){"a"===a&&i.href?(r=i.href,n=i):(r=o.href,n=o);var s=e._.URL(r),l=s.protocol;"http:"!==l&&"https:"!==l||e.getPart(r)&&e.rewriteUrl(r,n)}};e._.addEvent(document,"mousedown",t),window.PointerEvent&&"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>=0&&e._.addEvent(document,"pointerdown",t)},nl.init=function(e,t){function r(t){for(var r=t.length,n=[],i=0;i0?(this.setRefferId(t),this.addListen(),this.option=t.linker,void(this.option=r(this.option))):void e.log("\u8bf7\u914d\u7f6e\u6253\u901a\u57df\u540d\u53c2\u6570\uff01")};var il,al,ol,sl,ll,ul,cl,pl,dl,fl,gl,_l,hl,ml=En(nl,"SiteLinker","sdkReady"),vl="utm_source utm_medium utm_campaign utm_content utm_term",yl="1.25.15",bl={init:function(e){function t(){var e=vl.split(" "),t="",r={};return il._.isArray(il.para.source_channel)&&il.para.source_channel.length>0&&(e=e.concat(il.para.source_channel),e=il._.unique(e)),il._.each(e,function(e){t=il._.getQueryParam(location.href,e),t.length&&(r[e]=t)}),r}e&&!il&&(il=e,il.registerInterceptor("businessStage",{getUtmData:{priority:0,entry:function(){return t()}}}))}},wl=Rn(bl,"Utm","sdkAfterInitPara"),Sl="1.25.15",kl=!1,Pl=null,Cl={init:function(e){Pl=e,Pl.disableSDK=Mn,Pl.enableSDK=qn,Pl.getDisabled=Kn}},Ol=Jn(Cl,"DisableSDK","sdkInitAPI"),Nl="1.25.15",jl={plugin_name:"DebugSender",init:function(e){al=e,ol=al._,Gn()}},Tl=Wn(jl),Il="1.25.15",$l={plugin_name:"JsappSender",init:function(e){sl=e,ll=sl._,ri()}},Al=ei($l),Dl="1.25.15",xl=null,El={plugin_name:"BatchSender",init:function(e){ul=e,cl=ul._,ui()}},Ll=oi(El),Ul="1.25.15",Rl={plugin_name:"BeaconSender",init:function(e){pl=e,dl=pl._,hi()}},Hl=di(Rl),Bl="1.25.15",Jl={plugin_name:"AjaxSender",init:function(e){fl=e,gl=fl._,ki()}},Ml=yi(Jl),ql="1.25.15",Kl={plugin_name:"ImageSender",init:function(e){_l=e,hl=_l._,$i()}},Fl=Oi(Kl),Vl=null,Wl=null,zl=[],Xl={init:function(e){e&&(Vl=e,Wl=Vl._,Vl.logger&&Vl.logger.appendWriter(Ei),Vl.on&&Vl.on("sdkAfterInitPara",function(){for(var e=0;e