@jingsocial/jingtrack-miniprogram-sdk 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,46 @@
1
+ <img src="https://www.jingdigital.com/wp-content/uploads/2018/08/logo%E6%A8%AA%E6%9D%BFnew-uai-258x77.png" width="200" >
2
+
3
+ ## JingTrack 小程序 SDK
4
+
5
+ JingTrack 小程序 SDK 是一款针对原生小程序的埋点 JS 插件,支持 uni-app 和 Taro 框架。
6
+
7
+ ### 下载地址
8
+
9
+ > 注意:版本可能发生变动。
10
+
11
+ - 原生 : https://dev.jingsocial.com/open/js/jingtrack-miniprogram/jingtrack-wx-sdk-v1.0.0.js
12
+ - uni-app : https://dev.jingsocial.com/open/js/jingtrack-miniprogram/jingtrack-uniapp-sdk-v1.0.0.js
13
+ - Taro : https://dev.jingsocial.com/open/js/jingtrack-miniprogram/jingtrack-taro-sdk-v1.0.0.js
14
+
15
+ ### npm 集成
16
+
17
+ ```js
18
+ import jingTrack from '@jingsocial/jingtrack-miniprogram-sdk/dist/wx'; // 原生
19
+ import jingTrack from '@jingsocial/jingtrack-miniprogram-sdk/dist/uniapp'; // uni-app
20
+ import jingTrack from '@jingsocial/jingtrack-miniprogram-sdk/dist/taro'; // Taro
21
+ ```
22
+
23
+ ### 集成文档
24
+
25
+ [JingTrack SDK 使用指南](https://www.yuque.com/g/_mochi/mochi/xtc54zma44sq385a/collaborator/join?token=TdmJUgoQzuWMQd3O&source=doc_collaborator)
26
+
27
+ <!-- ## 开发
28
+
29
+ ### 安装依赖包
30
+
31
+ ```bash
32
+ yarn
33
+ ```
34
+
35
+ ### 本地开发
36
+
37
+ ```bash
38
+ yarn local
39
+ ```
40
+
41
+ ### 打包 SDK
42
+
43
+ - `yarn build:wx` : 原生微信小程序
44
+ - `yarn build:uniapp` : uni-app 框架
45
+ - `yarn build:taro` : Taro 框架
46
+ - `yarn build` : 原生微信小程序、uni-app 框架 和 Taro 框架 -->
package/dist/taro.js ADDED
@@ -0,0 +1 @@
1
+ var t=function(){return t=Object.assign||function(t){for(var n,e=1,i=arguments.length;i>e;e++)for(var r in n=arguments[e])({}).hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},t.apply(this,arguments)};function n(t,n,e,i){return new(e||(e=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function u(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}c((i=i.apply(t,n||[])).next())}))}function e(t,n){var e,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(e=1,i&&(r=2&u[0]?i.return:u[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,u[1])).done)return r;switch(i=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,i=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){a.label=u[1];break}if(6===u[0]&&a.label<r[1]){a.label=r[1],r=u;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(u);break}r[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(t,a)}catch(t){u=[6,t],i=0}finally{e=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function i(t,n,e){if(e||2===arguments.length)for(var i,r=0,o=n.length;o>r;r++)!i&&r in n||(i||(i=[].slice.call(n,0,r)),i[r]=n[r]);return t.concat(i||[].slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}var a=function(t,n){return t===n||t!=t&&n!=n},u=a,c=function(t,n){for(var e=t.length;e--;)if(u(t[e][0],n))return e;return-1},s=c,l=[].splice,d=c,f=c,p=c,v=function(){this.__data__=[],this.size=0};function h(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var i=t[n];this.set(i[0],i[1])}}h.prototype.clear=v,h.prototype.delete=function(t){var n=this.__data__,e=s(n,t);return e>=0&&(e==n.length-1?n.pop():l.call(n,e,1),--this.size,!0)},h.prototype.get=function(t){var n=this.__data__,e=d(n,t);return 0>e?void 0:n[e][1]},h.prototype.has=function(t){return f(this.__data__,t)>-1},h.prototype.set=function(t,n){var e=this.__data__,i=p(e,t);return 0>i?(++this.size,e.push([t,n])):e[i][1]=n,this};var g,y=h,_=y,m="object"==typeof r&&r&&r.Object===Object&&r,b=m,j="object"==typeof self&&self&&self.Object===Object&&self,T=b||j||Function("return this")(),I=T.Symbol,k=I,w=Object.prototype,E=w.hasOwnProperty,P=w.toString,S=k?k.toStringTag:void 0,A={}.toString,x=function(t){var n=E.call(t,S),e=t[S];try{t[S]=void 0;var i=!0}catch(t){}var r=P.call(t);return i&&(n?t[S]=e:delete t[S]),r},O=I?I.toStringTag:void 0,C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":O&&O in Object(t)?x(t):function(t){return A.call(t)}(t)},U=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)},V=o(U),N=C,L=U,q=function(t){if(!L(t))return!1;var n=N(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n},F=o(q),D=T["__core-js_shared__"],H=(g=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",M=function(){}.toString,R=function(t){if(null!=t){try{return M.call(t)}catch(t){}try{return t+""}catch(t){}}return""},B=q,z=function(t){return!!H&&H in t},G=U,$=R,J=/^\[object .+?Constructor\]$/,W=function(){}.toString,K=Object.prototype.hasOwnProperty,Q=RegExp("^"+W.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=function(t,n){var e=function(t,n){return null==t?void 0:t[n]}(t,n);return function(t){return!(!G(t)||z(t))&&(B(t)?Q:J).test($(t))}(e)?e:void 0},Z=Y(T,"Map"),X=Y(Object,"create"),tt=X,nt=X,et={}.hasOwnProperty,it=X,rt={}.hasOwnProperty,ot=X,at=function(){this.__data__=tt?tt(null):{},this.size=0},ut=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},ct=function(t){var n=this.__data__;if(nt){var e=n[t];return"__lodash_hash_undefined__"===e?void 0:e}return et.call(n,t)?n[t]:void 0};function st(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var i=t[n];this.set(i[0],i[1])}}st.prototype.clear=at,st.prototype.delete=ut,st.prototype.get=ct,st.prototype.has=function(t){var n=this.__data__;return it?void 0!==n[t]:rt.call(n,t)},st.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=ot&&void 0===n?"__lodash_hash_undefined__":n,this};var lt=st,dt=y,ft=Z,pt=function(t,n){var e,i,r=t.__data__;return("string"==(i=typeof(e=n))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==e:null===e)?r["string"==typeof n?"string":"hash"]:r.map},vt=pt,ht=pt,gt=pt,yt=pt;function _t(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var i=t[n];this.set(i[0],i[1])}}_t.prototype.clear=function(){this.size=0,this.__data__={hash:new lt,map:new(ft||dt),string:new lt}},_t.prototype.delete=function(t){var n=vt(this,t).delete(t);return this.size-=n?1:0,n},_t.prototype.get=function(t){return ht(this,t).get(t)},_t.prototype.has=function(t){return gt(this,t).has(t)},_t.prototype.set=function(t,n){var e=yt(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this};var mt=_t,bt=y,jt=Z,Tt=mt,It=y,kt=function(){this.__data__=new _,this.size=0},wt=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Et=function(t){return this.__data__.get(t)},Pt=function(t){return this.__data__.has(t)};function St(t){var n=this.__data__=new It(t);this.size=n.size}St.prototype.clear=kt,St.prototype.delete=wt,St.prototype.get=Et,St.prototype.has=Pt,St.prototype.set=function(t,n){var e=this.__data__;if(e instanceof bt){var i=e.__data__;if(!jt||199>i.length)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new Tt(i)}return e.set(t,n),this.size=e.size,this};var At=St,xt=Y,Ot=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ct=Ot,Ut=function(t,n,e){"__proto__"==n&&Ct?Ct(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e},Vt=Ut,Nt=a,Lt=function(t,n,e){(void 0!==e&&!Nt(t[n],e)||void 0===e&&!(n in t))&&Vt(t,n,e)},qt=function(t,n,e){for(var i=-1,r=Object(t),o=e(t),a=o.length;a--;){var u=o[++i];if(!1===n(r[u],u,r))break}return t},Ft={exports:{}};!function(t,n){var e=T,i=n&&!n.nodeType&&n,r=i&&t&&!t.nodeType&&t,o=r&&r.exports===i?e.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.exports=function(t,n){if(n)return t.slice();var e=t.length,i=a?a(e):new t.constructor(e);return t.copy(i),i}}(Ft,Ft.exports);var Dt=Ft.exports,Ht=T.Uint8Array,Mt=Ht,Rt=function(t,n){var e=-1,i=t.length;for(n||(n=Array(i));++e<i;)n[e]=t[e];return n},Bt=U,zt=Object.create,Gt=function(){function t(){}return function(n){if(!Bt(n))return{};if(zt)return zt(n);t.prototype=n;var e=new t;return t.prototype=void 0,e}}(),$t=function(t,n){return function(e){return t(n(e))}},Jt=$t(Object.getPrototypeOf,Object),Wt=Object.prototype,Kt=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Wt)},Qt=Gt,Yt=Jt,Zt=Kt,Xt=function(t){return null!=t&&"object"==typeof t},tn=C,nn=Xt,en=function(t){return nn(t)&&"[object Arguments]"==tn(t)},rn=Xt,on=Object.prototype,an=on.hasOwnProperty,un=on.propertyIsEnumerable,cn=en(function(){return arguments}())?en:function(t){return rn(t)&&an.call(t,"callee")&&!un.call(t,"callee")},sn=Array.isArray,ln=o(sn),dn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&9007199254740991>=t},fn=q,pn=dn,vn=function(t){return null!=t&&pn(t.length)&&!fn(t)},hn=vn,gn=Xt,yn=function(t){return gn(t)&&hn(t)},_n={exports:{}},mn=function(){return!1};!function(t,n){var e=T,i=mn,r=n&&!n.nodeType&&n,o=r&&t&&!t.nodeType&&t,a=o&&o.exports===r?e.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u}(_n,_n.exports);var bn=_n.exports,jn=C,Tn=Jt,In=Xt,kn=function(){}.toString,wn=Object.prototype.hasOwnProperty,En=kn.call(Object),Pn=C,Sn=dn,An=Xt,xn={};xn["[object Float32Array]"]=xn["[object Float64Array]"]=xn["[object Int8Array]"]=xn["[object Int16Array]"]=xn["[object Int32Array]"]=xn["[object Uint8Array]"]=xn["[object Uint8ClampedArray]"]=xn["[object Uint16Array]"]=xn["[object Uint32Array]"]=!0,xn["[object Arguments]"]=xn["[object Array]"]=xn["[object ArrayBuffer]"]=xn["[object Boolean]"]=xn["[object DataView]"]=xn["[object Date]"]=xn["[object Error]"]=xn["[object Function]"]=xn["[object Map]"]=xn["[object Number]"]=xn["[object Object]"]=xn["[object RegExp]"]=xn["[object Set]"]=xn["[object String]"]=xn["[object WeakMap]"]=!1;var On=function(t){return function(n){return t(n)}},Cn={exports:{}};!function(t,n){var e=m,i=n&&!n.nodeType&&n,r=i&&t&&!t.nodeType&&t,o=r&&r.exports===i&&e.process,a=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}(Cn,Cn.exports);var Un,Vn,Nn,Ln=Cn.exports,qn=function(t){return An(t)&&Sn(t.length)&&!!xn[Pn(t)]},Fn=On,Dn=Ln&&Ln.isTypedArray,Hn=Dn?Fn(Dn):qn,Mn=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]},Rn=Ut,Bn=a,zn={}.hasOwnProperty,Gn=function(t,n,e){var i=t[n];zn.call(t,n)&&Bn(i,e)&&(void 0!==e||n in t)||Rn(t,n,e)},$n=Ut,Jn=/^(?:0|[1-9]\d*)$/,Wn=function(t,n){var e=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&Jn.test(t))&&t>-1&&t%1==0&&n>t},Kn=cn,Qn=sn,Yn=bn,Zn=Wn,Xn=Hn,te={}.hasOwnProperty,ne=function(t,n){var e=Qn(t),i=!e&&Kn(t),r=!e&&!i&&Yn(t),o=!e&&!i&&!r&&Xn(t),a=e||i||r||o,u=a?function(t,n){for(var e=-1,i=Array(t);++e<t;)i[e]=n(e);return i}(t.length,String):[],c=u.length;for(var s in t)!n&&!te.call(t,s)||a&&("length"==s||r&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Zn(s,c))||u.push(s);return u},ee=U,ie=Kt,re={}.hasOwnProperty,oe=ne,ae=function(t){if(!ee(t))return function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}(t);var n=ie(t),e=[];for(var i in t)("constructor"!=i||!n&&re.call(t,i))&&e.push(i);return e},ue=vn,ce=function(t){return ue(t)?oe(t,!0):ae(t)},se=function(t,n,e,i){var r=!e;e||(e={});for(var o=-1,a=n.length;++o<a;){var u=n[o],c=i?i(e[u],t[u],u,e,t):void 0;void 0===c&&(c=t[u]),r?$n(e,u,c):Gn(e,u,c)}return e},le=ce,de=Lt,fe=Dt,pe=function(t,n){var e,i,r=n?(e=t.buffer,i=new e.constructor(e.byteLength),new Mt(i).set(new Mt(e)),i):t.buffer;return new t.constructor(r,t.byteOffset,t.length)},ve=Rt,he=function(t){return"function"!=typeof t.constructor||Zt(t)?{}:Qt(Yt(t))},ge=cn,ye=sn,_e=yn,me=bn,be=q,je=U,Te=function(t){if(!In(t)||"[object Object]"!=jn(t))return!1;var n=Tn(t);if(null===n)return!0;var e=wn.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&kn.call(e)==En},Ie=Hn,ke=Mn,we=At,Ee=Lt,Pe=qt,Se=function(t,n,e,i,r,o,a){var u,c=ke(t,e),s=ke(n,e),l=a.get(s);if(l)de(t,e,l);else{var d=o?o(c,s,e+"",t,n,a):void 0,f=void 0===d;if(f){var p=ye(s),v=!p&&me(s),h=!p&&!v&&Ie(s);d=s,p||v||h?ye(c)?d=c:_e(c)?d=ve(c):v?(f=!1,d=fe(s,!0)):h?(f=!1,d=pe(s,!0)):d=[]:Te(s)||ge(s)?(d=c,ge(c)?d=se(u=c,le(u)):je(c)&&!be(c)||(d=he(s))):f=!1}f&&(a.set(s,d),r(d,s,i,o,a),a.delete(s)),de(t,e,d)}},Ae=U,xe=ce,Oe=Mn,Ce=function t(n,e,i,r,o){n!==e&&Pe(e,(function(a,u){if(o||(o=new we),Ae(a))Se(n,e,u,i,t,r,o);else{var c=r?r(Oe(n,u),a,u+"",n,e,o):void 0;void 0===c&&(c=a),Ee(n,u,c)}}),xe)},Ue=function(t){return t},Ve=Math.max,Ne=Ot,Le=Date.now,qe=(Un=Ne?function(t,n){return Ne(t,"toString",{configurable:!0,enumerable:!1,value:(e=n,function(){return e}),writable:!0});var e}:Ue,Vn=0,Nn=0,function(){var t=Le(),n=16-(t-Nn);if(Nn=t,n>0){if(++Vn>=800)return arguments[0]}else Vn=0;return Un.apply(void 0,arguments)}),Fe=Ue,De=function(t,n,e){return n=Ve(void 0===n?t.length-1:n,0),function(){for(var i=arguments,r=-1,o=Ve(i.length-n,0),a=Array(o);++r<o;)a[r]=i[n+r];r=-1;for(var u=Array(n+1);++r<n;)u[r]=i[r];return u[n]=e(a),function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}(t,this,u)}},He=qe,Me=function(t,n){return He(De(t,n,Fe),t+"")},Re=a,Be=vn,ze=Wn,Ge=U,$e=function(t,n,e){if(!Ge(e))return!1;var i=typeof n;return!!("number"==i?Be(e)&&ze(n,e.length):"string"==i&&n in e)&&Re(e[n],t)},Je=Me,We=$e,Ke=function(t){return Je((function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,a&&We(e[0],e[1],a)&&(o=3>r?void 0:o,r=1),n=Object(n);++i<r;){var u=e[i];u&&t(n,u,i,o)}return n}))},Qe=Ce,Ye=o(Ke((function(t,n,e){Qe(t,n,e)}))),Ze=Ce,Xe=o(Ke((function(t,n,e,i){Ze(t,n,e,i)}))),ti=mt;function ni(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new ti;++n<e;)this.add(t[n])}ni.prototype.add=ni.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ni.prototype.has=function(t){return this.__data__.has(t)};var ei=ni,ii=function(t){return t!=t},ri=function(t,n){return!(null==t||!t.length)&&function(t,n,e){return n==n?function(t,n,e){for(var i=e-1,r=t.length;++i<r;)if(t[i]===n)return i;return-1}(t,n,e):function(t,n,e,i){for(var r=t.length,o=e+(i?1:-1);i?o--:++o<r;)if(n(t[o],o,t))return o;return-1}(t,ii,e)}(t,n,0)>-1},oi=function(t,n,e){for(var i=-1,r=null==t?0:t.length;++i<r;)if(e(n,t[i]))return!0;return!1},ai=function(t,n){return t.has(n)},ui=Y(T,"Set"),ci=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e},si=ui,li=si&&1/ci(new si([,-0]))[1]==1/0?function(t){return new si(t)}:function(){},di=ei,fi=ri,pi=oi,vi=ai,hi=li,gi=ci,yi=o((function(t){return t&&t.length?function(t,n,e){var i=-1,r=fi,o=t.length,a=!0,u=[],c=u;if(e)a=!1,r=pi;else if(200>o)c=n?[]:u;else{var s=n?null:hi(t);if(s)return gi(s);a=!1,r=vi,c=new di}t:for(;++i<o;){var l=t[i],d=n?n(l):l;if(l=e||0!==l?l:0,a&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue t;n&&c.push(d),u.push(l)}else r(c,d,e)||(c!==u&&c.push(d),u.push(l))}return u}(t):[]})),_i=function(t,n){for(var e=-1,i=n.length,r=t.length;++e<i;)t[r+e]=n[e];return t},mi=cn,bi=sn,ji=I?I.isConcatSpreadable:void 0,Ti=_i,Ii=function(t){return bi(t)||mi(t)||!!(ji&&t&&t[ji])},ki=function t(n,e,i,r,o){var a=-1,u=n.length;for(i||(i=Ii),o||(o=[]);++a<u;){var c=n[a];e>0&&i(c)?e>1?t(c,e-1,i,r,o):Ti(o,c):r||(o[o.length]=c)}return o},wi=_i,Ei=ki,Pi=Rt,Si=sn,Ai=o((function(){var t=arguments.length;if(!t)return[];for(var n=Array(t-1),e=arguments[0],i=t;i--;)n[i-1]=arguments[i];return wi(Si(e)?Pi(e):[e],Ei(n,1))})),xi=$t(Object.keys,Object),Oi=Kt,Ci=xi,Ui={}.hasOwnProperty,Vi=function(t){if(!Oi(t))return Ci(t);var n=[];for(var e in Object(t))Ui.call(t,e)&&"constructor"!=e&&n.push(e);return n},Ni=Y(T,"DataView"),Li=Z,qi=Y(T,"Promise"),Fi=ui,Di=Y(T,"WeakMap"),Hi=C,Mi=R,Ri="[object Map]",Bi="[object Promise]",zi="[object Set]",Gi="[object WeakMap]",$i="[object DataView]",Ji=Mi(Ni),Wi=Mi(Li),Ki=Mi(qi),Qi=Mi(Fi),Yi=Mi(Di),Zi=Hi;(Ni&&Zi(new Ni(new ArrayBuffer(1)))!=$i||Li&&Zi(new Li)!=Ri||qi&&Zi(qi.resolve())!=Bi||Fi&&Zi(new Fi)!=zi||Di&&Zi(new Di)!=Gi)&&(Zi=function(t){var n=Hi(t),e="[object Object]"==n?t.constructor:void 0,i=e?Mi(e):"";if(i)switch(i){case Ji:return $i;case Wi:return Ri;case Ki:return Bi;case Qi:return zi;case Yi:return Gi}return n});var Xi=Zi,tr=Vi,nr=Xi,er=cn,ir=sn,rr=vn,or=bn,ar=Kt,ur=Hn,cr={}.hasOwnProperty,sr=o((function(t){if(null==t)return!0;if(rr(t)&&(ir(t)||"string"==typeof t||"function"==typeof t.splice||or(t)||ur(t)||er(t)))return!t.length;var n=nr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(ar(t))return!tr(t).length;for(var e in t)if(cr.call(t,e))return!1;return!0})),lr=ei,dr=function(t,n){for(var e=-1,i=null==t?0:t.length;++e<i;)if(n(t[e],e,t))return!0;return!1},fr=ai,pr=function(t,n,e,i,r,o){var a=1&e,u=t.length,c=n.length;if(!(u==c||a&&c>u))return!1;var s=o.get(t),l=o.get(n);if(s&&l)return s==n&&l==t;var d=-1,f=!0,p=2&e?new lr:void 0;for(o.set(t,n),o.set(n,t);++d<u;){var v=t[d],h=n[d];if(i)var g=a?i(h,v,d,n,t,o):i(v,h,d,t,n,o);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!dr(n,(function(t,n){if(!fr(p,n)&&(v===t||r(v,t,e,i,o)))return p.push(n)}))){f=!1;break}}else if(v!==h&&!r(v,h,e,i,o)){f=!1;break}}return o.delete(t),o.delete(n),f},vr=Ht,hr=a,gr=pr,yr=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t,i){e[++n]=[i,t]})),e},_r=ci,mr=I?I.prototype:void 0,br=mr?mr.valueOf:void 0,jr=_i,Tr=sn,Ir={}.propertyIsEnumerable,kr=Object.getOwnPropertySymbols,wr=kr?function(t){return null==t?[]:function(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++e<i;){var a=t[e];n(a,e,t)&&(o[r++]=a)}return o}(kr(t=Object(t)),(function(n){return Ir.call(t,n)}))}:function(){return[]},Er=ne,Pr=Vi,Sr=vn,Ar=function(t){return Sr(t)?Er(t):Pr(t)},xr=o(Ar),Or=function(t,n,e){var i=n(t);return Tr(t)?i:jr(i,e(t))},Cr=wr,Ur=Ar,Vr=function(t){return Or(t,Ur,Cr)},Nr={}.hasOwnProperty,Lr=At,qr=pr,Fr=function(t,n,e,i,r,o,a){switch(e){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!o(new vr(t),new vr(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return hr(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var u=yr;case"[object Set]":var c=1&i;if(u||(u=_r),t.size!=n.size&&!c)return!1;var s=a.get(t);if(s)return s==n;i|=2,a.set(t,n);var l=gr(u(t),u(n),i,r,o,a);return a.delete(t),l;case"[object Symbol]":if(br)return br.call(t)==br.call(n)}return!1},Dr=Xi,Hr=sn,Mr=bn,Rr=Hn,Br="[object Arguments]",zr="[object Array]",Gr="[object Object]",$r={}.hasOwnProperty,Jr=function(t,n,e,i,r,o){var a=Hr(t),u=Hr(n),c=a?zr:Dr(t),s=u?zr:Dr(n),l=(c=c==Br?Gr:c)==Gr,d=(s=s==Br?Gr:s)==Gr,f=c==s;if(f&&Mr(t)){if(!Mr(n))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new Lr),a||Rr(t)?qr(t,n,e,i,r,o):Fr(t,n,c,e,i,r,o);if(!(1&e)){var p=l&&$r.call(t,"__wrapped__"),v=d&&$r.call(n,"__wrapped__");if(p||v){var h=p?t.value():t,g=v?n.value():n;return o||(o=new Lr),r(h,g,e,i,o)}}return!!f&&(o||(o=new Lr),function(t,n,e,i,r,o){var a=1&e,u=Vr(t),c=u.length;if(c!=Vr(n).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in n:Nr.call(n,l)))return!1}var d=o.get(t),f=o.get(n);if(d&&f)return d==n&&f==t;var p=!0;o.set(t,n),o.set(n,t);for(var v=a;++s<c;){var h=t[l=u[s]],g=n[l];if(i)var y=a?i(g,h,l,n,t,o):i(h,g,l,t,n,o);if(!(void 0===y?h===g||r(h,g,e,i,o):y)){p=!1;break}v||(v="constructor"==l)}if(p&&!v){var _=t.constructor,m=n.constructor;_==m||!("constructor"in t)||!("constructor"in n)||"function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m||(p=!1)}return o.delete(t),o.delete(n),p}(t,n,e,i,r,o))},Wr=Xt,Kr=function t(n,e,i,r,o){return n===e||(null==n||null==e||!Wr(n)&&!Wr(e)?n!=n&&e!=e:Jr(n,e,i,r,t,o))},Qr=o((function(t,n){return Kr(t,n)})),Yr=function(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e<i;)r[e]=n(t[e],e,t);return r},Zr=ei,Xr=ri,to=oi,no=Yr,eo=On,io=ai,ro=function(t,n,e,i){var r=-1,o=Xr,a=!0,u=t.length,c=[],s=n.length;if(!u)return c;e&&(n=no(n,eo(e))),i?(o=to,a=!1):200>n.length||(o=io,a=!1,n=new Zr(n));t:for(;++r<u;){var l=t[r],d=null==e?l:e(l);if(l=i||0!==l?l:0,a&&d==d){for(var f=s;f--;)if(n[f]===d)continue t;c.push(l)}else o(n,d,i)||c.push(l)}return c},oo=ro,ao=ki,uo=yn,co=o(Me((function(t,n){return uo(t)?oo(t,ao(n,1,uo,!0)):[]}))),so=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0},lo=o(so),fo=ro,po=ki,vo=yn,ho=so,go=o(Me((function(t,n){var e=ho(n);return vo(e)&&(e=void 0),vo(t)?fo(t,po(n,1,vo,!0),void 0,e):[]}))),yo=C,_o=Xt,mo=function(t){return"symbol"==typeof t||_o(t)&&"[object Symbol]"==yo(t)},bo=sn,jo=mo,To=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Io=/^\w*$/,ko=mt;function wo(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var i=arguments,r=n?n.apply(this,i):i[0],o=e.cache;if(o.has(r))return o.get(r);var a=t.apply(this,i);return e.cache=o.set(r,a)||o,a};return e.cache=new(wo.Cache||ko),e}wo.Cache=ko;var Eo,Po,So,Ao,xo,Oo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Co=/\\(\\)?/g,Uo=(Eo=wo((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(Oo,(function(t,e,i,r){n.push(i?r.replace(Co,"$1"):e||t)})),n}),(function(t){return 500===Po.size&&Po.clear(),t})),Po=Eo.cache,Eo),Vo=Yr,No=sn,Lo=mo,qo=I?I.prototype:void 0,Fo=qo?qo.toString:void 0,Do=function t(n){if("string"==typeof n)return n;if(No(n))return Vo(n,t)+"";if(Lo(n))return Fo?Fo.call(n):"";var e=n+"";return"0"==e&&1/n==-1/0?"-0":e},Ho=Do,Mo=function(t){return null==t?"":Ho(t)},Ro=o(Mo),Bo=sn,zo=function(t,n){if(bo(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!jo(t))||Io.test(t)||!To.test(t)||null!=n&&t in Object(n)},Go=Uo,$o=Mo,Jo=function(t,n){return Bo(t)?t:zo(t,n)?[t]:Go($o(t))},Wo=mo,Ko=function(t){if("string"==typeof t||Wo(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Qo=Jo,Yo=Ko,Zo=function(t,n){for(var e=0,i=(n=Qo(n,t)).length;null!=t&&i>e;)t=t[Yo(n[e++])];return e&&e==i?t:void 0},Xo=Zo,ta=o((function(t,n,e){var i=null==t?void 0:Xo(t,n);return void 0===i?e:i})),na=o((function(t){return null==t})),ea=C,ia=sn,ra=Xt,oa=o((function(t){return"string"==typeof t||!ia(t)&&ra(t)&&"[object String]"==ea(t)})),aa=o((function(t){return t&&t.length?t[0]:void 0})),ua=function(t,n,e){var i=-1,r=t.length;0>n&&(n=-n>r?0:r+n),0>(e=e>r?r:e)&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+n];return o},ca=/\s/,sa=/^\s+/,la=function(t){return t?t.slice(0,function(t){for(var n=t.length;n--&&ca.test(t.charAt(n)););return n}(t)+1).replace(sa,""):t},da=U,fa=mo,pa=/^[-+]0x[0-9a-f]+$/i,va=/^0b[01]+$/i,ha=/^0o[0-7]+$/i,ga=parseInt,ya=function(t){return t?Infinity===(t=function(t){if("number"==typeof t)return t;if(fa(t))return NaN;if(da(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=da(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=la(t);var e=va.test(t);return e||ha.test(t)?ga(t.slice(2),e?2:8):pa.test(t)?NaN:+t}(t))||t===-1/0?17976931348623157e292*(0>t?-1:1):t==t?t:0:0===t?t:0},_a=function(t){var n=ya(t),e=n%1;return n==n?e?n-e:n:0},ma=ua,ba=_a,ja=o((function(t,n,e){var i=null==t?0:t.length;return i?(n=e||void 0===n?1:ba(n),ma(t,0>n?0:n,i)):[]})),Ta=ua,Ia=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),ka=function(t){return Ia.test(t)},wa=C,Ea=Xt,Pa=On,Sa=Ln&&Ln.isRegExp,Aa=Sa?Pa(Sa):function(t){return Ea(t)&&"[object RegExp]"==wa(t)},xa="\\ud800-\\udfff",Oa="["+xa+"]",Ca="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Ua="\\ud83c[\\udffb-\\udfff]",Va="[^"+xa+"]",Na="(?:\\ud83c[\\udde6-\\uddff]){2}",La="[\\ud800-\\udbff][\\udc00-\\udfff]",qa="(?:"+Ca+"|"+Ua+")?",Fa="[\\ufe0e\\ufe0f]?",Da=Fa+qa+"(?:\\u200d(?:"+[Va,Na,La].join("|")+")"+Fa+qa+")*",Ha=RegExp(Ua+"(?="+Ua+")|(?:"+[Va+Ca+"?",Ca,Na,La,Oa].join("|")+")"+Da,"g"),Ma=function(t){return t.split("")},Ra=ka,Ba=Do,za=function(t,n,e){var i=t.length;return e=void 0===e?i:e,n||i>e?Ta(t,n,e):t},Ga=ka,$a=$e,Ja=Aa,Wa=function(t){return Ra(t)?function(t){return t.match(Ha)||[]}(t):Ma(t)},Ka=Mo,Qa=o((function(t,n,e){return e&&"number"!=typeof e&&$a(t,n,e)&&(n=e=void 0),(e=void 0===e?4294967295:e>>>0)?(t=Ka(t))&&("string"==typeof n||null!=n&&!Ja(n))&&!(n=Ba(n))&&Ga(t)?za(Wa(t),0,e):t.split(n,e):[]})),Ya=Do,Za=_a,Xa=Mo,tu=o((function(t,n,e){return t=Xa(t),e=null==e?0:(i=Za(e),r=0,o=t.length,i==i&&(void 0!==o&&(i=i>o?o:i),void 0!==r&&(i=r>i?r:i)),i),n=Ya(n),t.slice(e,e+n.length)==n;var i,r,o})),nu={}.hasOwnProperty,eu=Jo,iu=cn,ru=sn,ou=Wn,au=dn,uu=Ko,cu=function(t,n){return null!=t&&nu.call(t,n)},su=o((function(t,n){return null!=t&&function(t,n,e){for(var i=-1,r=(n=eu(n,t)).length,o=!1;++i<r;){var a=uu(n[i]);if(!(o=null!=t&&e(t,a)))break;t=t[a]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&au(r)&&ou(a,r)&&(ru(t)||iu(t))}(t,n,cu)})),lu=Zo,du=ua,fu=Jo,pu=so,vu=Ko,hu=function(t,n){return null==(t=function(t,n){return 2>n.length?t:lu(t,du(n,0,-1))}(t,n=fu(n,t)))||delete t[vu(pu(n))]},gu=o((function(t,n){return null==t||hu(t,n)})),yu=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},_u="code",mu={autotrack:{type:["object","array","boolean"],default:!0},enableVisual:{type:"boolean",default:!0},server:{type:"string",default:""},debug:{type:"boolean",default:!1},uniVue:{type:["object","function"],default:!1},taro:{type:["object","module"],default:!1},taroVue:{type:["object","function"],default:!1},silentGetOpenId:{type:"boolean",default:!1}},bu=["init","track","identify","setIdentity","getIdentity","removeIdentityItem","clearIdentity","generateUrlWithSession"],ju={dev:{VUE_APP_API_HOST:"https://devapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://devcgi.jingsocial.com"},staging:{VUE_APP_API_HOST:"https://stagingapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://stagingcgi.jingsocial.com"},ali:{VUE_APP_API_HOST:"https://api.jingsocial.com",VUE_APP_CGI_API_HOST:"https://cgi.jingsocial.com"},msc:{VUE_APP_API_HOST:"https://mscappapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://msccgi.jingsocial.com"},agl:{VUE_APP_API_HOST:"https://api.ma.aglcommunity.cn",VUE_APP_CGI_API_HOST:"https://cgi.ma.aglcommunity.cn"},agl_uat:{VUE_APP_API_HOST:"https://uatapi.ma.aglcommunity.cn",VUE_APP_CGI_API_HOST:"https://uatcgi.ma.aglcommunity.cn"}},Tu={onLaunch:"mp_launch",onShow:"mp_show",onHide:"mp_hide"},Iu={onShow:"mp_pageview",onHide:"mp_pageleave",onUnload:"mp_pageleave",onShareAppMessage:"mp_share",onShareTimeline:"mp_share",onAddToFavorites:"mp_addfavorites"},ku={click:"mp_click"},wu=yi(Ai([],Object.values(Tu),Object.values(Iu))),Eu=yi(Ai([],wu,Object.values(ku))),Pu="jing_session_id",Su="SYSTEM_READY",Au="OPTION_INITIALIZED",xu="SDK_READY",Ou="FIRST_CHECK_VISUAL",Cu="VISUAL_CONFIG_READY";!function(t){t[t.normal=0]="normal",t[t.debug=1]="debug",t[t.visualization=2]="visualization"}(So||(So={})),function(t){t.JINGTRACK_ELEMENT_ID="jing_track_element_id",t.JINGTRACK_ELEMENT_CONTENT="jing_track_element_content"}(Ao||(Ao={})),function(t){t.wechat_openid="wechat_openid",t.wechat_unionid="wechat_unionid",t.mobile="mobile",t.email="email",t.third_party="third_party",t.external_userid="external_userid",t.workwechat_user_userid="workwechat_user_userid",t.mp_openid="mp_openid",t.omni_user_uuid="omni_user_uuid"}(xo||(xo={}));var Uu=function(){function t(){}return t.enabled=!1,t.typeColors={plain:"color: #4A72FB;",error:"color: #FD3E3E;",warn:"color: #FF7621;",success:"color: #61B707;"},t.setEnabled=function(n){t.enabled=!!n},t.forceLog=function(n){for(var e,i,r=[],o=1;arguments.length>o;o++)r[o-1]=arguments[o];var a="%c「JingTrack」".concat(n),u=null!==(e=2>r.length?r[0]:r[1])&&void 0!==e?e:"plain",c=null!==(i=t.typeColors[u])&&void 0!==i?i:t.typeColors.plain;if(2>r.length)console.log(a,c);else{var s=r[0];console.log(a,c,s)}},t.log=function(n){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];if(t.enabled)return t.forceLog.apply(t,i([n],e,!1))},t.plain=function(n,e){return na(e)?t.log(n,"plain"):t.log(n,e,"plain")},t.success=function(n,e){return na(e)?t.log(n,"success"):t.log(n,e,"success")},t.error=function(n,e){return na(e)?t.log(n,"error"):t.log(n,e,"error")},t.warn=function(n,e){return na(e)?t.log(n,"warn"):t.log(n,e,"warn")},t}(),Vu=function(t,n){Uu.forceLog(t,n,"error")},Nu=function(t){try{return t()}catch(n){return void Vu("niceTry 错误捕捉",{error:n,fn:t})}},Lu=function(t){if(!t||"object"!=typeof t)return"";var n=t.Current,e=t.createComponent;return n&&!e?"3":!n&&e?"2":""},qu=function(t){var n,e;return null!==(e=null!==(n=null==(t=V(t)?t:{})?void 0:t.data)&&void 0!==n?n:null==t?void 0:t.$data)&&void 0!==e?e:{}},Fu=function(t){var n=this;this.jingTrackInstance=t,this.minip=("framework",Nu((function(){var t=void 0;return t||(t=Nu((function(){return wx}))),t}))),this.proxySetNavigationBarTitle=function(){var t,e=n,i=null===(t=e.minip)||void 0===t?void 0:t.setNavigationBarTitle;i&&Object.defineProperty(e.minip,"setNavigationBarTitle",{writable:!0,enumerable:!0,configurable:!0,value:function(){for(var t=[],n=0;arguments.length>n;n++)t[n]=arguments[n];var r=i.apply(this,t);try{if(!V(t[0]))return r;var o=e.getCurrentPath(),a=t[0].title;e.settedTitle[o]=a}catch(t){Vu("setNavigationBarTitle 方法代理出错",t)}return r}})},this.getCurrentPage=function(){return Nu((function(){return lo(getCurrentPages())}))||{}},this.getCurrentPath=function(){var t=n.getCurrentPage();return(null==t?void 0:t.route)||""},this.removeSettedTitleItem=function(t){t||(t=n.getCurrentPath()),n.settedTitle[t]=""},this.getPageTitle=function(t){var e,i,r,o,a,u,c,s,l,d,f;t||(t=n.getCurrentPath());var p="",v=Nu((function(){return __wxConfig}));try{if(!(p=null!==(e=n.settedTitle[t])&&void 0!==e?e:"")){var h=(null===(i=null==v?void 0:v.page)||void 0===i?void 0:i[t])||(null===(r=null==v?void 0:v.page)||void 0===r?void 0:r["".concat(t,".html")]);p=h?null!==(a=null===(o=null==h?void 0:h.window)||void 0===o?void 0:o.navigationBarTitleText)&&void 0!==a?a:"":null!==(s=null===(c=null===(u=null==v?void 0:v.global)||void 0===u?void 0:u.window)||void 0===c?void 0:c.navigationBarTitleText)&&void 0!==s?s:""}if(!p){var g=null===(d=null===(l=null==v?void 0:v.tabBar)||void 0===l?void 0:l.list)||void 0===d?void 0:d.find((function(n){return n.pagePath===t||n.pagePath==="".concat(t,".html")}));p=null!==(f=null==g?void 0:g.text)&&void 0!==f?f:""}}catch(t){return Vu("getPageTitle 方法执行出错",t),""}return p},this.getSystemInfo=function(){var t=n;return new Promise((function(e){var i;null===(i=n.minip)||void 0===i||i.getSystemInfo({success:function(n){t.systemInfo=n,e(n)},fail:function(){return e(null)}})}))},this.getNetworkType=function(){var t=n;return new Promise((function(e){var i;null===(i=n.minip)||void 0===i||i.getNetworkType({success:function(n){t.network=n,e(n)},fail:function(){return e(null)}})}))},this.getStorageSync=function(t){var e,i=null===(e=n.minip)||void 0===e?void 0:e.getStorageSync(t);return V(i)&&i.expiredAt?i.expiredAt<Date.now()?"":i.value:i},this.getStorage=function(t){return new Promise((function(e){var i;null===(i=n.minip)||void 0===i||i.getStorage({key:t,success:function(t){var n=t.data;return e(n)},fail:function(){return e("")}})}))},this.setStorageSync=function(t,e,i){var r;i&&(e={value:e,expiredAt:i}),null===(r=n.minip)||void 0===r||r.setStorageSync(t,e)},this.setStorage=function(t,e){var i;null===(i=n.minip)||void 0===i||i.setStorage({key:t,data:e})},this.removeStorageSync=function(t){var e;null===(e=n.minip)||void 0===e||e.removeStorageSync(t)},this.removeStorage=function(t){var e;null===(e=n.minip)||void 0===e||e.removeStorage(t)},this.getLaunchOptionsSync=function(){var t;return null===(t=n.minip)||void 0===t?void 0:t.getLaunchOptionsSync()},this.request=function(t){var e,i=t.url,r=t.data,o=t.header,a=t.timeout,u=t.method,c=t.success,s=t.fail,l=t.complete,d=null===(e=n.minip)||void 0===e?void 0:e.request({url:i,data:r,header:o,headers:o,timeout:a,method:u,success:c,fail:s,complete:l}),f=setTimeout((function(){(null==d?void 0:d.abort)&&F(null==d?void 0:d.abort)&&(null==d||d.abort()),clearTimeout(f),f=null}),(a||1e4)+10);return d},this.settedTitle={},this.jingTrackInstance.emitter.on(Au,(function(){Promise.allSettled([n.getSystemInfo(),n.getNetworkType()]).then((function(){n.jingTrackInstance.emitter.emit(Su)}))})),this.proxySetNavigationBarTitle()},Du=["tap","longpress","longtap","getuserinfo","getphonenumber","contact"],Hu=["blur","change","confirm"],Mu=["submit","reset"],Ru=i(i(i([],Du,!0),Hu,!0),Mu,!0),Bu={appLaunch:"onLaunch",appShow:"onShow",appHide:"onHide"},zu={pageLoad:"onLoad",pageShow:"onShow",pageHide:"onHide",pageUnload:"onUnload",tabTap:"onTabItemTap",shareApp:"onShareAppMessage",shareTime:"onShareTimeline",addFavorites:"onAddToFavorites"},Gu=Object.values(Bu),$u=Object.values(zu),Ju={appHandlers:i(i([],Gu,!0),["onError","onPageNotFound","onUnhandledRejection","onThemeChange"],!1),pageHandlers:i(i([],$u,!0),["onReady","onUnload","onRouteDone","onPullDownRefresh","onReachBottom","onPageScroll","onResize","onSaveExitState"],!1),appListenerList:Gu,pageListenerList:$u,actionListenerList:Ru,listeners:{app:Bu,page:zu,actions:{click:Du,change:Hu,submit:Mu}},originalApp:Nu((function(){return App})),originalPage:Nu((function(){return Page})),originalComponent:Nu((function(){return Component})),originalBehavior:Nu((function(){return Behavior}))},Wu=function(t,n){var e;return(null==t?void 0:t.pixelRatio)?Math.round(t[n]*t.pixelRatio):null!==(e=null==t?void 0:t[n])&&void 0!==e?e:0},Ku=function(t){return"".concat(null==t?void 0:t.brand," / ").concat(null==t?void 0:t.model)},Qu=function(){function t(t){var n=this;this.jingTrackInstance=t,this.generateSnapshot=function(){var t=n.jingTrackInstance.currentPage;return{title:t.title,url:t.path,referer:t.referer}},this.getFrontId=function(t,e){var i,r,o=n.jingTrackInstance.currentPage,a=t.originEventName?t.originEventName:t.action_code,u="".concat(null!==(i=null==e?void 0:e.url)&&void 0!==i?i:o.path,"_").concat(a),c=null===(r=null==t?void 0:t.data_set)||void 0===r?void 0:r[Ao.JINGTRACK_ELEMENT_ID];return c&&(u="".concat(u,"_").concat(c)),encodeURIComponent(u)},this.visualContextBuilder=function(t,e){var i,r,o,a,u,c,s,l,d,f=n.jingTrackInstance.currentPage,p=null!==(i=t.track_type)&&void 0!==i?i:"";return{action_code:t.action_code,event_name:null!==(r=t.originEventName)&&void 0!==r?r:"",front_id:p===_u?"":n.getFrontId(t,e),url:null!==(o=null==e?void 0:e.url)&&void 0!==o?o:f.path,title:null!==(a=null==e?void 0:e.title)&&void 0!==a?a:f.title,element_content:null!==(u=t.element_content)&&void 0!==u?u:"",element_related_content:null!==(c=t.element_related_content)&&void 0!==c?c:"",data_set:null!==(s=t.data_set)&&void 0!==s?s:{},page_data:null!==(l=t.page_data)&&void 0!==l?l:{},track_type:p,identity_data:n.getIdentityData(t),extra_data:null!==(d=t.extra_data)&&void 0!==d?d:{}}},this.normalContextBuilder=function(t,e){var i,r,o,a,u,c,s,l,d=n.jingTrackInstance,f=d.version,p=d.options,v=d.minipInstance,h=d.userStore,g=d.currentPage,y=v.systemInfo,_=n.getIdentityData(t);return{action_code:t.action_code,version:f,entity_uuid:null!==(i=p.jingTrackUuid)&&void 0!==i?i:"",entity_type:"jingtrack_mini_program",action_category:"jingtrack_mp",visitor_uuid:null!==(r=h.visitor_id)&&void 0!==r?r:"",session_uuid:null!==(o=h.session_id)&&void 0!==o?o:"",is_new_session:h.useNewSession(),is_new_identity:n.judgeIsNewIdentity(_),identity_data:_,tags_id:n.parseEmptyArrToNull(t.tags_id),intent_tags_uuid:n.parseEmptyArrToNull(t.intent_tags_uuid),environment_data:{title:null!==(a=null==e?void 0:e.title)&&void 0!==a?a:g.title,url:null!==(u=null==e?void 0:e.url)&&void 0!==u?u:g.path,referer:null!==(c=null==e?void 0:e.referer)&&void 0!==c?c:g.referer,screen_width:Wu(y,"screenWidth"),screen_height:Wu(y,"screenHeight"),viewport_width:Wu(y,"windowWidth"),viewport_height:Wu(y,"windowHeight"),os:Ku(y),os_version:null!==(s=null==y?void 0:y.system)&&void 0!==s?s:"",platform_code:"wechat_miniprogram"},source_data:Ye({},null==g?void 0:g.sourceData,t.source_data),extra_data:null!==(l=t.extra_data)&&void 0!==l?l:{}}},this.contextBuilder=function(t,e){return n.jingTrackInstance.reportMode===So.visualization?n.visualContextBuilder(t,e):n.normalContextBuilder(t,e)},this.contextBuilderByPresetProperties=function(t){var e,i={},r=null!=t?t:{},o=r.identity_data,a=r.intent_tags_uuid,u=r.tags_id,c=r.source_data;if(ln(o)&&(i.identity_data=o),ln(a)&&(i.intent_tags_uuid=a),ln(u)&&(i.tags_id=u),V(c)){var s=n.jingTrackInstance.currentPage;i.source_data=s.getSourceData(c),null===(e=null==i?void 0:i.source_data)||void 0===e||delete e.push_engine_channel_uuid}return i}}return t.prototype.getIdentityData=function(t){var n=this.jingTrackInstance.userStore;return t.identity_data?n.mergeIdentity(n.getIdentity(),t.identity_data):n.getIdentity()},t.prototype.judgeIsNewIdentity=function(t){var n=0,e=this.jingTrackInstance,i=e.userStore,r=e.minipInstance,o=[];try{o=JSON.parse(r.getStorageSync(i.visitor_id)||"[]")}catch(t){o=[]}var a=go(t,o,Qr);if(!sr(a)){var u=i.mergeIdentity(o,a);r.setStorageSync(i.visitor_id,JSON.stringify(u)),n=1}return n},t.prototype.parseEmptyArrToNull=function(t){return!ln(t)||sr(t)?null:t},t.prototype.mergeContext=function(){for(var t=this,n=[],e=0;arguments.length>e;e++)n[e]=arguments[e];return Xe.apply(void 0,i(i([{}],n,!1),[function(n,e,i){if("identity_data"===i&&ln(n)&&ln(e))return t.jingTrackInstance.userStore.mergeIdentity(n,e)}],!1))},t}();const Yu="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder;const Zu="function"==typeof TextEncoder?new TextEncoder:void 0,Xu=[].slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let n={};Xu.forEach(((t,e)=>n[t]=e))})();const tc=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const nc="function"==typeof btoa?t=>btoa(t):Yu?t=>Buffer.from(t,"binary").toString("base64"):t=>{let n,e,i,r,o="";const a=t.length%3;for(let a=0;a<t.length;){if((e=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255||(r=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");n=e<<16|i<<8|r,o+=Xu[n>>18&63]+Xu[n>>12&63]+Xu[n>>6&63]+Xu[63&n]}return a?o.slice(0,a-3)+"===".substring(a):o},ec=Yu?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let e=0,i=t.length;i>e;e+=4096)n.push(tc.apply(null,t.subarray(e,e+4096)));return nc(n.join(""))},ic=t=>{if(2>t.length)return 128>(n=t.charCodeAt(0))?t:2048>n?tc(192|n>>>6)+tc(128|63&n):tc(224|n>>>12&15)+tc(128|n>>>6&63)+tc(128|63&n);var n=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return tc(240|n>>>18&7)+tc(128|n>>>12&63)+tc(128|n>>>6&63)+tc(128|63&n)},rc=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,oc=Yu?t=>Buffer.from(t,"utf8").toString("base64"):Zu?t=>ec(Zu.encode(t)):t=>nc(t.replace(rc,ic)),ac=(t,n=!1)=>n?(t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_")))(oc(t)):oc(t);var uc,cc=function(n){var e=this;this.jingTrackInstance=n,this.queuesMaxLength=100,this.requestLimit=3,this.retryLimit=2,this.uploadInterval=1e3,this.requestTimeout=5e3,this.compressable=!0,this.setVisualModeWid=function(t){e.visualModeWid=t},this.getRequestURL=function(t){var n,i,r,o=null===(r=null===(i=e.jingTrackInstance)||void 0===i?void 0:i.options)||void 0===r?void 0:r.server,a=ju[o];return((n={})[So.normal]="".concat(null==a?void 0:a.VUE_APP_API_HOST,"/eventService/log"),n[So.debug]="".concat(null==a?void 0:a.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(t,"/debug-report"),n[So.visualization]="".concat(null==a?void 0:a.VUE_APP_CGI_API_HOST,"/bffapi/lead/jingTrackMiniprogram/").concat(t,"/track"),n)[e.jingTrackInstance.reportMode]},this.commitRequest=function(t){t.requestId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})),e.requestQueue.push(t),e.trySendRequest()},this.trySendRequest=function(t){e.requestQueue.length>0&&e.requestingNum<e.requestLimit&&(t?e.preSendRequestProcessing():e.preRequestProcessingThrottle())},this.preSendRequestProcessing=function(){var t=e.requestQueue.splice(0,e.queuesMaxLength);sr(t)||e.sendRequest(t)},this.preRequestProcessingThrottle=function(t,n,e,i){var r;void 0===n&&(n=250);var o=0;return"boolean"!==yu(e)&&(i=t,t=e,e=void 0),function(){for(var a=[],u=0;arguments.length>u;u++)a[u]=arguments[u];var c=this,s=Date.now()-o;function l(){o=Date.now(),t.apply(c,a)}i&&!r&&l(),r&&clearTimeout(r),void 0===i&&s>n?l():!0!==e&&(r=setTimeout(i?function(){r=void 0}:l,void 0===i?n-s:n))}}(this.preSendRequestProcessing,this.uploadInterval,!1,!1),this.getRequestData=function(n){var i,r=e.jingTrackInstance,o=r.reportMode,a=r.userStore,u=n.map((function(n){var e=t({},n);return gu(e,"requestId"),e}));return o===So.visualization?{trackData:u,wid:e.visualModeWid,visitor_id:null!==(i=a.visitor_id)&&void 0!==i?i:""}:{data:e.compressable?ac(JSON.stringify(u)):u}},this.sendRequest=function(t){Uu.success("事件上报",{reportQueue:t}),e.requestingNum+=1;var n=e.jingTrackInstance.minipInstance,i=e.getRequestData(t),r=oa(i)?"text/plain":"application/json";n.request({url:e.getRequestURL(e.jingTrackInstance.options.jingTrackUuid),header:{"content-type":r},method:"POST",timeout:e.requestTimeout,data:i,fail:function(n){[200,204].includes(n.code)||(e.requestFailFn(t),Uu.error("上报失败,result: ",n))},complete:function(){e.requestingNum-=1,e.trySendRequest()}})},this.requestFailFn=function(t){var n=[];t.forEach((function(t){var i;e.retryIds[t.requestId]=(null!==(i=e.retryIds[t.requestId])&&void 0!==i?i:0)+1,e.retryIds[t.requestId]>e.retryLimit||n.push(t)})),sr(n)||setTimeout((function(){var t;(t=e.requestQueue).unshift.apply(t,n),e.trySendRequest()}),500)},this.requestQueue=[],this.retryIds={},this.requestingNum=0},sc=((uc={})[Su]=!1,uc[Ou]=!1,uc[xu]=!1,uc),lc=function(){function n(n){var e=this;this.jingTrackInstance=n,this.checkUploadConditions=function(t){Object.keys(sc).forEach((function(n){t[n]&&(sc[n]=!0)})),Object.values(sc).every((function(t){return t}))&&(e.canUpload=!0)},this.pushToInterceptedEvents=function(t){var n=e.reportContextBuilder.generateSnapshot();e.interceptedEvents.push((function(){return e.preUploadProcessing(t,n)}))},this.releaseEventInspector=function(){e.interceptedEvents.forEach((function(t){return t()})),e.interceptedEvents=[]},this.commitEvent=function(t){try{var n=e.jingTrackInstance.options;if(co(wu,n.autotrack).includes(t.action_code))return;e.canUpload?e.preUploadProcessing(t):e.pushToInterceptedEvents(t)}catch(t){Vu("commitEvent 方法执行出错",t)}},this.commitCustomEvent=function(n,i,r){if(Eu.includes(n))return Uu.error("事件名称 ".concat(n," 为预置事件 code,请更换!"));var o=e.reportContextBuilder.mergeContext({extra_data:V(i)?i:{}},e.reportContextBuilder.contextBuilderByPresetProperties(r)),a=t({action_code:n,track_type:_u},o);e.commitEvent(a)},this.preUploadProcessing=function(t,n){try{var i=e.jingTrackInstance.reportMode,r=[t];if(i!==So.visualization&&Eu.includes(t.action_code)&&(r=e.matchEventWithVisualEventList(t,n),sr(r)))return;r.forEach((function(t){var i=e.reportContextBuilder.contextBuilder(t,n);e.commitUpload(i)}))}catch(t){Vu("preUploadProcessing 方法执行出错",t)}},this.parseValue=function(t,n){var e;return null!==(e="const"===t.type?t.value:ta(n[t.source],t.value,""))&&void 0!==e?e:""},this.matchEventWithVisualEventList=function(t,n){var i=e.reportContextBuilder.getFrontId(t,n),r=e.visualEventList.filter((function(t){return t.front_id===i}));return sr(r)?t.action_code===ku.click?[]:[t]:r.map((function(n){var i={};(n.properties||[]).forEach((function(n){i[n.name]=e.parseValue(n.value,t)}));var r=[];(n.identity_data||[]).forEach((function(n){var i,o,a=e.parseValue(n.identity_value,t);r.push({identity_value:a,identity_type:null!==(i=null==n?void 0:n.identity_type)&&void 0!==i?i:"",identity_channel_uuid:null!==(o=null==n?void 0:n.identity_channel_uuid)&&void 0!==o?o:""})}));var o=t.extra_data||{};return{action_code:n.action_code,identity_data:r,extra_data:Ye({},o,i)}}))},this.commitUpload=function(t){e.uploader.commitRequest(t)},this.interceptedEvents=[],this.visualEventList=[],this.reportContextBuilder=new Qu(this.jingTrackInstance),this.uploader=new cc(this.jingTrackInstance),this.jingTrackInstance.emitter.on(xu,(function(){var t;return e.checkUploadConditions(((t={})[xu]=!0,t))})),this.jingTrackInstance.emitter.on(Su,(function(){var t;return e.checkUploadConditions(((t={})[Su]=!0,t))})),this.jingTrackInstance.emitter.on(Ou,(function(){var t;return e.checkUploadConditions(((t={})[Ou]=!0,t))})),this.jingTrackInstance.emitter.on(Cu,(function(t){return void 0===t&&(t=[]),e.visualEventList=t}))}return Object.defineProperty(n.prototype,"canUpload",{get:function(){return this._canUpload},set:function(t){this._canUpload=!!t,this._canUpload&&this.releaseEventInspector()},enumerable:!1,configurable:!0}),n}(),dc={},fc={}.hasOwnProperty;function pc(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function vc(t){try{return encodeURIComponent(t)}catch(t){return null}}dc.stringify=function(t,n){n=n||"";var e,i,r=[];for(i in"string"!=typeof n&&(n="?"),t)if(fc.call(t,i)){if((e=t[i])||null!=e&&!isNaN(e)||(e=""),i=vc(i),e=vc(e),null===i||null===e)continue;r.push(i+"="+e)}return r.length?n+r.join("&"):""},dc.parse=function(t){for(var n,e=/([^=?#&]+)=?([^&]*)/g,i={};n=e.exec(t);){var r=pc(n[1]),o=pc(n[2]);null===r||null===o||r in i||(i[r]=o)}return i};var hc=function(){function i(i){var r=this;this.jingTrackInstance=i,this.getVisitorId=function(){var t=r.jingTrackInstance.minipInstance,n=t.getStorageSync("jingVisitorUserId");return n||(n="jingWebFingerprint"+r.createVisitorId(),t.setStorageSync("jingVisitorUserId",n)),n},this.useNewSession=function(){var t=r.is_new_session;return t&&(r.is_new_session=!1),t},this.correctIdentify=function(t){for(var n,e,i,o,a=0,u=Object.values(xo);a<t.length;){var c=t[a];u.includes(c.identity_type)&&c.identity_value?(c.identity_type===xo.mp_openid&&(c.identity_channel_uuid=null!==(i=null===(e=null===(n=r.jingTrackInstance)||void 0===n?void 0:n.options)||void 0===e?void 0:e.jingTrackUuid)&&void 0!==i?i:""),t[a]={is_multi:0,identity_type:c.identity_type,identity_value:c.identity_value,identity_channel_uuid:null!==(o=c.identity_channel_uuid)&&void 0!==o?o:""},a++):t.splice(a,1)}},this.setIdentity=function(t){Nu((function(){r.identity=r.mergeIdentity(r.identity,t)}))},this.setSilentIdentity=function(t){Nu((function(){r.silentIdentity=r.mergeIdentity(r.silentIdentity,t)}))},this.removeIdentityItem=function(t){Nu((function(){r.identity=r.identity.filter((function(n){return!t.includes(n.identity_type)}))}))},this.clearIdentity=function(){r.identity=[]},this.getIdentity=function(){return r.mergeIdentity(r.silentIdentity,r.identity)},this.mergeIdentity=function(t,n){try{if(!ln(n))return t;r.correctIdentify(n);var e={};t.forEach((function(t){e[t.identity_type]=t})),n.forEach((function(t){e[t.identity_type]=t}));var i=[];for(var o in e)i.push(e[o]);return i}catch(t){Vu("合并身份信息出错",t)}return t},this.mpLogin=function(){return n(r,void 0,void 0,(function(){var t;return e(this,(function(n){return t=this.jingTrackInstance.minipInstance,[2,new Promise((function(n,e){t.minip.login({success:function(t){return n(t)},fail:function(t){return e(t)}})}))]}))}))},this.silentGetOpenId=function(){return n(r,void 0,void 0,(function(){var t,n,i,r,o,a,u;return e(this,(function(e){switch(e.label){case 0:t=this.jingTrackInstance.jingApi,e.label=1;case 1:return e.trys.push([1,4,,5]),[4,this.mpLogin()];case 2:return n=e.sent().code,[4,t.getOpenID(n)];case 3:return(i=e.sent().data).openid&&this.setSilentIdentity([{identity_channel_uuid:null!==(u=null===(a=null===(o=this.jingTrackInstance)||void 0===o?void 0:o.options)||void 0===a?void 0:a.jingTrackUuid)&&void 0!==u?u:"",identity_type:xo.mp_openid,identity_value:i.openid}]),i.unionid&&this.setSilentIdentity([{identity_channel_uuid:"",identity_type:xo.wechat_unionid,identity_value:i.unionid}]),i.openid||Uu.warn("获取 open_id 失败",i),[3,5];case 4:return r=e.sent(),Vu("静默获取 open_id 出错!funcName: silentGetOpenId",r),[3,5];case 5:return[2]}}))}))},this.generateUrlWithSession=function(n,e){var i,o=((i={})[Pu]=r.session_id,i.jing_visitor_id=r.visitor_id,i),a=[xo.wechat_unionid,xo.mp_openid,xo.wechat_openid,xo.mobile,xo.email,xo.third_party],u=r.getIdentity(),c=null;if(a.includes(e)&&(c=u.find((function(t){return t.identity_type===e}))),!c){var s=a.find((function(t){return u.find((function(n){return n.identity_type===t}))}));c=u.find((function(t){return t.identity_type===s}))}return c&&(o.jing_identity_type=c.identity_type,o.jing_identity_value=c.identity_value,o.jing_identity_channel_uuid=c.identity_channel_uuid),function(n,e){void 0===e&&(e={});var i=n.indexOf("#"),r=i>-1?n.substring(i):"",o=i>-1?n.substring(0,i):n.substring(0),a=o.indexOf("?"),u=a>-1?o.substring(a):"",c=a>-1?o.substring(0,a):o.substring(0),s=t(t({},dc.parse(u)),e);return c+dc.stringify(s,"?")+r}(n,o)},this.visitor_id=this.getVisitorId();var o=this.jingTrackInstance.minipInstance.getLaunchOptionsSync().query;this.is_new_session=!1,this.session_id=o[Pu]||(this.is_new_session=!0)&&this.createSessionID(),this.identity=[],this.silentIdentity=[]}return i.prototype.createVisitorId=function(){for(var t=[],n="0123456789abcdef",e=0;36>e;e++)t[e]=n.substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]=n.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},i.prototype.createSessionID=function(){for(var t="",n=0;16>n;n++){var e=16*Math.random()|0;t+=(.5>Math.random()?e:3&e|8).toString(16)}return t},i}(),gc=function(){function t(t){var n=this;this.jingTrackInstance=t,this.parsePage=function(t,e){var i,r,o,a=(null==t?void 0:t.route)||(null==t?void 0:t.__route__)||(null===(i=null==t?void 0:t.$page)||void 0===i?void 0:i.fullPath)||(null===(o=null===(r=n.jingTrackInstance)||void 0===r?void 0:r.minipInstance)||void 0===o?void 0:o.getCurrentPath())||"";n.query=n.getQuery(e),t.scene&&(n.scene=t.scene),n.path=a,n.pageEnterTime[n.path]=Date.now()},this.getQuery=function(t){return void 0===t&&(t={}),n.sourceData=n.getSourceData(t),t},this.getSourceData=function(t){var n=["scene_1","scene_2","scene_3","scene_4","scene_5","param_1","param_2","param_3","param_4","param_5","utm_source","utm_medium","utm_campaign","utm_term","utm_content","push_engine_channel_uuid"],e={};for(var i in t)n.includes(i)&&(e[i]=t[i]);return e},this.referer="",this.path="",this.query={},this.pageEnterTime={},this.sourceData={}}return Object.defineProperty(t.prototype,"path",{get:function(){return this._path},set:function(t){this._path!==t&&(this.referer=this._path),this._path=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.jingTrackInstance.minipInstance.getPageTitle()},enumerable:!1,configurable:!0}),t}(),yc=function(){function t(t){var n=this;this.jingTrackInstance=t,this.main=function(t,e,i){var r,o,a=n.jingTrackInstance,u=a.options,c=a.platformConfig,s=a.plugins;e&&"autoplay"!==ta(t,"detail.source")&&(u.taro&&["eh"].includes(e)||t.type===(null===(r=n.prevEvent)||void 0===r?void 0:r.type)&&10>Math.abs(Number(t.timeStamp)-Number(null===(o=n.prevEvent)||void 0===o?void 0:o.timeStamp))||(n.prevEvent=t,u.uniVue&&(e=null==s?void 0:s.jingTrackUniAppAdapter.getRealEventNameForVue2(e,t)),Uu.plain("全埋点事件抓取, e.type: ".concat(t.type),{eventName:e,e:t,context:i}),c.actionListenerList.includes(t.type)&&n.buildClickEvent(t,e,i)))},this.buildClickEvent=function(t,e,i){var r,o,a,u,c=n.jingTrackInstance.reportMode,s=n.getElementDataset(t),l={action_code:ku.click,originEventName:e,page_data:qu(i),data_set:s},d=null!==(o=null===(r=null==t?void 0:t._relatedInfo)||void 0===r?void 0:r.anchorRelatedText)&&void 0!==o?o:"";c===So.visualization?(l.element_content=n.getElementContent(t),l.element_related_content=d):l.extra_data={element_id:null!==(u=null===(a=null==t?void 0:t.currentTarget)||void 0===a?void 0:a.id)&&void 0!==u?u:"",element_content:n.getElementContent(t),element_related_content:d},n.jingTrackInstance.eventCenter.commitEvent(l)},this.prevEvent={}}return t.prototype.getElementDataset=function(t){var n,e=V(null===(n=null==t?void 0:t.currentTarget)||void 0===n?void 0:n.dataset)?t.currentTarget.dataset:{},i=["eventOpts"],r={};return Object.entries(e).forEach((function(t){var n=t[0],e=t[1];i.includes(n)||(r[n]=e)})),r},t.prototype.getElementContent=function(t){var n,e,i;return(null===(e=null===(n=null==t?void 0:t.currentTarget)||void 0===n?void 0:n.dataset)||void 0===e?void 0:e[Ao.JINGTRACK_ELEMENT_CONTENT])||(null===(i=null==t?void 0:t._relatedInfo)||void 0===i?void 0:i.anchorTargetText)||""},t}(),_c=/^__reactProps\$[a-z0-9]+$/i,mc=/return [$\w]+\.\w+\(/,bc=/return \w+\(/,jc=/return [$\w]+\.\$emit\(['"](\w+)['"]/,Tc=/return [$\w]+\.\w+/,Ic=/return [$\w]+/,kc={tap:"onClick",longpress:"onLongPress"};const wc={jingEventAutoTracking:{name:"jingEventAutoTracking",method:yc},jingTrackTaroAdapter:{name:"jingTrackTaroAdapter",method:function(n){var e=this;this.jingTrackInstance=n,this.main=function(){var t=e.jingTrackInstance.options,n=t.taro,i=t.taroVue,r=n.Current,o=n.createComponent,a=!r&&o,u=r&&!o;if(e.taro=n,a)e.taroVersion="2",e.proxyTaro2(e.taro),Uu.plain("Taro version 2 (React)");else if(u){if(e.taroVersion="3",e.taroVue=i,e.taroVue){var c=Number.parseInt(aa(Qa(e.taroVue.version,".")),10);e.taroVueVersion=c,Uu.plain("Taro version 3, Vue version ".concat(c))}else Uu.plain("Taro version 3 (React)");e.proxyTaro3()}else Uu.error("未获取到 Taro 实例或不支持的 Taro 版本,请检查!")},this.proxyTaro2=function(t){var n=e,i=t.createApp,r=t.createComponent;i&&(t.createApp=function(t){var e=i(t);return n.jingTrackInstance.minipHooks.appOverriding(e),e}),r&&(t.createComponent=function(t,e){var i=r(t,e),o=e?"page":"component";return n.jingTrackInstance.minipHooks["".concat(o,"Overriding")](i.methods),i})},this.proxyTaro3=function(){var n,i,r=e,o=e.jingTrackInstance,a=o.minipHooks,u=o.platformConfig.actionListenerList;if(a.nativeOverriding(["App","Page"]),2!==e.taroVueVersion){var c=null===(i=null===(n=r.taro)||void 0===n?void 0:n.hooks)||void 0===i?void 0:i.call;c?r.defineProperty(r.taro.hooks,"call",(function(){for(var n,e,i=[],o=0;arguments.length>o;o++)i[o]=arguments[o];var a=Array.from(i),s=c.apply(this,a);if("modifyDispatchEvent"===a[0]){var l=a[1],d=a[2],f=null===(e=null===(n=r.jingTrackInstance.plugins)||void 0===n?void 0:n.jingEventAutoTracking)||void 0===e?void 0:e.main;if(F(f)&&u.includes(l.type)){var p=l.mpEvent,v=p.currentTarget,h=p.detail;try{var g=aa(d.__handlers[l.type]);if(g){g.oldHandler&&(g=g.oldHandler);var y;y=r.taroVue?r.taro3vue3GetFuncName(g,d):r.taro3reactGetFuncName(g,l,d),f(t(t({},l.mpEvent),{currentTarget:t(t({},v),{detail:h,dataset:t(t({},v.dataset),d.dataset)})}),y)}}catch(t){Vu("Taro 尝试获取方法名出错!",t)}}}return s})):(Uu.warn("Taro3 实例获取失败,请检查初始化逻辑!"),a.nativeOverriding(["Page"]))}else e.taro3Vue2Proxy()},this.taro3reactGetFuncName=function(t,n,i){var r,o,a,u,c,s,l,d,f=xr(i).find((function(t){return _c.test(t)})),p=null!==(o=null!==(r=Nu((function(){var t;return null===(t=null==i?void 0:i[f])||void 0===t?void 0:t[kc[n.type]]})))&&void 0!==r?r:t.oldHandler)&&void 0!==o?o:t;if(null===(a=null==p?void 0:p.value)||void 0===a?void 0:a.name)return null===(u=null==p?void 0:p.value)||void 0===u?void 0:u.name;if(p.name&&!["handler","invoker"].includes(p.name)){var v=null===(s=null===(c=aa("".concat(p).match(mc)))||void 0===c?void 0:c.replace("return ",""))||void 0===s?void 0:s.replace("(","");if(v){var h=aa(ja(Qa(v,".")));v=h&&"apply"!==h?h:""}else v=null===(d=null===(l=aa("".concat(p).match(bc)))||void 0===l?void 0:l.replace("return ",""))||void 0===d?void 0:d.replace("(","");return v||("bound "===p.name?e.getAnonymousFunc(i):p.name)}return e.getAnonymousFunc(i)},this.taro3vue3GetFuncName=function(t,n){var i,r,o,a="".concat(t.value);if(tu("".concat(a).replace(" ",""),"function(")){var u=a.match(jc);if(u&&u[1])return u[1];var c=a.match(Tc);if(c&&c[0]){var s=null===(i=c[0])||void 0===i?void 0:i.replace("return ","").replace("(","");return null==s?void 0:s.split(".")[1]}var l=a.match(Ic);if(l&&l[0])return null===(r=l[0])||void 0===r?void 0:r.replace("return ","").replace("(","")}return(null===(o=null==t?void 0:t.value)||void 0===o?void 0:o.name)?t.value.name:e.getAnonymousFunc(n)},this.getAnonymousFunc=function(t){var n=e.jingTrackInstance.currentPage.path.split("/"),i=n.findIndex((function(t){return t.indexOf("page")>-1}))+1,r=i&&n[i]?n[i]:lo(n);return"".concat(r,"_Func").concat(tu(t.uid,"_")?t.uid:"_"+t.uid)},this.taro3Vue2Proxy=function(){var t=e;e.taroVue.mixin({beforeMount:function(){var n=this,e=this.$options.methods;xr(e).forEach((function(e){t.defineProperty(n,e,t.proxyMethods(e,n[e],n))}));var i=this._setupState;sr(i)||xr(i).forEach((function(e){t.defineProperty(i,e,t.proxyMethods(e,i[e],n))}))}})},this.proxyMethods=function(t,n,i){var r=e.jingTrackInstance.platformConfig.pageHandlers,o=e.jingTrackInstance.minipHooks;return F(n)&&!r.includes(t)?function(){for(var e=[],r=0;arguments.length>r;r++)e[r]=arguments[r];return o.customFcEffects(t,n,i).apply(this,e)}:n},this.defineProperty=function(t,n,e){Object.defineProperty(t,n,{writable:!0,enumerable:!0,configurable:!0,value:e})}}}};Object.freeze(wc);var Ec=function(t){var n=this;this.jingTrackInstance=t,this.innerPluginInit=function(){xr(wc).forEach((function(t){var e=wc[t],i=e.name,r=e.method;n.pluginItems.find((function(t){return t.name===i}))||n.pluginItems.push({name:i||t,method:r||function(){}})})),sr(n.pluginItems)||n.installAll()},this.installAll=function(){n.pluginItems.forEach((function(t){return n.install(t)}))},this.install=function(t){var e,i=t.name,r=t.options;if(null===(e=n.jingTrackInstance)||void 0===e?void 0:e.plugins[i])return Uu.forceLog("重复加载插件 ".concat(i," 或插件重名,已跳过加载!"),"warn"),!1;try{return n.jingTrackInstance.plugins[i]=new t.method(n.jingTrackInstance,r),Uu.forceLog("加载插件:".concat(i),"plain"),!0}catch(t){return Vu("插件【".concat(i,"】加载异常"),t),!1}},this.uninstall=function(t){var e;gu(n.pluginItems,t);var i=gu(null===(e=n.jingTrackInstance)||void 0===e?void 0:e.plugins,t);return i||Uu.forceLog("卸载插件 ".concat(t," 失败!"),"error"),i},this.uninstallAll=function(){n.pluginItems.forEach((function(t){return n.uninstall(t.name)}))},this.pluginItems=[]},Pc=function(t){var n=this;this.jingTrackInstance=t,this.main=function(t,e){var i,r,o,a=n.jingTrackInstance,u=a.platformConfig,c=a.currentPage;if(!a.minipHooks.shareOut){Uu.plain("app ".concat(t," 事件触发"),{eventName:t,args:e});var s=Tu[t],l=u.listeners.app,d="App.".concat(t);switch(t){case l.appLaunch:case l.appShow:n.enterTime=Date.now();var f={route:(null===(i=null==e?void 0:e[0])||void 0===i?void 0:i.path)||"",scene:null===(r=null==e?void 0:e[0])||void 0===r?void 0:r.scene},p=(null===(o=null==e?void 0:e[0])||void 0===o?void 0:o.query)||{};c.parsePage(f,p),n.buildAppActiveEvent(s,d);break;case l.appHide:n.buildAppCloseEvent(s,d)}}},this.buildAppActiveEvent=function(t,e){var i=n.jingTrackInstance,r=i.reportMode,o=i.currentPage,a={action_code:t,originEventName:e};r!==So.visualization&&(a.extra_data={scene:o.scene,query:dc.stringify(o.query)}),n.jingTrackInstance.eventCenter.commitEvent(a)},this.buildAppCloseEvent=function(t,e){var i={action_code:t,originEventName:e};n.jingTrackInstance.reportMode!==So.visualization&&(i.extra_data={duration:(Date.now()-n.enterTime)/1e3}),n.jingTrackInstance.eventCenter.commitEvent(i)}},Sc=function(){function n(n){var e=this;this.jingTrackInstance=n,this.main=function(t,n,i){var r,o,a,u,c,s,l=e.jingTrackInstance,d=l.platformConfig,f=l.currentPage,p=l.minipHooks,v=l.minipInstance;Uu.plain("page ".concat(n," 事件触发"),{page:t,eventName:n,args:i});var h=t.route||t.__route__||(null===(r=null==t?void 0:t.$page)||void 0===r?void 0:r.fullPath)||"",g=Iu[n],y=d.listeners.page,_="Page.".concat(n);switch(n){case y.pageShow:if(!p.shareOut){var m=ta(t,"options")||ta(t,"__displayReporter.query")||ta(t,"$page.query")||ta(t,"$wx.__displayReporter.query");e.pageQuery[h]=m,f.parsePage(t,e.pageQuery[h]||{}),e.buildVisitOrFavoriteEvent(g,_,t)}p.shareOut=!1;break;case y.pageHide:case y.pageUnload:p.shareOut||e.buildPageCloseEvent(g,_,t),n===y.pageUnload&&v.removeSettedTitleItem(h);break;case y.shareApp:case y.shareTime:var b=n===y.shareApp;b&&(p.shareOut=!0);var j={isShareApp:b,from:(null===(o=null==i?void 0:i[0])||void 0===o?void 0:o.from)||"",sharePath:b&&(null===(a=null==i?void 0:i[1])||void 0===a?void 0:a.path)||"",query:b?{}:null===(u=null==i?void 0:i[1])||void 0===u?void 0:u.query};e.buildShareAppEvent(g,_,j,t);break;case y.addFavorites:e.buildVisitOrFavoriteEvent(g,_,t);break;case y.tabTap:var T=(null==i?void 0:i[0])||{},I={text:null!==(c=null==T?void 0:T.text)&&void 0!==c?c:"",originEventName:"".concat(n,"_").concat(null!==(s=null==T?void 0:T.index)&&void 0!==s?s:"")};e.buildTabClickEvent(I,t)}},this.buildPageCloseEvent=function(t,n,i){var r=e.jingTrackInstance,o=r.reportMode,a=r.currentPage,u={action_code:t,originEventName:n,page_data:qu(i)};if(o!==So.visualization){var c=a.pageEnterTime[a.path]||Date.now();u.extra_data={scene:a.scene,query:dc.stringify(a.query),page_duration:(Date.now()-c)/1e3}}e.jingTrackInstance.eventCenter.commitEvent(u)},this.buildShareAppEvent=function(n,i,r,o){var a,u=e.jingTrackInstance,c=u.reportMode,s=u.currentPage,l={action_code:n,originEventName:i,page_data:qu(o)};c!==So.visualization&&(l.extra_data={scene:s.scene,from:null!==(a={menu:"右上角转发菜单",button:"页面内转发按钮"}[r.from])&&void 0!==a?a:"",query:dc.stringify(t(t({},s.query),r.query)),share_type:r.isShareApp?"好友列表":"朋友圈"},r.isShareApp&&(l.extra_data.share_path=r.sharePath)),e.jingTrackInstance.eventCenter.commitEvent(l)},this.buildTabClickEvent=function(t,n){var i=e.jingTrackInstance.reportMode,r={action_code:ku.click,originEventName:t.originEventName,page_data:qu(n)};i!==So.visualization?r.extra_data={element_id:"",element_content:t.text,element_related_content:""}:r.element_content=t.text,e.jingTrackInstance.eventCenter.commitEvent(r)},this.pageQuery={}}return n.prototype.buildVisitOrFavoriteEvent=function(t,n,e){var i=this.jingTrackInstance,r=i.reportMode,o=i.currentPage,a={action_code:t,originEventName:n,page_data:qu(e)};r!==So.visualization&&(a.extra_data={scene:o.scene,query:dc.stringify(o.query)}),this.jingTrackInstance.eventCenter.commitEvent(a)},n}(),Ac=function(t,n){return F(n)&&"constructor"!==t},xc=function(i){var r=this;this.jingTrackInstance=i,this.setAppEffectCbs=function(){var t=r.jingTrackInstance.platformConfig.appHandlers,n=r;t.forEach((function(t){r.defAppCbs[t]=function(){for(var e=[],i=0;arguments.length>i;i++)e[i]=arguments[i];n.appEffects.main(t,e)}}))},this.setPageEffectCbs=function(){var t=r.jingTrackInstance.platformConfig.pageHandlers,n=r;t.forEach((function(t){r.defPageCbs[t]=function(){for(var e=[],i=0;arguments.length>i;i++)e[i]=arguments[i];n.pageEffects.main(this,t,e)}}))},this.lifeFcEffects=function(i,o,a){var u=r;return["onShareTimeline","onAddToFavorites"].includes(i)?function(){for(var t,n,e,r=[],c=0;arguments.length>c;c++)r[c]=arguments[c];var s=o.apply(this,r);try{var l=[].slice.call(r);s&&l.push(s),null===(e=null===(n=null===(t=u["def".concat(a,"Cbs")])||void 0===t?void 0:t[i])||void 0===n?void 0:n.apply)||void 0===e||e.call(n,this,l)}catch(t){Vu("lifeFcEffects 方法执行出错",t)}return s}:function(){for(var r,c,s,l,d=[],f=0;arguments.length>f;f++)d[f]=arguments[f];return n(this,void 0,void 0,(function(){var f,p,v,h,g;return e(this,(function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),"onShareAppMessage"!==i?[3,3]:[4,o.apply(this,d)];case 1:return f=null!==(r=y.sent())&&void 0!==r?r:{},"promise"!==yu(f.promise)?[3,3]:(p=function(){return n(this,void 0,void 0,(function(){var n;return e(this,(function(e){return n=f,[2,new Promise((function(e){var i=setTimeout((function(){e(t({},n)),clearTimeout(i),i=null}),3e3);f.promise.then((function(r){e(t({},n=r)),clearTimeout(i),i=null}))}))]}))}))},v=[t({},f)],[4,p()]);case 2:f=t.apply(void 0,v.concat([y.sent()])),gu(f,"promise"),y.label=3;case 3:return h=[].slice.call(d),f&&h.push(f),null===(l=null===(s=null===(c=u["def".concat(a,"Cbs")])||void 0===c?void 0:c[i])||void 0===s?void 0:s.apply)||void 0===l||l.call(s,this,h),[3,5];case 4:return g=y.sent(),Vu("".concat(a," 生命周期 ").concat(i," 副作用方法执行出错!funcName: lifeFcEffects"),g),[3,5];case 5:return"onShareAppMessage"!==i&&(f=o.apply(this,d)),[2,f]}}))}))}},this.customFcEffects=function(t,n,e){var i=r.jingTrackInstance.platformConfig.actionListenerList,o=r;return function(){for(var r,a,u,c,s=[],l=0;arguments.length>l;l++)s[l]=arguments[l];if(null===(a=null===(r=o.jingTrackInstance)||void 0===r?void 0:r.plugins)||void 0===a?void 0:a.jingEventAutoTracking)try{var d=s[0]||{};su(d,"type")&&((null==d?void 0:d.currentTarget)||(null==d?void 0:d.target))||(d=s[s.length-1]),((null==d?void 0:d.currentTarget)||(null==d?void 0:d.target))&&i.includes(d.type)&&(F(o.actionEffects)||(o.actionEffects=(null===(c=null===(u=o.jingTrackInstance.plugins)||void 0===u?void 0:u.jingEventAutoTracking)||void 0===c?void 0:c.main)||function(){}),null==o||o.actionEffects(d,t,null!=e?e:this))}catch(t){Vu("customFcEffects 方法执行出错",t)}return n.apply(this,s)}},this.appApplyProxy=function(t,n){var e=r.jingTrackInstance.platformConfig,i=e.appHandlers;return e.appListenerList.includes(t)?r.lifeFcEffects(t,n,"App"):i.includes(t)?n:r.customFcEffects(t,n)},this.pageApplyProxy=function(t,n){var e=r.jingTrackInstance.platformConfig,i=e.pageHandlers;return e.pageListenerList.includes(t)?r.lifeFcEffects(t,n,"Page"):i.includes(t)?n:r.customFcEffects(t,n)},this.customApplyProxy=function(t,n){return r.customFcEffects(t,n)},this.objectTraverse=function(t,n){Object.getOwnPropertyNames(t).forEach((function(e){return n(e,t)}))},this.supLifeFcs=function(t,n){var e=r.jingTrackInstance.platformConfig;ln(e["".concat(n,"ListenerList")])&&e["".concat(n,"ListenerList")].forEach((function(n){F(t[n])||["onShareAppMessage","onShareTimeline"].includes(n)||(t[n]=function(){})}))},this.appOverriding=function(t){return r.setAppEffectCbs(),r.supLifeFcs(t,"app"),r.objectTraverse(t,(function(t,n){Ac(t,n[t])&&(n[t]=r.appApplyProxy(t,n[t]))})),t},this.pageOverriding=function(t){return r.setPageEffectCbs(),r.supLifeFcs(t,"page"),r.objectTraverse(t,(function(t,n){Ac(t,n[t])&&(n[t]=r.pageApplyProxy(t,n[t]))})),t},this.componentOverriding=function(t){var n=r.jingTrackInstance.options;return t.methods||(t.methods={}),n.uniVue&&(r.setPageEffectCbs(),r.supLifeFcs(t.methods,"page")),r.objectTraverse(t.methods,(function(t,e){Ac(t,e[t])&&(e[t]=n.uniVue?r.pageApplyProxy(t,e[t]):r.customApplyProxy(t,e[t]))})),t},this.behaviorOverriding=function(t){return t.methods||(t.methods={}),r.objectTraverse(t.methods,(function(t,n){Ac(t,n[t])&&(n[t]=r.customApplyProxy(t,n[t]))})),t},this.jingApp=function(t){return(0,r.jingTrackInstance.platformConfig.originalApp)(r.appOverriding(t))},this.jingPage=function(t){return(0,r.jingTrackInstance.platformConfig.originalPage)(r.pageOverriding(t))},this.jingComponent=function(t){return(0,r.jingTrackInstance.platformConfig.originalComponent)(r.componentOverriding(t))},this.jingBehavior=function(t){var n=r.jingTrackInstance.platformConfig.originalBehavior;return(void 0===n?function(){}:n)(r.behaviorOverriding(t))},this.nativeOverriding=function(t){void 0===t&&(t=["App","Page","Component","Behavior"]);var n=r;if(t.includes("App"))try{r.appHooked||(App=function(t){return n.jingApp(t)},r.appHooked=!0)}catch(t){Vu("App 代理出错",t)}if(t.includes("Page"))try{r.pageHooked||(Page=function(t){return n.jingPage(t)},r.pageHooked=!0)}catch(t){Vu("Page 代理出错",t)}if(t.includes("Component"))try{r.componentHooked||(Component=function(t){return n.jingComponent(t)},r.componentHooked=!0)}catch(t){Vu("Component 代理出错",t)}if(t.includes("Behavior"))try{r.behaviorHooked||(Behavior=function(t){return n.jingBehavior(t)},r.behaviorHooked=!0)}catch(t){Vu("Behavior 代理出错",t)}},this.shareOut=!1,this.defAppCbs={},this.defPageCbs={},this.appEffects=new Pc(this.jingTrackInstance),this.pageEffects=new Sc(this.jingTrackInstance)},Oc=function(){function t(t){var r=this;this.jingTrackInstance=t,this.request=function(t){return new Promise((function(n,e){r.jingTrackInstance.minipInstance.request({url:t.url,method:t.method,data:t.data,fail:function(t){Uu.error("请求失败!",t),e(t)},complete:function(t){var i,r;200===t.statusCode&&0===(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.code)?n(t.data):e((null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.message)||t)}})}))},this.getServer=function(){var t,n,e,i=null===(n=null===(t=r.jingTrackInstance)||void 0===t?void 0:t.options)||void 0===n?void 0:n.server;return null!==(e=ju[i])&&void 0!==e?e:{}},this.initJingTrack=function(){return n(r,void 0,void 0,(function(){var t;return e(this,(function(n){switch(n.label){case 0:return t=this.getServer(),[4,this.request({url:"".concat(null==t?void 0:t.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/init"),method:"GET"})];case 1:return[2,n.sent()]}}))}))},this.getOpenID=function(t){return n(r,void 0,void 0,(function(){var n;return e(this,(function(e){switch(e.label){case 0:return n=this.getServer(),[4,this.request({url:"".concat(null==n?void 0:n.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/get-openid"),method:"POST",data:{js_code:t}})];case 1:return[2,e.sent()]}}))}))},this.getVisualEvents=function(){return n(r,void 0,void 0,(function(){var t;return e(this,(function(n){switch(n.label){case 0:return t=this.getServer(),[4,this.request({url:"".concat(null==t?void 0:t.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/visual-events"),method:"GET"})];case 1:return[2,n.sent()]}}))}))},this.checkViewConnect=function(t){return n(r,void 0,void 0,(function(){var n;return e(this,(function(e){switch(e.label){case 0:return n=this.getServer(),[4,this.request({url:"".concat(null==n?void 0:n.VUE_APP_CGI_API_HOST,"/bffapi/lead/jingTrackMiniprogram/").concat(this.jingTrackUuid,"/checkViewConnect"),method:"POST",data:t})];case 1:return[2,e.sent()]}}))}))},this.pollingCheckViewConnect=function(t){var i=0;return new Promise((function(o,a){var u=function(){return n(r,void 0,void 0,(function(){var n,r,c,s,l,d,f;return e(this,(function(e){switch(e.label){case 0:i++,e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,this.checkViewConnect(t)];case 2:return n=e.sent().data,r=n.status,c=n.wid,s=void 0===c?"":c,0===r||1===r?(1===r&&(this.jingTrackInstance.reportMode=So.visualization,null===(f=null===(d=this.jingTrackInstance)||void 0===d?void 0:d.eventCenter)||void 0===f||f.uploader.setVisualModeWid(s)),o(r)):i>60||setTimeout((function(){u()}),2e3),[3,5];case 3:return l=e.sent(),a(l),[3,5];case 4:return 1===i&&this.jingTrackInstance.emitter.emit("FIRST_CHECK_VISUAL"),[7];case 5:return[2]}}))}))};u()}))},this.getJINGConfig=function(t){return n(r,void 0,void 0,(function(){var n,r,o,a,u,c,s,l;return e(this,(function(e){switch(e.label){case 0:return n=i([this.initJingTrack(),this.getVisualEvents()],t,!0),[4,Promise.allSettled(n)];case 1:if(r=e.sent(),o=r[0],a=r[1],"fulfilled"!==o.status)throw Error(o.reason);return this.jingTrackInstance.options.appId=null!==(s=null===(c=null===(u=null==o?void 0:o.value)||void 0===u?void 0:u.data)||void 0===c?void 0:c.app_id)&&void 0!==s?s:"","fulfilled"===a.status&&this.jingTrackInstance.emitter.emit(Cu,(null===(l=null==a?void 0:a.value)||void 0===l?void 0:l.data)||[]),[2]}}))}))}}return Object.defineProperty(t.prototype,"jingTrackUuid",{get:function(){var t,n;return null===(n=null===(t=null==this?void 0:this.jingTrackInstance)||void 0===t?void 0:t.options)||void 0===n?void 0:n.jingTrackUuid},enumerable:!1,configurable:!0}),t}(),Cc=function(){function i(){var i,r=this;this.init=function(t){return n(r,void 0,void 0,(function(){var n,i,r,o,a,u,c,s,l,d,f=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),Uu.forceLog("JingTrack 小程序 SDK 初始化中...","plain"),this.initOptions(t),this.initialized=!0,this.options.debug&&(this.reportMode=So.debug,Uu.setEnabled(!0)),n=this.options,i=n.uniVue,r=n.taro,i||r||this.minipHooks.nativeOverriding(),i&&(null===(c=null===(u=this.plugins)||void 0===u?void 0:u.jingTrackUniAppAdapter)||void 0===c||c.main()),r&&(null===(l=null===(s=this.plugins)||void 0===s?void 0:s.jingTrackTaroAdapter)||void 0===l||l.main()),!this.options.debug&&this.options.enableVisual?this.emitter.on(Su,(function(){var t,n,e,i,r,o,a,u,c,s;f.jingApi.pollingCheckViewConnect({visitorId:f.userStore.visitor_id,device:null===(t=f.minipInstance.systemInfo)||void 0===t?void 0:t.model,os:null===(n=f.minipInstance.systemInfo)||void 0===n?void 0:n.system,wechatVersion:null===(e=f.minipInstance.systemInfo)||void 0===e?void 0:e.version,jingTrackVersion:f.version,uniVueVersion:null!==(o=null===(r=null===(i=f.options)||void 0===i?void 0:i.uniVue)||void 0===r?void 0:r.version)&&void 0!==o?o:"",taroVersion:Lu(null===(a=f.options)||void 0===a?void 0:a.taro),taroVueVersion:null!==(s=null===(c=null===(u=f.options)||void 0===u?void 0:u.taroVue)||void 0===c?void 0:c.version)&&void 0!==s?s:""}).catch((function(t){Vu("pollingCheckViewConnect 方法执行出错!",t)}))})):this.emitter.emit(Ou),o=[],this.options.silentGetOpenId&&o.push(this.userStore.silentGetOpenId()),[4,this.jingApi.getJINGConfig(o)];case 1:return e.sent(),Uu.forceLog("JingTrack 小程序 SDK 初始化完成!",{jingTrackInstance:this},"success"),null===(d=this.emitter)||void 0===d||d.emit(xu,this),[2,!0];case 2:return a=e.sent(),Vu("JingTrack init 方法执行出错",a),[2,!1];case 3:return[2]}}))}))},this.initOptions=function(n){var e,i=n.jingTrackUuid,o={};if(xr(mu).forEach((function(t){var e=mu[t].type,i=ln(e)?!e.includes(yu(n[t])):yu(n[t])!==mu[t].type;o[t]=i?mu[t].default:n[t]})),!ju[o.server])throw Error("server 参数传入错误,请传入 ".concat(JSON.stringify(Object.keys(ju))," 的一种!"));if("boolean"===yu(o.autotrack))o.autotrack=o.autotrack?wu:[];else{var a="array"===yu(o.autotrack)?function(t){return o.autotrack.includes(t)}:function(t){return o.autotrack[t]};o.autotrack=wu.filter(a)}var u=co(wu,o.autotrack);sr(u)||Uu.forceLog("以下行为未开启全埋点: ",u,"warn"),r.options=t({jingTrackUuid:i,appId:""},o),null===(e=r.emitter)||void 0===e||e.emit(Au,r)},this.track=function(t,n,e){r.eventCenter.commitCustomEvent(t,n,e)},this.identify=function(t,n){var e=[];t&&e.push({identity_type:xo.mp_openid,identity_value:t}),n&&e.push({identity_type:xo.wechat_unionid,identity_value:n}),r.setIdentity(e)};try{this.version="1.1.0",this.platform="wx",this.framework="taro",this.platformConfig=Ju,this.emitter={all:i=i||new Map,on:function(t,n){var e=i.get(t);e?e.push(n):i.set(t,[n])},off:function(t,n){var e=i.get(t);e&&(n?e.splice(e.indexOf(n)>>>0,1):i.set(t,[]))},emit:function(t,n){var e=i.get(t);e&&e.slice().map((function(t){t(n)})),(e=i.get("*"))&&e.slice().map((function(e){e(t,n)}))}},this.reportMode=So.normal,this.minipInstance=new Fu(this),this.currentPage=new gc(this),this.plugins=new Ec(this),this.jingApi=new Oc(this),this.userStore=new hc(this),this.eventCenter=new lc(this),this.minipHooks=new xc(this),this.plugins.innerPluginInit()}catch(t){Vu("JingTrack 实例化失败",t)}}return Object.defineProperty(i.prototype,"setIdentity",{get:function(){return this.userStore.setIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getIdentity",{get:function(){return this.userStore.getIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"removeIdentityItem",{get:function(){return this.userStore.removeIdentityItem},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"clearIdentity",{get:function(){return this.userStore.clearIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"generateUrlWithSession",{get:function(){return this.userStore.generateUrlWithSession},enumerable:!1,configurable:!0}),i}(),Uc=new Cc,Vc=function(n){for(var e=[],i=1;arguments.length>i;i++)e[i-1]=arguments[i];try{if(oa(n)&&bu.includes(n)&&Uc[n]){if("init"===n){if(Uc.initialized)return Uu.forceLog("SDK 重复初始化,请检查是否重复加载 SDK !","warn"),!1;var r=e[0],o={};if(1===e.length)oa(r)&&(o={jingTrackUuid:r});else if(2===e.length)if(oa(r)&&V(e[1])){var a=e[1];o=t(t({},a),{jingTrackUuid:r})}else oa(r)&&oa(e[1])&&(o={appId:u=e[1],jingTrackUuid:r});else{var u=e[1];a=e[2],oa(r)&&oa(u)&&V(a)&&(o=t(t({},a),{appId:u,jingTrackUuid:r}))}if(sr(o))throw Error("初始化 SDK 失败。请使用 jingTrack('init', '您的 JingTrack 项目 ID', options) 初始化 SDK。");return Uc.init(o)}if(!Uc.initialized)throw Error("SDK 未初始化!请先调用 init 方法初始化 SDK。");return Uc[n].apply(Uc,e)}throw Error("不存在名为 ".concat(Ro(n)," 的方法调用!"))}catch(t){Vu("JingTrack ".concat(n," 方法执行出错"),t)}};export{Vc as default};
package/dist/uniapp.js ADDED
@@ -0,0 +1 @@
1
+ var t=function(){return t=Object.assign||function(t){for(var n,e=1,i=arguments.length;i>e;e++)for(var r in n=arguments[e])({}).hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t},t.apply(this,arguments)};function n(t,n,e,i){return new(e||(e=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function u(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?r(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(a,u)}c((i=i.apply(t,n||[])).next())}))}function e(t,n){var e,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(e=1,i&&(r=2&u[0]?i.return:u[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,u[1])).done)return r;switch(i=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,i=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){a.label=u[1];break}if(6===u[0]&&a.label<r[1]){a.label=r[1],r=u;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(u);break}r[2]&&a.ops.pop(),a.trys.pop();continue}u=n.call(t,a)}catch(t){u=[6,t],i=0}finally{e=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function i(t,n,e){if(e||2===arguments.length)for(var i,r=0,o=n.length;o>r;r++)!i&&r in n||(i||(i=[].slice.call(n,0,r)),i[r]=n[r]);return t.concat(i||[].slice.call(n))}"function"==typeof SuppressedError&&SuppressedError;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}var a=function(t,n){return t===n||t!=t&&n!=n},u=a,c=function(t,n){for(var e=t.length;e--;)if(u(t[e][0],n))return e;return-1},s=c,l=[].splice,d=c,f=c,p=c,v=function(){this.__data__=[],this.size=0};function h(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var i=t[n];this.set(i[0],i[1])}}h.prototype.clear=v,h.prototype.delete=function(t){var n=this.__data__,e=s(n,t);return e>=0&&(e==n.length-1?n.pop():l.call(n,e,1),--this.size,!0)},h.prototype.get=function(t){var n=this.__data__,e=d(n,t);return 0>e?void 0:n[e][1]},h.prototype.has=function(t){return f(this.__data__,t)>-1},h.prototype.set=function(t,n){var e=this.__data__,i=p(e,t);return 0>i?(++this.size,e.push([t,n])):e[i][1]=n,this};var g,y=h,_=y,m="object"==typeof r&&r&&r.Object===Object&&r,b=m,j="object"==typeof self&&self&&self.Object===Object&&self,I=b||j||Function("return this")(),T=I.Symbol,k=T,w=Object.prototype,E=w.hasOwnProperty,P=w.toString,S=k?k.toStringTag:void 0,A={}.toString,x=function(t){var n=E.call(t,S),e=t[S];try{t[S]=void 0;var i=!0}catch(t){}var r=P.call(t);return i&&(n?t[S]=e:delete t[S]),r},O=T?T.toStringTag:void 0,C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":O&&O in Object(t)?x(t):function(t){return A.call(t)}(t)},U=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)},V=o(U),N=C,L=U,q=function(t){if(!L(t))return!1;var n=N(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n},D=o(q),F=I["__core-js_shared__"],M=(g=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",H=function(){}.toString,R=function(t){if(null!=t){try{return H.call(t)}catch(t){}try{return t+""}catch(t){}}return""},B=q,z=function(t){return!!M&&M in t},G=U,$=R,J=/^\[object .+?Constructor\]$/,W=function(){}.toString,K=Object.prototype.hasOwnProperty,Q=RegExp("^"+W.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=function(t,n){var e=function(t,n){return null==t?void 0:t[n]}(t,n);return function(t){return!(!G(t)||z(t))&&(B(t)?Q:J).test($(t))}(e)?e:void 0},Z=Y(I,"Map"),X=Y(Object,"create"),tt=X,nt=X,et={}.hasOwnProperty,it=X,rt={}.hasOwnProperty,ot=X,at=function(){this.__data__=tt?tt(null):{},this.size=0},ut=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},ct=function(t){var n=this.__data__;if(nt){var e=n[t];return"__lodash_hash_undefined__"===e?void 0:e}return et.call(n,t)?n[t]:void 0};function st(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var i=t[n];this.set(i[0],i[1])}}st.prototype.clear=at,st.prototype.delete=ut,st.prototype.get=ct,st.prototype.has=function(t){var n=this.__data__;return it?void 0!==n[t]:rt.call(n,t)},st.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=ot&&void 0===n?"__lodash_hash_undefined__":n,this};var lt=st,dt=y,ft=Z,pt=function(t,n){var e,i,r=t.__data__;return("string"==(i=typeof(e=n))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==e:null===e)?r["string"==typeof n?"string":"hash"]:r.map},vt=pt,ht=pt,gt=pt,yt=pt;function _t(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var i=t[n];this.set(i[0],i[1])}}_t.prototype.clear=function(){this.size=0,this.__data__={hash:new lt,map:new(ft||dt),string:new lt}},_t.prototype.delete=function(t){var n=vt(this,t).delete(t);return this.size-=n?1:0,n},_t.prototype.get=function(t){return ht(this,t).get(t)},_t.prototype.has=function(t){return gt(this,t).has(t)},_t.prototype.set=function(t,n){var e=yt(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this};var mt=_t,bt=y,jt=Z,It=mt,Tt=y,kt=function(){this.__data__=new _,this.size=0},wt=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Et=function(t){return this.__data__.get(t)},Pt=function(t){return this.__data__.has(t)};function St(t){var n=this.__data__=new Tt(t);this.size=n.size}St.prototype.clear=kt,St.prototype.delete=wt,St.prototype.get=Et,St.prototype.has=Pt,St.prototype.set=function(t,n){var e=this.__data__;if(e instanceof bt){var i=e.__data__;if(!jt||199>i.length)return i.push([t,n]),this.size=++e.size,this;e=this.__data__=new It(i)}return e.set(t,n),this.size=e.size,this};var At=St,xt=Y,Ot=function(){try{var t=xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ct=Ot,Ut=function(t,n,e){"__proto__"==n&&Ct?Ct(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e},Vt=Ut,Nt=a,Lt=function(t,n,e){(void 0!==e&&!Nt(t[n],e)||void 0===e&&!(n in t))&&Vt(t,n,e)},qt=function(t,n,e){for(var i=-1,r=Object(t),o=e(t),a=o.length;a--;){var u=o[++i];if(!1===n(r[u],u,r))break}return t},Dt={exports:{}};!function(t,n){var e=I,i=n&&!n.nodeType&&n,r=i&&t&&!t.nodeType&&t,o=r&&r.exports===i?e.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.exports=function(t,n){if(n)return t.slice();var e=t.length,i=a?a(e):new t.constructor(e);return t.copy(i),i}}(Dt,Dt.exports);var Ft=Dt.exports,Mt=I.Uint8Array,Ht=Mt,Rt=function(t,n){var e=-1,i=t.length;for(n||(n=Array(i));++e<i;)n[e]=t[e];return n},Bt=U,zt=Object.create,Gt=function(){function t(){}return function(n){if(!Bt(n))return{};if(zt)return zt(n);t.prototype=n;var e=new t;return t.prototype=void 0,e}}(),$t=function(t,n){return function(e){return t(n(e))}},Jt=$t(Object.getPrototypeOf,Object),Wt=Object.prototype,Kt=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Wt)},Qt=Gt,Yt=Jt,Zt=Kt,Xt=function(t){return null!=t&&"object"==typeof t},tn=C,nn=Xt,en=function(t){return nn(t)&&"[object Arguments]"==tn(t)},rn=Xt,on=Object.prototype,an=on.hasOwnProperty,un=on.propertyIsEnumerable,cn=en(function(){return arguments}())?en:function(t){return rn(t)&&an.call(t,"callee")&&!un.call(t,"callee")},sn=Array.isArray,ln=o(sn),dn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&9007199254740991>=t},fn=q,pn=dn,vn=function(t){return null!=t&&pn(t.length)&&!fn(t)},hn=vn,gn=Xt,yn=function(t){return gn(t)&&hn(t)},_n={exports:{}},mn=function(){return!1};!function(t,n){var e=I,i=mn,r=n&&!n.nodeType&&n,o=r&&t&&!t.nodeType&&t,a=o&&o.exports===r?e.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u}(_n,_n.exports);var bn=_n.exports,jn=C,In=Jt,Tn=Xt,kn=function(){}.toString,wn=Object.prototype.hasOwnProperty,En=kn.call(Object),Pn=C,Sn=dn,An=Xt,xn={};xn["[object Float32Array]"]=xn["[object Float64Array]"]=xn["[object Int8Array]"]=xn["[object Int16Array]"]=xn["[object Int32Array]"]=xn["[object Uint8Array]"]=xn["[object Uint8ClampedArray]"]=xn["[object Uint16Array]"]=xn["[object Uint32Array]"]=!0,xn["[object Arguments]"]=xn["[object Array]"]=xn["[object ArrayBuffer]"]=xn["[object Boolean]"]=xn["[object DataView]"]=xn["[object Date]"]=xn["[object Error]"]=xn["[object Function]"]=xn["[object Map]"]=xn["[object Number]"]=xn["[object Object]"]=xn["[object RegExp]"]=xn["[object Set]"]=xn["[object String]"]=xn["[object WeakMap]"]=!1;var On=function(t){return function(n){return t(n)}},Cn={exports:{}};!function(t,n){var e=m,i=n&&!n.nodeType&&n,r=i&&t&&!t.nodeType&&t,o=r&&r.exports===i&&e.process,a=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}(Cn,Cn.exports);var Un,Vn,Nn,Ln=Cn.exports,qn=function(t){return An(t)&&Sn(t.length)&&!!xn[Pn(t)]},Dn=On,Fn=Ln&&Ln.isTypedArray,Mn=Fn?Dn(Fn):qn,Hn=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]},Rn=Ut,Bn=a,zn={}.hasOwnProperty,Gn=function(t,n,e){var i=t[n];zn.call(t,n)&&Bn(i,e)&&(void 0!==e||n in t)||Rn(t,n,e)},$n=Ut,Jn=/^(?:0|[1-9]\d*)$/,Wn=function(t,n){var e=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&Jn.test(t))&&t>-1&&t%1==0&&n>t},Kn=cn,Qn=sn,Yn=bn,Zn=Wn,Xn=Mn,te={}.hasOwnProperty,ne=function(t,n){var e=Qn(t),i=!e&&Kn(t),r=!e&&!i&&Yn(t),o=!e&&!i&&!r&&Xn(t),a=e||i||r||o,u=a?function(t,n){for(var e=-1,i=Array(t);++e<t;)i[e]=n(e);return i}(t.length,String):[],c=u.length;for(var s in t)!n&&!te.call(t,s)||a&&("length"==s||r&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Zn(s,c))||u.push(s);return u},ee=U,ie=Kt,re={}.hasOwnProperty,oe=ne,ae=function(t){if(!ee(t))return function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}(t);var n=ie(t),e=[];for(var i in t)("constructor"!=i||!n&&re.call(t,i))&&e.push(i);return e},ue=vn,ce=function(t){return ue(t)?oe(t,!0):ae(t)},se=function(t,n,e,i){var r=!e;e||(e={});for(var o=-1,a=n.length;++o<a;){var u=n[o],c=i?i(e[u],t[u],u,e,t):void 0;void 0===c&&(c=t[u]),r?$n(e,u,c):Gn(e,u,c)}return e},le=ce,de=Lt,fe=Ft,pe=function(t,n){var e,i,r=n?(e=t.buffer,i=new e.constructor(e.byteLength),new Ht(i).set(new Ht(e)),i):t.buffer;return new t.constructor(r,t.byteOffset,t.length)},ve=Rt,he=function(t){return"function"!=typeof t.constructor||Zt(t)?{}:Qt(Yt(t))},ge=cn,ye=sn,_e=yn,me=bn,be=q,je=U,Ie=function(t){if(!Tn(t)||"[object Object]"!=jn(t))return!1;var n=In(t);if(null===n)return!0;var e=wn.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&kn.call(e)==En},Te=Mn,ke=Hn,we=At,Ee=Lt,Pe=qt,Se=function(t,n,e,i,r,o,a){var u,c=ke(t,e),s=ke(n,e),l=a.get(s);if(l)de(t,e,l);else{var d=o?o(c,s,e+"",t,n,a):void 0,f=void 0===d;if(f){var p=ye(s),v=!p&&me(s),h=!p&&!v&&Te(s);d=s,p||v||h?ye(c)?d=c:_e(c)?d=ve(c):v?(f=!1,d=fe(s,!0)):h?(f=!1,d=pe(s,!0)):d=[]:Ie(s)||ge(s)?(d=c,ge(c)?d=se(u=c,le(u)):je(c)&&!be(c)||(d=he(s))):f=!1}f&&(a.set(s,d),r(d,s,i,o,a),a.delete(s)),de(t,e,d)}},Ae=U,xe=ce,Oe=Hn,Ce=function t(n,e,i,r,o){n!==e&&Pe(e,(function(a,u){if(o||(o=new we),Ae(a))Se(n,e,u,i,t,r,o);else{var c=r?r(Oe(n,u),a,u+"",n,e,o):void 0;void 0===c&&(c=a),Ee(n,u,c)}}),xe)},Ue=function(t){return t},Ve=Math.max,Ne=Ot,Le=Date.now,qe=(Un=Ne?function(t,n){return Ne(t,"toString",{configurable:!0,enumerable:!1,value:(e=n,function(){return e}),writable:!0});var e}:Ue,Vn=0,Nn=0,function(){var t=Le(),n=16-(t-Nn);if(Nn=t,n>0){if(++Vn>=800)return arguments[0]}else Vn=0;return Un.apply(void 0,arguments)}),De=Ue,Fe=function(t,n,e){return n=Ve(void 0===n?t.length-1:n,0),function(){for(var i=arguments,r=-1,o=Ve(i.length-n,0),a=Array(o);++r<o;)a[r]=i[n+r];r=-1;for(var u=Array(n+1);++r<n;)u[r]=i[r];return u[n]=e(a),function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}(t,this,u)}},Me=qe,He=function(t,n){return Me(Fe(t,n,De),t+"")},Re=a,Be=vn,ze=Wn,Ge=U,$e=function(t,n,e){if(!Ge(e))return!1;var i=typeof n;return!!("number"==i?Be(e)&&ze(n,e.length):"string"==i&&n in e)&&Re(e[n],t)},Je=He,We=$e,Ke=function(t){return Je((function(n,e){var i=-1,r=e.length,o=r>1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,a&&We(e[0],e[1],a)&&(o=3>r?void 0:o,r=1),n=Object(n);++i<r;){var u=e[i];u&&t(n,u,i,o)}return n}))},Qe=Ce,Ye=o(Ke((function(t,n,e){Qe(t,n,e)}))),Ze=Ce,Xe=o(Ke((function(t,n,e,i){Ze(t,n,e,i)}))),ti=mt;function ni(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new ti;++n<e;)this.add(t[n])}ni.prototype.add=ni.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},ni.prototype.has=function(t){return this.__data__.has(t)};var ei=ni,ii=function(t){return t!=t},ri=function(t,n){return!(null==t||!t.length)&&function(t,n,e){return n==n?function(t,n,e){for(var i=e-1,r=t.length;++i<r;)if(t[i]===n)return i;return-1}(t,n,e):function(t,n,e,i){for(var r=t.length,o=e+(i?1:-1);i?o--:++o<r;)if(n(t[o],o,t))return o;return-1}(t,ii,e)}(t,n,0)>-1},oi=function(t,n,e){for(var i=-1,r=null==t?0:t.length;++i<r;)if(e(n,t[i]))return!0;return!1},ai=function(t,n){return t.has(n)},ui=Y(I,"Set"),ci=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e},si=ui,li=si&&1/ci(new si([,-0]))[1]==1/0?function(t){return new si(t)}:function(){},di=ei,fi=ri,pi=oi,vi=ai,hi=li,gi=ci,yi=o((function(t){return t&&t.length?function(t,n,e){var i=-1,r=fi,o=t.length,a=!0,u=[],c=u;if(e)a=!1,r=pi;else if(200>o)c=n?[]:u;else{var s=n?null:hi(t);if(s)return gi(s);a=!1,r=vi,c=new di}t:for(;++i<o;){var l=t[i],d=n?n(l):l;if(l=e||0!==l?l:0,a&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue t;n&&c.push(d),u.push(l)}else r(c,d,e)||(c!==u&&c.push(d),u.push(l))}return u}(t):[]})),_i=function(t,n){for(var e=-1,i=n.length,r=t.length;++e<i;)t[r+e]=n[e];return t},mi=cn,bi=sn,ji=T?T.isConcatSpreadable:void 0,Ii=_i,Ti=function(t){return bi(t)||mi(t)||!!(ji&&t&&t[ji])},ki=function t(n,e,i,r,o){var a=-1,u=n.length;for(i||(i=Ti),o||(o=[]);++a<u;){var c=n[a];e>0&&i(c)?e>1?t(c,e-1,i,r,o):Ii(o,c):r||(o[o.length]=c)}return o},wi=_i,Ei=ki,Pi=Rt,Si=sn,Ai=o((function(){var t=arguments.length;if(!t)return[];for(var n=Array(t-1),e=arguments[0],i=t;i--;)n[i-1]=arguments[i];return wi(Si(e)?Pi(e):[e],Ei(n,1))})),xi=$t(Object.keys,Object),Oi=Kt,Ci=xi,Ui={}.hasOwnProperty,Vi=function(t){if(!Oi(t))return Ci(t);var n=[];for(var e in Object(t))Ui.call(t,e)&&"constructor"!=e&&n.push(e);return n},Ni=Y(I,"DataView"),Li=Z,qi=Y(I,"Promise"),Di=ui,Fi=Y(I,"WeakMap"),Mi=C,Hi=R,Ri="[object Map]",Bi="[object Promise]",zi="[object Set]",Gi="[object WeakMap]",$i="[object DataView]",Ji=Hi(Ni),Wi=Hi(Li),Ki=Hi(qi),Qi=Hi(Di),Yi=Hi(Fi),Zi=Mi;(Ni&&Zi(new Ni(new ArrayBuffer(1)))!=$i||Li&&Zi(new Li)!=Ri||qi&&Zi(qi.resolve())!=Bi||Di&&Zi(new Di)!=zi||Fi&&Zi(new Fi)!=Gi)&&(Zi=function(t){var n=Mi(t),e="[object Object]"==n?t.constructor:void 0,i=e?Hi(e):"";if(i)switch(i){case Ji:return $i;case Wi:return Ri;case Ki:return Bi;case Qi:return zi;case Yi:return Gi}return n});var Xi=Zi,tr=Vi,nr=Xi,er=cn,ir=sn,rr=vn,or=bn,ar=Kt,ur=Mn,cr={}.hasOwnProperty,sr=o((function(t){if(null==t)return!0;if(rr(t)&&(ir(t)||"string"==typeof t||"function"==typeof t.splice||or(t)||ur(t)||er(t)))return!t.length;var n=nr(t);if("[object Map]"==n||"[object Set]"==n)return!t.size;if(ar(t))return!tr(t).length;for(var e in t)if(cr.call(t,e))return!1;return!0})),lr=ei,dr=function(t,n){for(var e=-1,i=null==t?0:t.length;++e<i;)if(n(t[e],e,t))return!0;return!1},fr=ai,pr=function(t,n,e,i,r,o){var a=1&e,u=t.length,c=n.length;if(!(u==c||a&&c>u))return!1;var s=o.get(t),l=o.get(n);if(s&&l)return s==n&&l==t;var d=-1,f=!0,p=2&e?new lr:void 0;for(o.set(t,n),o.set(n,t);++d<u;){var v=t[d],h=n[d];if(i)var g=a?i(h,v,d,n,t,o):i(v,h,d,t,n,o);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!dr(n,(function(t,n){if(!fr(p,n)&&(v===t||r(v,t,e,i,o)))return p.push(n)}))){f=!1;break}}else if(v!==h&&!r(v,h,e,i,o)){f=!1;break}}return o.delete(t),o.delete(n),f},vr=Mt,hr=a,gr=pr,yr=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t,i){e[++n]=[i,t]})),e},_r=ci,mr=T?T.prototype:void 0,br=mr?mr.valueOf:void 0,jr=_i,Ir=sn,Tr={}.propertyIsEnumerable,kr=Object.getOwnPropertySymbols,wr=kr?function(t){return null==t?[]:function(t,n){for(var e=-1,i=null==t?0:t.length,r=0,o=[];++e<i;){var a=t[e];n(a,e,t)&&(o[r++]=a)}return o}(kr(t=Object(t)),(function(n){return Tr.call(t,n)}))}:function(){return[]},Er=ne,Pr=Vi,Sr=vn,Ar=function(t){return Sr(t)?Er(t):Pr(t)},xr=o(Ar),Or=function(t,n,e){var i=n(t);return Ir(t)?i:jr(i,e(t))},Cr=wr,Ur=Ar,Vr=function(t){return Or(t,Ur,Cr)},Nr={}.hasOwnProperty,Lr=At,qr=pr,Dr=function(t,n,e,i,r,o,a){switch(e){case"[object DataView]":if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=n.byteLength||!o(new vr(t),new vr(n)));case"[object Boolean]":case"[object Date]":case"[object Number]":return hr(+t,+n);case"[object Error]":return t.name==n.name&&t.message==n.message;case"[object RegExp]":case"[object String]":return t==n+"";case"[object Map]":var u=yr;case"[object Set]":var c=1&i;if(u||(u=_r),t.size!=n.size&&!c)return!1;var s=a.get(t);if(s)return s==n;i|=2,a.set(t,n);var l=gr(u(t),u(n),i,r,o,a);return a.delete(t),l;case"[object Symbol]":if(br)return br.call(t)==br.call(n)}return!1},Fr=Xi,Mr=sn,Hr=bn,Rr=Mn,Br="[object Arguments]",zr="[object Array]",Gr="[object Object]",$r={}.hasOwnProperty,Jr=function(t,n,e,i,r,o){var a=Mr(t),u=Mr(n),c=a?zr:Fr(t),s=u?zr:Fr(n),l=(c=c==Br?Gr:c)==Gr,d=(s=s==Br?Gr:s)==Gr,f=c==s;if(f&&Hr(t)){if(!Hr(n))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new Lr),a||Rr(t)?qr(t,n,e,i,r,o):Dr(t,n,c,e,i,r,o);if(!(1&e)){var p=l&&$r.call(t,"__wrapped__"),v=d&&$r.call(n,"__wrapped__");if(p||v){var h=p?t.value():t,g=v?n.value():n;return o||(o=new Lr),r(h,g,e,i,o)}}return!!f&&(o||(o=new Lr),function(t,n,e,i,r,o){var a=1&e,u=Vr(t),c=u.length;if(c!=Vr(n).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in n:Nr.call(n,l)))return!1}var d=o.get(t),f=o.get(n);if(d&&f)return d==n&&f==t;var p=!0;o.set(t,n),o.set(n,t);for(var v=a;++s<c;){var h=t[l=u[s]],g=n[l];if(i)var y=a?i(g,h,l,n,t,o):i(h,g,l,t,n,o);if(!(void 0===y?h===g||r(h,g,e,i,o):y)){p=!1;break}v||(v="constructor"==l)}if(p&&!v){var _=t.constructor,m=n.constructor;_==m||!("constructor"in t)||!("constructor"in n)||"function"==typeof _&&_ instanceof _&&"function"==typeof m&&m instanceof m||(p=!1)}return o.delete(t),o.delete(n),p}(t,n,e,i,r,o))},Wr=Xt,Kr=function t(n,e,i,r,o){return n===e||(null==n||null==e||!Wr(n)&&!Wr(e)?n!=n&&e!=e:Jr(n,e,i,r,t,o))},Qr=o((function(t,n){return Kr(t,n)})),Yr=function(t,n){for(var e=-1,i=null==t?0:t.length,r=Array(i);++e<i;)r[e]=n(t[e],e,t);return r},Zr=ei,Xr=ri,to=oi,no=Yr,eo=On,io=ai,ro=function(t,n,e,i){var r=-1,o=Xr,a=!0,u=t.length,c=[],s=n.length;if(!u)return c;e&&(n=no(n,eo(e))),i?(o=to,a=!1):200>n.length||(o=io,a=!1,n=new Zr(n));t:for(;++r<u;){var l=t[r],d=null==e?l:e(l);if(l=i||0!==l?l:0,a&&d==d){for(var f=s;f--;)if(n[f]===d)continue t;c.push(l)}else o(n,d,i)||c.push(l)}return c},oo=ro,ao=ki,uo=yn,co=o(He((function(t,n){return uo(t)?oo(t,ao(n,1,uo,!0)):[]}))),so=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0},lo=o(so),fo=ro,po=ki,vo=yn,ho=so,go=o(He((function(t,n){var e=ho(n);return vo(e)&&(e=void 0),vo(t)?fo(t,po(n,1,vo,!0),void 0,e):[]}))),yo=C,_o=Xt,mo=function(t){return"symbol"==typeof t||_o(t)&&"[object Symbol]"==yo(t)},bo=sn,jo=mo,Io=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,To=/^\w*$/,ko=mt;function wo(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var i=arguments,r=n?n.apply(this,i):i[0],o=e.cache;if(o.has(r))return o.get(r);var a=t.apply(this,i);return e.cache=o.set(r,a)||o,a};return e.cache=new(wo.Cache||ko),e}wo.Cache=ko;var Eo,Po,So,Ao,xo,Oo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Co=/\\(\\)?/g,Uo=(Eo=wo((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(Oo,(function(t,e,i,r){n.push(i?r.replace(Co,"$1"):e||t)})),n}),(function(t){return 500===Po.size&&Po.clear(),t})),Po=Eo.cache,Eo),Vo=Yr,No=sn,Lo=mo,qo=T?T.prototype:void 0,Do=qo?qo.toString:void 0,Fo=function t(n){if("string"==typeof n)return n;if(No(n))return Vo(n,t)+"";if(Lo(n))return Do?Do.call(n):"";var e=n+"";return"0"==e&&1/n==-1/0?"-0":e},Mo=Fo,Ho=function(t){return null==t?"":Mo(t)},Ro=o(Ho),Bo=sn,zo=function(t,n){if(bo(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!jo(t))||To.test(t)||!Io.test(t)||null!=n&&t in Object(n)},Go=Uo,$o=Ho,Jo=function(t,n){return Bo(t)?t:zo(t,n)?[t]:Go($o(t))},Wo=mo,Ko=function(t){if("string"==typeof t||Wo(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Qo=Jo,Yo=Ko,Zo=function(t,n){for(var e=0,i=(n=Qo(n,t)).length;null!=t&&i>e;)t=t[Yo(n[e++])];return e&&e==i?t:void 0},Xo=Zo,ta=o((function(t,n,e){var i=null==t?void 0:Xo(t,n);return void 0===i?e:i})),na=o((function(t){return null==t})),ea=C,ia=sn,ra=Xt,oa=o((function(t){return"string"==typeof t||!ia(t)&&ra(t)&&"[object String]"==ea(t)})),aa=o((function(t){return t&&t.length?t[0]:void 0})),ua=function(t,n,e){var i=-1,r=t.length;0>n&&(n=-n>r?0:r+n),0>(e=e>r?r:e)&&(e+=r),r=n>e?0:e-n>>>0,n>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+n];return o},ca=ua,sa=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),la=function(t){return sa.test(t)},da=C,fa=Xt,pa=On,va=Ln&&Ln.isRegExp,ha=va?pa(va):function(t){return fa(t)&&"[object RegExp]"==da(t)},ga="\\ud800-\\udfff",ya="["+ga+"]",_a="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ma="\\ud83c[\\udffb-\\udfff]",ba="[^"+ga+"]",ja="(?:\\ud83c[\\udde6-\\uddff]){2}",Ia="[\\ud800-\\udbff][\\udc00-\\udfff]",Ta="(?:"+_a+"|"+ma+")?",ka="[\\ufe0e\\ufe0f]?",wa=ka+Ta+"(?:\\u200d(?:"+[ba,ja,Ia].join("|")+")"+ka+Ta+")*",Ea=RegExp(ma+"(?="+ma+")|(?:"+[ba+_a+"?",_a,ja,Ia,ya].join("|")+")"+wa,"g"),Pa=function(t){return t.split("")},Sa=la,Aa=Fo,xa=function(t,n,e){var i=t.length;return e=void 0===e?i:e,n||i>e?ca(t,n,e):t},Oa=la,Ca=$e,Ua=ha,Va=function(t){return Sa(t)?function(t){return t.match(Ea)||[]}(t):Pa(t)},Na=Ho,La=o((function(t,n,e){return e&&"number"!=typeof e&&Ca(t,n,e)&&(n=e=void 0),(e=void 0===e?4294967295:e>>>0)?(t=Na(t))&&("string"==typeof n||null!=n&&!Ua(n))&&!(n=Aa(n))&&Oa(t)?xa(Va(t),0,e):t.split(n,e):[]})),qa={}.hasOwnProperty,Da=Jo,Fa=cn,Ma=sn,Ha=Wn,Ra=dn,Ba=Ko,za=function(t,n){return null!=t&&qa.call(t,n)},Ga=o((function(t,n){return null!=t&&function(t,n,e){for(var i=-1,r=(n=Da(n,t)).length,o=!1;++i<r;){var a=Ba(n[i]);if(!(o=null!=t&&e(t,a)))break;t=t[a]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&Ra(r)&&Ha(a,r)&&(Ma(t)||Fa(t))}(t,n,za)})),$a=Zo,Ja=ua,Wa=Jo,Ka=so,Qa=Ko,Ya=function(t,n){return null==(t=function(t,n){return 2>n.length?t:$a(t,Ja(n,0,-1))}(t,n=Wa(n,t)))||delete t[Qa(Ka(n))]},Za=o((function(t,n){return null==t||Ya(t,n)})),Xa=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},tu="code",nu={autotrack:{type:["object","array","boolean"],default:!0},enableVisual:{type:"boolean",default:!0},server:{type:"string",default:""},debug:{type:"boolean",default:!1},uniVue:{type:["object","function"],default:!1},taro:{type:["object","module"],default:!1},taroVue:{type:["object","function"],default:!1},silentGetOpenId:{type:"boolean",default:!1}},eu=["init","track","identify","setIdentity","getIdentity","removeIdentityItem","clearIdentity","generateUrlWithSession"],iu={dev:{VUE_APP_API_HOST:"https://devapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://devcgi.jingsocial.com"},staging:{VUE_APP_API_HOST:"https://stagingapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://stagingcgi.jingsocial.com"},ali:{VUE_APP_API_HOST:"https://api.jingsocial.com",VUE_APP_CGI_API_HOST:"https://cgi.jingsocial.com"},msc:{VUE_APP_API_HOST:"https://mscappapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://msccgi.jingsocial.com"},agl:{VUE_APP_API_HOST:"https://api.ma.aglcommunity.cn",VUE_APP_CGI_API_HOST:"https://cgi.ma.aglcommunity.cn"},agl_uat:{VUE_APP_API_HOST:"https://uatapi.ma.aglcommunity.cn",VUE_APP_CGI_API_HOST:"https://uatcgi.ma.aglcommunity.cn"}},ru={onLaunch:"mp_launch",onShow:"mp_show",onHide:"mp_hide"},ou={onShow:"mp_pageview",onHide:"mp_pageleave",onUnload:"mp_pageleave",onShareAppMessage:"mp_share",onShareTimeline:"mp_share",onAddToFavorites:"mp_addfavorites"},au={click:"mp_click"},uu=yi(Ai([],Object.values(ru),Object.values(ou))),cu=yi(Ai([],uu,Object.values(au))),su="jing_session_id",lu="SYSTEM_READY",du="OPTION_INITIALIZED",fu="SDK_READY",pu="FIRST_CHECK_VISUAL",vu="VISUAL_CONFIG_READY";!function(t){t[t.normal=0]="normal",t[t.debug=1]="debug",t[t.visualization=2]="visualization"}(So||(So={})),function(t){t.JINGTRACK_ELEMENT_ID="jing_track_element_id",t.JINGTRACK_ELEMENT_CONTENT="jing_track_element_content"}(Ao||(Ao={})),function(t){t.wechat_openid="wechat_openid",t.wechat_unionid="wechat_unionid",t.mobile="mobile",t.email="email",t.third_party="third_party",t.external_userid="external_userid",t.workwechat_user_userid="workwechat_user_userid",t.mp_openid="mp_openid",t.omni_user_uuid="omni_user_uuid"}(xo||(xo={}));var hu=function(){function t(){}return t.enabled=!1,t.typeColors={plain:"color: #4A72FB;",error:"color: #FD3E3E;",warn:"color: #FF7621;",success:"color: #61B707;"},t.setEnabled=function(n){t.enabled=!!n},t.forceLog=function(n){for(var e,i,r=[],o=1;arguments.length>o;o++)r[o-1]=arguments[o];var a="%c「JingTrack」".concat(n),u=null!==(e=2>r.length?r[0]:r[1])&&void 0!==e?e:"plain",c=null!==(i=t.typeColors[u])&&void 0!==i?i:t.typeColors.plain;if(2>r.length)console.log(a,c);else{var s=r[0];console.log(a,c,s)}},t.log=function(n){for(var e=[],r=1;arguments.length>r;r++)e[r-1]=arguments[r];if(t.enabled)return t.forceLog.apply(t,i([n],e,!1))},t.plain=function(n,e){return na(e)?t.log(n,"plain"):t.log(n,e,"plain")},t.success=function(n,e){return na(e)?t.log(n,"success"):t.log(n,e,"success")},t.error=function(n,e){return na(e)?t.log(n,"error"):t.log(n,e,"error")},t.warn=function(n,e){return na(e)?t.log(n,"warn"):t.log(n,e,"warn")},t}(),gu=function(t,n){hu.forceLog(t,n,"error")},yu=function(t){try{return t()}catch(n){return void gu("niceTry 错误捕捉",{error:n,fn:t})}},_u=function(t){if(!t||"object"!=typeof t)return"";var n=t.Current,e=t.createComponent;return n&&!e?"3":!n&&e?"2":""},mu=function(t){var n,e;return null!==(e=null!==(n=null==(t=V(t)?t:{})?void 0:t.data)&&void 0!==n?n:null==t?void 0:t.$data)&&void 0!==e?e:{}},bu=function(t){var n=this;this.jingTrackInstance=t,this.minip=("framework",yu((function(){var t=void 0;return t||(t=yu((function(){return wx}))),t}))),this.proxySetNavigationBarTitle=function(){var t,e=n,i=null===(t=e.minip)||void 0===t?void 0:t.setNavigationBarTitle;i&&Object.defineProperty(e.minip,"setNavigationBarTitle",{writable:!0,enumerable:!0,configurable:!0,value:function(){for(var t=[],n=0;arguments.length>n;n++)t[n]=arguments[n];var r=i.apply(this,t);try{if(!V(t[0]))return r;var o=e.getCurrentPath(),a=t[0].title;e.settedTitle[o]=a}catch(t){gu("setNavigationBarTitle 方法代理出错",t)}return r}})},this.getCurrentPage=function(){return yu((function(){return lo(getCurrentPages())}))||{}},this.getCurrentPath=function(){var t=n.getCurrentPage();return(null==t?void 0:t.route)||""},this.removeSettedTitleItem=function(t){t||(t=n.getCurrentPath()),n.settedTitle[t]=""},this.getPageTitle=function(t){var e,i,r,o,a,u,c,s,l,d,f;t||(t=n.getCurrentPath());var p="",v=yu((function(){return __wxConfig}));try{if(!(p=null!==(e=n.settedTitle[t])&&void 0!==e?e:"")){var h=(null===(i=null==v?void 0:v.page)||void 0===i?void 0:i[t])||(null===(r=null==v?void 0:v.page)||void 0===r?void 0:r["".concat(t,".html")]);p=h?null!==(a=null===(o=null==h?void 0:h.window)||void 0===o?void 0:o.navigationBarTitleText)&&void 0!==a?a:"":null!==(s=null===(c=null===(u=null==v?void 0:v.global)||void 0===u?void 0:u.window)||void 0===c?void 0:c.navigationBarTitleText)&&void 0!==s?s:""}if(!p){var g=null===(d=null===(l=null==v?void 0:v.tabBar)||void 0===l?void 0:l.list)||void 0===d?void 0:d.find((function(n){return n.pagePath===t||n.pagePath==="".concat(t,".html")}));p=null!==(f=null==g?void 0:g.text)&&void 0!==f?f:""}}catch(t){return gu("getPageTitle 方法执行出错",t),""}return p},this.getSystemInfo=function(){var t=n;return new Promise((function(e){var i;null===(i=n.minip)||void 0===i||i.getSystemInfo({success:function(n){t.systemInfo=n,e(n)},fail:function(){return e(null)}})}))},this.getNetworkType=function(){var t=n;return new Promise((function(e){var i;null===(i=n.minip)||void 0===i||i.getNetworkType({success:function(n){t.network=n,e(n)},fail:function(){return e(null)}})}))},this.getStorageSync=function(t){var e,i=null===(e=n.minip)||void 0===e?void 0:e.getStorageSync(t);return V(i)&&i.expiredAt?i.expiredAt<Date.now()?"":i.value:i},this.getStorage=function(t){return new Promise((function(e){var i;null===(i=n.minip)||void 0===i||i.getStorage({key:t,success:function(t){var n=t.data;return e(n)},fail:function(){return e("")}})}))},this.setStorageSync=function(t,e,i){var r;i&&(e={value:e,expiredAt:i}),null===(r=n.minip)||void 0===r||r.setStorageSync(t,e)},this.setStorage=function(t,e){var i;null===(i=n.minip)||void 0===i||i.setStorage({key:t,data:e})},this.removeStorageSync=function(t){var e;null===(e=n.minip)||void 0===e||e.removeStorageSync(t)},this.removeStorage=function(t){var e;null===(e=n.minip)||void 0===e||e.removeStorage(t)},this.getLaunchOptionsSync=function(){var t;return null===(t=n.minip)||void 0===t?void 0:t.getLaunchOptionsSync()},this.request=function(t){var e,i=t.url,r=t.data,o=t.header,a=t.timeout,u=t.method,c=t.success,s=t.fail,l=t.complete,d=null===(e=n.minip)||void 0===e?void 0:e.request({url:i,data:r,header:o,headers:o,timeout:a,method:u,success:c,fail:s,complete:l}),f=setTimeout((function(){(null==d?void 0:d.abort)&&D(null==d?void 0:d.abort)&&(null==d||d.abort()),clearTimeout(f),f=null}),(a||1e4)+10);return d},this.settedTitle={},this.jingTrackInstance.emitter.on(du,(function(){Promise.allSettled([n.getSystemInfo(),n.getNetworkType()]).then((function(){n.jingTrackInstance.emitter.emit(lu)}))})),this.proxySetNavigationBarTitle()},ju=["tap","longpress","longtap","getuserinfo","getphonenumber","contact"],Iu=["blur","change","confirm"],Tu=["submit","reset"],ku=i(i(i([],ju,!0),Iu,!0),Tu,!0),wu={appLaunch:"onLaunch",appShow:"onShow",appHide:"onHide"},Eu={pageLoad:"onLoad",pageShow:"onShow",pageHide:"onHide",pageUnload:"onUnload",tabTap:"onTabItemTap",shareApp:"onShareAppMessage",shareTime:"onShareTimeline",addFavorites:"onAddToFavorites"},Pu=Object.values(wu),Su=Object.values(Eu),Au={appHandlers:i(i([],Pu,!0),["onError","onPageNotFound","onUnhandledRejection","onThemeChange"],!1),pageHandlers:i(i([],Su,!0),["onReady","onUnload","onRouteDone","onPullDownRefresh","onReachBottom","onPageScroll","onResize","onSaveExitState"],!1),appListenerList:Pu,pageListenerList:Su,actionListenerList:ku,listeners:{app:wu,page:Eu,actions:{click:ju,change:Iu,submit:Tu}},originalApp:yu((function(){return App})),originalPage:yu((function(){return Page})),originalComponent:yu((function(){return Component})),originalBehavior:yu((function(){return Behavior}))},xu=function(t,n){var e;return(null==t?void 0:t.pixelRatio)?Math.round(t[n]*t.pixelRatio):null!==(e=null==t?void 0:t[n])&&void 0!==e?e:0},Ou=function(t){return"".concat(null==t?void 0:t.brand," / ").concat(null==t?void 0:t.model)},Cu=function(){function t(t){var n=this;this.jingTrackInstance=t,this.generateSnapshot=function(){var t=n.jingTrackInstance.currentPage;return{title:t.title,url:t.path,referer:t.referer}},this.getFrontId=function(t,e){var i,r,o=n.jingTrackInstance.currentPage,a=t.originEventName?t.originEventName:t.action_code,u="".concat(null!==(i=null==e?void 0:e.url)&&void 0!==i?i:o.path,"_").concat(a),c=null===(r=null==t?void 0:t.data_set)||void 0===r?void 0:r[Ao.JINGTRACK_ELEMENT_ID];return c&&(u="".concat(u,"_").concat(c)),encodeURIComponent(u)},this.visualContextBuilder=function(t,e){var i,r,o,a,u,c,s,l,d,f=n.jingTrackInstance.currentPage,p=null!==(i=t.track_type)&&void 0!==i?i:"";return{action_code:t.action_code,event_name:null!==(r=t.originEventName)&&void 0!==r?r:"",front_id:p===tu?"":n.getFrontId(t,e),url:null!==(o=null==e?void 0:e.url)&&void 0!==o?o:f.path,title:null!==(a=null==e?void 0:e.title)&&void 0!==a?a:f.title,element_content:null!==(u=t.element_content)&&void 0!==u?u:"",element_related_content:null!==(c=t.element_related_content)&&void 0!==c?c:"",data_set:null!==(s=t.data_set)&&void 0!==s?s:{},page_data:null!==(l=t.page_data)&&void 0!==l?l:{},track_type:p,identity_data:n.getIdentityData(t),extra_data:null!==(d=t.extra_data)&&void 0!==d?d:{}}},this.normalContextBuilder=function(t,e){var i,r,o,a,u,c,s,l,d=n.jingTrackInstance,f=d.version,p=d.options,v=d.minipInstance,h=d.userStore,g=d.currentPage,y=v.systemInfo,_=n.getIdentityData(t);return{action_code:t.action_code,version:f,entity_uuid:null!==(i=p.jingTrackUuid)&&void 0!==i?i:"",entity_type:"jingtrack_mini_program",action_category:"jingtrack_mp",visitor_uuid:null!==(r=h.visitor_id)&&void 0!==r?r:"",session_uuid:null!==(o=h.session_id)&&void 0!==o?o:"",is_new_session:h.useNewSession(),is_new_identity:n.judgeIsNewIdentity(_),identity_data:_,tags_id:n.parseEmptyArrToNull(t.tags_id),intent_tags_uuid:n.parseEmptyArrToNull(t.intent_tags_uuid),environment_data:{title:null!==(a=null==e?void 0:e.title)&&void 0!==a?a:g.title,url:null!==(u=null==e?void 0:e.url)&&void 0!==u?u:g.path,referer:null!==(c=null==e?void 0:e.referer)&&void 0!==c?c:g.referer,screen_width:xu(y,"screenWidth"),screen_height:xu(y,"screenHeight"),viewport_width:xu(y,"windowWidth"),viewport_height:xu(y,"windowHeight"),os:Ou(y),os_version:null!==(s=null==y?void 0:y.system)&&void 0!==s?s:"",platform_code:"wechat_miniprogram"},source_data:Ye({},null==g?void 0:g.sourceData,t.source_data),extra_data:null!==(l=t.extra_data)&&void 0!==l?l:{}}},this.contextBuilder=function(t,e){return n.jingTrackInstance.reportMode===So.visualization?n.visualContextBuilder(t,e):n.normalContextBuilder(t,e)},this.contextBuilderByPresetProperties=function(t){var e,i={},r=null!=t?t:{},o=r.identity_data,a=r.intent_tags_uuid,u=r.tags_id,c=r.source_data;if(ln(o)&&(i.identity_data=o),ln(a)&&(i.intent_tags_uuid=a),ln(u)&&(i.tags_id=u),V(c)){var s=n.jingTrackInstance.currentPage;i.source_data=s.getSourceData(c),null===(e=null==i?void 0:i.source_data)||void 0===e||delete e.push_engine_channel_uuid}return i}}return t.prototype.getIdentityData=function(t){var n=this.jingTrackInstance.userStore;return t.identity_data?n.mergeIdentity(n.getIdentity(),t.identity_data):n.getIdentity()},t.prototype.judgeIsNewIdentity=function(t){var n=0,e=this.jingTrackInstance,i=e.userStore,r=e.minipInstance,o=[];try{o=JSON.parse(r.getStorageSync(i.visitor_id)||"[]")}catch(t){o=[]}var a=go(t,o,Qr);if(!sr(a)){var u=i.mergeIdentity(o,a);r.setStorageSync(i.visitor_id,JSON.stringify(u)),n=1}return n},t.prototype.parseEmptyArrToNull=function(t){return!ln(t)||sr(t)?null:t},t.prototype.mergeContext=function(){for(var t=this,n=[],e=0;arguments.length>e;e++)n[e]=arguments[e];return Xe.apply(void 0,i(i([{}],n,!1),[function(n,e,i){if("identity_data"===i&&ln(n)&&ln(e))return t.jingTrackInstance.userStore.mergeIdentity(n,e)}],!1))},t}();const Uu="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder;const Vu="function"==typeof TextEncoder?new TextEncoder:void 0,Nu=[].slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let n={};Nu.forEach(((t,e)=>n[t]=e))})();const Lu=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const qu="function"==typeof btoa?t=>btoa(t):Uu?t=>Buffer.from(t,"binary").toString("base64"):t=>{let n,e,i,r,o="";const a=t.length%3;for(let a=0;a<t.length;){if((e=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255||(r=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");n=e<<16|i<<8|r,o+=Nu[n>>18&63]+Nu[n>>12&63]+Nu[n>>6&63]+Nu[63&n]}return a?o.slice(0,a-3)+"===".substring(a):o},Du=Uu?t=>Buffer.from(t).toString("base64"):t=>{let n=[];for(let e=0,i=t.length;i>e;e+=4096)n.push(Lu.apply(null,t.subarray(e,e+4096)));return qu(n.join(""))},Fu=t=>{if(2>t.length)return 128>(n=t.charCodeAt(0))?t:2048>n?Lu(192|n>>>6)+Lu(128|63&n):Lu(224|n>>>12&15)+Lu(128|n>>>6&63)+Lu(128|63&n);var n=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return Lu(240|n>>>18&7)+Lu(128|n>>>12&63)+Lu(128|n>>>6&63)+Lu(128|63&n)},Mu=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Hu=Uu?t=>Buffer.from(t,"utf8").toString("base64"):Vu?t=>Du(Vu.encode(t)):t=>qu(t.replace(Mu,Fu)),Ru=(t,n=!1)=>n?(t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_")))(Hu(t)):Hu(t);var Bu,zu=function(n){var e=this;this.jingTrackInstance=n,this.queuesMaxLength=100,this.requestLimit=3,this.retryLimit=2,this.uploadInterval=1e3,this.requestTimeout=5e3,this.compressable=!0,this.setVisualModeWid=function(t){e.visualModeWid=t},this.getRequestURL=function(t){var n,i,r,o=null===(r=null===(i=e.jingTrackInstance)||void 0===i?void 0:i.options)||void 0===r?void 0:r.server,a=iu[o];return((n={})[So.normal]="".concat(null==a?void 0:a.VUE_APP_API_HOST,"/eventService/log"),n[So.debug]="".concat(null==a?void 0:a.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(t,"/debug-report"),n[So.visualization]="".concat(null==a?void 0:a.VUE_APP_CGI_API_HOST,"/bffapi/lead/jingTrackMiniprogram/").concat(t,"/track"),n)[e.jingTrackInstance.reportMode]},this.commitRequest=function(t){t.requestId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})),e.requestQueue.push(t),e.trySendRequest()},this.trySendRequest=function(t){e.requestQueue.length>0&&e.requestingNum<e.requestLimit&&(t?e.preSendRequestProcessing():e.preRequestProcessingThrottle())},this.preSendRequestProcessing=function(){var t=e.requestQueue.splice(0,e.queuesMaxLength);sr(t)||e.sendRequest(t)},this.preRequestProcessingThrottle=function(t,n,e,i){var r;void 0===n&&(n=250);var o=0;return"boolean"!==Xa(e)&&(i=t,t=e,e=void 0),function(){for(var a=[],u=0;arguments.length>u;u++)a[u]=arguments[u];var c=this,s=Date.now()-o;function l(){o=Date.now(),t.apply(c,a)}i&&!r&&l(),r&&clearTimeout(r),void 0===i&&s>n?l():!0!==e&&(r=setTimeout(i?function(){r=void 0}:l,void 0===i?n-s:n))}}(this.preSendRequestProcessing,this.uploadInterval,!1,!1),this.getRequestData=function(n){var i,r=e.jingTrackInstance,o=r.reportMode,a=r.userStore,u=n.map((function(n){var e=t({},n);return Za(e,"requestId"),e}));return o===So.visualization?{trackData:u,wid:e.visualModeWid,visitor_id:null!==(i=a.visitor_id)&&void 0!==i?i:""}:{data:e.compressable?Ru(JSON.stringify(u)):u}},this.sendRequest=function(t){hu.success("事件上报",{reportQueue:t}),e.requestingNum+=1;var n=e.jingTrackInstance.minipInstance,i=e.getRequestData(t),r=oa(i)?"text/plain":"application/json";n.request({url:e.getRequestURL(e.jingTrackInstance.options.jingTrackUuid),header:{"content-type":r},method:"POST",timeout:e.requestTimeout,data:i,fail:function(n){[200,204].includes(n.code)||(e.requestFailFn(t),hu.error("上报失败,result: ",n))},complete:function(){e.requestingNum-=1,e.trySendRequest()}})},this.requestFailFn=function(t){var n=[];t.forEach((function(t){var i;e.retryIds[t.requestId]=(null!==(i=e.retryIds[t.requestId])&&void 0!==i?i:0)+1,e.retryIds[t.requestId]>e.retryLimit||n.push(t)})),sr(n)||setTimeout((function(){var t;(t=e.requestQueue).unshift.apply(t,n),e.trySendRequest()}),500)},this.requestQueue=[],this.retryIds={},this.requestingNum=0},Gu=((Bu={})[lu]=!1,Bu[pu]=!1,Bu[fu]=!1,Bu),$u=function(){function n(n){var e=this;this.jingTrackInstance=n,this.checkUploadConditions=function(t){Object.keys(Gu).forEach((function(n){t[n]&&(Gu[n]=!0)})),Object.values(Gu).every((function(t){return t}))&&(e.canUpload=!0)},this.pushToInterceptedEvents=function(t){var n=e.reportContextBuilder.generateSnapshot();e.interceptedEvents.push((function(){return e.preUploadProcessing(t,n)}))},this.releaseEventInspector=function(){e.interceptedEvents.forEach((function(t){return t()})),e.interceptedEvents=[]},this.commitEvent=function(t){try{var n=e.jingTrackInstance.options;if(co(uu,n.autotrack).includes(t.action_code))return;e.canUpload?e.preUploadProcessing(t):e.pushToInterceptedEvents(t)}catch(t){gu("commitEvent 方法执行出错",t)}},this.commitCustomEvent=function(n,i,r){if(cu.includes(n))return hu.error("事件名称 ".concat(n," 为预置事件 code,请更换!"));var o=e.reportContextBuilder.mergeContext({extra_data:V(i)?i:{}},e.reportContextBuilder.contextBuilderByPresetProperties(r)),a=t({action_code:n,track_type:tu},o);e.commitEvent(a)},this.preUploadProcessing=function(t,n){try{var i=e.jingTrackInstance.reportMode,r=[t];if(i!==So.visualization&&cu.includes(t.action_code)&&(r=e.matchEventWithVisualEventList(t,n),sr(r)))return;r.forEach((function(t){var i=e.reportContextBuilder.contextBuilder(t,n);e.commitUpload(i)}))}catch(t){gu("preUploadProcessing 方法执行出错",t)}},this.parseValue=function(t,n){var e;return null!==(e="const"===t.type?t.value:ta(n[t.source],t.value,""))&&void 0!==e?e:""},this.matchEventWithVisualEventList=function(t,n){var i=e.reportContextBuilder.getFrontId(t,n),r=e.visualEventList.filter((function(t){return t.front_id===i}));return sr(r)?t.action_code===au.click?[]:[t]:r.map((function(n){var i={};(n.properties||[]).forEach((function(n){i[n.name]=e.parseValue(n.value,t)}));var r=[];(n.identity_data||[]).forEach((function(n){var i,o,a=e.parseValue(n.identity_value,t);r.push({identity_value:a,identity_type:null!==(i=null==n?void 0:n.identity_type)&&void 0!==i?i:"",identity_channel_uuid:null!==(o=null==n?void 0:n.identity_channel_uuid)&&void 0!==o?o:""})}));var o=t.extra_data||{};return{action_code:n.action_code,identity_data:r,extra_data:Ye({},o,i)}}))},this.commitUpload=function(t){e.uploader.commitRequest(t)},this.interceptedEvents=[],this.visualEventList=[],this.reportContextBuilder=new Cu(this.jingTrackInstance),this.uploader=new zu(this.jingTrackInstance),this.jingTrackInstance.emitter.on(fu,(function(){var t;return e.checkUploadConditions(((t={})[fu]=!0,t))})),this.jingTrackInstance.emitter.on(lu,(function(){var t;return e.checkUploadConditions(((t={})[lu]=!0,t))})),this.jingTrackInstance.emitter.on(pu,(function(){var t;return e.checkUploadConditions(((t={})[pu]=!0,t))})),this.jingTrackInstance.emitter.on(vu,(function(t){return void 0===t&&(t=[]),e.visualEventList=t}))}return Object.defineProperty(n.prototype,"canUpload",{get:function(){return this._canUpload},set:function(t){this._canUpload=!!t,this._canUpload&&this.releaseEventInspector()},enumerable:!1,configurable:!0}),n}(),Ju={},Wu={}.hasOwnProperty;function Ku(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function Qu(t){try{return encodeURIComponent(t)}catch(t){return null}}Ju.stringify=function(t,n){n=n||"";var e,i,r=[];for(i in"string"!=typeof n&&(n="?"),t)if(Wu.call(t,i)){if((e=t[i])||null!=e&&!isNaN(e)||(e=""),i=Qu(i),e=Qu(e),null===i||null===e)continue;r.push(i+"="+e)}return r.length?n+r.join("&"):""},Ju.parse=function(t){for(var n,e=/([^=?#&]+)=?([^&]*)/g,i={};n=e.exec(t);){var r=Ku(n[1]),o=Ku(n[2]);null===r||null===o||r in i||(i[r]=o)}return i};var Yu=function(){function i(i){var r=this;this.jingTrackInstance=i,this.getVisitorId=function(){var t=r.jingTrackInstance.minipInstance,n=t.getStorageSync("jingVisitorUserId");return n||(n="jingWebFingerprint"+r.createVisitorId(),t.setStorageSync("jingVisitorUserId",n)),n},this.useNewSession=function(){var t=r.is_new_session;return t&&(r.is_new_session=!1),t},this.correctIdentify=function(t){for(var n,e,i,o,a=0,u=Object.values(xo);a<t.length;){var c=t[a];u.includes(c.identity_type)&&c.identity_value?(c.identity_type===xo.mp_openid&&(c.identity_channel_uuid=null!==(i=null===(e=null===(n=r.jingTrackInstance)||void 0===n?void 0:n.options)||void 0===e?void 0:e.jingTrackUuid)&&void 0!==i?i:""),t[a]={is_multi:0,identity_type:c.identity_type,identity_value:c.identity_value,identity_channel_uuid:null!==(o=c.identity_channel_uuid)&&void 0!==o?o:""},a++):t.splice(a,1)}},this.setIdentity=function(t){yu((function(){r.identity=r.mergeIdentity(r.identity,t)}))},this.setSilentIdentity=function(t){yu((function(){r.silentIdentity=r.mergeIdentity(r.silentIdentity,t)}))},this.removeIdentityItem=function(t){yu((function(){r.identity=r.identity.filter((function(n){return!t.includes(n.identity_type)}))}))},this.clearIdentity=function(){r.identity=[]},this.getIdentity=function(){return r.mergeIdentity(r.silentIdentity,r.identity)},this.mergeIdentity=function(t,n){try{if(!ln(n))return t;r.correctIdentify(n);var e={};t.forEach((function(t){e[t.identity_type]=t})),n.forEach((function(t){e[t.identity_type]=t}));var i=[];for(var o in e)i.push(e[o]);return i}catch(t){gu("合并身份信息出错",t)}return t},this.mpLogin=function(){return n(r,void 0,void 0,(function(){var t;return e(this,(function(n){return t=this.jingTrackInstance.minipInstance,[2,new Promise((function(n,e){t.minip.login({success:function(t){return n(t)},fail:function(t){return e(t)}})}))]}))}))},this.silentGetOpenId=function(){return n(r,void 0,void 0,(function(){var t,n,i,r,o,a,u;return e(this,(function(e){switch(e.label){case 0:t=this.jingTrackInstance.jingApi,e.label=1;case 1:return e.trys.push([1,4,,5]),[4,this.mpLogin()];case 2:return n=e.sent().code,[4,t.getOpenID(n)];case 3:return(i=e.sent().data).openid&&this.setSilentIdentity([{identity_channel_uuid:null!==(u=null===(a=null===(o=this.jingTrackInstance)||void 0===o?void 0:o.options)||void 0===a?void 0:a.jingTrackUuid)&&void 0!==u?u:"",identity_type:xo.mp_openid,identity_value:i.openid}]),i.unionid&&this.setSilentIdentity([{identity_channel_uuid:"",identity_type:xo.wechat_unionid,identity_value:i.unionid}]),i.openid||hu.warn("获取 open_id 失败",i),[3,5];case 4:return r=e.sent(),gu("静默获取 open_id 出错!funcName: silentGetOpenId",r),[3,5];case 5:return[2]}}))}))},this.generateUrlWithSession=function(n,e){var i,o=((i={})[su]=r.session_id,i.jing_visitor_id=r.visitor_id,i),a=[xo.wechat_unionid,xo.mp_openid,xo.wechat_openid,xo.mobile,xo.email,xo.third_party],u=r.getIdentity(),c=null;if(a.includes(e)&&(c=u.find((function(t){return t.identity_type===e}))),!c){var s=a.find((function(t){return u.find((function(n){return n.identity_type===t}))}));c=u.find((function(t){return t.identity_type===s}))}return c&&(o.jing_identity_type=c.identity_type,o.jing_identity_value=c.identity_value,o.jing_identity_channel_uuid=c.identity_channel_uuid),function(n,e){void 0===e&&(e={});var i=n.indexOf("#"),r=i>-1?n.substring(i):"",o=i>-1?n.substring(0,i):n.substring(0),a=o.indexOf("?"),u=a>-1?o.substring(a):"",c=a>-1?o.substring(0,a):o.substring(0),s=t(t({},Ju.parse(u)),e);return c+Ju.stringify(s,"?")+r}(n,o)},this.visitor_id=this.getVisitorId();var o=this.jingTrackInstance.minipInstance.getLaunchOptionsSync().query;this.is_new_session=!1,this.session_id=o[su]||(this.is_new_session=!0)&&this.createSessionID(),this.identity=[],this.silentIdentity=[]}return i.prototype.createVisitorId=function(){for(var t=[],n="0123456789abcdef",e=0;36>e;e++)t[e]=n.substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]=n.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},i.prototype.createSessionID=function(){for(var t="",n=0;16>n;n++){var e=16*Math.random()|0;t+=(.5>Math.random()?e:3&e|8).toString(16)}return t},i}(),Zu=function(){function t(t){var n=this;this.jingTrackInstance=t,this.parsePage=function(t,e){var i,r,o,a=(null==t?void 0:t.route)||(null==t?void 0:t.__route__)||(null===(i=null==t?void 0:t.$page)||void 0===i?void 0:i.fullPath)||(null===(o=null===(r=n.jingTrackInstance)||void 0===r?void 0:r.minipInstance)||void 0===o?void 0:o.getCurrentPath())||"";n.query=n.getQuery(e),t.scene&&(n.scene=t.scene),n.path=a,n.pageEnterTime[n.path]=Date.now()},this.getQuery=function(t){return void 0===t&&(t={}),n.sourceData=n.getSourceData(t),t},this.getSourceData=function(t){var n=["scene_1","scene_2","scene_3","scene_4","scene_5","param_1","param_2","param_3","param_4","param_5","utm_source","utm_medium","utm_campaign","utm_term","utm_content","push_engine_channel_uuid"],e={};for(var i in t)n.includes(i)&&(e[i]=t[i]);return e},this.referer="",this.path="",this.query={},this.pageEnterTime={},this.sourceData={}}return Object.defineProperty(t.prototype,"path",{get:function(){return this._path},set:function(t){this._path!==t&&(this.referer=this._path),this._path=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.jingTrackInstance.minipInstance.getPageTitle()},enumerable:!1,configurable:!0}),t}(),Xu=function(){function t(t){var n=this;this.jingTrackInstance=t,this.main=function(t,e,i){var r,o,a=n.jingTrackInstance,u=a.options,c=a.platformConfig,s=a.plugins;e&&"autoplay"!==ta(t,"detail.source")&&(u.taro&&["eh"].includes(e)||t.type===(null===(r=n.prevEvent)||void 0===r?void 0:r.type)&&10>Math.abs(Number(t.timeStamp)-Number(null===(o=n.prevEvent)||void 0===o?void 0:o.timeStamp))||(n.prevEvent=t,u.uniVue&&(e=null==s?void 0:s.jingTrackUniAppAdapter.getRealEventNameForVue2(e,t)),hu.plain("全埋点事件抓取, e.type: ".concat(t.type),{eventName:e,e:t,context:i}),c.actionListenerList.includes(t.type)&&n.buildClickEvent(t,e,i)))},this.buildClickEvent=function(t,e,i){var r,o,a,u,c=n.jingTrackInstance.reportMode,s=n.getElementDataset(t),l={action_code:au.click,originEventName:e,page_data:mu(i),data_set:s},d=null!==(o=null===(r=null==t?void 0:t._relatedInfo)||void 0===r?void 0:r.anchorRelatedText)&&void 0!==o?o:"";c===So.visualization?(l.element_content=n.getElementContent(t),l.element_related_content=d):l.extra_data={element_id:null!==(u=null===(a=null==t?void 0:t.currentTarget)||void 0===a?void 0:a.id)&&void 0!==u?u:"",element_content:n.getElementContent(t),element_related_content:d},n.jingTrackInstance.eventCenter.commitEvent(l)},this.prevEvent={}}return t.prototype.getElementDataset=function(t){var n,e=V(null===(n=null==t?void 0:t.currentTarget)||void 0===n?void 0:n.dataset)?t.currentTarget.dataset:{},i=["eventOpts"],r={};return Object.entries(e).forEach((function(t){var n=t[0],e=t[1];i.includes(n)||(r[n]=e)})),r},t.prototype.getElementContent=function(t){var n,e,i;return(null===(e=null===(n=null==t?void 0:t.currentTarget)||void 0===n?void 0:n.dataset)||void 0===e?void 0:e[Ao.JINGTRACK_ELEMENT_CONTENT])||(null===(i=null==t?void 0:t._relatedInfo)||void 0===i?void 0:i.anchorTargetText)||""},t}(),tc={name:"jingEventAutoTracking",method:Xu},nc=function(){function t(t){var n,e,i=this;this.jingTrackInstance=t,this.main=function(){var t,n;switch(i.uniVue||(i.uniVue=null===(n=null===(t=i.jingTrackInstance)||void 0===t?void 0:t.options)||void 0===n?void 0:n.uniVue),hu.plain("Vue version in UniApp: ".concat(i.uniVue.version)),Number.parseInt(aa(La(i.uniVue.version,".")),10)){case 2:i.uniVue2Proxy();break;case 3:i.uniVue3Proxy(i.uniVue);break;default:hu.error("不支持的 Vue 版本,请使用 Vue2 或 Vue3!")}},this.uniVue2Proxy=function(){i.jingTrackInstance.minipHooks.nativeOverriding()},this.uniVue3Proxy=function(t){var n=i.jingTrackInstance,e=n.minipHooks,r=n.platformConfig.pageHandlers;e.nativeOverriding();var o=i;t.mixin({beforeMount:function(){var t,n,i=this,a=function(t,n,i){return D(n)&&!r.includes(t)?function(){for(var r=[],o=0;arguments.length>o;o++)r[o]=arguments[o];var a=D(i)?i(this):null;return e.customFcEffects(t,n,a).apply(this,r)}:n},u=function(t,n,e){xr(t).forEach((function(t){D(n[t])&&Object.defineProperty(n,t,{value:a(t,n[t],e),configurable:!0,writable:!0})}))},c=this.$options.methods;c&&u(c,this);var s=null===(t=null==this?void 0:this._)||void 0===t?void 0:t.setupState;s&&u(s,s,(function(t){return{data:t}}));var l=null===(n=null==this?void 0:this._)||void 0===n?void 0:n.exposed;if(o.exposedNames={},l){var d=xr(l);d.forEach((function(t){D(l[t])&&(o.exposedNames[t]=l[t].name)})),xr(this.$scope).filter((function(t){return/^e[0-9]+$/.test(t)&&D(i.$scope[t])})).forEach((function(t,n){var r=i.$scope[t],a=o.splicingMethodName(i.$scope[t].value.name,t,d[n]);i.$scope[t]=e.customFcEffects(a,r,{})}))}}})},this.splicingMethodName=function(t,n,e){var r;return t||(e?null!==(r=i.exposedNames[e])&&void 0!==r?r:"".concat(n,"#").concat(e):n)},this.uniVue=null===(e=null===(n=this.jingTrackInstance)||void 0===n?void 0:n.options)||void 0===e?void 0:e.uniVue,this.exposedNames={}}return t.prototype.getRealEventNameForVue2=function(t,n){if("__e"===t){var e=n.type,i=n.currentTarget,r=n.target,o=(null==i?void 0:i.dataset)||(null==r?void 0:r.dataset);if(o){var a=o.eventOpts||o["event-opts"];a&&a.forEach((function(n){var i=aa(n),r=lo(n);e!==i&&"^".concat(e)!==i&&"~".concat(e)!==i||(t=aa(aa(r)))}))}return t}return t},t}();const ec={jingEventAutoTracking:tc,jingTrackUniAppAdapter:{name:"jingTrackUniAppAdapter",method:nc}};Object.freeze(ec);var ic=function(t){var n=this;this.jingTrackInstance=t,this.innerPluginInit=function(){xr(ec).forEach((function(t){var e=ec[t],i=e.name,r=e.method;n.pluginItems.find((function(t){return t.name===i}))||n.pluginItems.push({name:i||t,method:r||function(){}})})),sr(n.pluginItems)||n.installAll()},this.installAll=function(){n.pluginItems.forEach((function(t){return n.install(t)}))},this.install=function(t){var e,i=t.name,r=t.options;if(null===(e=n.jingTrackInstance)||void 0===e?void 0:e.plugins[i])return hu.forceLog("重复加载插件 ".concat(i," 或插件重名,已跳过加载!"),"warn"),!1;try{return n.jingTrackInstance.plugins[i]=new t.method(n.jingTrackInstance,r),hu.forceLog("加载插件:".concat(i),"plain"),!0}catch(t){return gu("插件【".concat(i,"】加载异常"),t),!1}},this.uninstall=function(t){var e;Za(n.pluginItems,t);var i=Za(null===(e=n.jingTrackInstance)||void 0===e?void 0:e.plugins,t);return i||hu.forceLog("卸载插件 ".concat(t," 失败!"),"error"),i},this.uninstallAll=function(){n.pluginItems.forEach((function(t){return n.uninstall(t.name)}))},this.pluginItems=[]},rc=function(t){var n=this;this.jingTrackInstance=t,this.main=function(t,e){var i,r,o,a=n.jingTrackInstance,u=a.platformConfig,c=a.currentPage;if(!a.minipHooks.shareOut){hu.plain("app ".concat(t," 事件触发"),{eventName:t,args:e});var s=ru[t],l=u.listeners.app,d="App.".concat(t);switch(t){case l.appLaunch:case l.appShow:n.enterTime=Date.now();var f={route:(null===(i=null==e?void 0:e[0])||void 0===i?void 0:i.path)||"",scene:null===(r=null==e?void 0:e[0])||void 0===r?void 0:r.scene},p=(null===(o=null==e?void 0:e[0])||void 0===o?void 0:o.query)||{};c.parsePage(f,p),n.buildAppActiveEvent(s,d);break;case l.appHide:n.buildAppCloseEvent(s,d)}}},this.buildAppActiveEvent=function(t,e){var i=n.jingTrackInstance,r=i.reportMode,o=i.currentPage,a={action_code:t,originEventName:e};r!==So.visualization&&(a.extra_data={scene:o.scene,query:Ju.stringify(o.query)}),n.jingTrackInstance.eventCenter.commitEvent(a)},this.buildAppCloseEvent=function(t,e){var i={action_code:t,originEventName:e};n.jingTrackInstance.reportMode!==So.visualization&&(i.extra_data={duration:(Date.now()-n.enterTime)/1e3}),n.jingTrackInstance.eventCenter.commitEvent(i)}},oc=function(){function n(n){var e=this;this.jingTrackInstance=n,this.main=function(t,n,i){var r,o,a,u,c,s,l=e.jingTrackInstance,d=l.platformConfig,f=l.currentPage,p=l.minipHooks,v=l.minipInstance;hu.plain("page ".concat(n," 事件触发"),{page:t,eventName:n,args:i});var h=t.route||t.__route__||(null===(r=null==t?void 0:t.$page)||void 0===r?void 0:r.fullPath)||"",g=ou[n],y=d.listeners.page,_="Page.".concat(n);switch(n){case y.pageShow:if(!p.shareOut){var m=ta(t,"options")||ta(t,"__displayReporter.query")||ta(t,"$page.query")||ta(t,"$wx.__displayReporter.query");e.pageQuery[h]=m,f.parsePage(t,e.pageQuery[h]||{}),e.buildVisitOrFavoriteEvent(g,_,t)}p.shareOut=!1;break;case y.pageHide:case y.pageUnload:p.shareOut||e.buildPageCloseEvent(g,_,t),n===y.pageUnload&&v.removeSettedTitleItem(h);break;case y.shareApp:case y.shareTime:var b=n===y.shareApp;b&&(p.shareOut=!0);var j={isShareApp:b,from:(null===(o=null==i?void 0:i[0])||void 0===o?void 0:o.from)||"",sharePath:b&&(null===(a=null==i?void 0:i[1])||void 0===a?void 0:a.path)||"",query:b?{}:null===(u=null==i?void 0:i[1])||void 0===u?void 0:u.query};e.buildShareAppEvent(g,_,j,t);break;case y.addFavorites:e.buildVisitOrFavoriteEvent(g,_,t);break;case y.tabTap:var I=(null==i?void 0:i[0])||{},T={text:null!==(c=null==I?void 0:I.text)&&void 0!==c?c:"",originEventName:"".concat(n,"_").concat(null!==(s=null==I?void 0:I.index)&&void 0!==s?s:"")};e.buildTabClickEvent(T,t)}},this.buildPageCloseEvent=function(t,n,i){var r=e.jingTrackInstance,o=r.reportMode,a=r.currentPage,u={action_code:t,originEventName:n,page_data:mu(i)};if(o!==So.visualization){var c=a.pageEnterTime[a.path]||Date.now();u.extra_data={scene:a.scene,query:Ju.stringify(a.query),page_duration:(Date.now()-c)/1e3}}e.jingTrackInstance.eventCenter.commitEvent(u)},this.buildShareAppEvent=function(n,i,r,o){var a,u=e.jingTrackInstance,c=u.reportMode,s=u.currentPage,l={action_code:n,originEventName:i,page_data:mu(o)};c!==So.visualization&&(l.extra_data={scene:s.scene,from:null!==(a={menu:"右上角转发菜单",button:"页面内转发按钮"}[r.from])&&void 0!==a?a:"",query:Ju.stringify(t(t({},s.query),r.query)),share_type:r.isShareApp?"好友列表":"朋友圈"},r.isShareApp&&(l.extra_data.share_path=r.sharePath)),e.jingTrackInstance.eventCenter.commitEvent(l)},this.buildTabClickEvent=function(t,n){var i=e.jingTrackInstance.reportMode,r={action_code:au.click,originEventName:t.originEventName,page_data:mu(n)};i!==So.visualization?r.extra_data={element_id:"",element_content:t.text,element_related_content:""}:r.element_content=t.text,e.jingTrackInstance.eventCenter.commitEvent(r)},this.pageQuery={}}return n.prototype.buildVisitOrFavoriteEvent=function(t,n,e){var i=this.jingTrackInstance,r=i.reportMode,o=i.currentPage,a={action_code:t,originEventName:n,page_data:mu(e)};r!==So.visualization&&(a.extra_data={scene:o.scene,query:Ju.stringify(o.query)}),this.jingTrackInstance.eventCenter.commitEvent(a)},n}(),ac=function(t,n){return D(n)&&"constructor"!==t},uc=function(i){var r=this;this.jingTrackInstance=i,this.setAppEffectCbs=function(){var t=r.jingTrackInstance.platformConfig.appHandlers,n=r;t.forEach((function(t){r.defAppCbs[t]=function(){for(var e=[],i=0;arguments.length>i;i++)e[i]=arguments[i];n.appEffects.main(t,e)}}))},this.setPageEffectCbs=function(){var t=r.jingTrackInstance.platformConfig.pageHandlers,n=r;t.forEach((function(t){r.defPageCbs[t]=function(){for(var e=[],i=0;arguments.length>i;i++)e[i]=arguments[i];n.pageEffects.main(this,t,e)}}))},this.lifeFcEffects=function(i,o,a){var u=r;return["onShareTimeline","onAddToFavorites"].includes(i)?function(){for(var t,n,e,r=[],c=0;arguments.length>c;c++)r[c]=arguments[c];var s=o.apply(this,r);try{var l=[].slice.call(r);s&&l.push(s),null===(e=null===(n=null===(t=u["def".concat(a,"Cbs")])||void 0===t?void 0:t[i])||void 0===n?void 0:n.apply)||void 0===e||e.call(n,this,l)}catch(t){gu("lifeFcEffects 方法执行出错",t)}return s}:function(){for(var r,c,s,l,d=[],f=0;arguments.length>f;f++)d[f]=arguments[f];return n(this,void 0,void 0,(function(){var f,p,v,h,g;return e(this,(function(y){switch(y.label){case 0:return y.trys.push([0,4,,5]),"onShareAppMessage"!==i?[3,3]:[4,o.apply(this,d)];case 1:return f=null!==(r=y.sent())&&void 0!==r?r:{},"promise"!==Xa(f.promise)?[3,3]:(p=function(){return n(this,void 0,void 0,(function(){var n;return e(this,(function(e){return n=f,[2,new Promise((function(e){var i=setTimeout((function(){e(t({},n)),clearTimeout(i),i=null}),3e3);f.promise.then((function(r){e(t({},n=r)),clearTimeout(i),i=null}))}))]}))}))},v=[t({},f)],[4,p()]);case 2:f=t.apply(void 0,v.concat([y.sent()])),Za(f,"promise"),y.label=3;case 3:return h=[].slice.call(d),f&&h.push(f),null===(l=null===(s=null===(c=u["def".concat(a,"Cbs")])||void 0===c?void 0:c[i])||void 0===s?void 0:s.apply)||void 0===l||l.call(s,this,h),[3,5];case 4:return g=y.sent(),gu("".concat(a," 生命周期 ").concat(i," 副作用方法执行出错!funcName: lifeFcEffects"),g),[3,5];case 5:return"onShareAppMessage"!==i&&(f=o.apply(this,d)),[2,f]}}))}))}},this.customFcEffects=function(t,n,e){var i=r.jingTrackInstance.platformConfig.actionListenerList,o=r;return function(){for(var r,a,u,c,s=[],l=0;arguments.length>l;l++)s[l]=arguments[l];if(null===(a=null===(r=o.jingTrackInstance)||void 0===r?void 0:r.plugins)||void 0===a?void 0:a.jingEventAutoTracking)try{var d=s[0]||{};Ga(d,"type")&&((null==d?void 0:d.currentTarget)||(null==d?void 0:d.target))||(d=s[s.length-1]),((null==d?void 0:d.currentTarget)||(null==d?void 0:d.target))&&i.includes(d.type)&&(D(o.actionEffects)||(o.actionEffects=(null===(c=null===(u=o.jingTrackInstance.plugins)||void 0===u?void 0:u.jingEventAutoTracking)||void 0===c?void 0:c.main)||function(){}),null==o||o.actionEffects(d,t,null!=e?e:this))}catch(t){gu("customFcEffects 方法执行出错",t)}return n.apply(this,s)}},this.appApplyProxy=function(t,n){var e=r.jingTrackInstance.platformConfig,i=e.appHandlers;return e.appListenerList.includes(t)?r.lifeFcEffects(t,n,"App"):i.includes(t)?n:r.customFcEffects(t,n)},this.pageApplyProxy=function(t,n){var e=r.jingTrackInstance.platformConfig,i=e.pageHandlers;return e.pageListenerList.includes(t)?r.lifeFcEffects(t,n,"Page"):i.includes(t)?n:r.customFcEffects(t,n)},this.customApplyProxy=function(t,n){return r.customFcEffects(t,n)},this.objectTraverse=function(t,n){Object.getOwnPropertyNames(t).forEach((function(e){return n(e,t)}))},this.supLifeFcs=function(t,n){var e=r.jingTrackInstance.platformConfig;ln(e["".concat(n,"ListenerList")])&&e["".concat(n,"ListenerList")].forEach((function(n){D(t[n])||["onShareAppMessage","onShareTimeline"].includes(n)||(t[n]=function(){})}))},this.appOverriding=function(t){return r.setAppEffectCbs(),r.supLifeFcs(t,"app"),r.objectTraverse(t,(function(t,n){ac(t,n[t])&&(n[t]=r.appApplyProxy(t,n[t]))})),t},this.pageOverriding=function(t){return r.setPageEffectCbs(),r.supLifeFcs(t,"page"),r.objectTraverse(t,(function(t,n){ac(t,n[t])&&(n[t]=r.pageApplyProxy(t,n[t]))})),t},this.componentOverriding=function(t){var n=r.jingTrackInstance.options;return t.methods||(t.methods={}),n.uniVue&&(r.setPageEffectCbs(),r.supLifeFcs(t.methods,"page")),r.objectTraverse(t.methods,(function(t,e){ac(t,e[t])&&(e[t]=n.uniVue?r.pageApplyProxy(t,e[t]):r.customApplyProxy(t,e[t]))})),t},this.behaviorOverriding=function(t){return t.methods||(t.methods={}),r.objectTraverse(t.methods,(function(t,n){ac(t,n[t])&&(n[t]=r.customApplyProxy(t,n[t]))})),t},this.jingApp=function(t){return(0,r.jingTrackInstance.platformConfig.originalApp)(r.appOverriding(t))},this.jingPage=function(t){return(0,r.jingTrackInstance.platformConfig.originalPage)(r.pageOverriding(t))},this.jingComponent=function(t){return(0,r.jingTrackInstance.platformConfig.originalComponent)(r.componentOverriding(t))},this.jingBehavior=function(t){var n=r.jingTrackInstance.platformConfig.originalBehavior;return(void 0===n?function(){}:n)(r.behaviorOverriding(t))},this.nativeOverriding=function(t){void 0===t&&(t=["App","Page","Component","Behavior"]);var n=r;if(t.includes("App"))try{r.appHooked||(App=function(t){return n.jingApp(t)},r.appHooked=!0)}catch(t){gu("App 代理出错",t)}if(t.includes("Page"))try{r.pageHooked||(Page=function(t){return n.jingPage(t)},r.pageHooked=!0)}catch(t){gu("Page 代理出错",t)}if(t.includes("Component"))try{r.componentHooked||(Component=function(t){return n.jingComponent(t)},r.componentHooked=!0)}catch(t){gu("Component 代理出错",t)}if(t.includes("Behavior"))try{r.behaviorHooked||(Behavior=function(t){return n.jingBehavior(t)},r.behaviorHooked=!0)}catch(t){gu("Behavior 代理出错",t)}},this.shareOut=!1,this.defAppCbs={},this.defPageCbs={},this.appEffects=new rc(this.jingTrackInstance),this.pageEffects=new oc(this.jingTrackInstance)},cc=function(){function t(t){var r=this;this.jingTrackInstance=t,this.request=function(t){return new Promise((function(n,e){r.jingTrackInstance.minipInstance.request({url:t.url,method:t.method,data:t.data,fail:function(t){hu.error("请求失败!",t),e(t)},complete:function(t){var i,r;200===t.statusCode&&0===(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.code)?n(t.data):e((null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.message)||t)}})}))},this.getServer=function(){var t,n,e,i=null===(n=null===(t=r.jingTrackInstance)||void 0===t?void 0:t.options)||void 0===n?void 0:n.server;return null!==(e=iu[i])&&void 0!==e?e:{}},this.initJingTrack=function(){return n(r,void 0,void 0,(function(){var t;return e(this,(function(n){switch(n.label){case 0:return t=this.getServer(),[4,this.request({url:"".concat(null==t?void 0:t.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/init"),method:"GET"})];case 1:return[2,n.sent()]}}))}))},this.getOpenID=function(t){return n(r,void 0,void 0,(function(){var n;return e(this,(function(e){switch(e.label){case 0:return n=this.getServer(),[4,this.request({url:"".concat(null==n?void 0:n.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/get-openid"),method:"POST",data:{js_code:t}})];case 1:return[2,e.sent()]}}))}))},this.getVisualEvents=function(){return n(r,void 0,void 0,(function(){var t;return e(this,(function(n){switch(n.label){case 0:return t=this.getServer(),[4,this.request({url:"".concat(null==t?void 0:t.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/visual-events"),method:"GET"})];case 1:return[2,n.sent()]}}))}))},this.checkViewConnect=function(t){return n(r,void 0,void 0,(function(){var n;return e(this,(function(e){switch(e.label){case 0:return n=this.getServer(),[4,this.request({url:"".concat(null==n?void 0:n.VUE_APP_CGI_API_HOST,"/bffapi/lead/jingTrackMiniprogram/").concat(this.jingTrackUuid,"/checkViewConnect"),method:"POST",data:t})];case 1:return[2,e.sent()]}}))}))},this.pollingCheckViewConnect=function(t){var i=0;return new Promise((function(o,a){var u=function(){return n(r,void 0,void 0,(function(){var n,r,c,s,l,d,f;return e(this,(function(e){switch(e.label){case 0:i++,e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,this.checkViewConnect(t)];case 2:return n=e.sent().data,r=n.status,c=n.wid,s=void 0===c?"":c,0===r||1===r?(1===r&&(this.jingTrackInstance.reportMode=So.visualization,null===(f=null===(d=this.jingTrackInstance)||void 0===d?void 0:d.eventCenter)||void 0===f||f.uploader.setVisualModeWid(s)),o(r)):i>60||setTimeout((function(){u()}),2e3),[3,5];case 3:return l=e.sent(),a(l),[3,5];case 4:return 1===i&&this.jingTrackInstance.emitter.emit("FIRST_CHECK_VISUAL"),[7];case 5:return[2]}}))}))};u()}))},this.getJINGConfig=function(t){return n(r,void 0,void 0,(function(){var n,r,o,a,u,c,s,l;return e(this,(function(e){switch(e.label){case 0:return n=i([this.initJingTrack(),this.getVisualEvents()],t,!0),[4,Promise.allSettled(n)];case 1:if(r=e.sent(),o=r[0],a=r[1],"fulfilled"!==o.status)throw Error(o.reason);return this.jingTrackInstance.options.appId=null!==(s=null===(c=null===(u=null==o?void 0:o.value)||void 0===u?void 0:u.data)||void 0===c?void 0:c.app_id)&&void 0!==s?s:"","fulfilled"===a.status&&this.jingTrackInstance.emitter.emit(vu,(null===(l=null==a?void 0:a.value)||void 0===l?void 0:l.data)||[]),[2]}}))}))}}return Object.defineProperty(t.prototype,"jingTrackUuid",{get:function(){var t,n;return null===(n=null===(t=null==this?void 0:this.jingTrackInstance)||void 0===t?void 0:t.options)||void 0===n?void 0:n.jingTrackUuid},enumerable:!1,configurable:!0}),t}(),sc=function(){function i(){var i,r=this;this.init=function(t){return n(r,void 0,void 0,(function(){var n,i,r,o,a,u,c,s,l,d,f=this;return e(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),hu.forceLog("JingTrack 小程序 SDK 初始化中...","plain"),this.initOptions(t),this.initialized=!0,this.options.debug&&(this.reportMode=So.debug,hu.setEnabled(!0)),n=this.options,i=n.uniVue,r=n.taro,i||r||this.minipHooks.nativeOverriding(),i&&(null===(c=null===(u=this.plugins)||void 0===u?void 0:u.jingTrackUniAppAdapter)||void 0===c||c.main()),r&&(null===(l=null===(s=this.plugins)||void 0===s?void 0:s.jingTrackTaroAdapter)||void 0===l||l.main()),!this.options.debug&&this.options.enableVisual?this.emitter.on(lu,(function(){var t,n,e,i,r,o,a,u,c,s;f.jingApi.pollingCheckViewConnect({visitorId:f.userStore.visitor_id,device:null===(t=f.minipInstance.systemInfo)||void 0===t?void 0:t.model,os:null===(n=f.minipInstance.systemInfo)||void 0===n?void 0:n.system,wechatVersion:null===(e=f.minipInstance.systemInfo)||void 0===e?void 0:e.version,jingTrackVersion:f.version,uniVueVersion:null!==(o=null===(r=null===(i=f.options)||void 0===i?void 0:i.uniVue)||void 0===r?void 0:r.version)&&void 0!==o?o:"",taroVersion:_u(null===(a=f.options)||void 0===a?void 0:a.taro),taroVueVersion:null!==(s=null===(c=null===(u=f.options)||void 0===u?void 0:u.taroVue)||void 0===c?void 0:c.version)&&void 0!==s?s:""}).catch((function(t){gu("pollingCheckViewConnect 方法执行出错!",t)}))})):this.emitter.emit(pu),o=[],this.options.silentGetOpenId&&o.push(this.userStore.silentGetOpenId()),[4,this.jingApi.getJINGConfig(o)];case 1:return e.sent(),hu.forceLog("JingTrack 小程序 SDK 初始化完成!",{jingTrackInstance:this},"success"),null===(d=this.emitter)||void 0===d||d.emit(fu,this),[2,!0];case 2:return a=e.sent(),gu("JingTrack init 方法执行出错",a),[2,!1];case 3:return[2]}}))}))},this.initOptions=function(n){var e,i=n.jingTrackUuid,o={};if(xr(nu).forEach((function(t){var e=nu[t].type,i=ln(e)?!e.includes(Xa(n[t])):Xa(n[t])!==nu[t].type;o[t]=i?nu[t].default:n[t]})),!iu[o.server])throw Error("server 参数传入错误,请传入 ".concat(JSON.stringify(Object.keys(iu))," 的一种!"));if("boolean"===Xa(o.autotrack))o.autotrack=o.autotrack?uu:[];else{var a="array"===Xa(o.autotrack)?function(t){return o.autotrack.includes(t)}:function(t){return o.autotrack[t]};o.autotrack=uu.filter(a)}var u=co(uu,o.autotrack);sr(u)||hu.forceLog("以下行为未开启全埋点: ",u,"warn"),r.options=t({jingTrackUuid:i,appId:""},o),null===(e=r.emitter)||void 0===e||e.emit(du,r)},this.track=function(t,n,e){r.eventCenter.commitCustomEvent(t,n,e)},this.identify=function(t,n){var e=[];t&&e.push({identity_type:xo.mp_openid,identity_value:t}),n&&e.push({identity_type:xo.wechat_unionid,identity_value:n}),r.setIdentity(e)};try{this.version="1.1.0",this.platform="wx",this.framework="uniapp",this.platformConfig=Au,this.emitter={all:i=i||new Map,on:function(t,n){var e=i.get(t);e?e.push(n):i.set(t,[n])},off:function(t,n){var e=i.get(t);e&&(n?e.splice(e.indexOf(n)>>>0,1):i.set(t,[]))},emit:function(t,n){var e=i.get(t);e&&e.slice().map((function(t){t(n)})),(e=i.get("*"))&&e.slice().map((function(e){e(t,n)}))}},this.reportMode=So.normal,this.minipInstance=new bu(this),this.currentPage=new Zu(this),this.plugins=new ic(this),this.jingApi=new cc(this),this.userStore=new Yu(this),this.eventCenter=new $u(this),this.minipHooks=new uc(this),this.plugins.innerPluginInit()}catch(t){gu("JingTrack 实例化失败",t)}}return Object.defineProperty(i.prototype,"setIdentity",{get:function(){return this.userStore.setIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getIdentity",{get:function(){return this.userStore.getIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"removeIdentityItem",{get:function(){return this.userStore.removeIdentityItem},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"clearIdentity",{get:function(){return this.userStore.clearIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"generateUrlWithSession",{get:function(){return this.userStore.generateUrlWithSession},enumerable:!1,configurable:!0}),i}(),lc=new sc,dc=function(n){for(var e=[],i=1;arguments.length>i;i++)e[i-1]=arguments[i];try{if(oa(n)&&eu.includes(n)&&lc[n]){if("init"===n){if(lc.initialized)return hu.forceLog("SDK 重复初始化,请检查是否重复加载 SDK !","warn"),!1;var r=e[0],o={};if(1===e.length)oa(r)&&(o={jingTrackUuid:r});else if(2===e.length)if(oa(r)&&V(e[1])){var a=e[1];o=t(t({},a),{jingTrackUuid:r})}else oa(r)&&oa(e[1])&&(o={appId:u=e[1],jingTrackUuid:r});else{var u=e[1];a=e[2],oa(r)&&oa(u)&&V(a)&&(o=t(t({},a),{appId:u,jingTrackUuid:r}))}if(sr(o))throw Error("初始化 SDK 失败。请使用 jingTrack('init', '您的 JingTrack 项目 ID', options) 初始化 SDK。");return lc.init(o)}if(!lc.initialized)throw Error("SDK 未初始化!请先调用 init 方法初始化 SDK。");return lc[n].apply(lc,e)}throw Error("不存在名为 ".concat(Ro(n)," 的方法调用!"))}catch(t){gu("JingTrack ".concat(n," 方法执行出错"),t)}};export{dc as default};
package/dist/wx.js ADDED
@@ -0,0 +1 @@
1
+ var t=function(){return t=Object.assign||function(t){for(var e,n=1,i=arguments.length;i>n;n++)for(var r in e=arguments[n])({}).hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},t.apply(this,arguments)};function e(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{c(i.next(t))}catch(t){o(t)}}function u(t){try{c(i.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,u)}c((i=i.apply(t,e||[])).next())}))}function n(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&u[0]?i.return:u[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,u[1])).done)return r;switch(i=0,r&&(u=[2&u[0],r.value]),u[0]){case 0:case 1:r=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,i=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==u[0]&&2!==u[0])){a=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]<r[3])){a.label=u[1];break}if(6===u[0]&&a.label<r[1]){a.label=r[1],r=u;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(u);break}r[2]&&a.ops.pop(),a.trys.pop();continue}u=e.call(t,a)}catch(t){u=[6,t],i=0}finally{n=r=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}function i(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;o>r;r++)!i&&r in e||(i||(i=[].slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||[].slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(t){return t&&t.__esModule&&{}.hasOwnProperty.call(t,"default")?t.default:t}var a=function(t,e){return t===e||t!=t&&e!=e},u=a,c=function(t,e){for(var n=t.length;n--;)if(u(t[n][0],e))return n;return-1},s=c,l=[].splice,d=c,f=c,p=c,v=function(){this.__data__=[],this.size=0};function h(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}h.prototype.clear=v,h.prototype.delete=function(t){var e=this.__data__,n=s(e,t);return n>=0&&(n==e.length-1?e.pop():l.call(e,n,1),--this.size,!0)},h.prototype.get=function(t){var e=this.__data__,n=d(e,t);return 0>n?void 0:e[n][1]},h.prototype.has=function(t){return f(this.__data__,t)>-1},h.prototype.set=function(t,e){var n=this.__data__,i=p(n,t);return 0>i?(++this.size,n.push([t,e])):n[i][1]=e,this};var g,_=h,y=_,m="object"==typeof r&&r&&r.Object===Object&&r,b=m,j="object"==typeof self&&self&&self.Object===Object&&self,I=b||j||Function("return this")(),T=I.Symbol,k=T,w=Object.prototype,E=w.hasOwnProperty,S=w.toString,P=k?k.toStringTag:void 0,A={}.toString,O=function(t){var e=E.call(t,P),n=t[P];try{t[P]=void 0;var i=!0}catch(t){}var r=S.call(t);return i&&(e?t[P]=n:delete t[P]),r},C=T?T.toStringTag:void 0,x=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":C&&C in Object(t)?O(t):function(t){return A.call(t)}(t)},U=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},L=o(U),q=x,V=U,N=function(t){if(!V(t))return!1;var e=q(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},D=o(N),F=I["__core-js_shared__"],M=(g=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",B=function(){}.toString,H=function(t){if(null!=t){try{return B.call(t)}catch(t){}try{return t+""}catch(t){}}return""},R=N,z=function(t){return!!M&&M in t},G=U,J=H,W=/^\[object .+?Constructor\]$/,K=function(){}.toString,$=Object.prototype.hasOwnProperty,Q=RegExp("^"+K.call($).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Y=function(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return function(t){return!(!G(t)||z(t))&&(R(t)?Q:W).test(J(t))}(n)?n:void 0},Z=Y(I,"Map"),X=Y(Object,"create"),tt=X,et=X,nt={}.hasOwnProperty,it=X,rt={}.hasOwnProperty,ot=X,at=function(){this.__data__=tt?tt(null):{},this.size=0},ut=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ct=function(t){var e=this.__data__;if(et){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return nt.call(e,t)?e[t]:void 0};function st(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}st.prototype.clear=at,st.prototype.delete=ut,st.prototype.get=ct,st.prototype.has=function(t){var e=this.__data__;return it?void 0!==e[t]:rt.call(e,t)},st.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ot&&void 0===e?"__lodash_hash_undefined__":e,this};var lt=st,dt=_,ft=Z,pt=function(t,e){var n,i,r=t.__data__;return("string"==(i=typeof(n=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==n:null===n)?r["string"==typeof e?"string":"hash"]:r.map},vt=pt,ht=pt,gt=pt,_t=pt;function yt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}yt.prototype.clear=function(){this.size=0,this.__data__={hash:new lt,map:new(ft||dt),string:new lt}},yt.prototype.delete=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e},yt.prototype.get=function(t){return ht(this,t).get(t)},yt.prototype.has=function(t){return gt(this,t).has(t)},yt.prototype.set=function(t,e){var n=_t(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this};var mt=yt,bt=_,jt=Z,It=mt,Tt=_,kt=function(){this.__data__=new y,this.size=0},wt=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Et=function(t){return this.__data__.get(t)},St=function(t){return this.__data__.has(t)};function Pt(t){var e=this.__data__=new Tt(t);this.size=e.size}Pt.prototype.clear=kt,Pt.prototype.delete=wt,Pt.prototype.get=Et,Pt.prototype.has=St,Pt.prototype.set=function(t,e){var n=this.__data__;if(n instanceof bt){var i=n.__data__;if(!jt||199>i.length)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new It(i)}return n.set(t,e),this.size=n.size,this};var At=Pt,Ot=Y,Ct=function(){try{var t=Ot(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),xt=Ct,Ut=function(t,e,n){"__proto__"==e&&xt?xt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Lt=Ut,qt=a,Vt=function(t,e,n){(void 0!==n&&!qt(t[e],n)||void 0===n&&!(e in t))&&Lt(t,e,n)},Nt=function(t,e,n){for(var i=-1,r=Object(t),o=n(t),a=o.length;a--;){var u=o[++i];if(!1===e(r[u],u,r))break}return t},Dt={exports:{}};!function(t,e){var n=I,i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,o=r&&r.exports===i?n.Buffer:void 0,a=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,i=a?a(n):new t.constructor(n);return t.copy(i),i}}(Dt,Dt.exports);var Ft=Dt.exports,Mt=I.Uint8Array,Bt=Mt,Ht=function(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e},Rt=U,zt=Object.create,Gt=function(){function t(){}return function(e){if(!Rt(e))return{};if(zt)return zt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),Jt=function(t,e){return function(n){return t(e(n))}},Wt=Jt(Object.getPrototypeOf,Object),Kt=Object.prototype,$t=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Kt)},Qt=Gt,Yt=Wt,Zt=$t,Xt=function(t){return null!=t&&"object"==typeof t},te=x,ee=Xt,ne=function(t){return ee(t)&&"[object Arguments]"==te(t)},ie=Xt,re=Object.prototype,oe=re.hasOwnProperty,ae=re.propertyIsEnumerable,ue=ne(function(){return arguments}())?ne:function(t){return ie(t)&&oe.call(t,"callee")&&!ae.call(t,"callee")},ce=Array.isArray,se=o(ce),le=function(t){return"number"==typeof t&&t>-1&&t%1==0&&9007199254740991>=t},de=N,fe=le,pe=function(t){return null!=t&&fe(t.length)&&!de(t)},ve=pe,he=Xt,ge=function(t){return he(t)&&ve(t)},_e={exports:{}},ye=function(){return!1};!function(t,e){var n=I,i=ye,r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,a=o&&o.exports===r?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;t.exports=u}(_e,_e.exports);var me=_e.exports,be=x,je=Wt,Ie=Xt,Te=function(){}.toString,ke=Object.prototype.hasOwnProperty,we=Te.call(Object),Ee=x,Se=le,Pe=Xt,Ae={};Ae["[object Float32Array]"]=Ae["[object Float64Array]"]=Ae["[object Int8Array]"]=Ae["[object Int16Array]"]=Ae["[object Int32Array]"]=Ae["[object Uint8Array]"]=Ae["[object Uint8ClampedArray]"]=Ae["[object Uint16Array]"]=Ae["[object Uint32Array]"]=!0,Ae["[object Arguments]"]=Ae["[object Array]"]=Ae["[object ArrayBuffer]"]=Ae["[object Boolean]"]=Ae["[object DataView]"]=Ae["[object Date]"]=Ae["[object Error]"]=Ae["[object Function]"]=Ae["[object Map]"]=Ae["[object Number]"]=Ae["[object Object]"]=Ae["[object RegExp]"]=Ae["[object Set]"]=Ae["[object String]"]=Ae["[object WeakMap]"]=!1;var Oe=function(t){return function(e){return t(e)}},Ce={exports:{}};!function(t,e){var n=m,i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,o=r&&r.exports===i&&n.process,a=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=a}(Ce,Ce.exports);var xe,Ue,Le,qe=Ce.exports,Ve=function(t){return Pe(t)&&Se(t.length)&&!!Ae[Ee(t)]},Ne=Oe,De=qe&&qe.isTypedArray,Fe=De?Ne(De):Ve,Me=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},Be=Ut,He=a,Re={}.hasOwnProperty,ze=function(t,e,n){var i=t[e];Re.call(t,e)&&He(i,n)&&(void 0!==n||e in t)||Be(t,e,n)},Ge=Ut,Je=/^(?:0|[1-9]\d*)$/,We=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Je.test(t))&&t>-1&&t%1==0&&e>t},Ke=ue,$e=ce,Qe=me,Ye=We,Ze=Fe,Xe={}.hasOwnProperty,tn=function(t,e){var n=$e(t),i=!n&&Ke(t),r=!n&&!i&&Qe(t),o=!n&&!i&&!r&&Ze(t),a=n||i||r||o,u=a?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],c=u.length;for(var s in t)!e&&!Xe.call(t,s)||a&&("length"==s||r&&("offset"==s||"parent"==s)||o&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ye(s,c))||u.push(s);return u},en=U,nn=$t,rn={}.hasOwnProperty,on=tn,an=function(t){if(!en(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=nn(t),n=[];for(var i in t)("constructor"!=i||!e&&rn.call(t,i))&&n.push(i);return n},un=pe,cn=function(t){return un(t)?on(t,!0):an(t)},sn=function(t,e,n,i){var r=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var u=e[o],c=i?i(n[u],t[u],u,n,t):void 0;void 0===c&&(c=t[u]),r?Ge(n,u,c):ze(n,u,c)}return n},ln=cn,dn=Vt,fn=Ft,pn=function(t,e){var n,i,r=e?(n=t.buffer,i=new n.constructor(n.byteLength),new Bt(i).set(new Bt(n)),i):t.buffer;return new t.constructor(r,t.byteOffset,t.length)},vn=Ht,hn=function(t){return"function"!=typeof t.constructor||Zt(t)?{}:Qt(Yt(t))},gn=ue,_n=ce,yn=ge,mn=me,bn=N,jn=U,In=function(t){if(!Ie(t)||"[object Object]"!=be(t))return!1;var e=je(t);if(null===e)return!0;var n=ke.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Te.call(n)==we},Tn=Fe,kn=Me,wn=At,En=Vt,Sn=Nt,Pn=function(t,e,n,i,r,o,a){var u,c=kn(t,n),s=kn(e,n),l=a.get(s);if(l)dn(t,n,l);else{var d=o?o(c,s,n+"",t,e,a):void 0,f=void 0===d;if(f){var p=_n(s),v=!p&&mn(s),h=!p&&!v&&Tn(s);d=s,p||v||h?_n(c)?d=c:yn(c)?d=vn(c):v?(f=!1,d=fn(s,!0)):h?(f=!1,d=pn(s,!0)):d=[]:In(s)||gn(s)?(d=c,gn(c)?d=sn(u=c,ln(u)):jn(c)&&!bn(c)||(d=hn(s))):f=!1}f&&(a.set(s,d),r(d,s,i,o,a),a.delete(s)),dn(t,n,d)}},An=U,On=cn,Cn=Me,xn=function t(e,n,i,r,o){e!==n&&Sn(n,(function(a,u){if(o||(o=new wn),An(a))Pn(e,n,u,i,t,r,o);else{var c=r?r(Cn(e,u),a,u+"",e,n,o):void 0;void 0===c&&(c=a),En(e,u,c)}}),On)},Un=function(t){return t},Ln=Math.max,qn=Ct,Vn=Date.now,Nn=(xe=qn?function(t,e){return qn(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Un,Ue=0,Le=0,function(){var t=Vn(),e=16-(t-Le);if(Le=t,e>0){if(++Ue>=800)return arguments[0]}else Ue=0;return xe.apply(void 0,arguments)}),Dn=Un,Fn=function(t,e,n){return e=Ln(void 0===e?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=Ln(i.length-e,0),a=Array(o);++r<o;)a[r]=i[e+r];r=-1;for(var u=Array(e+1);++r<e;)u[r]=i[r];return u[e]=n(a),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,u)}},Mn=Nn,Bn=function(t,e){return Mn(Fn(t,e,Dn),t+"")},Hn=a,Rn=pe,zn=We,Gn=U,Jn=Bn,Wn=function(t){return Jn((function(e,n){var i=-1,r=n.length,o=r>1?n[r-1]:void 0,a=r>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(r--,o):void 0,a&&function(t,e,n){if(!Gn(n))return!1;var i=typeof e;return!!("number"==i?Rn(n)&&zn(e,n.length):"string"==i&&e in n)&&Hn(n[e],t)}(n[0],n[1],a)&&(o=3>r?void 0:o,r=1),e=Object(e);++i<r;){var u=n[i];u&&t(e,u,i,o)}return e}))},Kn=xn,$n=o(Wn((function(t,e,n){Kn(t,e,n)}))),Qn=xn,Yn=o(Wn((function(t,e,n,i){Qn(t,e,n,i)}))),Zn=mt;function Xn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Zn;++e<n;)this.add(t[e])}Xn.prototype.add=Xn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Xn.prototype.has=function(t){return this.__data__.has(t)};var ti=Xn,ei=function(t){return t!=t},ni=function(t,e){return!(null==t||!t.length)&&function(t,e,n){return e==e?function(t,e,n){for(var i=n-1,r=t.length;++i<r;)if(t[i]===e)return i;return-1}(t,e,n):function(t,e,n,i){for(var r=t.length,o=n+(i?1:-1);i?o--:++o<r;)if(e(t[o],o,t))return o;return-1}(t,ei,n)}(t,e,0)>-1},ii=function(t,e,n){for(var i=-1,r=null==t?0:t.length;++i<r;)if(n(e,t[i]))return!0;return!1},ri=function(t,e){return t.has(e)},oi=Y(I,"Set"),ai=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},ui=oi,ci=ui&&1/ai(new ui([,-0]))[1]==1/0?function(t){return new ui(t)}:function(){},si=ti,li=ni,di=ii,fi=ri,pi=ci,vi=ai,hi=o((function(t){return t&&t.length?function(t,e,n){var i=-1,r=li,o=t.length,a=!0,u=[],c=u;if(n)a=!1,r=di;else if(200>o)c=e?[]:u;else{var s=e?null:pi(t);if(s)return vi(s);a=!1,r=fi,c=new si}t:for(;++i<o;){var l=t[i],d=e?e(l):l;if(l=n||0!==l?l:0,a&&d==d){for(var f=c.length;f--;)if(c[f]===d)continue t;e&&c.push(d),u.push(l)}else r(c,d,n)||(c!==u&&c.push(d),u.push(l))}return u}(t):[]})),gi=function(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t},_i=ue,yi=ce,mi=T?T.isConcatSpreadable:void 0,bi=gi,ji=function(t){return yi(t)||_i(t)||!!(mi&&t&&t[mi])},Ii=function t(e,n,i,r,o){var a=-1,u=e.length;for(i||(i=ji),o||(o=[]);++a<u;){var c=e[a];n>0&&i(c)?n>1?t(c,n-1,i,r,o):bi(o,c):r||(o[o.length]=c)}return o},Ti=gi,ki=Ii,wi=Ht,Ei=ce,Si=o((function(){var t=arguments.length;if(!t)return[];for(var e=Array(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return Ti(Ei(n)?wi(n):[n],ki(e,1))})),Pi=Jt(Object.keys,Object),Ai=$t,Oi=Pi,Ci={}.hasOwnProperty,xi=function(t){if(!Ai(t))return Oi(t);var e=[];for(var n in Object(t))Ci.call(t,n)&&"constructor"!=n&&e.push(n);return e},Ui=Y(I,"DataView"),Li=Z,qi=Y(I,"Promise"),Vi=oi,Ni=Y(I,"WeakMap"),Di=x,Fi=H,Mi="[object Map]",Bi="[object Promise]",Hi="[object Set]",Ri="[object WeakMap]",zi="[object DataView]",Gi=Fi(Ui),Ji=Fi(Li),Wi=Fi(qi),Ki=Fi(Vi),$i=Fi(Ni),Qi=Di;(Ui&&Qi(new Ui(new ArrayBuffer(1)))!=zi||Li&&Qi(new Li)!=Mi||qi&&Qi(qi.resolve())!=Bi||Vi&&Qi(new Vi)!=Hi||Ni&&Qi(new Ni)!=Ri)&&(Qi=function(t){var e=Di(t),n="[object Object]"==e?t.constructor:void 0,i=n?Fi(n):"";if(i)switch(i){case Gi:return zi;case Ji:return Mi;case Wi:return Bi;case Ki:return Hi;case $i:return Ri}return e});var Yi=Qi,Zi=xi,Xi=Yi,tr=ue,er=ce,nr=pe,ir=me,rr=$t,or=Fe,ar={}.hasOwnProperty,ur=o((function(t){if(null==t)return!0;if(nr(t)&&(er(t)||"string"==typeof t||"function"==typeof t.splice||ir(t)||or(t)||tr(t)))return!t.length;var e=Xi(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(rr(t))return!Zi(t).length;for(var n in t)if(ar.call(t,n))return!1;return!0})),cr=ti,sr=function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1},lr=ri,dr=function(t,e,n,i,r,o){var a=1&n,u=t.length,c=e.length;if(!(u==c||a&&c>u))return!1;var s=o.get(t),l=o.get(e);if(s&&l)return s==e&&l==t;var d=-1,f=!0,p=2&n?new cr:void 0;for(o.set(t,e),o.set(e,t);++d<u;){var v=t[d],h=e[d];if(i)var g=a?i(h,v,d,e,t,o):i(v,h,d,t,e,o);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!sr(e,(function(t,e){if(!lr(p,e)&&(v===t||r(v,t,n,i,o)))return p.push(e)}))){f=!1;break}}else if(v!==h&&!r(v,h,n,i,o)){f=!1;break}}return o.delete(t),o.delete(e),f},fr=Mt,pr=a,vr=dr,hr=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,i){n[++e]=[i,t]})),n},gr=ai,_r=T?T.prototype:void 0,yr=_r?_r.valueOf:void 0,mr=gi,br=ce,jr={}.propertyIsEnumerable,Ir=Object.getOwnPropertySymbols,Tr=Ir?function(t){return null==t?[]:function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var a=t[n];e(a,n,t)&&(o[r++]=a)}return o}(Ir(t=Object(t)),(function(e){return jr.call(t,e)}))}:function(){return[]},kr=tn,wr=xi,Er=pe,Sr=function(t){return Er(t)?kr(t):wr(t)},Pr=o(Sr),Ar=function(t,e,n){var i=e(t);return br(t)?i:mr(i,n(t))},Or=Tr,Cr=Sr,xr=function(t){return Ar(t,Cr,Or)},Ur={}.hasOwnProperty,Lr=At,qr=dr,Vr=function(t,e,n,i,r,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new fr(t),new fr(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return pr(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var u=hr;case"[object Set]":var c=1&i;if(u||(u=gr),t.size!=e.size&&!c)return!1;var s=a.get(t);if(s)return s==e;i|=2,a.set(t,e);var l=vr(u(t),u(e),i,r,o,a);return a.delete(t),l;case"[object Symbol]":if(yr)return yr.call(t)==yr.call(e)}return!1},Nr=Yi,Dr=ce,Fr=me,Mr=Fe,Br="[object Arguments]",Hr="[object Array]",Rr="[object Object]",zr={}.hasOwnProperty,Gr=function(t,e,n,i,r,o){var a=Dr(t),u=Dr(e),c=a?Hr:Nr(t),s=u?Hr:Nr(e),l=(c=c==Br?Rr:c)==Rr,d=(s=s==Br?Rr:s)==Rr,f=c==s;if(f&&Fr(t)){if(!Fr(e))return!1;a=!0,l=!1}if(f&&!l)return o||(o=new Lr),a||Mr(t)?qr(t,e,n,i,r,o):Vr(t,e,c,n,i,r,o);if(!(1&n)){var p=l&&zr.call(t,"__wrapped__"),v=d&&zr.call(e,"__wrapped__");if(p||v){var h=p?t.value():t,g=v?e.value():e;return o||(o=new Lr),r(h,g,n,i,o)}}return!!f&&(o||(o=new Lr),function(t,e,n,i,r,o){var a=1&n,u=xr(t),c=u.length;if(c!=xr(e).length&&!a)return!1;for(var s=c;s--;){var l=u[s];if(!(a?l in e:Ur.call(e,l)))return!1}var d=o.get(t),f=o.get(e);if(d&&f)return d==e&&f==t;var p=!0;o.set(t,e),o.set(e,t);for(var v=a;++s<c;){var h=t[l=u[s]],g=e[l];if(i)var _=a?i(g,h,l,e,t,o):i(h,g,l,t,e,o);if(!(void 0===_?h===g||r(h,g,n,i,o):_)){p=!1;break}v||(v="constructor"==l)}if(p&&!v){var y=t.constructor,m=e.constructor;y==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,i,r,o))},Jr=Xt,Wr=function t(e,n,i,r,o){return e===n||(null==e||null==n||!Jr(e)&&!Jr(n)?e!=e&&n!=n:Gr(e,n,i,r,t,o))},Kr=o((function(t,e){return Wr(t,e)})),$r=function(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r},Qr=ti,Yr=ni,Zr=ii,Xr=$r,to=Oe,eo=ri,no=function(t,e,n,i){var r=-1,o=Yr,a=!0,u=t.length,c=[],s=e.length;if(!u)return c;n&&(e=Xr(e,to(n))),i?(o=Zr,a=!1):200>e.length||(o=eo,a=!1,e=new Qr(e));t:for(;++r<u;){var l=t[r],d=null==n?l:n(l);if(l=i||0!==l?l:0,a&&d==d){for(var f=s;f--;)if(e[f]===d)continue t;c.push(l)}else o(e,d,i)||c.push(l)}return c},io=no,ro=Ii,oo=ge,ao=o(Bn((function(t,e){return oo(t)?io(t,ro(e,1,oo,!0)):[]}))),uo=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},co=o(uo),so=no,lo=Ii,fo=ge,po=uo,vo=o(Bn((function(t,e){var n=po(e);return fo(n)&&(n=void 0),fo(t)?so(t,lo(e,1,fo,!0),void 0,n):[]}))),ho=x,go=Xt,_o=function(t){return"symbol"==typeof t||go(t)&&"[object Symbol]"==ho(t)},yo=ce,mo=_o,bo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,jo=/^\w*$/,Io=mt;function To(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=t.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(To.Cache||Io),n}To.Cache=Io;var ko,wo,Eo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,So=/\\(\\)?/g,Po=(ko=To((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Eo,(function(t,n,i,r){e.push(i?r.replace(So,"$1"):n||t)})),e}),(function(t){return 500===wo.size&&wo.clear(),t})),wo=ko.cache,ko),Ao=$r,Oo=ce,Co=_o,xo=T?T.prototype:void 0,Uo=xo?xo.toString:void 0,Lo=function t(e){if("string"==typeof e)return e;if(Oo(e))return Ao(e,t)+"";if(Co(e))return Uo?Uo.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n},qo=function(t){return null==t?"":Lo(t)},Vo=o(qo),No=ce,Do=function(t,e){if(yo(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!mo(t))||jo.test(t)||!bo.test(t)||null!=e&&t in Object(e)},Fo=Po,Mo=qo,Bo=function(t,e){return No(t)?t:Do(t,e)?[t]:Fo(Mo(t))},Ho=_o,Ro=function(t){if("string"==typeof t||Ho(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e},zo=Bo,Go=Ro,Jo=function(t,e){for(var n=0,i=(e=zo(e,t)).length;null!=t&&i>n;)t=t[Go(e[n++])];return n&&n==i?t:void 0},Wo=Jo,Ko=o((function(t,e,n){var i=null==t?void 0:Wo(t,e);return void 0===i?n:i})),$o=o((function(t){return null==t})),Qo=x,Yo=ce,Zo=Xt,Xo=o((function(t){return"string"==typeof t||!Yo(t)&&Zo(t)&&"[object String]"==Qo(t)}));qe&&qe.isRegExp;var ta,ea,na,ia={}.hasOwnProperty,ra=Bo,oa=ue,aa=ce,ua=We,ca=le,sa=Ro,la=function(t,e){return null!=t&&ia.call(t,e)},da=o((function(t,e){return null!=t&&function(t,e,n){for(var i=-1,r=(e=ra(e,t)).length,o=!1;++i<r;){var a=sa(e[i]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&ca(r)&&ua(a,r)&&(aa(t)||oa(t))}(t,e,la)})),fa=Jo,pa=function(t,e,n){var i=-1,r=t.length;0>e&&(e=-e>r?0:r+e),0>(n=n>r?r:n)&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+e];return o},va=Bo,ha=uo,ga=Ro,_a=function(t,e){return null==(t=function(t,e){return 2>e.length?t:fa(t,pa(e,0,-1))}(t,e=va(e,t)))||delete t[ga(ha(e))]},ya=o((function(t,e){return null==t||_a(t,e)})),ma=function(t){return{}.toString.call(t).slice(8,-1).toLowerCase()},ba="code",ja={autotrack:{type:["object","array","boolean"],default:!0},enableVisual:{type:"boolean",default:!0},server:{type:"string",default:""},debug:{type:"boolean",default:!1},uniVue:{type:["object","function"],default:!1},taro:{type:["object","module"],default:!1},taroVue:{type:["object","function"],default:!1},silentGetOpenId:{type:"boolean",default:!1}},Ia=["init","track","identify","setIdentity","getIdentity","removeIdentityItem","clearIdentity","generateUrlWithSession"],Ta={dev:{VUE_APP_API_HOST:"https://devapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://devcgi.jingsocial.com"},staging:{VUE_APP_API_HOST:"https://stagingapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://stagingcgi.jingsocial.com"},ali:{VUE_APP_API_HOST:"https://api.jingsocial.com",VUE_APP_CGI_API_HOST:"https://cgi.jingsocial.com"},msc:{VUE_APP_API_HOST:"https://mscappapi.jingsocial.com",VUE_APP_CGI_API_HOST:"https://msccgi.jingsocial.com"},agl:{VUE_APP_API_HOST:"https://api.ma.aglcommunity.cn",VUE_APP_CGI_API_HOST:"https://cgi.ma.aglcommunity.cn"},agl_uat:{VUE_APP_API_HOST:"https://uatapi.ma.aglcommunity.cn",VUE_APP_CGI_API_HOST:"https://uatcgi.ma.aglcommunity.cn"}},ka={onLaunch:"mp_launch",onShow:"mp_show",onHide:"mp_hide"},wa={onShow:"mp_pageview",onHide:"mp_pageleave",onUnload:"mp_pageleave",onShareAppMessage:"mp_share",onShareTimeline:"mp_share",onAddToFavorites:"mp_addfavorites"},Ea={click:"mp_click"},Sa=hi(Si([],Object.values(ka),Object.values(wa))),Pa=hi(Si([],Sa,Object.values(Ea))),Aa="jing_session_id",Oa="SYSTEM_READY",Ca="OPTION_INITIALIZED",xa="SDK_READY",Ua="FIRST_CHECK_VISUAL",La="VISUAL_CONFIG_READY";!function(t){t[t.normal=0]="normal",t[t.debug=1]="debug",t[t.visualization=2]="visualization"}(ta||(ta={})),function(t){t.JINGTRACK_ELEMENT_ID="jing_track_element_id",t.JINGTRACK_ELEMENT_CONTENT="jing_track_element_content"}(ea||(ea={})),function(t){t.wechat_openid="wechat_openid",t.wechat_unionid="wechat_unionid",t.mobile="mobile",t.email="email",t.third_party="third_party",t.external_userid="external_userid",t.workwechat_user_userid="workwechat_user_userid",t.mp_openid="mp_openid",t.omni_user_uuid="omni_user_uuid"}(na||(na={}));var qa=function(){function t(){}return t.enabled=!1,t.typeColors={plain:"color: #4A72FB;",error:"color: #FD3E3E;",warn:"color: #FF7621;",success:"color: #61B707;"},t.setEnabled=function(e){t.enabled=!!e},t.forceLog=function(e){for(var n,i,r=[],o=1;arguments.length>o;o++)r[o-1]=arguments[o];var a="%c「JingTrack」".concat(e),u=null!==(n=2>r.length?r[0]:r[1])&&void 0!==n?n:"plain",c=null!==(i=t.typeColors[u])&&void 0!==i?i:t.typeColors.plain;if(2>r.length)console.log(a,c);else{var s=r[0];console.log(a,c,s)}},t.log=function(e){for(var n=[],r=1;arguments.length>r;r++)n[r-1]=arguments[r];if(t.enabled)return t.forceLog.apply(t,i([e],n,!1))},t.plain=function(e,n){return $o(n)?t.log(e,"plain"):t.log(e,n,"plain")},t.success=function(e,n){return $o(n)?t.log(e,"success"):t.log(e,n,"success")},t.error=function(e,n){return $o(n)?t.log(e,"error"):t.log(e,n,"error")},t.warn=function(e,n){return $o(n)?t.log(e,"warn"):t.log(e,n,"warn")},t}(),Va=function(t,e){qa.forceLog(t,e,"error")},Na=function(t){try{return t()}catch(e){return void Va("niceTry 错误捕捉",{error:e,fn:t})}},Da=function(t){if(!t||"object"!=typeof t)return"";var e=t.Current,n=t.createComponent;return e&&!n?"3":!e&&n?"2":""},Fa=function(t){var e,n;return null!==(n=null!==(e=null==(t=L(t)?t:{})?void 0:t.data)&&void 0!==e?e:null==t?void 0:t.$data)&&void 0!==n?n:{}},Ma=function(t){var e=this;this.jingTrackInstance=t,this.minip=("wx",Na((function(){return wx}))),this.proxySetNavigationBarTitle=function(){var t,n=e,i=null===(t=n.minip)||void 0===t?void 0:t.setNavigationBarTitle;i&&Object.defineProperty(n.minip,"setNavigationBarTitle",{writable:!0,enumerable:!0,configurable:!0,value:function(){for(var t=[],e=0;arguments.length>e;e++)t[e]=arguments[e];var r=i.apply(this,t);try{if(!L(t[0]))return r;var o=n.getCurrentPath(),a=t[0].title;n.settedTitle[o]=a}catch(t){Va("setNavigationBarTitle 方法代理出错",t)}return r}})},this.getCurrentPage=function(){return Na((function(){return co(getCurrentPages())}))||{}},this.getCurrentPath=function(){var t=e.getCurrentPage();return(null==t?void 0:t.route)||""},this.removeSettedTitleItem=function(t){t||(t=e.getCurrentPath()),e.settedTitle[t]=""},this.getPageTitle=function(t){var n,i,r,o,a,u,c,s,l,d,f;t||(t=e.getCurrentPath());var p="",v=Na((function(){return __wxConfig}));try{if(!(p=null!==(n=e.settedTitle[t])&&void 0!==n?n:"")){var h=(null===(i=null==v?void 0:v.page)||void 0===i?void 0:i[t])||(null===(r=null==v?void 0:v.page)||void 0===r?void 0:r["".concat(t,".html")]);p=h?null!==(a=null===(o=null==h?void 0:h.window)||void 0===o?void 0:o.navigationBarTitleText)&&void 0!==a?a:"":null!==(s=null===(c=null===(u=null==v?void 0:v.global)||void 0===u?void 0:u.window)||void 0===c?void 0:c.navigationBarTitleText)&&void 0!==s?s:""}if(!p){var g=null===(d=null===(l=null==v?void 0:v.tabBar)||void 0===l?void 0:l.list)||void 0===d?void 0:d.find((function(e){return e.pagePath===t||e.pagePath==="".concat(t,".html")}));p=null!==(f=null==g?void 0:g.text)&&void 0!==f?f:""}}catch(t){return Va("getPageTitle 方法执行出错",t),""}return p},this.getSystemInfo=function(){var t=e;return new Promise((function(n){var i;null===(i=e.minip)||void 0===i||i.getSystemInfo({success:function(e){t.systemInfo=e,n(e)},fail:function(){return n(null)}})}))},this.getNetworkType=function(){var t=e;return new Promise((function(n){var i;null===(i=e.minip)||void 0===i||i.getNetworkType({success:function(e){t.network=e,n(e)},fail:function(){return n(null)}})}))},this.getStorageSync=function(t){var n,i=null===(n=e.minip)||void 0===n?void 0:n.getStorageSync(t);return L(i)&&i.expiredAt?i.expiredAt<Date.now()?"":i.value:i},this.getStorage=function(t){return new Promise((function(n){var i;null===(i=e.minip)||void 0===i||i.getStorage({key:t,success:function(t){var e=t.data;return n(e)},fail:function(){return n("")}})}))},this.setStorageSync=function(t,n,i){var r;i&&(n={value:n,expiredAt:i}),null===(r=e.minip)||void 0===r||r.setStorageSync(t,n)},this.setStorage=function(t,n){var i;null===(i=e.minip)||void 0===i||i.setStorage({key:t,data:n})},this.removeStorageSync=function(t){var n;null===(n=e.minip)||void 0===n||n.removeStorageSync(t)},this.removeStorage=function(t){var n;null===(n=e.minip)||void 0===n||n.removeStorage(t)},this.getLaunchOptionsSync=function(){var t;return null===(t=e.minip)||void 0===t?void 0:t.getLaunchOptionsSync()},this.request=function(t){var n,i=t.url,r=t.data,o=t.header,a=t.timeout,u=t.method,c=t.success,s=t.fail,l=t.complete,d=null===(n=e.minip)||void 0===n?void 0:n.request({url:i,data:r,header:o,headers:o,timeout:a,method:u,success:c,fail:s,complete:l}),f=setTimeout((function(){(null==d?void 0:d.abort)&&D(null==d?void 0:d.abort)&&(null==d||d.abort()),clearTimeout(f),f=null}),(a||1e4)+10);return d},this.settedTitle={},this.jingTrackInstance.emitter.on(Ca,(function(){Promise.allSettled([e.getSystemInfo(),e.getNetworkType()]).then((function(){e.jingTrackInstance.emitter.emit(Oa)}))})),this.proxySetNavigationBarTitle()},Ba=["tap","longpress","longtap","getuserinfo","getphonenumber","contact"],Ha=["blur","change","confirm"],Ra=["submit","reset"],za=i(i(i([],Ba,!0),Ha,!0),Ra,!0),Ga={appLaunch:"onLaunch",appShow:"onShow",appHide:"onHide"},Ja={pageLoad:"onLoad",pageShow:"onShow",pageHide:"onHide",pageUnload:"onUnload",tabTap:"onTabItemTap",shareApp:"onShareAppMessage",shareTime:"onShareTimeline",addFavorites:"onAddToFavorites"},Wa=Object.values(Ga),Ka=Object.values(Ja),$a={appHandlers:i(i([],Wa,!0),["onError","onPageNotFound","onUnhandledRejection","onThemeChange"],!1),pageHandlers:i(i([],Ka,!0),["onReady","onUnload","onRouteDone","onPullDownRefresh","onReachBottom","onPageScroll","onResize","onSaveExitState"],!1),appListenerList:Wa,pageListenerList:Ka,actionListenerList:za,listeners:{app:Ga,page:Ja,actions:{click:Ba,change:Ha,submit:Ra}},originalApp:Na((function(){return App})),originalPage:Na((function(){return Page})),originalComponent:Na((function(){return Component})),originalBehavior:Na((function(){return Behavior}))},Qa=function(t,e){var n;return(null==t?void 0:t.pixelRatio)?Math.round(t[e]*t.pixelRatio):null!==(n=null==t?void 0:t[e])&&void 0!==n?n:0},Ya=function(t){return"".concat(null==t?void 0:t.brand," / ").concat(null==t?void 0:t.model)},Za=function(){function t(t){var e=this;this.jingTrackInstance=t,this.generateSnapshot=function(){var t=e.jingTrackInstance.currentPage;return{title:t.title,url:t.path,referer:t.referer}},this.getFrontId=function(t,n){var i,r,o=e.jingTrackInstance.currentPage,a=t.originEventName?t.originEventName:t.action_code,u="".concat(null!==(i=null==n?void 0:n.url)&&void 0!==i?i:o.path,"_").concat(a),c=null===(r=null==t?void 0:t.data_set)||void 0===r?void 0:r[ea.JINGTRACK_ELEMENT_ID];return c&&(u="".concat(u,"_").concat(c)),encodeURIComponent(u)},this.visualContextBuilder=function(t,n){var i,r,o,a,u,c,s,l,d,f=e.jingTrackInstance.currentPage,p=null!==(i=t.track_type)&&void 0!==i?i:"";return{action_code:t.action_code,event_name:null!==(r=t.originEventName)&&void 0!==r?r:"",front_id:p===ba?"":e.getFrontId(t,n),url:null!==(o=null==n?void 0:n.url)&&void 0!==o?o:f.path,title:null!==(a=null==n?void 0:n.title)&&void 0!==a?a:f.title,element_content:null!==(u=t.element_content)&&void 0!==u?u:"",element_related_content:null!==(c=t.element_related_content)&&void 0!==c?c:"",data_set:null!==(s=t.data_set)&&void 0!==s?s:{},page_data:null!==(l=t.page_data)&&void 0!==l?l:{},track_type:p,identity_data:e.getIdentityData(t),extra_data:null!==(d=t.extra_data)&&void 0!==d?d:{}}},this.normalContextBuilder=function(t,n){var i,r,o,a,u,c,s,l,d=e.jingTrackInstance,f=d.version,p=d.options,v=d.minipInstance,h=d.userStore,g=d.currentPage,_=v.systemInfo,y=e.getIdentityData(t);return{action_code:t.action_code,version:f,entity_uuid:null!==(i=p.jingTrackUuid)&&void 0!==i?i:"",entity_type:"jingtrack_mini_program",action_category:"jingtrack_mp",visitor_uuid:null!==(r=h.visitor_id)&&void 0!==r?r:"",session_uuid:null!==(o=h.session_id)&&void 0!==o?o:"",is_new_session:h.useNewSession(),is_new_identity:e.judgeIsNewIdentity(y),identity_data:y,tags_id:e.parseEmptyArrToNull(t.tags_id),intent_tags_uuid:e.parseEmptyArrToNull(t.intent_tags_uuid),environment_data:{title:null!==(a=null==n?void 0:n.title)&&void 0!==a?a:g.title,url:null!==(u=null==n?void 0:n.url)&&void 0!==u?u:g.path,referer:null!==(c=null==n?void 0:n.referer)&&void 0!==c?c:g.referer,screen_width:Qa(_,"screenWidth"),screen_height:Qa(_,"screenHeight"),viewport_width:Qa(_,"windowWidth"),viewport_height:Qa(_,"windowHeight"),os:Ya(_),os_version:null!==(s=null==_?void 0:_.system)&&void 0!==s?s:"",platform_code:"wechat_miniprogram"},source_data:$n({},null==g?void 0:g.sourceData,t.source_data),extra_data:null!==(l=t.extra_data)&&void 0!==l?l:{}}},this.contextBuilder=function(t,n){return e.jingTrackInstance.reportMode===ta.visualization?e.visualContextBuilder(t,n):e.normalContextBuilder(t,n)},this.contextBuilderByPresetProperties=function(t){var n,i={},r=null!=t?t:{},o=r.identity_data,a=r.intent_tags_uuid,u=r.tags_id,c=r.source_data;if(se(o)&&(i.identity_data=o),se(a)&&(i.intent_tags_uuid=a),se(u)&&(i.tags_id=u),L(c)){var s=e.jingTrackInstance.currentPage;i.source_data=s.getSourceData(c),null===(n=null==i?void 0:i.source_data)||void 0===n||delete n.push_engine_channel_uuid}return i}}return t.prototype.getIdentityData=function(t){var e=this.jingTrackInstance.userStore;return t.identity_data?e.mergeIdentity(e.getIdentity(),t.identity_data):e.getIdentity()},t.prototype.judgeIsNewIdentity=function(t){var e=0,n=this.jingTrackInstance,i=n.userStore,r=n.minipInstance,o=[];try{o=JSON.parse(r.getStorageSync(i.visitor_id)||"[]")}catch(t){o=[]}var a=vo(t,o,Kr);if(!ur(a)){var u=i.mergeIdentity(o,a);r.setStorageSync(i.visitor_id,JSON.stringify(u)),e=1}return e},t.prototype.parseEmptyArrToNull=function(t){return!se(t)||ur(t)?null:t},t.prototype.mergeContext=function(){for(var t=this,e=[],n=0;arguments.length>n;n++)e[n]=arguments[n];return Yn.apply(void 0,i(i([{}],e,!1),[function(e,n,i){if("identity_data"===i&&se(e)&&se(n))return t.jingTrackInstance.userStore.mergeIdentity(e,n)}],!1))},t}();const Xa="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder;const tu="function"==typeof TextEncoder?new TextEncoder:void 0,eu=[].slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let e={};eu.forEach(((t,n)=>e[t]=n))})();const nu=String.fromCharCode.bind(String);"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const iu="function"==typeof btoa?t=>btoa(t):Xa?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,n,i,r,o="";const a=t.length%3;for(let a=0;a<t.length;){if((n=t.charCodeAt(a++))>255||(i=t.charCodeAt(a++))>255||(r=t.charCodeAt(a++))>255)throw new TypeError("invalid character found");e=n<<16|i<<8|r,o+=eu[e>>18&63]+eu[e>>12&63]+eu[e>>6&63]+eu[63&e]}return a?o.slice(0,a-3)+"===".substring(a):o},ru=Xa?t=>Buffer.from(t).toString("base64"):t=>{let e=[];for(let n=0,i=t.length;i>n;n+=4096)e.push(nu.apply(null,t.subarray(n,n+4096)));return iu(e.join(""))},ou=t=>{if(2>t.length)return 128>(e=t.charCodeAt(0))?t:2048>e?nu(192|e>>>6)+nu(128|63&e):nu(224|e>>>12&15)+nu(128|e>>>6&63)+nu(128|63&e);var e=65536+1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320);return nu(240|e>>>18&7)+nu(128|e>>>12&63)+nu(128|e>>>6&63)+nu(128|63&e)},au=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,uu=Xa?t=>Buffer.from(t,"utf8").toString("base64"):tu?t=>ru(tu.encode(t)):t=>iu(t.replace(au,ou)),cu=(t,e=!1)=>e?(t=>t.replace(/=/g,"").replace(/[+\/]/g,(t=>"+"==t?"-":"_")))(uu(t)):uu(t);var su,lu=function(e){var n=this;this.jingTrackInstance=e,this.queuesMaxLength=100,this.requestLimit=3,this.retryLimit=2,this.uploadInterval=1e3,this.requestTimeout=5e3,this.compressable=!0,this.setVisualModeWid=function(t){n.visualModeWid=t},this.getRequestURL=function(t){var e,i,r,o=null===(r=null===(i=n.jingTrackInstance)||void 0===i?void 0:i.options)||void 0===r?void 0:r.server,a=Ta[o];return((e={})[ta.normal]="".concat(null==a?void 0:a.VUE_APP_API_HOST,"/eventService/log"),e[ta.debug]="".concat(null==a?void 0:a.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(t,"/debug-report"),e[ta.visualization]="".concat(null==a?void 0:a.VUE_APP_CGI_API_HOST,"/bffapi/lead/jingTrackMiniprogram/").concat(t,"/track"),e)[n.jingTrackInstance.reportMode]},this.commitRequest=function(t){t.requestId="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})),n.requestQueue.push(t),n.trySendRequest()},this.trySendRequest=function(t){n.requestQueue.length>0&&n.requestingNum<n.requestLimit&&(t?n.preSendRequestProcessing():n.preRequestProcessingThrottle())},this.preSendRequestProcessing=function(){var t=n.requestQueue.splice(0,n.queuesMaxLength);ur(t)||n.sendRequest(t)},this.preRequestProcessingThrottle=function(t,e,n,i){var r;void 0===e&&(e=250);var o=0;return"boolean"!==ma(n)&&(i=t,t=n,n=void 0),function(){for(var a=[],u=0;arguments.length>u;u++)a[u]=arguments[u];var c=this,s=Date.now()-o;function l(){o=Date.now(),t.apply(c,a)}i&&!r&&l(),r&&clearTimeout(r),void 0===i&&s>e?l():!0!==n&&(r=setTimeout(i?function(){r=void 0}:l,void 0===i?e-s:e))}}(this.preSendRequestProcessing,this.uploadInterval,!1,!1),this.getRequestData=function(e){var i,r=n.jingTrackInstance,o=r.reportMode,a=r.userStore,u=e.map((function(e){var n=t({},e);return ya(n,"requestId"),n}));return o===ta.visualization?{trackData:u,wid:n.visualModeWid,visitor_id:null!==(i=a.visitor_id)&&void 0!==i?i:""}:{data:n.compressable?cu(JSON.stringify(u)):u}},this.sendRequest=function(t){qa.success("事件上报",{reportQueue:t}),n.requestingNum+=1;var e=n.jingTrackInstance.minipInstance,i=n.getRequestData(t),r=Xo(i)?"text/plain":"application/json";e.request({url:n.getRequestURL(n.jingTrackInstance.options.jingTrackUuid),header:{"content-type":r},method:"POST",timeout:n.requestTimeout,data:i,fail:function(e){[200,204].includes(e.code)||(n.requestFailFn(t),qa.error("上报失败,result: ",e))},complete:function(){n.requestingNum-=1,n.trySendRequest()}})},this.requestFailFn=function(t){var e=[];t.forEach((function(t){var i;n.retryIds[t.requestId]=(null!==(i=n.retryIds[t.requestId])&&void 0!==i?i:0)+1,n.retryIds[t.requestId]>n.retryLimit||e.push(t)})),ur(e)||setTimeout((function(){var t;(t=n.requestQueue).unshift.apply(t,e),n.trySendRequest()}),500)},this.requestQueue=[],this.retryIds={},this.requestingNum=0},du=((su={})[Oa]=!1,su[Ua]=!1,su[xa]=!1,su),fu=function(){function e(e){var n=this;this.jingTrackInstance=e,this.checkUploadConditions=function(t){Object.keys(du).forEach((function(e){t[e]&&(du[e]=!0)})),Object.values(du).every((function(t){return t}))&&(n.canUpload=!0)},this.pushToInterceptedEvents=function(t){var e=n.reportContextBuilder.generateSnapshot();n.interceptedEvents.push((function(){return n.preUploadProcessing(t,e)}))},this.releaseEventInspector=function(){n.interceptedEvents.forEach((function(t){return t()})),n.interceptedEvents=[]},this.commitEvent=function(t){try{var e=n.jingTrackInstance.options;if(ao(Sa,e.autotrack).includes(t.action_code))return;n.canUpload?n.preUploadProcessing(t):n.pushToInterceptedEvents(t)}catch(t){Va("commitEvent 方法执行出错",t)}},this.commitCustomEvent=function(e,i,r){if(Pa.includes(e))return qa.error("事件名称 ".concat(e," 为预置事件 code,请更换!"));var o=n.reportContextBuilder.mergeContext({extra_data:L(i)?i:{}},n.reportContextBuilder.contextBuilderByPresetProperties(r)),a=t({action_code:e,track_type:ba},o);n.commitEvent(a)},this.preUploadProcessing=function(t,e){try{var i=n.jingTrackInstance.reportMode,r=[t];if(i!==ta.visualization&&Pa.includes(t.action_code)&&(r=n.matchEventWithVisualEventList(t,e),ur(r)))return;r.forEach((function(t){var i=n.reportContextBuilder.contextBuilder(t,e);n.commitUpload(i)}))}catch(t){Va("preUploadProcessing 方法执行出错",t)}},this.parseValue=function(t,e){var n;return null!==(n="const"===t.type?t.value:Ko(e[t.source],t.value,""))&&void 0!==n?n:""},this.matchEventWithVisualEventList=function(t,e){var i=n.reportContextBuilder.getFrontId(t,e),r=n.visualEventList.filter((function(t){return t.front_id===i}));return ur(r)?t.action_code===Ea.click?[]:[t]:r.map((function(e){var i={};(e.properties||[]).forEach((function(e){i[e.name]=n.parseValue(e.value,t)}));var r=[];(e.identity_data||[]).forEach((function(e){var i,o,a=n.parseValue(e.identity_value,t);r.push({identity_value:a,identity_type:null!==(i=null==e?void 0:e.identity_type)&&void 0!==i?i:"",identity_channel_uuid:null!==(o=null==e?void 0:e.identity_channel_uuid)&&void 0!==o?o:""})}));var o=t.extra_data||{};return{action_code:e.action_code,identity_data:r,extra_data:$n({},o,i)}}))},this.commitUpload=function(t){n.uploader.commitRequest(t)},this.interceptedEvents=[],this.visualEventList=[],this.reportContextBuilder=new Za(this.jingTrackInstance),this.uploader=new lu(this.jingTrackInstance),this.jingTrackInstance.emitter.on(xa,(function(){var t;return n.checkUploadConditions(((t={})[xa]=!0,t))})),this.jingTrackInstance.emitter.on(Oa,(function(){var t;return n.checkUploadConditions(((t={})[Oa]=!0,t))})),this.jingTrackInstance.emitter.on(Ua,(function(){var t;return n.checkUploadConditions(((t={})[Ua]=!0,t))})),this.jingTrackInstance.emitter.on(La,(function(t){return void 0===t&&(t=[]),n.visualEventList=t}))}return Object.defineProperty(e.prototype,"canUpload",{get:function(){return this._canUpload},set:function(t){this._canUpload=!!t,this._canUpload&&this.releaseEventInspector()},enumerable:!1,configurable:!0}),e}(),pu={},vu={}.hasOwnProperty;function hu(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}function gu(t){try{return encodeURIComponent(t)}catch(t){return null}}pu.stringify=function(t,e){e=e||"";var n,i,r=[];for(i in"string"!=typeof e&&(e="?"),t)if(vu.call(t,i)){if((n=t[i])||null!=n&&!isNaN(n)||(n=""),i=gu(i),n=gu(n),null===i||null===n)continue;r.push(i+"="+n)}return r.length?e+r.join("&"):""},pu.parse=function(t){for(var e,n=/([^=?#&]+)=?([^&]*)/g,i={};e=n.exec(t);){var r=hu(e[1]),o=hu(e[2]);null===r||null===o||r in i||(i[r]=o)}return i};var _u=function(){function i(i){var r=this;this.jingTrackInstance=i,this.getVisitorId=function(){var t=r.jingTrackInstance.minipInstance,e=t.getStorageSync("jingVisitorUserId");return e||(e="jingWebFingerprint"+r.createVisitorId(),t.setStorageSync("jingVisitorUserId",e)),e},this.useNewSession=function(){var t=r.is_new_session;return t&&(r.is_new_session=!1),t},this.correctIdentify=function(t){for(var e,n,i,o,a=0,u=Object.values(na);a<t.length;){var c=t[a];u.includes(c.identity_type)&&c.identity_value?(c.identity_type===na.mp_openid&&(c.identity_channel_uuid=null!==(i=null===(n=null===(e=r.jingTrackInstance)||void 0===e?void 0:e.options)||void 0===n?void 0:n.jingTrackUuid)&&void 0!==i?i:""),t[a]={is_multi:0,identity_type:c.identity_type,identity_value:c.identity_value,identity_channel_uuid:null!==(o=c.identity_channel_uuid)&&void 0!==o?o:""},a++):t.splice(a,1)}},this.setIdentity=function(t){Na((function(){r.identity=r.mergeIdentity(r.identity,t)}))},this.setSilentIdentity=function(t){Na((function(){r.silentIdentity=r.mergeIdentity(r.silentIdentity,t)}))},this.removeIdentityItem=function(t){Na((function(){r.identity=r.identity.filter((function(e){return!t.includes(e.identity_type)}))}))},this.clearIdentity=function(){r.identity=[]},this.getIdentity=function(){return r.mergeIdentity(r.silentIdentity,r.identity)},this.mergeIdentity=function(t,e){try{if(!se(e))return t;r.correctIdentify(e);var n={};t.forEach((function(t){n[t.identity_type]=t})),e.forEach((function(t){n[t.identity_type]=t}));var i=[];for(var o in n)i.push(n[o]);return i}catch(t){Va("合并身份信息出错",t)}return t},this.mpLogin=function(){return e(r,void 0,void 0,(function(){var t;return n(this,(function(e){return t=this.jingTrackInstance.minipInstance,[2,new Promise((function(e,n){t.minip.login({success:function(t){return e(t)},fail:function(t){return n(t)}})}))]}))}))},this.silentGetOpenId=function(){return e(r,void 0,void 0,(function(){var t,e,i,r,o,a,u;return n(this,(function(n){switch(n.label){case 0:t=this.jingTrackInstance.jingApi,n.label=1;case 1:return n.trys.push([1,4,,5]),[4,this.mpLogin()];case 2:return e=n.sent().code,[4,t.getOpenID(e)];case 3:return(i=n.sent().data).openid&&this.setSilentIdentity([{identity_channel_uuid:null!==(u=null===(a=null===(o=this.jingTrackInstance)||void 0===o?void 0:o.options)||void 0===a?void 0:a.jingTrackUuid)&&void 0!==u?u:"",identity_type:na.mp_openid,identity_value:i.openid}]),i.unionid&&this.setSilentIdentity([{identity_channel_uuid:"",identity_type:na.wechat_unionid,identity_value:i.unionid}]),i.openid||qa.warn("获取 open_id 失败",i),[3,5];case 4:return r=n.sent(),Va("静默获取 open_id 出错!funcName: silentGetOpenId",r),[3,5];case 5:return[2]}}))}))},this.generateUrlWithSession=function(e,n){var i,o=((i={})[Aa]=r.session_id,i.jing_visitor_id=r.visitor_id,i),a=[na.wechat_unionid,na.mp_openid,na.wechat_openid,na.mobile,na.email,na.third_party],u=r.getIdentity(),c=null;if(a.includes(n)&&(c=u.find((function(t){return t.identity_type===n}))),!c){var s=a.find((function(t){return u.find((function(e){return e.identity_type===t}))}));c=u.find((function(t){return t.identity_type===s}))}return c&&(o.jing_identity_type=c.identity_type,o.jing_identity_value=c.identity_value,o.jing_identity_channel_uuid=c.identity_channel_uuid),function(e,n){void 0===n&&(n={});var i=e.indexOf("#"),r=i>-1?e.substring(i):"",o=i>-1?e.substring(0,i):e.substring(0),a=o.indexOf("?"),u=a>-1?o.substring(a):"",c=a>-1?o.substring(0,a):o.substring(0),s=t(t({},pu.parse(u)),n);return c+pu.stringify(s,"?")+r}(e,o)},this.visitor_id=this.getVisitorId();var o=this.jingTrackInstance.minipInstance.getLaunchOptionsSync().query;this.is_new_session=!1,this.session_id=o[Aa]||(this.is_new_session=!0)&&this.createSessionID(),this.identity=[],this.silentIdentity=[]}return i.prototype.createVisitorId=function(){for(var t=[],e="0123456789abcdef",n=0;36>n;n++)t[n]=e.substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]=e.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")},i.prototype.createSessionID=function(){for(var t="",e=0;16>e;e++){var n=16*Math.random()|0;t+=(.5>Math.random()?n:3&n|8).toString(16)}return t},i}(),yu=function(){function t(t){var e=this;this.jingTrackInstance=t,this.parsePage=function(t,n){var i,r,o,a=(null==t?void 0:t.route)||(null==t?void 0:t.__route__)||(null===(i=null==t?void 0:t.$page)||void 0===i?void 0:i.fullPath)||(null===(o=null===(r=e.jingTrackInstance)||void 0===r?void 0:r.minipInstance)||void 0===o?void 0:o.getCurrentPath())||"";e.query=e.getQuery(n),t.scene&&(e.scene=t.scene),e.path=a,e.pageEnterTime[e.path]=Date.now()},this.getQuery=function(t){return void 0===t&&(t={}),e.sourceData=e.getSourceData(t),t},this.getSourceData=function(t){var e=["scene_1","scene_2","scene_3","scene_4","scene_5","param_1","param_2","param_3","param_4","param_5","utm_source","utm_medium","utm_campaign","utm_term","utm_content","push_engine_channel_uuid"],n={};for(var i in t)e.includes(i)&&(n[i]=t[i]);return n},this.referer="",this.path="",this.query={},this.pageEnterTime={},this.sourceData={}}return Object.defineProperty(t.prototype,"path",{get:function(){return this._path},set:function(t){this._path!==t&&(this.referer=this._path),this._path=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this.jingTrackInstance.minipInstance.getPageTitle()},enumerable:!1,configurable:!0}),t}(),mu=function(){function t(t){var e=this;this.jingTrackInstance=t,this.main=function(t,n,i){var r,o,a=e.jingTrackInstance,u=a.options,c=a.platformConfig,s=a.plugins;n&&"autoplay"!==Ko(t,"detail.source")&&(u.taro&&["eh"].includes(n)||t.type===(null===(r=e.prevEvent)||void 0===r?void 0:r.type)&&10>Math.abs(Number(t.timeStamp)-Number(null===(o=e.prevEvent)||void 0===o?void 0:o.timeStamp))||(e.prevEvent=t,u.uniVue&&(n=null==s?void 0:s.jingTrackUniAppAdapter.getRealEventNameForVue2(n,t)),qa.plain("全埋点事件抓取, e.type: ".concat(t.type),{eventName:n,e:t,context:i}),c.actionListenerList.includes(t.type)&&e.buildClickEvent(t,n,i)))},this.buildClickEvent=function(t,n,i){var r,o,a,u,c=e.jingTrackInstance.reportMode,s=e.getElementDataset(t),l={action_code:Ea.click,originEventName:n,page_data:Fa(i),data_set:s},d=null!==(o=null===(r=null==t?void 0:t._relatedInfo)||void 0===r?void 0:r.anchorRelatedText)&&void 0!==o?o:"";c===ta.visualization?(l.element_content=e.getElementContent(t),l.element_related_content=d):l.extra_data={element_id:null!==(u=null===(a=null==t?void 0:t.currentTarget)||void 0===a?void 0:a.id)&&void 0!==u?u:"",element_content:e.getElementContent(t),element_related_content:d},e.jingTrackInstance.eventCenter.commitEvent(l)},this.prevEvent={}}return t.prototype.getElementDataset=function(t){var e,n=L(null===(e=null==t?void 0:t.currentTarget)||void 0===e?void 0:e.dataset)?t.currentTarget.dataset:{},i=["eventOpts"],r={};return Object.entries(n).forEach((function(t){var e=t[0],n=t[1];i.includes(e)||(r[e]=n)})),r},t.prototype.getElementContent=function(t){var e,n,i;return(null===(n=null===(e=null==t?void 0:t.currentTarget)||void 0===e?void 0:e.dataset)||void 0===n?void 0:n[ea.JINGTRACK_ELEMENT_CONTENT])||(null===(i=null==t?void 0:t._relatedInfo)||void 0===i?void 0:i.anchorTargetText)||""},t}();const bu={jingEventAutoTracking:{name:"jingEventAutoTracking",method:mu}};Object.freeze(bu);var ju=function(t){var e=this;this.jingTrackInstance=t,this.innerPluginInit=function(){Pr(bu).forEach((function(t){var n=bu[t],i=n.name,r=n.method;e.pluginItems.find((function(t){return t.name===i}))||e.pluginItems.push({name:i||t,method:r||function(){}})})),ur(e.pluginItems)||e.installAll()},this.installAll=function(){e.pluginItems.forEach((function(t){return e.install(t)}))},this.install=function(t){var n,i=t.name,r=t.options;if(null===(n=e.jingTrackInstance)||void 0===n?void 0:n.plugins[i])return qa.forceLog("重复加载插件 ".concat(i," 或插件重名,已跳过加载!"),"warn"),!1;try{return e.jingTrackInstance.plugins[i]=new t.method(e.jingTrackInstance,r),qa.forceLog("加载插件:".concat(i),"plain"),!0}catch(t){return Va("插件【".concat(i,"】加载异常"),t),!1}},this.uninstall=function(t){var n;ya(e.pluginItems,t);var i=ya(null===(n=e.jingTrackInstance)||void 0===n?void 0:n.plugins,t);return i||qa.forceLog("卸载插件 ".concat(t," 失败!"),"error"),i},this.uninstallAll=function(){e.pluginItems.forEach((function(t){return e.uninstall(t.name)}))},this.pluginItems=[]},Iu=function(t){var e=this;this.jingTrackInstance=t,this.main=function(t,n){var i,r,o,a=e.jingTrackInstance,u=a.platformConfig,c=a.currentPage;if(!a.minipHooks.shareOut){qa.plain("app ".concat(t," 事件触发"),{eventName:t,args:n});var s=ka[t],l=u.listeners.app,d="App.".concat(t);switch(t){case l.appLaunch:case l.appShow:e.enterTime=Date.now();var f={route:(null===(i=null==n?void 0:n[0])||void 0===i?void 0:i.path)||"",scene:null===(r=null==n?void 0:n[0])||void 0===r?void 0:r.scene},p=(null===(o=null==n?void 0:n[0])||void 0===o?void 0:o.query)||{};c.parsePage(f,p),e.buildAppActiveEvent(s,d);break;case l.appHide:e.buildAppCloseEvent(s,d)}}},this.buildAppActiveEvent=function(t,n){var i=e.jingTrackInstance,r=i.reportMode,o=i.currentPage,a={action_code:t,originEventName:n};r!==ta.visualization&&(a.extra_data={scene:o.scene,query:pu.stringify(o.query)}),e.jingTrackInstance.eventCenter.commitEvent(a)},this.buildAppCloseEvent=function(t,n){var i={action_code:t,originEventName:n};e.jingTrackInstance.reportMode!==ta.visualization&&(i.extra_data={duration:(Date.now()-e.enterTime)/1e3}),e.jingTrackInstance.eventCenter.commitEvent(i)}},Tu=function(){function e(e){var n=this;this.jingTrackInstance=e,this.main=function(t,e,i){var r,o,a,u,c,s,l=n.jingTrackInstance,d=l.platformConfig,f=l.currentPage,p=l.minipHooks,v=l.minipInstance;qa.plain("page ".concat(e," 事件触发"),{page:t,eventName:e,args:i});var h=t.route||t.__route__||(null===(r=null==t?void 0:t.$page)||void 0===r?void 0:r.fullPath)||"",g=wa[e],_=d.listeners.page,y="Page.".concat(e);switch(e){case _.pageShow:if(!p.shareOut){var m=Ko(t,"options")||Ko(t,"__displayReporter.query")||Ko(t,"$page.query")||Ko(t,"$wx.__displayReporter.query");n.pageQuery[h]=m,f.parsePage(t,n.pageQuery[h]||{}),n.buildVisitOrFavoriteEvent(g,y,t)}p.shareOut=!1;break;case _.pageHide:case _.pageUnload:p.shareOut||n.buildPageCloseEvent(g,y,t),e===_.pageUnload&&v.removeSettedTitleItem(h);break;case _.shareApp:case _.shareTime:var b=e===_.shareApp;b&&(p.shareOut=!0);var j={isShareApp:b,from:(null===(o=null==i?void 0:i[0])||void 0===o?void 0:o.from)||"",sharePath:b&&(null===(a=null==i?void 0:i[1])||void 0===a?void 0:a.path)||"",query:b?{}:null===(u=null==i?void 0:i[1])||void 0===u?void 0:u.query};n.buildShareAppEvent(g,y,j,t);break;case _.addFavorites:n.buildVisitOrFavoriteEvent(g,y,t);break;case _.tabTap:var I=(null==i?void 0:i[0])||{},T={text:null!==(c=null==I?void 0:I.text)&&void 0!==c?c:"",originEventName:"".concat(e,"_").concat(null!==(s=null==I?void 0:I.index)&&void 0!==s?s:"")};n.buildTabClickEvent(T,t)}},this.buildPageCloseEvent=function(t,e,i){var r=n.jingTrackInstance,o=r.reportMode,a=r.currentPage,u={action_code:t,originEventName:e,page_data:Fa(i)};if(o!==ta.visualization){var c=a.pageEnterTime[a.path]||Date.now();u.extra_data={scene:a.scene,query:pu.stringify(a.query),page_duration:(Date.now()-c)/1e3}}n.jingTrackInstance.eventCenter.commitEvent(u)},this.buildShareAppEvent=function(e,i,r,o){var a,u=n.jingTrackInstance,c=u.reportMode,s=u.currentPage,l={action_code:e,originEventName:i,page_data:Fa(o)};c!==ta.visualization&&(l.extra_data={scene:s.scene,from:null!==(a={menu:"右上角转发菜单",button:"页面内转发按钮"}[r.from])&&void 0!==a?a:"",query:pu.stringify(t(t({},s.query),r.query)),share_type:r.isShareApp?"好友列表":"朋友圈"},r.isShareApp&&(l.extra_data.share_path=r.sharePath)),n.jingTrackInstance.eventCenter.commitEvent(l)},this.buildTabClickEvent=function(t,e){var i=n.jingTrackInstance.reportMode,r={action_code:Ea.click,originEventName:t.originEventName,page_data:Fa(e)};i!==ta.visualization?r.extra_data={element_id:"",element_content:t.text,element_related_content:""}:r.element_content=t.text,n.jingTrackInstance.eventCenter.commitEvent(r)},this.pageQuery={}}return e.prototype.buildVisitOrFavoriteEvent=function(t,e,n){var i=this.jingTrackInstance,r=i.reportMode,o=i.currentPage,a={action_code:t,originEventName:e,page_data:Fa(n)};r!==ta.visualization&&(a.extra_data={scene:o.scene,query:pu.stringify(o.query)}),this.jingTrackInstance.eventCenter.commitEvent(a)},e}(),ku=function(t,e){return D(e)&&"constructor"!==t},wu=function(i){var r=this;this.jingTrackInstance=i,this.setAppEffectCbs=function(){var t=r.jingTrackInstance.platformConfig.appHandlers,e=r;t.forEach((function(t){r.defAppCbs[t]=function(){for(var n=[],i=0;arguments.length>i;i++)n[i]=arguments[i];e.appEffects.main(t,n)}}))},this.setPageEffectCbs=function(){var t=r.jingTrackInstance.platformConfig.pageHandlers,e=r;t.forEach((function(t){r.defPageCbs[t]=function(){for(var n=[],i=0;arguments.length>i;i++)n[i]=arguments[i];e.pageEffects.main(this,t,n)}}))},this.lifeFcEffects=function(i,o,a){var u=r;return["onShareTimeline","onAddToFavorites"].includes(i)?function(){for(var t,e,n,r=[],c=0;arguments.length>c;c++)r[c]=arguments[c];var s=o.apply(this,r);try{var l=[].slice.call(r);s&&l.push(s),null===(n=null===(e=null===(t=u["def".concat(a,"Cbs")])||void 0===t?void 0:t[i])||void 0===e?void 0:e.apply)||void 0===n||n.call(e,this,l)}catch(t){Va("lifeFcEffects 方法执行出错",t)}return s}:function(){for(var r,c,s,l,d=[],f=0;arguments.length>f;f++)d[f]=arguments[f];return e(this,void 0,void 0,(function(){var f,p,v,h,g;return n(this,(function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),"onShareAppMessage"!==i?[3,3]:[4,o.apply(this,d)];case 1:return f=null!==(r=_.sent())&&void 0!==r?r:{},"promise"!==ma(f.promise)?[3,3]:(p=function(){return e(this,void 0,void 0,(function(){var e;return n(this,(function(n){return e=f,[2,new Promise((function(n){var i=setTimeout((function(){n(t({},e)),clearTimeout(i),i=null}),3e3);f.promise.then((function(r){n(t({},e=r)),clearTimeout(i),i=null}))}))]}))}))},v=[t({},f)],[4,p()]);case 2:f=t.apply(void 0,v.concat([_.sent()])),ya(f,"promise"),_.label=3;case 3:return h=[].slice.call(d),f&&h.push(f),null===(l=null===(s=null===(c=u["def".concat(a,"Cbs")])||void 0===c?void 0:c[i])||void 0===s?void 0:s.apply)||void 0===l||l.call(s,this,h),[3,5];case 4:return g=_.sent(),Va("".concat(a," 生命周期 ").concat(i," 副作用方法执行出错!funcName: lifeFcEffects"),g),[3,5];case 5:return"onShareAppMessage"!==i&&(f=o.apply(this,d)),[2,f]}}))}))}},this.customFcEffects=function(t,e,n){var i=r.jingTrackInstance.platformConfig.actionListenerList,o=r;return function(){for(var r,a,u,c,s=[],l=0;arguments.length>l;l++)s[l]=arguments[l];if(null===(a=null===(r=o.jingTrackInstance)||void 0===r?void 0:r.plugins)||void 0===a?void 0:a.jingEventAutoTracking)try{var d=s[0]||{};da(d,"type")&&((null==d?void 0:d.currentTarget)||(null==d?void 0:d.target))||(d=s[s.length-1]),((null==d?void 0:d.currentTarget)||(null==d?void 0:d.target))&&i.includes(d.type)&&(D(o.actionEffects)||(o.actionEffects=(null===(c=null===(u=o.jingTrackInstance.plugins)||void 0===u?void 0:u.jingEventAutoTracking)||void 0===c?void 0:c.main)||function(){}),null==o||o.actionEffects(d,t,null!=n?n:this))}catch(t){Va("customFcEffects 方法执行出错",t)}return e.apply(this,s)}},this.appApplyProxy=function(t,e){var n=r.jingTrackInstance.platformConfig,i=n.appHandlers;return n.appListenerList.includes(t)?r.lifeFcEffects(t,e,"App"):i.includes(t)?e:r.customFcEffects(t,e)},this.pageApplyProxy=function(t,e){var n=r.jingTrackInstance.platformConfig,i=n.pageHandlers;return n.pageListenerList.includes(t)?r.lifeFcEffects(t,e,"Page"):i.includes(t)?e:r.customFcEffects(t,e)},this.customApplyProxy=function(t,e){return r.customFcEffects(t,e)},this.objectTraverse=function(t,e){Object.getOwnPropertyNames(t).forEach((function(n){return e(n,t)}))},this.supLifeFcs=function(t,e){var n=r.jingTrackInstance.platformConfig;se(n["".concat(e,"ListenerList")])&&n["".concat(e,"ListenerList")].forEach((function(e){D(t[e])||["onShareAppMessage","onShareTimeline"].includes(e)||(t[e]=function(){})}))},this.appOverriding=function(t){return r.setAppEffectCbs(),r.supLifeFcs(t,"app"),r.objectTraverse(t,(function(t,e){ku(t,e[t])&&(e[t]=r.appApplyProxy(t,e[t]))})),t},this.pageOverriding=function(t){return r.setPageEffectCbs(),r.supLifeFcs(t,"page"),r.objectTraverse(t,(function(t,e){ku(t,e[t])&&(e[t]=r.pageApplyProxy(t,e[t]))})),t},this.componentOverriding=function(t){var e=r.jingTrackInstance.options;return t.methods||(t.methods={}),e.uniVue&&(r.setPageEffectCbs(),r.supLifeFcs(t.methods,"page")),r.objectTraverse(t.methods,(function(t,n){ku(t,n[t])&&(n[t]=e.uniVue?r.pageApplyProxy(t,n[t]):r.customApplyProxy(t,n[t]))})),t},this.behaviorOverriding=function(t){return t.methods||(t.methods={}),r.objectTraverse(t.methods,(function(t,e){ku(t,e[t])&&(e[t]=r.customApplyProxy(t,e[t]))})),t},this.jingApp=function(t){return(0,r.jingTrackInstance.platformConfig.originalApp)(r.appOverriding(t))},this.jingPage=function(t){return(0,r.jingTrackInstance.platformConfig.originalPage)(r.pageOverriding(t))},this.jingComponent=function(t){return(0,r.jingTrackInstance.platformConfig.originalComponent)(r.componentOverriding(t))},this.jingBehavior=function(t){var e=r.jingTrackInstance.platformConfig.originalBehavior;return(void 0===e?function(){}:e)(r.behaviorOverriding(t))},this.nativeOverriding=function(t){void 0===t&&(t=["App","Page","Component","Behavior"]);var e=r;if(t.includes("App"))try{r.appHooked||(App=function(t){return e.jingApp(t)},r.appHooked=!0)}catch(t){Va("App 代理出错",t)}if(t.includes("Page"))try{r.pageHooked||(Page=function(t){return e.jingPage(t)},r.pageHooked=!0)}catch(t){Va("Page 代理出错",t)}if(t.includes("Component"))try{r.componentHooked||(Component=function(t){return e.jingComponent(t)},r.componentHooked=!0)}catch(t){Va("Component 代理出错",t)}if(t.includes("Behavior"))try{r.behaviorHooked||(Behavior=function(t){return e.jingBehavior(t)},r.behaviorHooked=!0)}catch(t){Va("Behavior 代理出错",t)}},this.shareOut=!1,this.defAppCbs={},this.defPageCbs={},this.appEffects=new Iu(this.jingTrackInstance),this.pageEffects=new Tu(this.jingTrackInstance)},Eu=function(){function t(t){var r=this;this.jingTrackInstance=t,this.request=function(t){return new Promise((function(e,n){r.jingTrackInstance.minipInstance.request({url:t.url,method:t.method,data:t.data,fail:function(t){qa.error("请求失败!",t),n(t)},complete:function(t){var i,r;200===t.statusCode&&0===(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.code)?e(t.data):n((null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.message)||t)}})}))},this.getServer=function(){var t,e,n,i=null===(e=null===(t=r.jingTrackInstance)||void 0===t?void 0:t.options)||void 0===e?void 0:e.server;return null!==(n=Ta[i])&&void 0!==n?n:{}},this.initJingTrack=function(){return e(r,void 0,void 0,(function(){var t;return n(this,(function(e){switch(e.label){case 0:return t=this.getServer(),[4,this.request({url:"".concat(null==t?void 0:t.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/init"),method:"GET"})];case 1:return[2,e.sent()]}}))}))},this.getOpenID=function(t){return e(r,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return e=this.getServer(),[4,this.request({url:"".concat(null==e?void 0:e.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/get-openid"),method:"POST",data:{js_code:t}})];case 1:return[2,n.sent()]}}))}))},this.getVisualEvents=function(){return e(r,void 0,void 0,(function(){var t;return n(this,(function(e){switch(e.label){case 0:return t=this.getServer(),[4,this.request({url:"".concat(null==t?void 0:t.VUE_APP_CGI_API_HOST,"/contact/jingtrack/track/mp/").concat(this.jingTrackUuid,"/visual-events"),method:"GET"})];case 1:return[2,e.sent()]}}))}))},this.checkViewConnect=function(t){return e(r,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return e=this.getServer(),[4,this.request({url:"".concat(null==e?void 0:e.VUE_APP_CGI_API_HOST,"/bffapi/lead/jingTrackMiniprogram/").concat(this.jingTrackUuid,"/checkViewConnect"),method:"POST",data:t})];case 1:return[2,n.sent()]}}))}))},this.pollingCheckViewConnect=function(t){var i=0;return new Promise((function(o,a){var u=function(){return e(r,void 0,void 0,(function(){var e,r,c,s,l,d,f;return n(this,(function(n){switch(n.label){case 0:i++,n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,this.checkViewConnect(t)];case 2:return e=n.sent().data,r=e.status,c=e.wid,s=void 0===c?"":c,0===r||1===r?(1===r&&(this.jingTrackInstance.reportMode=ta.visualization,null===(f=null===(d=this.jingTrackInstance)||void 0===d?void 0:d.eventCenter)||void 0===f||f.uploader.setVisualModeWid(s)),o(r)):i>60||setTimeout((function(){u()}),2e3),[3,5];case 3:return l=n.sent(),a(l),[3,5];case 4:return 1===i&&this.jingTrackInstance.emitter.emit("FIRST_CHECK_VISUAL"),[7];case 5:return[2]}}))}))};u()}))},this.getJINGConfig=function(t){return e(r,void 0,void 0,(function(){var e,r,o,a,u,c,s,l;return n(this,(function(n){switch(n.label){case 0:return e=i([this.initJingTrack(),this.getVisualEvents()],t,!0),[4,Promise.allSettled(e)];case 1:if(r=n.sent(),o=r[0],a=r[1],"fulfilled"!==o.status)throw Error(o.reason);return this.jingTrackInstance.options.appId=null!==(s=null===(c=null===(u=null==o?void 0:o.value)||void 0===u?void 0:u.data)||void 0===c?void 0:c.app_id)&&void 0!==s?s:"","fulfilled"===a.status&&this.jingTrackInstance.emitter.emit(La,(null===(l=null==a?void 0:a.value)||void 0===l?void 0:l.data)||[]),[2]}}))}))}}return Object.defineProperty(t.prototype,"jingTrackUuid",{get:function(){var t,e;return null===(e=null===(t=null==this?void 0:this.jingTrackInstance)||void 0===t?void 0:t.options)||void 0===e?void 0:e.jingTrackUuid},enumerable:!1,configurable:!0}),t}(),Su=function(){function i(){var i,r=this;this.init=function(t){return e(r,void 0,void 0,(function(){var e,i,r,o,a,u,c,s,l,d,f=this;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),qa.forceLog("JingTrack 小程序 SDK 初始化中...","plain"),this.initOptions(t),this.initialized=!0,this.options.debug&&(this.reportMode=ta.debug,qa.setEnabled(!0)),e=this.options,i=e.uniVue,r=e.taro,i||r||this.minipHooks.nativeOverriding(),i&&(null===(c=null===(u=this.plugins)||void 0===u?void 0:u.jingTrackUniAppAdapter)||void 0===c||c.main()),r&&(null===(l=null===(s=this.plugins)||void 0===s?void 0:s.jingTrackTaroAdapter)||void 0===l||l.main()),!this.options.debug&&this.options.enableVisual?this.emitter.on(Oa,(function(){var t,e,n,i,r,o,a,u,c,s;f.jingApi.pollingCheckViewConnect({visitorId:f.userStore.visitor_id,device:null===(t=f.minipInstance.systemInfo)||void 0===t?void 0:t.model,os:null===(e=f.minipInstance.systemInfo)||void 0===e?void 0:e.system,wechatVersion:null===(n=f.minipInstance.systemInfo)||void 0===n?void 0:n.version,jingTrackVersion:f.version,uniVueVersion:null!==(o=null===(r=null===(i=f.options)||void 0===i?void 0:i.uniVue)||void 0===r?void 0:r.version)&&void 0!==o?o:"",taroVersion:Da(null===(a=f.options)||void 0===a?void 0:a.taro),taroVueVersion:null!==(s=null===(c=null===(u=f.options)||void 0===u?void 0:u.taroVue)||void 0===c?void 0:c.version)&&void 0!==s?s:""}).catch((function(t){Va("pollingCheckViewConnect 方法执行出错!",t)}))})):this.emitter.emit(Ua),o=[],this.options.silentGetOpenId&&o.push(this.userStore.silentGetOpenId()),[4,this.jingApi.getJINGConfig(o)];case 1:return n.sent(),qa.forceLog("JingTrack 小程序 SDK 初始化完成!",{jingTrackInstance:this},"success"),null===(d=this.emitter)||void 0===d||d.emit(xa,this),[2,!0];case 2:return a=n.sent(),Va("JingTrack init 方法执行出错",a),[2,!1];case 3:return[2]}}))}))},this.initOptions=function(e){var n,i=e.jingTrackUuid,o={};if(Pr(ja).forEach((function(t){var n=ja[t].type,i=se(n)?!n.includes(ma(e[t])):ma(e[t])!==ja[t].type;o[t]=i?ja[t].default:e[t]})),!Ta[o.server])throw Error("server 参数传入错误,请传入 ".concat(JSON.stringify(Object.keys(Ta))," 的一种!"));if("boolean"===ma(o.autotrack))o.autotrack=o.autotrack?Sa:[];else{var a="array"===ma(o.autotrack)?function(t){return o.autotrack.includes(t)}:function(t){return o.autotrack[t]};o.autotrack=Sa.filter(a)}var u=ao(Sa,o.autotrack);ur(u)||qa.forceLog("以下行为未开启全埋点: ",u,"warn"),r.options=t({jingTrackUuid:i,appId:""},o),null===(n=r.emitter)||void 0===n||n.emit(Ca,r)},this.track=function(t,e,n){r.eventCenter.commitCustomEvent(t,e,n)},this.identify=function(t,e){var n=[];t&&n.push({identity_type:na.mp_openid,identity_value:t}),e&&n.push({identity_type:na.wechat_unionid,identity_value:e}),r.setIdentity(n)};try{this.version="1.1.0",this.platform="wx",this.framework="native",this.platformConfig=$a,this.emitter={all:i=i||new Map,on:function(t,e){var n=i.get(t);n?n.push(e):i.set(t,[e])},off:function(t,e){var n=i.get(t);n&&(e?n.splice(n.indexOf(e)>>>0,1):i.set(t,[]))},emit:function(t,e){var n=i.get(t);n&&n.slice().map((function(t){t(e)})),(n=i.get("*"))&&n.slice().map((function(n){n(t,e)}))}},this.reportMode=ta.normal,this.minipInstance=new Ma(this),this.currentPage=new yu(this),this.plugins=new ju(this),this.jingApi=new Eu(this),this.userStore=new _u(this),this.eventCenter=new fu(this),this.minipHooks=new wu(this),this.plugins.innerPluginInit()}catch(t){Va("JingTrack 实例化失败",t)}}return Object.defineProperty(i.prototype,"setIdentity",{get:function(){return this.userStore.setIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"getIdentity",{get:function(){return this.userStore.getIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"removeIdentityItem",{get:function(){return this.userStore.removeIdentityItem},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"clearIdentity",{get:function(){return this.userStore.clearIdentity},enumerable:!1,configurable:!0}),Object.defineProperty(i.prototype,"generateUrlWithSession",{get:function(){return this.userStore.generateUrlWithSession},enumerable:!1,configurable:!0}),i}(),Pu=new Su,Au=function(e){for(var n=[],i=1;arguments.length>i;i++)n[i-1]=arguments[i];try{if(Xo(e)&&Ia.includes(e)&&Pu[e]){if("init"===e){if(Pu.initialized)return qa.forceLog("SDK 重复初始化,请检查是否重复加载 SDK !","warn"),!1;var r=n[0],o={};if(1===n.length)Xo(r)&&(o={jingTrackUuid:r});else if(2===n.length)if(Xo(r)&&L(n[1])){var a=n[1];o=t(t({},a),{jingTrackUuid:r})}else Xo(r)&&Xo(n[1])&&(o={appId:u=n[1],jingTrackUuid:r});else{var u=n[1];a=n[2],Xo(r)&&Xo(u)&&L(a)&&(o=t(t({},a),{appId:u,jingTrackUuid:r}))}if(ur(o))throw Error("初始化 SDK 失败。请使用 jingTrack('init', '您的 JingTrack 项目 ID', options) 初始化 SDK。");return Pu.init(o)}if(!Pu.initialized)throw Error("SDK 未初始化!请先调用 init 方法初始化 SDK。");return Pu[e].apply(Pu,n)}throw Error("不存在名为 ".concat(Vo(e)," 的方法调用!"))}catch(t){Va("JingTrack ".concat(e," 方法执行出错"),t)}};export{Au as default};
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@jingsocial/jingtrack-miniprogram-sdk",
3
+ "version": "1.1.0",
4
+ "description": "jingtrack 小程序版",
5
+ "main": "index.js",
6
+ "license": "ISC",
7
+ "miniprogram": "dist",
8
+ "keywords": [
9
+ "jingsocial",
10
+ "mininprogram",
11
+ "sdk"
12
+ ],
13
+ "files": [
14
+ "dist/*"
15
+ ],
16
+ "scripts": {
17
+ "local": "jing-microproject-env-generator local && ./bin/build/local.sh",
18
+ "build:wx": "jing-microproject-env-generator && ./bin/build/wx.sh",
19
+ "build:uniapp": "jing-microproject-env-generator && ./bin/build/uniapp.sh",
20
+ "build:taro": "jing-microproject-env-generator && ./bin/build/taro.sh",
21
+ "build:full": "jing-microproject-env-generator && ./bin/build/full.sh",
22
+ "build": "jing-microproject-env-generator && ./bin/build/all.sh",
23
+ "dev": "yarn build && jing-microproject-deploy --envPath ./dev.json",
24
+ "npmBuild": "jing-microproject-env-generator && ./bin/build/all.sh npmMode"
25
+ },
26
+ "devDependencies": {
27
+ "@babel/core": "^7.24.0",
28
+ "@babel/preset-env": "^7.24.0",
29
+ "@babel/preset-typescript": "^7.23.3",
30
+ "@jing/frontend_env_deploy": "^1.0.4",
31
+ "@rollup/plugin-alias": "^5.1.0",
32
+ "@rollup/plugin-babel": "^6.0.4",
33
+ "@rollup/plugin-commonjs": "^25.0.7",
34
+ "@rollup/plugin-node-resolve": "^15.2.3",
35
+ "@rollup/plugin-replace": "^5.0.5",
36
+ "@rollup/plugin-terser": "^0.4.4",
37
+ "@rollup/plugin-typescript": "^11.1.6",
38
+ "@typescript-eslint/eslint-plugin": "^7.1.0",
39
+ "@typescript-eslint/parser": "^7.1.0",
40
+ "babel-plugin-import-glob": "^2.0.0",
41
+ "chalk": "4.1.2",
42
+ "core-js": "3",
43
+ "dotenv": "^16.4.5",
44
+ "eslint": "^8.57.0",
45
+ "rollup": "2.79.1",
46
+ "rollup-plugin-filesize": "^10.0.0",
47
+ "tslib": "^2.6.2",
48
+ "typescript": "4.9.5"
49
+ },
50
+ "dependencies": {
51
+ "js-base64": "^3.7.7",
52
+ "lodash": "^4.17.21",
53
+ "mitt": "^3.0.1",
54
+ "querystringify": "^2.2.0"
55
+ }
56
+ }