visual-buried-point-platform-uni 2.0.4-alpha.12 → 2.0.4-alpha.13

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.
@@ -1 +1 @@
1
- function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var CryptoJS=_interopDefault(require("crypto-js")),MD5=_interopDefault(require("md5")),name="visual-buried-point-platform-uni",version="2.0.4-alpha.12",lsi="e7be6adc3c2456e6c2b5eb8ae3ef57c9#2.0.4-alpha.11",description="To make it easy for you to get started with GitLab, here's a list of recommended next steps.",main="dist/cjs/buried-point-uni.js",module$1="dist/esm/buried-point-uni.js",scripts={build:"rimraf dist && rollup -c --environment INCLUDE_DEPS,BUILD:production && node lsi-md5.cjs"},type="module",files=["dist"],repository={type:"git",url:""},keywords=[],author="",license="MIT",peerDependencies={md5:"2.3.0","crypto-js":"^4.2.0"},devDependencies={"@babel/core":"^7.26.10","@babel/preset-env":"^7.26.9","@rollup/plugin-json":"^6.0.1","babel-loader":"^10.0.0","babel-preset-es2015":"^6.24.1","crypto-js":"^4.2.0",md5:"2.3.0",rimraf:"^6.0.1",rollup:"^1.20.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2",webpack:"^5.72.1","webpack-cli":"^6.0.1"},pk={name:name,version:version,lsi:lsi,description:description,main:main,module:module$1,"umd:main":"dist/umd/buried-point-uni.js",scripts:scripts,type:type,files:files,repository:repository,keywords:keywords,author:author,license:license,peerDependencies:peerDependencies,devDependencies:devDependencies};let usrIdKey="v_userId",anonIdKey="v_anonId";function getWxMiniInfo(){var e=wx.getAccountInfoSync().miniProgram;return{name:"",packageName:e?e.appId:"",version:e?e.envVersion+e.version:"",carrier:"mini",ecology:"mini"}}function getWxMiniDeviceInfo(){var e=wx.getSystemInfoSync();let t={lang:e.language,brand:e.brand+" "+e.model,os:getOSNameFormat(e.platform),osVersion:e.system,resolution:e.screenWidth+"x"+e.screenHeight,browser:"",browserVersion:"",color:"",deviceId:"",deviceType:getWxMiniDeviceType(e.system),network:""};return wx.getNetworkType({success(e){t.network=e.networkType}}),t}function getWxMiniDeviceType(t){return["Windows","Linux","macOS"].every(e=>t.includes(e))?1:2}function randomUUID(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function getWxMiniUserId(){return wx.getStorageSync(usrIdKey)?wx.getStorageSync(usrIdKey):""}function getWxMiniAnonyMousId(){let e=wx.getStorageSync(anonIdKey);return e||(e=randomUUID(),wx.setStorageSync(anonIdKey,e)),e}let AUTOTRACKTYPE={ENTER:"enter",LOOP:"loop",LEAVE:"leave"},BPNPVUV="UNIBPNPVUVSrcData",BPNPVUVFail="UNIBPNPVUVFailData",BPNPVUVFailOnce="UBPNPVUVFailOnce",wxMini="wxMini",usrIdKey$1="v_userId",anonIdKey$1="v_anonId",Global={env:"",domain:"",busSegment:"",module:"",flushInterval:"",pageInterval:"",token:"",appData:null,deviceData:null,distinctId:"",anonymousId:"",version:"",trackId:"",platform:"",uAgent:"",upEventUrl:"",upTrackUrl:"",isCompatible:!0,signTrackArray:[]},pagesArray=[],visPagesArr=[];function isWXMiniProgram(){try{return"undefined"!=typeof wx&&wx.env&&wx.canIUse}catch(e){return!1}}function initGetTrackId(){var e=Date.now().toString();Global.trackId=e,visPagesArr=[],console.log("tId ",e)}let sdkTrackIdVal=()=>{var e;return Global.trackId||(e=Date.now().toString(),Global.trackId=e,visPagesArr=[],e)};function randomUUID$1(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function timeToStr(e){e=new Date(e);return e.getFullYear()+`-${e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1}-${e.getDate()<10?"0"+e.getDate():e.getDate()} ${e.getHours()<10?"0"+e.getHours():e.getHours()}:${e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()}:`+(e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds())}function getUniWebH5Info(e){var e=e.ua.toLowerCase(),t=window.location.hostname,n=document.title;/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);return e.includes("alipay")||e.includes("unionPay")||e.includes("onbuygz")||e.includes("onetravel"),e.includes("micromessenger")&&e.includes("miniprogram"),{name:n||"",packageName:t||"",version:"",carrier:"H5",ecology:"h5"}}function getUniWXInfo(){var e=uni.getAccountInfoSync(),t=uni.getAppBaseInfo();return{name:t.appName||"",packageName:e?e.miniProgram.appId:"",version:e?e.miniProgram.envVersion+e.miniProgram.version:"",carrier:"mini",ecology:"mini"}}function getUniAppInfo(t){var n=plus.runtime.version,n={name:t.appName,version:n||"",carrier:"unknown",packageName:"",ecology:""};if("android"===t.platform){let e=n.carrier="Android";var r=plus.android.runtimeMainActivity().getPackageName();t.romName.includes("HarmonyOS")&&(e="Harmony OS",n.carrier="Harmony OS"),n.packageName=r||"",n.ecology=e}else"ios"===t.platform?(r=plus.ios.importClass("NSBundle").mainBundle().bundleIdentifier(),n.packageName=r||"",n.carrier="iOS",n.ecology="iOS"):"harmonyos"===t.platform?(r=uni.getAppBaseInfo(),n.carrier="Harmony OS",n.ecology="Harmony OS",n.version=r.appVersion,n.packageName=r.packageName):n.ecology="unknown";return n}function getCurDeviceType(e){var t;return"web"===Global.platform?(t=e.ua.toLowerCase(),/(windows|win32|win64|wow64)/.test(t)?1:(/(linux|android)/.test(t)||/(macintosh|mac os x|iphone|ipad|ipod)/.test(t),2)):"pc"===e.deviceType?1:2}function getOSNameFormat(e){return"macos"===e.toLowerCase()?"macOS":"harmonyos"===e.toLowerCase()?"Harmony OS":"ios"===e.toLowerCase()?"iOS":"android"===e.toLowerCase()?"Android":"windows"===e.toLowerCase()?"Windows":"linux"===e.toLowerCase()?"Linux":"unknown"}function getDeviceInfo(e){return{lang:e.osLanguage||e.hostLanguage,brand:e.deviceBrand+" "+e.deviceModel,os:getOSNameFormat(e.osName),osVersion:e.osVersion,resolution:e.screenWidth+"x"+e.screenHeight,browser:e.browserName,browserVersion:e.browserVersion,color:"",deviceId:e.deviceId,deviceType:getCurDeviceType(e),network:""}}function getDeviceInfoError(){return{lang:"",brand:"",os:"",osVersion:"",resolution:"",browser:"",browserVersion:"",color:"",deviceId:"",deviceType:"",network:""}}function getTrackObj(e){var t=getCurrentPages(),n=t[t.length-1],r=Global.platform;let o="",a="",i="",l="";if("web"===r||"h5"===r?(o=window.location.href,a=window.location.hostname,document.referrer&&(r=new URL(document.referrer),i=r||"",l=r.hostname||"")):(o=n.route,i=(1<t.length?t[t.length-2]:n).route,a=Global.domain||n.route),n)return{path:n.route,busSegment:e.busSegment||0===e.busSegment?e.busSegment:"",module:e.module||0===e.module?e.module:"",properties:e.extend_param?JSON.stringify(e.extend_param):"",title:e.title||"",domain:a,url:o,visitPage:t.length,sourceDomain:l,sourceUrl:i,sendMode:e.sendMode}}function uUpdatePageExtraArray(e){var t=getCurrentPages();let n=t[t.length-1];t=pagesArray.findIndex(e=>e.path===n.route),e={path:n.route,properties:e.properties?JSON.stringify(e.properties):"",busSegment:e.busSegment||"",module:e.module||"",title:e.title||""};-1!==t?pagesArray[t]=e:pagesArray.push(e)}function isValidURL(e){return/^(https?:\/\/[^\s$.?#].[^\s]*)$/i.test(e)}function getUtmObj(){if("web"===Global.platform){var e=window.location.href;if(e&&!e.includes("file://")&&isValidURL(e)){var e=window.location.href.split("?")[1];if(e)return{utmSource:(e=new URLSearchParams(e)).get("utmSource")||"",utmCampaign:e.get("utmCampaign")||"",utmTerm:e.get("utmTerm")||"",utmContent:e.get("utmContent")||"",ctk:e.get("ctk")||""}}}return null}function insertPVUVData(e,t){let n=null;var r,o=(n=(Global.platform===wxMini?wx:uni).getStorageSync(BPNPVUV))?JSON.parse(n):[];0<o.length&&-1!==(r=o.findIndex(e=>e.uid===t))?o[r]={...o[r],...e}:o.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNPVUV,JSON.stringify(o))}function getBaseicInfo(){isWXMiniProgram()?(Global.platform=wxMini,Global.appData=getWxMiniInfo(),Global.deviceData=getWxMiniDeviceInfo(),Global.distinctId=getWxMiniUserId(),Global.anonymousId=getWxMiniAnonyMousId()):(uni.getSystemInfo({success:function(e){Global.uAgent=e.ua;var t,n=e.uniPlatform;n.includes("app")?(Global.platform=e.osName,Global.appData=getUniAppInfo(e),Global.platform="Harmony OS"):n.includes("web")||n.includes("h5")?(Global.platform="web",t=getUniWebH5Info(e),Global.appData={...t,version:Global.version||"unknown"}):n.includes("weixin")?(Global.platform="weixin",Global.appData=getUniWXInfo()):console.log("uni get platform getBaseicInfo error "),Global.deviceData=getDeviceInfo(e)},fail:function(e){Global.deviceData=getDeviceInfoError()},complete:function(){uni.getNetworkType({success(e){Global.deviceData.network=e.networkType}})}}),Global.distinctId=uni.getStorageSync(usrIdKey$1)||"",Global.anonymousId=uni.getStorageSync(anonIdKey$1),Global.anonymousId||(Global.anonymousId=randomUUID$1()),uni.setStorageSync(anonIdKey$1,Global.anonymousId))}let localLsi=pk.lsi,secretKey="jCfeIQH52pMcgNUQoXYA";function encryptData(e){return CryptoJS.HmacSHA256(e,secretKey).toString()}function commonData(e){return{app:Global.appData,data:e,device:Global.deviceData,lsi:localLsi,projectId:Global.token,userAgent:Global.uAgent||"",anonymousId:Global.anonymousId,userId:Global.distinctId}}function reportTrackEventServer(e,t,n){var r;e?(r={...r=commonData(t),dataAbstract:encryptData(JSON.stringify(r))},Global.platform===wxMini?wx.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?wx.setStorageSync(n,JSON.stringify(t)):wx.setStorageSync(n,"")},fail:function(e){console.error(e),wx.setStorageSync(n,JSON.stringify(t))}}):uni.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?uni.setStorageSync(n,JSON.stringify(t)):uni.setStorageSync(n,"")},fail:function(e){console.log("error: ",e),uni.setStorageSync(n,JSON.stringify(t))}})):console.error("please set upload data upType")}function queryTrackDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNPVUV),wx.setStorageSync(BPNPVUV,""),t=wx.getStorageSync(BPNPVUVFail),n=wx.getStorageSync(BPNPVUVFailOnce),wx):(e=uni.getStorageSync(BPNPVUV),uni.setStorageSync(BPNPVUV,""),t=uni.getStorageSync(BPNPVUVFail),n=uni.getStorageSync(BPNPVUVFailOnce),uni)).setStorageSync(BPNPVUVFailOnce,""),e?JSON.parse(e):[]),a=t?JSON.parse(t):[],i=n?JSON.parse(n):[];r.push(...o),r.push(...i),r.push(...a),r&&r.length&&(r.forEach(e=>{delete e.uid}),reportTrackEventServer("track",r,BPNPVUVFail))}function setReportUrl(e){return"test"!==e?{upEventApi:"https://buryingpoint.onebuygz.com/client/api/event",upTrackApi:"https://buryingpoint.onebuygz.com/client/api/track",eventListApi:"https://buryingpoint.onebuygz.com/api/event/query/eventList"}:{upEventApi:"https://buryingpoint.gcongo.com.cn/client/api/event",upTrackApi:"https://buryingpoint.gcongo.com.cn/client/api/track",eventListApi:"https://buryingpoint.gcongo.com.cn/api/event/query/eventList"}}let BPNEvent="UNIBPNEventSrcData",BPNEventFail="UNIBPNEventFailData",BPNEventFailOnce="UBPNEventFailOnce";function getCurPath(){var e=getCurrentPages(),e=e[e.length-1];return e?e.route:"/"}function eventCommonStore(e){var t=e.$page||"",n=t.path||getCurPath(),t={utm:e.$utm||getUtmObj(),duration:"",element:e.$element||null,eventId:e.$event_id||"",event:e.$event_code||"",groupId:"",busSegment:e.$busSegment||0===e.$busSegment?e.$busSegment:"",module:e.$module||0===e.$module?e.$module:"",page:{domain:t.domain||"",pageId:MD5(n),path:n||"",title:t.title||"",url:n||""},properties:e.$extend_param?JSON.stringify(e.$extend_param):"",traceId:"",trackId:sdkTrackIdVal(),triggerTime:timeToStr(Date.now())};1==e.$sendMode?reportTrackEventServer("event",[t],BPNEventFailOnce):insertEventData(t)}function insertEventData(e){let t;var n=(t=(Global.platform===wxMini?wx:uni).getStorageSync(BPNEvent))?JSON.parse(t):[];n.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNEvent,JSON.stringify(n))}function queryEventDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNEvent),wx.setStorageSync(BPNEvent,""),t=wx.getStorageSync(BPNEventFail),n=wx.getStorageSync(BPNEventFailOnce),wx):(e=uni.getStorageSync(BPNEvent),uni.setStorageSync(BPNEvent,""),t=uni.getStorageSync(BPNEventFail),n=uni.getStorageSync(BPNEventFailOnce),uni)).setStorageSync(BPNEventFailOnce,""),e?JSON.parse(e):[]),a=t?JSON.parse(t):[],i=n?JSON.parse(n):[];r.push(...o),r.push(...a),r.push(...i),r&&r.length&&reportTrackEventServer("event",r,BPNEventFail)}let startTime,enterTimeLong,loopTimeLong,umlInterval,cirtemp,mObj,cPUUId,sMode;function uStartTrackPVData(e){umlInterval&&uDestoryTrackPVData(),e&&(clearInterval(umlInterval),uTrackPVData(AUTOTRACKTYPE.ENTER,e),umlInterval=setInterval(()=>{uTrackPVData(AUTOTRACKTYPE.LOOP,null)},15e3))}function uDestoryTrackPVData(){mObj&&uTrackPVData(AUTOTRACKTYPE.LEAVE,null),clearInterval(umlInterval),umlInterval=null,sMode=null}function uTrackPVData(e,t){e===AUTOTRACKTYPE.ENTER?(mObj=null,cPUUId=0,cirtemp=1,startTime=0,enterTimeLong=-1,loopTimeLong=-1,enterTimeLong=Date.now(),loopTimeLong=enterTimeLong,cPUUId=randomUUID$1(),mObj=getTrackObj(t),sMode=mObj.sendMode,visPagesArr.push(mObj.path)):e===AUTOTRACKTYPE.LOOP?(cirtemp=2,startTime=15,loopTimeLong=Date.now()):e===AUTOTRACKTYPE.LEAVE&&(cirtemp=3,t=Math.max(1,(Date.now()-loopTimeLong)/1e3),startTime=Math.ceil(t));e={busSegment:mObj.busSegment,circulation:cirtemp,domain:mObj.domain,duration:startTime,module:mObj.module,path:mObj.path,properties:mObj.properties,sourceDomain:mObj.sourceDomain,sourceUrl:mObj.sourceUrl,title:mObj.title,traceId:"",trackId:sdkTrackIdVal(),url:mObj.url,visitPage:visPagesArr.length,visitTime:timeToStr(enterTimeLong),utm:getUtmObj(),uid:cPUUId};!0===sMode?reportTrackEventServer("track",[e],BPNPVUVFailOnce):insertPVUVData(e,cPUUId)}let uglInterval=null;function init(e){var t;e?(t=setReportUrl(e.env),Global.upEventUrl=t.upEventApi,Global.upTrackUrl=t.upTrackApi,initGetTrackId(),Object.assign(Global,e),getBaseicInfo(),startGlobalTime()):console.log("init config error, please check config!")}function startGlobalTime(){clearInterval(uglInterval),uglInterval=null,uglInterval=setInterval(()=>{queryEventDataUpload(),queryTrackDataUpload()},15e3)}function setUserId(e){e?(Global.distinctId=e,(Global.platform===wxMini?wx:uni).setStorageSync(usrIdKey$1,e)):(Global.distinctId="",Global.platform===wxMini?wx.setStorageSync(usrIdKey$1,e):uni.setStorageSync(usrIdKey$1,""))}function setCustomEvent(e){e&&eventCommonStore(e)}function onStartTrack(e){uStartTrackPVData(e)}function onDestroyTrack(){uDestoryTrackPVData()}function setPageExtraObj(e){uUpdatePageExtraArray(e)}exports.init=init,exports.onDestroyTrack=onDestroyTrack,exports.onStartTrack=onStartTrack,exports.setCustomEvent=setCustomEvent,exports.setPageExtraObj=setPageExtraObj,exports.setUserId=setUserId;
1
+ Object.defineProperty(exports,"__esModule",{value:!0});var name="visual-buried-point-platform-uni",version="2.0.4-alpha.13",lsi="27b7c8c90574db0aeb2e7a5f9b90c56d#2.0.4-alpha.12",description="To make it easy for you to get started with GitLab, here's a list of recommended next steps.",main="dist/cjs/buried-point-uni.js",module$1="dist/esm/buried-point-uni.js",scripts={build:"rimraf dist && rollup -c --environment INCLUDE_DEPS,BUILD:production && node lsi-md5.cjs"},type="module",files=["dist"],repository={type:"git",url:""},keywords=[],author="",license="MIT",peerDependencies={md5:"2.3.0","crypto-js":"^4.2.0"},devDependencies={"@babel/core":"^7.26.10","@babel/preset-env":"^7.26.9","@rollup/plugin-json":"^6.0.1","babel-loader":"^10.0.0","babel-preset-es2015":"^6.24.1","crypto-js":"^4.2.0",md5:"2.3.0",rimraf:"^6.0.1",rollup:"^1.20.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2",webpack:"^5.72.1","webpack-cli":"^6.0.1"},pk={name:name,version:version,lsi:lsi,description:description,main:main,module:module$1,"umd:main":"dist/umd/buried-point-uni.js",scripts:scripts,type:type,files:files,repository:repository,keywords:keywords,author:author,license:license,peerDependencies:peerDependencies,devDependencies:devDependencies};let usrIdKey="v_userId",anonIdKey="v_anonId";function getWxMiniInfo(){var e=wx.getAccountInfoSync().miniProgram;return{name:"",packageName:e?e.appId:"",version:e?e.envVersion+e.version:"",carrier:"mini",ecology:"mini"}}function getWxMiniDeviceInfo(){var e=wx.getSystemInfoSync();let t={lang:e.language,brand:e.brand+" "+e.model,os:getOSNameFormat(e.platform),osVersion:e.system,resolution:e.screenWidth+"x"+e.screenHeight,browser:"",browserVersion:"",color:"",deviceId:"",deviceType:getWxMiniDeviceType(e.system),network:""};return wx.getNetworkType({success(e){t.network=e.networkType}}),t}function getWxMiniDeviceType(t){return["Windows","Linux","macOS"].every(e=>t.includes(e))?1:2}function randomUUID(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function getWxMiniUserId(){return wx.getStorageSync(usrIdKey)?wx.getStorageSync(usrIdKey):""}function getWxMiniAnonyMousId(){let e=wx.getStorageSync(anonIdKey);return e||(e=randomUUID(),wx.setStorageSync(anonIdKey,e)),e}let AUTOTRACKTYPE={ENTER:"enter",LOOP:"loop",LEAVE:"leave"},BPNPVUV="UNIBPNPVUVSrcData",BPNPVUVFail="UNIBPNPVUVFailData",BPNPVUVFailOnce="UBPNPVUVFailOnce",wxMini="wxMini",usrIdKey$1="v_userId",anonIdKey$1="v_anonId",Global={env:"",domain:"",busSegment:"",module:"",flushInterval:"",pageInterval:"",token:"",appData:null,deviceData:null,distinctId:"",anonymousId:"",version:"",trackId:"",platform:"",uAgent:"",upEventUrl:"",upTrackUrl:"",isCompatible:!0,signTrackArray:[]},pagesArray=[],visPagesArr=[];function isWXMiniProgram(){try{return"undefined"!=typeof wx&&wx.env&&wx.canIUse}catch(e){return!1}}function initGetTrackId(){var e=Date.now().toString();Global.trackId=e,visPagesArr=[],console.log("tId ",e)}let sdkTrackIdVal=()=>{var e;return Global.trackId||(e=Date.now().toString(),Global.trackId=e,visPagesArr=[],e)};function randomUUID$1(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function timeToStr(e){e=new Date(e);return e.getFullYear()+`-${e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1}-${e.getDate()<10?"0"+e.getDate():e.getDate()} ${e.getHours()<10?"0"+e.getHours():e.getHours()}:${e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()}:`+(e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds())}function getUniWebH5Info(e){var e=e.ua.toLowerCase(),t=window.location.hostname,n=document.title;/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);return e.includes("alipay")||e.includes("unionPay")||e.includes("onbuygz")||e.includes("onetravel"),e.includes("micromessenger")&&e.includes("miniprogram"),{name:n||"",packageName:t||"",version:"",carrier:"H5",ecology:"h5"}}function getUniWXInfo(){var e=uni.getAccountInfoSync(),t=uni.getAppBaseInfo();return{name:t.appName||"",packageName:e?e.miniProgram.appId:"",version:e?e.miniProgram.envVersion+e.miniProgram.version:"",carrier:"mini",ecology:"mini"}}function getUniAppInfo(t){var n=plus.runtime.version,n={name:t.appName,version:n||"",carrier:"unknown",packageName:"",ecology:""};if("android"===t.platform){let e=n.carrier="Android";var r=plus.android.runtimeMainActivity().getPackageName();t.romName.includes("HarmonyOS")&&(e="Harmony OS",n.carrier="Harmony OS"),n.packageName=r||"",n.ecology=e}else"ios"===t.platform?(r=plus.ios.importClass("NSBundle").mainBundle().bundleIdentifier(),n.packageName=r||"",n.carrier="iOS",n.ecology="iOS"):"harmonyos"===t.platform?(r=uni.getAppBaseInfo(),n.carrier="Harmony OS",n.ecology="Harmony OS",n.version=r.appVersion,n.packageName=r.packageName):n.ecology="unknown";return n}function getCurDeviceType(e){var t;return"web"===Global.platform?(t=e.ua.toLowerCase(),/(windows|win32|win64|wow64)/.test(t)?1:(/(linux|android)/.test(t)||/(macintosh|mac os x|iphone|ipad|ipod)/.test(t),2)):"pc"===e.deviceType?1:2}function getOSNameFormat(e){return"macos"===e.toLowerCase()?"macOS":"harmonyos"===e.toLowerCase()?"Harmony OS":"ios"===e.toLowerCase()?"iOS":"android"===e.toLowerCase()?"Android":"windows"===e.toLowerCase()?"Windows":"linux"===e.toLowerCase()?"Linux":"unknown"}function getDeviceInfo(e){return{lang:e.osLanguage||e.hostLanguage,brand:e.deviceBrand+" "+e.deviceModel,os:getOSNameFormat(e.osName),osVersion:e.osVersion,resolution:e.screenWidth+"x"+e.screenHeight,browser:e.browserName,browserVersion:e.browserVersion,color:"",deviceId:e.deviceId,deviceType:getCurDeviceType(e),network:""}}function getDeviceInfoError(){return{lang:"",brand:"",os:"",osVersion:"",resolution:"",browser:"",browserVersion:"",color:"",deviceId:"",deviceType:"",network:""}}function getTrackObj(e){var t=getCurrentPages(),n=t[t.length-1],r=Global.platform;let o="",i="",a="",s="";if("web"===r||"h5"===r?(o=window.location.href,i=window.location.hostname,document.referrer&&(r=new URL(document.referrer),a=r||"",s=r.hostname||"")):(o=n.route,a=(1<t.length?t[t.length-2]:n).route,i=Global.domain||n.route),n)return{path:n.route,busSegment:e.busSegment||0===e.busSegment?e.busSegment:"",module:e.module||0===e.module?e.module:"",properties:e.extend_param?JSON.stringify(e.extend_param):"",title:e.title||"",domain:i,url:o,visitPage:t.length,sourceDomain:s,sourceUrl:a,sendMode:e.sendMode}}function uUpdatePageExtraArray(e){var t=getCurrentPages();let n=t[t.length-1];t=pagesArray.findIndex(e=>e.path===n.route),e={path:n.route,properties:e.properties?JSON.stringify(e.properties):"",busSegment:e.busSegment||"",module:e.module||"",title:e.title||""};-1!==t?pagesArray[t]=e:pagesArray.push(e)}function isValidURL(e){return/^(https?:\/\/[^\s$.?#].[^\s]*)$/i.test(e)}function getUtmObj(){if("web"===Global.platform){var e=window.location.href;if(e&&!e.includes("file://")&&isValidURL(e)){var e=window.location.href.split("?")[1];if(e)return{utmSource:(e=new URLSearchParams(e)).get("utmSource")||"",utmCampaign:e.get("utmCampaign")||"",utmTerm:e.get("utmTerm")||"",utmContent:e.get("utmContent")||"",ctk:e.get("ctk")||""}}}return null}function insertPVUVData(e,t){let n=null;var r,o=(n=(Global.platform===wxMini?wx:uni).getStorageSync(BPNPVUV))?JSON.parse(n):[];0<o.length&&-1!==(r=o.findIndex(e=>e.uid===t))?o[r]={...o[r],...e}:o.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNPVUV,JSON.stringify(o))}function getBaseicInfo(){isWXMiniProgram()?(Global.platform=wxMini,Global.appData=getWxMiniInfo(),Global.deviceData=getWxMiniDeviceInfo(),Global.distinctId=getWxMiniUserId(),Global.anonymousId=getWxMiniAnonyMousId()):(uni.getSystemInfo({success:function(e){Global.uAgent=e.ua;var t,n=e.uniPlatform;n.includes("app")?(Global.platform=e.osName,Global.appData=getUniAppInfo(e),Global.platform="Harmony OS"):n.includes("web")||n.includes("h5")?(Global.platform="web",t=getUniWebH5Info(e),Global.appData={...t,version:Global.version||"unknown"}):n.includes("weixin")?(Global.platform="weixin",Global.appData=getUniWXInfo()):console.log("uni get platform getBaseicInfo error "),Global.deviceData=getDeviceInfo(e)},fail:function(e){Global.deviceData=getDeviceInfoError()},complete:function(){uni.getNetworkType({success(e){Global.deviceData.network=e.networkType}})}}),Global.distinctId=uni.getStorageSync(usrIdKey$1)||"",Global.anonymousId=uni.getStorageSync(anonIdKey$1),Global.anonymousId||(Global.anonymousId=randomUUID$1()),uni.setStorageSync(anonIdKey$1,Global.anonymousId))}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e.default||e}var _nodeResolve_empty={},_nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty}),require$$0=getCjsExportFromNamespace(_nodeResolve_empty$1),core=createCommonjsModule(function(e,t){e.exports=(e=(u=>{var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),!(r=!(r=!(r="undefined"!=typeof globalThis&&globalThis.crypto?globalThis.crypto:r)&&"undefined"!=typeof window&&window.msCrypto?window.msCrypto:r)&&void 0!==commonjsGlobal&&commonjsGlobal.crypto?commonjsGlobal.crypto:r)&&"function"==typeof commonjsRequire)try{r=require$$0}catch(e){}var n=Object.create||function(e){return t.prototype=e,e=new t,t.prototype=null,e};function t(){}var e={},o=e.lib={},i=o.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var s=0;s<o;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=u.ceil(t/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push((()=>{if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")})());return new c.init(t,e)}}),a=e.enc={},s=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},l=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},p=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t,n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,a=o/(4*i),s=(a=e?u.ceil(a):u.max((0|a)-this._minBufferSize,0))*i,e=u.min(4*s,o);if(s){for(var l=0;l<s;l+=i)this._doProcessBlock(r,l);t=r.splice(0,s),n.sigBytes-=e}return new c.init(t,e)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(o.Hasher=d.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(n){return function(e,t){return new n.init(t).finalize(e)}},_createHmacHelper:function(n){return function(e,t){return new g.HMAC.init(n,t).finalize(e)}}}),e.algo={});return e})(Math),e)}),sha256=createCommonjsModule(function(e,t){e.exports=(e=>{var o=Math,t=e,n=t.lib,r=n.WordArray,i=n.Hasher,n=t.algo,a=[],f=[];function s(e){for(var t=o.sqrt(e),n=2;n<=t;n++)if(!(e%n))return;return 1}function l(e){return 4294967296*(e-(0|e))|0}for(var u=2,c=0;c<64;)s(u)&&(c<8&&(a[c]=l(o.pow(u,.5))),f[c]=l(o.pow(u,1/3)),c++),u++;var m=[],n=n.SHA256=i.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],p=0;p<64;p++){m[p]=p<16?0|e[t+p]:(((d=m[p-15])<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+m[p-7]+(((d=m[p-2])<<15|d>>>17)^(d<<13|d>>>19)^d>>>10)+m[p-16];var d=r&o^r&i^o&i,g=c+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&u)+f[p]+m[p],c=u,u=l,l=s,s=a+g|0,a=i,i=o,o=r,r=g+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+d)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+u|0,n[7]=n[7]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=o.floor(n/4294967296),t[15+(64+r>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});return t.SHA256=i._createHelper(n),t.HmacSHA256=i._createHmacHelper(n),e.SHA256})(core)}),hmac=createCommonjsModule(function(e,t){var n,s;e.exports=(n=(e=core).lib.Base,s=e.enc.Utf8,void(e.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));for(var n=e.blockSize,r=4*n,e=((t=t.sigBytes>r?e.finalize(t):t).clamp(),this._oKey=t.clone()),t=this._iKey=t.clone(),o=e.words,i=t.words,a=0;a<n;a++)o[a]^=1549556828,i[a]^=909522486;e.sigBytes=t.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,e=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(e))}})))}),hmacSha256=createCommonjsModule(function(e,t){e.exports=core.HmacSHA256});let localLsi=pk.lsi,secretKey="jCfeIQH52pMcgNUQoXYA";function encryptData(e){return hmacSha256(e,secretKey).toString()}function commonData(e){return{app:Global.appData,data:e,device:Global.deviceData,lsi:localLsi,projectId:Global.token,userAgent:Global.uAgent||"",anonymousId:Global.anonymousId,userId:Global.distinctId}}function reportTrackEventServer(e,t,n){var r;e?(r={...r=commonData(t),dataAbstract:encryptData(JSON.stringify(r))},Global.platform===wxMini?wx.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?wx.setStorageSync(n,JSON.stringify(t)):wx.setStorageSync(n,"")},fail:function(e){console.error(e),wx.setStorageSync(n,JSON.stringify(t))}}):uni.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?uni.setStorageSync(n,JSON.stringify(t)):uni.setStorageSync(n,"")},fail:function(e){console.log("error: ",e),uni.setStorageSync(n,JSON.stringify(t))}})):console.error("please set upload data upType")}function queryTrackDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNPVUV),wx.setStorageSync(BPNPVUV,""),t=wx.getStorageSync(BPNPVUVFail),n=wx.getStorageSync(BPNPVUVFailOnce),wx):(e=uni.getStorageSync(BPNPVUV),uni.setStorageSync(BPNPVUV,""),t=uni.getStorageSync(BPNPVUVFail),n=uni.getStorageSync(BPNPVUVFailOnce),uni)).setStorageSync(BPNPVUVFailOnce,""),e?JSON.parse(e):[]),i=t?JSON.parse(t):[],a=n?JSON.parse(n):[];r.push(...o),r.push(...a),r.push(...i),r&&r.length&&(r.forEach(e=>{delete e.uid}),reportTrackEventServer("track",r,BPNPVUVFail))}function setReportUrl(e){return"test"!==e?{upEventApi:"https://buryingpoint.onebuygz.com/client/api/event",upTrackApi:"https://buryingpoint.onebuygz.com/client/api/track",eventListApi:"https://buryingpoint.onebuygz.com/api/event/query/eventList"}:{upEventApi:"https://buryingpoint.gcongo.com.cn/client/api/event",upTrackApi:"https://buryingpoint.gcongo.com.cn/client/api/track",eventListApi:"https://buryingpoint.gcongo.com.cn/api/event/query/eventList"}}var crypt=createCommonjsModule(function(e){var i,n;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];0<e;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(i.charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&t.push((i.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|i.indexOf(e.charAt(n))>>>6-2*r);return t}},e.exports=n}),charenc={utf8:{stringToBytes:function(e){return charenc.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(charenc.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},charenc_1=charenc,isBuffer_1=function(e){return null!=e&&(isBuffer(e)||isSlowBuffer(e)||!!e._isBuffer)};function isBuffer(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&isBuffer(e.slice(0,0))}var md5=createCommonjsModule(function(e){function y(e,t){e.constructor==String?e=(t&&"binary"===t.encoding?S:v).stringToBytes(e):b(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=h.bytesToWords(e),t=8*e.length,r=1732584193,o=-271733879,i=-1732584194,a=271733878,s=0;s<n.length;s++)n[s]=16711935&(n[s]<<8|n[s]>>>24)|4278255360&(n[s]<<24|n[s]>>>8);n[t>>>5]|=128<<t%32,n[14+(64+t>>>9<<4)]=t;for(var l=y._ff,u=y._gg,c=y._hh,p=y._ii,s=0;s<n.length;s+=16){var d=r,g=o,f=i,m=a,r=l(r,o,i,a,n[s+0],7,-680876936),a=l(a,r,o,i,n[s+1],12,-389564586),i=l(i,a,r,o,n[s+2],17,606105819),o=l(o,i,a,r,n[s+3],22,-1044525330);r=l(r,o,i,a,n[s+4],7,-176418897),a=l(a,r,o,i,n[s+5],12,1200080426),i=l(i,a,r,o,n[s+6],17,-1473231341),o=l(o,i,a,r,n[s+7],22,-45705983),r=l(r,o,i,a,n[s+8],7,1770035416),a=l(a,r,o,i,n[s+9],12,-1958414417),i=l(i,a,r,o,n[s+10],17,-42063),o=l(o,i,a,r,n[s+11],22,-1990404162),r=l(r,o,i,a,n[s+12],7,1804603682),a=l(a,r,o,i,n[s+13],12,-40341101),i=l(i,a,r,o,n[s+14],17,-1502002290),r=u(r,o=l(o,i,a,r,n[s+15],22,1236535329),i,a,n[s+1],5,-165796510),a=u(a,r,o,i,n[s+6],9,-1069501632),i=u(i,a,r,o,n[s+11],14,643717713),o=u(o,i,a,r,n[s+0],20,-373897302),r=u(r,o,i,a,n[s+5],5,-701558691),a=u(a,r,o,i,n[s+10],9,38016083),i=u(i,a,r,o,n[s+15],14,-660478335),o=u(o,i,a,r,n[s+4],20,-405537848),r=u(r,o,i,a,n[s+9],5,568446438),a=u(a,r,o,i,n[s+14],9,-1019803690),i=u(i,a,r,o,n[s+3],14,-187363961),o=u(o,i,a,r,n[s+8],20,1163531501),r=u(r,o,i,a,n[s+13],5,-1444681467),a=u(a,r,o,i,n[s+2],9,-51403784),i=u(i,a,r,o,n[s+7],14,1735328473),r=c(r,o=u(o,i,a,r,n[s+12],20,-1926607734),i,a,n[s+5],4,-378558),a=c(a,r,o,i,n[s+8],11,-2022574463),i=c(i,a,r,o,n[s+11],16,1839030562),o=c(o,i,a,r,n[s+14],23,-35309556),r=c(r,o,i,a,n[s+1],4,-1530992060),a=c(a,r,o,i,n[s+4],11,1272893353),i=c(i,a,r,o,n[s+7],16,-155497632),o=c(o,i,a,r,n[s+10],23,-1094730640),r=c(r,o,i,a,n[s+13],4,681279174),a=c(a,r,o,i,n[s+0],11,-358537222),i=c(i,a,r,o,n[s+3],16,-722521979),o=c(o,i,a,r,n[s+6],23,76029189),r=c(r,o,i,a,n[s+9],4,-640364487),a=c(a,r,o,i,n[s+12],11,-421815835),i=c(i,a,r,o,n[s+15],16,530742520),r=p(r,o=c(o,i,a,r,n[s+2],23,-995338651),i,a,n[s+0],6,-198630844),a=p(a,r,o,i,n[s+7],10,1126891415),i=p(i,a,r,o,n[s+14],15,-1416354905),o=p(o,i,a,r,n[s+5],21,-57434055),r=p(r,o,i,a,n[s+12],6,1700485571),a=p(a,r,o,i,n[s+3],10,-1894986606),i=p(i,a,r,o,n[s+10],15,-1051523),o=p(o,i,a,r,n[s+1],21,-2054922799),r=p(r,o,i,a,n[s+8],6,1873313359),a=p(a,r,o,i,n[s+15],10,-30611744),i=p(i,a,r,o,n[s+6],15,-1560198380),o=p(o,i,a,r,n[s+13],21,1309151649),r=p(r,o,i,a,n[s+4],6,-145523070),a=p(a,r,o,i,n[s+11],10,-1120210379),i=p(i,a,r,o,n[s+2],15,718787259),o=p(o,i,a,r,n[s+9],21,-343485551),r=r+d>>>0,o=o+g>>>0,i=i+f>>>0,a=a+m>>>0}return h.endian([r,o,i,a])}var h,v,b,S;h=crypt,v=charenc_1.utf8,b=isBuffer_1,S=charenc_1.bin,y._ff=function(e,t,n,r,o,i,a){e=e+(t&n|~t&r)+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._gg=function(e,t,n,r,o,i,a){e=e+(t&r|n&~r)+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._hh=function(e,t,n,r,o,i,a){e=e+(t^n^r)+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._ii=function(e,t,n,r,o,i,a){e=e+(n^(t|~r))+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._blocksize=16,y._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);e=h.wordsToBytes(y(e,t));return t&&t.asBytes?e:t&&t.asString?S.bytesToString(e):h.bytesToHex(e)}});let BPNEvent="UNIBPNEventSrcData",BPNEventFail="UNIBPNEventFailData",BPNEventFailOnce="UBPNEventFailOnce";function getCurPath(){var e=getCurrentPages(),e=e[e.length-1];return e?e.route:"/"}function eventCommonStore(e){var t=e.$page||"",n=t.path||getCurPath(),t={utm:e.$utm||getUtmObj(),duration:"",element:e.$element||null,eventId:e.$event_id||"",event:e.$event_code||"",groupId:"",busSegment:e.$busSegment||0===e.$busSegment?e.$busSegment:"",module:e.$module||0===e.$module?e.$module:"",page:{domain:t.domain||"",pageId:md5(n),path:n||"",title:t.title||"",url:n||""},properties:e.$extend_param?JSON.stringify(e.$extend_param):"",traceId:"",trackId:sdkTrackIdVal(),triggerTime:timeToStr(Date.now())};1==e.$sendMode?reportTrackEventServer("event",[t],BPNEventFailOnce):insertEventData(t)}function insertEventData(e){let t;var n=(t=(Global.platform===wxMini?wx:uni).getStorageSync(BPNEvent))?JSON.parse(t):[];n.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNEvent,JSON.stringify(n))}function queryEventDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNEvent),wx.setStorageSync(BPNEvent,""),t=wx.getStorageSync(BPNEventFail),n=wx.getStorageSync(BPNEventFailOnce),wx):(e=uni.getStorageSync(BPNEvent),uni.setStorageSync(BPNEvent,""),t=uni.getStorageSync(BPNEventFail),n=uni.getStorageSync(BPNEventFailOnce),uni)).setStorageSync(BPNEventFailOnce,""),e?JSON.parse(e):[]),i=t?JSON.parse(t):[],a=n?JSON.parse(n):[];r.push(...o),r.push(...i),r.push(...a),r&&r.length&&reportTrackEventServer("event",r,BPNEventFail)}let startTime,enterTimeLong,loopTimeLong,umlInterval,cirtemp,mObj,cPUUId,sMode;function uStartTrackPVData(e){umlInterval&&uDestoryTrackPVData(),e&&(clearInterval(umlInterval),uTrackPVData(AUTOTRACKTYPE.ENTER,e),umlInterval=setInterval(()=>{uTrackPVData(AUTOTRACKTYPE.LOOP,null)},15e3))}function uDestoryTrackPVData(){mObj&&uTrackPVData(AUTOTRACKTYPE.LEAVE,null),clearInterval(umlInterval),umlInterval=null,sMode=null}function uTrackPVData(e,t){e===AUTOTRACKTYPE.ENTER?(mObj=null,cPUUId=0,cirtemp=1,startTime=0,enterTimeLong=-1,loopTimeLong=-1,enterTimeLong=Date.now(),loopTimeLong=enterTimeLong,cPUUId=randomUUID$1(),mObj=getTrackObj(t),sMode=mObj.sendMode,visPagesArr.push(mObj.path)):e===AUTOTRACKTYPE.LOOP?(cirtemp=2,startTime=15,loopTimeLong=Date.now()):e===AUTOTRACKTYPE.LEAVE&&(cirtemp=3,t=Math.max(1,(Date.now()-loopTimeLong)/1e3),startTime=Math.ceil(t));e={busSegment:mObj.busSegment,circulation:cirtemp,domain:mObj.domain,duration:startTime,module:mObj.module,path:mObj.path,properties:mObj.properties,sourceDomain:mObj.sourceDomain,sourceUrl:mObj.sourceUrl,title:mObj.title,traceId:"",trackId:sdkTrackIdVal(),url:mObj.url,visitPage:visPagesArr.length,visitTime:timeToStr(enterTimeLong),utm:getUtmObj(),uid:cPUUId};!0===sMode?reportTrackEventServer("track",[e],BPNPVUVFailOnce):insertPVUVData(e,cPUUId)}let uglInterval=null;function init(e){var t;e?(t=setReportUrl(e.env),Global.upEventUrl=t.upEventApi,Global.upTrackUrl=t.upTrackApi,initGetTrackId(),Object.assign(Global,e),getBaseicInfo(),startGlobalTime()):console.log("init config error, please check config!")}function startGlobalTime(){clearInterval(uglInterval),uglInterval=null,uglInterval=setInterval(()=>{queryEventDataUpload(),queryTrackDataUpload()},15e3)}function setUserId(e){e?(Global.distinctId=e,(Global.platform===wxMini?wx:uni).setStorageSync(usrIdKey$1,e)):(Global.distinctId="",Global.platform===wxMini?wx.setStorageSync(usrIdKey$1,e):uni.setStorageSync(usrIdKey$1,""))}function setCustomEvent(e){e&&eventCommonStore(e)}function onStartTrack(e){uStartTrackPVData(e)}function onDestroyTrack(){uDestoryTrackPVData()}function setPageExtraObj(e){uUpdatePageExtraArray(e)}exports.init=init,exports.onDestroyTrack=onDestroyTrack,exports.onStartTrack=onStartTrack,exports.setCustomEvent=setCustomEvent,exports.setPageExtraObj=setPageExtraObj,exports.setUserId=setUserId;
@@ -1 +1 @@
1
- import CryptoJS from"crypto-js";import MD5 from"md5";var name="visual-buried-point-platform-uni",version="2.0.4-alpha.12",lsi="e7be6adc3c2456e6c2b5eb8ae3ef57c9#2.0.4-alpha.11",description="To make it easy for you to get started with GitLab, here's a list of recommended next steps.",main="dist/cjs/buried-point-uni.js",module="dist/esm/buried-point-uni.js",scripts={build:"rimraf dist && rollup -c --environment INCLUDE_DEPS,BUILD:production && node lsi-md5.cjs"},type="module",files=["dist"],repository={type:"git",url:""},keywords=[],author="",license="MIT",peerDependencies={md5:"2.3.0","crypto-js":"^4.2.0"},devDependencies={"@babel/core":"^7.26.10","@babel/preset-env":"^7.26.9","@rollup/plugin-json":"^6.0.1","babel-loader":"^10.0.0","babel-preset-es2015":"^6.24.1","crypto-js":"^4.2.0",md5:"2.3.0",rimraf:"^6.0.1",rollup:"^1.20.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2",webpack:"^5.72.1","webpack-cli":"^6.0.1"},pk={name:name,version:version,lsi:lsi,description:description,main:main,module:module,"umd:main":"dist/umd/buried-point-uni.js",scripts:scripts,type:type,files:files,repository:repository,keywords:keywords,author:author,license:license,peerDependencies:peerDependencies,devDependencies:devDependencies};let usrIdKey="v_userId",anonIdKey="v_anonId";function getWxMiniInfo(){var e=wx.getAccountInfoSync().miniProgram;return{name:"",packageName:e?e.appId:"",version:e?e.envVersion+e.version:"",carrier:"mini",ecology:"mini"}}function getWxMiniDeviceInfo(){var e=wx.getSystemInfoSync();let t={lang:e.language,brand:e.brand+" "+e.model,os:getOSNameFormat(e.platform),osVersion:e.system,resolution:e.screenWidth+"x"+e.screenHeight,browser:"",browserVersion:"",color:"",deviceId:"",deviceType:getWxMiniDeviceType(e.system),network:""};return wx.getNetworkType({success(e){t.network=e.networkType}}),t}function getWxMiniDeviceType(t){return["Windows","Linux","macOS"].every(e=>t.includes(e))?1:2}function randomUUID(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function getWxMiniUserId(){return wx.getStorageSync(usrIdKey)?wx.getStorageSync(usrIdKey):""}function getWxMiniAnonyMousId(){let e=wx.getStorageSync(anonIdKey);return e||(e=randomUUID(),wx.setStorageSync(anonIdKey,e)),e}let AUTOTRACKTYPE={ENTER:"enter",LOOP:"loop",LEAVE:"leave"},BPNPVUV="UNIBPNPVUVSrcData",BPNPVUVFail="UNIBPNPVUVFailData",BPNPVUVFailOnce="UBPNPVUVFailOnce",wxMini="wxMini",usrIdKey$1="v_userId",anonIdKey$1="v_anonId",Global={env:"",domain:"",busSegment:"",module:"",flushInterval:"",pageInterval:"",token:"",appData:null,deviceData:null,distinctId:"",anonymousId:"",version:"",trackId:"",platform:"",uAgent:"",upEventUrl:"",upTrackUrl:"",isCompatible:!0,signTrackArray:[]},pagesArray=[],visPagesArr=[];function isWXMiniProgram(){try{return"undefined"!=typeof wx&&wx.env&&wx.canIUse}catch(e){return!1}}function initGetTrackId(){var e=Date.now().toString();Global.trackId=e,visPagesArr=[],console.log("tId ",e)}let sdkTrackIdVal=()=>{var e;return Global.trackId||(e=Date.now().toString(),Global.trackId=e,visPagesArr=[],e)};function randomUUID$1(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function timeToStr(e){e=new Date(e);return e.getFullYear()+`-${e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1}-${e.getDate()<10?"0"+e.getDate():e.getDate()} ${e.getHours()<10?"0"+e.getHours():e.getHours()}:${e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()}:`+(e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds())}function getUniWebH5Info(e){var e=e.ua.toLowerCase(),t=window.location.hostname,n=document.title;/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);return e.includes("alipay")||e.includes("unionPay")||e.includes("onbuygz")||e.includes("onetravel"),e.includes("micromessenger")&&e.includes("miniprogram"),{name:n||"",packageName:t||"",version:"",carrier:"H5",ecology:"h5"}}function getUniWXInfo(){var e=uni.getAccountInfoSync(),t=uni.getAppBaseInfo();return{name:t.appName||"",packageName:e?e.miniProgram.appId:"",version:e?e.miniProgram.envVersion+e.miniProgram.version:"",carrier:"mini",ecology:"mini"}}function getUniAppInfo(t){var n=plus.runtime.version,n={name:t.appName,version:n||"",carrier:"unknown",packageName:"",ecology:""};if("android"===t.platform){let e=n.carrier="Android";var r=plus.android.runtimeMainActivity().getPackageName();t.romName.includes("HarmonyOS")&&(e="Harmony OS",n.carrier="Harmony OS"),n.packageName=r||"",n.ecology=e}else"ios"===t.platform?(r=plus.ios.importClass("NSBundle").mainBundle().bundleIdentifier(),n.packageName=r||"",n.carrier="iOS",n.ecology="iOS"):"harmonyos"===t.platform?(r=uni.getAppBaseInfo(),n.carrier="Harmony OS",n.ecology="Harmony OS",n.version=r.appVersion,n.packageName=r.packageName):n.ecology="unknown";return n}function getCurDeviceType(e){var t;return"web"===Global.platform?(t=e.ua.toLowerCase(),/(windows|win32|win64|wow64)/.test(t)?1:(/(linux|android)/.test(t)||/(macintosh|mac os x|iphone|ipad|ipod)/.test(t),2)):"pc"===e.deviceType?1:2}function getOSNameFormat(e){return"macos"===e.toLowerCase()?"macOS":"harmonyos"===e.toLowerCase()?"Harmony OS":"ios"===e.toLowerCase()?"iOS":"android"===e.toLowerCase()?"Android":"windows"===e.toLowerCase()?"Windows":"linux"===e.toLowerCase()?"Linux":"unknown"}function getDeviceInfo(e){return{lang:e.osLanguage||e.hostLanguage,brand:e.deviceBrand+" "+e.deviceModel,os:getOSNameFormat(e.osName),osVersion:e.osVersion,resolution:e.screenWidth+"x"+e.screenHeight,browser:e.browserName,browserVersion:e.browserVersion,color:"",deviceId:e.deviceId,deviceType:getCurDeviceType(e),network:""}}function getDeviceInfoError(){return{lang:"",brand:"",os:"",osVersion:"",resolution:"",browser:"",browserVersion:"",color:"",deviceId:"",deviceType:"",network:""}}function getTrackObj(e){var t=getCurrentPages(),n=t[t.length-1],r=Global.platform;let o="",a="",i="",l="";if("web"===r||"h5"===r?(o=window.location.href,a=window.location.hostname,document.referrer&&(r=new URL(document.referrer),i=r||"",l=r.hostname||"")):(o=n.route,i=(1<t.length?t[t.length-2]:n).route,a=Global.domain||n.route),n)return{path:n.route,busSegment:e.busSegment||0===e.busSegment?e.busSegment:"",module:e.module||0===e.module?e.module:"",properties:e.extend_param?JSON.stringify(e.extend_param):"",title:e.title||"",domain:a,url:o,visitPage:t.length,sourceDomain:l,sourceUrl:i,sendMode:e.sendMode}}function uUpdatePageExtraArray(e){var t=getCurrentPages();let n=t[t.length-1];t=pagesArray.findIndex(e=>e.path===n.route),e={path:n.route,properties:e.properties?JSON.stringify(e.properties):"",busSegment:e.busSegment||"",module:e.module||"",title:e.title||""};-1!==t?pagesArray[t]=e:pagesArray.push(e)}function isValidURL(e){return/^(https?:\/\/[^\s$.?#].[^\s]*)$/i.test(e)}function getUtmObj(){if("web"===Global.platform){var e=window.location.href;if(e&&!e.includes("file://")&&isValidURL(e)){var e=window.location.href.split("?")[1];if(e)return{utmSource:(e=new URLSearchParams(e)).get("utmSource")||"",utmCampaign:e.get("utmCampaign")||"",utmTerm:e.get("utmTerm")||"",utmContent:e.get("utmContent")||"",ctk:e.get("ctk")||""}}}return null}function insertPVUVData(e,t){let n=null;var r,o=(n=(Global.platform===wxMini?wx:uni).getStorageSync(BPNPVUV))?JSON.parse(n):[];0<o.length&&-1!==(r=o.findIndex(e=>e.uid===t))?o[r]={...o[r],...e}:o.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNPVUV,JSON.stringify(o))}function getBaseicInfo(){isWXMiniProgram()?(Global.platform=wxMini,Global.appData=getWxMiniInfo(),Global.deviceData=getWxMiniDeviceInfo(),Global.distinctId=getWxMiniUserId(),Global.anonymousId=getWxMiniAnonyMousId()):(uni.getSystemInfo({success:function(e){Global.uAgent=e.ua;var t,n=e.uniPlatform;n.includes("app")?(Global.platform=e.osName,Global.appData=getUniAppInfo(e),Global.platform="Harmony OS"):n.includes("web")||n.includes("h5")?(Global.platform="web",t=getUniWebH5Info(e),Global.appData={...t,version:Global.version||"unknown"}):n.includes("weixin")?(Global.platform="weixin",Global.appData=getUniWXInfo()):console.log("uni get platform getBaseicInfo error "),Global.deviceData=getDeviceInfo(e)},fail:function(e){Global.deviceData=getDeviceInfoError()},complete:function(){uni.getNetworkType({success(e){Global.deviceData.network=e.networkType}})}}),Global.distinctId=uni.getStorageSync(usrIdKey$1)||"",Global.anonymousId=uni.getStorageSync(anonIdKey$1),Global.anonymousId||(Global.anonymousId=randomUUID$1()),uni.setStorageSync(anonIdKey$1,Global.anonymousId))}let localLsi=pk.lsi,secretKey="jCfeIQH52pMcgNUQoXYA";function encryptData(e){return CryptoJS.HmacSHA256(e,secretKey).toString()}function commonData(e){return{app:Global.appData,data:e,device:Global.deviceData,lsi:localLsi,projectId:Global.token,userAgent:Global.uAgent||"",anonymousId:Global.anonymousId,userId:Global.distinctId}}function reportTrackEventServer(e,t,n){var r;e?(r={...r=commonData(t),dataAbstract:encryptData(JSON.stringify(r))},Global.platform===wxMini?wx.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?wx.setStorageSync(n,JSON.stringify(t)):wx.setStorageSync(n,"")},fail:function(e){console.error(e),wx.setStorageSync(n,JSON.stringify(t))}}):uni.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?uni.setStorageSync(n,JSON.stringify(t)):uni.setStorageSync(n,"")},fail:function(e){console.log("error: ",e),uni.setStorageSync(n,JSON.stringify(t))}})):console.error("please set upload data upType")}function queryTrackDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNPVUV),wx.setStorageSync(BPNPVUV,""),t=wx.getStorageSync(BPNPVUVFail),n=wx.getStorageSync(BPNPVUVFailOnce),wx):(e=uni.getStorageSync(BPNPVUV),uni.setStorageSync(BPNPVUV,""),t=uni.getStorageSync(BPNPVUVFail),n=uni.getStorageSync(BPNPVUVFailOnce),uni)).setStorageSync(BPNPVUVFailOnce,""),e?JSON.parse(e):[]),a=t?JSON.parse(t):[],i=n?JSON.parse(n):[];r.push(...o),r.push(...i),r.push(...a),r&&r.length&&(r.forEach(e=>{delete e.uid}),reportTrackEventServer("track",r,BPNPVUVFail))}function setReportUrl(e){return"test"!==e?{upEventApi:"https://buryingpoint.onebuygz.com/client/api/event",upTrackApi:"https://buryingpoint.onebuygz.com/client/api/track",eventListApi:"https://buryingpoint.onebuygz.com/api/event/query/eventList"}:{upEventApi:"https://buryingpoint.gcongo.com.cn/client/api/event",upTrackApi:"https://buryingpoint.gcongo.com.cn/client/api/track",eventListApi:"https://buryingpoint.gcongo.com.cn/api/event/query/eventList"}}let BPNEvent="UNIBPNEventSrcData",BPNEventFail="UNIBPNEventFailData",BPNEventFailOnce="UBPNEventFailOnce";function getCurPath(){var e=getCurrentPages(),e=e[e.length-1];return e?e.route:"/"}function eventCommonStore(e){var t=e.$page||"",n=t.path||getCurPath(),t={utm:e.$utm||getUtmObj(),duration:"",element:e.$element||null,eventId:e.$event_id||"",event:e.$event_code||"",groupId:"",busSegment:e.$busSegment||0===e.$busSegment?e.$busSegment:"",module:e.$module||0===e.$module?e.$module:"",page:{domain:t.domain||"",pageId:MD5(n),path:n||"",title:t.title||"",url:n||""},properties:e.$extend_param?JSON.stringify(e.$extend_param):"",traceId:"",trackId:sdkTrackIdVal(),triggerTime:timeToStr(Date.now())};1==e.$sendMode?reportTrackEventServer("event",[t],BPNEventFailOnce):insertEventData(t)}function insertEventData(e){let t;var n=(t=(Global.platform===wxMini?wx:uni).getStorageSync(BPNEvent))?JSON.parse(t):[];n.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNEvent,JSON.stringify(n))}function queryEventDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNEvent),wx.setStorageSync(BPNEvent,""),t=wx.getStorageSync(BPNEventFail),n=wx.getStorageSync(BPNEventFailOnce),wx):(e=uni.getStorageSync(BPNEvent),uni.setStorageSync(BPNEvent,""),t=uni.getStorageSync(BPNEventFail),n=uni.getStorageSync(BPNEventFailOnce),uni)).setStorageSync(BPNEventFailOnce,""),e?JSON.parse(e):[]),a=t?JSON.parse(t):[],i=n?JSON.parse(n):[];r.push(...o),r.push(...a),r.push(...i),r&&r.length&&reportTrackEventServer("event",r,BPNEventFail)}let startTime,enterTimeLong,loopTimeLong,umlInterval,cirtemp,mObj,cPUUId,sMode;function uStartTrackPVData(e){umlInterval&&uDestoryTrackPVData(),e&&(clearInterval(umlInterval),uTrackPVData(AUTOTRACKTYPE.ENTER,e),umlInterval=setInterval(()=>{uTrackPVData(AUTOTRACKTYPE.LOOP,null)},15e3))}function uDestoryTrackPVData(){mObj&&uTrackPVData(AUTOTRACKTYPE.LEAVE,null),clearInterval(umlInterval),umlInterval=null,sMode=null}function uTrackPVData(e,t){e===AUTOTRACKTYPE.ENTER?(mObj=null,cPUUId=0,cirtemp=1,startTime=0,enterTimeLong=-1,loopTimeLong=-1,enterTimeLong=Date.now(),loopTimeLong=enterTimeLong,cPUUId=randomUUID$1(),mObj=getTrackObj(t),sMode=mObj.sendMode,visPagesArr.push(mObj.path)):e===AUTOTRACKTYPE.LOOP?(cirtemp=2,startTime=15,loopTimeLong=Date.now()):e===AUTOTRACKTYPE.LEAVE&&(cirtemp=3,t=Math.max(1,(Date.now()-loopTimeLong)/1e3),startTime=Math.ceil(t));e={busSegment:mObj.busSegment,circulation:cirtemp,domain:mObj.domain,duration:startTime,module:mObj.module,path:mObj.path,properties:mObj.properties,sourceDomain:mObj.sourceDomain,sourceUrl:mObj.sourceUrl,title:mObj.title,traceId:"",trackId:sdkTrackIdVal(),url:mObj.url,visitPage:visPagesArr.length,visitTime:timeToStr(enterTimeLong),utm:getUtmObj(),uid:cPUUId};!0===sMode?reportTrackEventServer("track",[e],BPNPVUVFailOnce):insertPVUVData(e,cPUUId)}let uglInterval=null;function init(e){var t;e?(t=setReportUrl(e.env),Global.upEventUrl=t.upEventApi,Global.upTrackUrl=t.upTrackApi,initGetTrackId(),Object.assign(Global,e),getBaseicInfo(),startGlobalTime()):console.log("init config error, please check config!")}function startGlobalTime(){clearInterval(uglInterval),uglInterval=null,uglInterval=setInterval(()=>{queryEventDataUpload(),queryTrackDataUpload()},15e3)}function setUserId(e){e?(Global.distinctId=e,(Global.platform===wxMini?wx:uni).setStorageSync(usrIdKey$1,e)):(Global.distinctId="",Global.platform===wxMini?wx.setStorageSync(usrIdKey$1,e):uni.setStorageSync(usrIdKey$1,""))}function setCustomEvent(e){e&&eventCommonStore(e)}function onStartTrack(e){uStartTrackPVData(e)}function onDestroyTrack(){uDestoryTrackPVData()}function setPageExtraObj(e){uUpdatePageExtraArray(e)}export{init,onDestroyTrack,onStartTrack,setCustomEvent,setPageExtraObj,setUserId};
1
+ var name="visual-buried-point-platform-uni",version="2.0.4-alpha.13",lsi="27b7c8c90574db0aeb2e7a5f9b90c56d#2.0.4-alpha.12",description="To make it easy for you to get started with GitLab, here's a list of recommended next steps.",main="dist/cjs/buried-point-uni.js",module="dist/esm/buried-point-uni.js",scripts={build:"rimraf dist && rollup -c --environment INCLUDE_DEPS,BUILD:production && node lsi-md5.cjs"},type="module",files=["dist"],repository={type:"git",url:""},keywords=[],author="",license="MIT",peerDependencies={md5:"2.3.0","crypto-js":"^4.2.0"},devDependencies={"@babel/core":"^7.26.10","@babel/preset-env":"^7.26.9","@rollup/plugin-json":"^6.0.1","babel-loader":"^10.0.0","babel-preset-es2015":"^6.24.1","crypto-js":"^4.2.0",md5:"2.3.0",rimraf:"^6.0.1",rollup:"^1.20.2","rollup-plugin-analyzer":"^4.0.0","rollup-plugin-babel":"^4.3.3","rollup-plugin-commonjs":"^10.0.2","rollup-plugin-node-resolve":"^5.2.0","rollup-plugin-replace":"^2.2.0","rollup-plugin-uglify":"^6.0.2",webpack:"^5.72.1","webpack-cli":"^6.0.1"},pk={name:name,version:version,lsi:lsi,description:description,main:main,module:module,"umd:main":"dist/umd/buried-point-uni.js",scripts:scripts,type:type,files:files,repository:repository,keywords:keywords,author:author,license:license,peerDependencies:peerDependencies,devDependencies:devDependencies};let usrIdKey="v_userId",anonIdKey="v_anonId";function getWxMiniInfo(){var e=wx.getAccountInfoSync().miniProgram;return{name:"",packageName:e?e.appId:"",version:e?e.envVersion+e.version:"",carrier:"mini",ecology:"mini"}}function getWxMiniDeviceInfo(){var e=wx.getSystemInfoSync();let t={lang:e.language,brand:e.brand+" "+e.model,os:getOSNameFormat(e.platform),osVersion:e.system,resolution:e.screenWidth+"x"+e.screenHeight,browser:"",browserVersion:"",color:"",deviceId:"",deviceType:getWxMiniDeviceType(e.system),network:""};return wx.getNetworkType({success(e){t.network=e.networkType}}),t}function getWxMiniDeviceType(t){return["Windows","Linux","macOS"].every(e=>t.includes(e))?1:2}function randomUUID(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function getWxMiniUserId(){return wx.getStorageSync(usrIdKey)?wx.getStorageSync(usrIdKey):""}function getWxMiniAnonyMousId(){let e=wx.getStorageSync(anonIdKey);return e||(e=randomUUID(),wx.setStorageSync(anonIdKey,e)),e}let AUTOTRACKTYPE={ENTER:"enter",LOOP:"loop",LEAVE:"leave"},BPNPVUV="UNIBPNPVUVSrcData",BPNPVUVFail="UNIBPNPVUVFailData",BPNPVUVFailOnce="UBPNPVUVFailOnce",wxMini="wxMini",usrIdKey$1="v_userId",anonIdKey$1="v_anonId",Global={env:"",domain:"",busSegment:"",module:"",flushInterval:"",pageInterval:"",token:"",appData:null,deviceData:null,distinctId:"",anonymousId:"",version:"",trackId:"",platform:"",uAgent:"",upEventUrl:"",upTrackUrl:"",isCompatible:!0,signTrackArray:[]},pagesArray=[],visPagesArr=[];function isWXMiniProgram(){try{return"undefined"!=typeof wx&&wx.env&&wx.canIUse}catch(e){return!1}}function initGetTrackId(){var e=Date.now().toString();Global.trackId=e,visPagesArr=[],console.log("tId ",e)}let sdkTrackIdVal=()=>{var e;return Global.trackId||(e=Date.now().toString(),Global.trackId=e,visPagesArr=[],e)};function randomUUID$1(){return"xxxx-4xxx-yxxx-xxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function timeToStr(e){e=new Date(e);return e.getFullYear()+`-${e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1}-${e.getDate()<10?"0"+e.getDate():e.getDate()} ${e.getHours()<10?"0"+e.getHours():e.getHours()}:${e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()}:`+(e.getSeconds()<10?"0"+e.getSeconds():e.getSeconds())}function getUniWebH5Info(e){var e=e.ua.toLowerCase(),t=window.location.hostname,n=document.title;/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);return e.includes("alipay")||e.includes("unionPay")||e.includes("onbuygz")||e.includes("onetravel"),e.includes("micromessenger")&&e.includes("miniprogram"),{name:n||"",packageName:t||"",version:"",carrier:"H5",ecology:"h5"}}function getUniWXInfo(){var e=uni.getAccountInfoSync(),t=uni.getAppBaseInfo();return{name:t.appName||"",packageName:e?e.miniProgram.appId:"",version:e?e.miniProgram.envVersion+e.miniProgram.version:"",carrier:"mini",ecology:"mini"}}function getUniAppInfo(t){var n=plus.runtime.version,n={name:t.appName,version:n||"",carrier:"unknown",packageName:"",ecology:""};if("android"===t.platform){let e=n.carrier="Android";var r=plus.android.runtimeMainActivity().getPackageName();t.romName.includes("HarmonyOS")&&(e="Harmony OS",n.carrier="Harmony OS"),n.packageName=r||"",n.ecology=e}else"ios"===t.platform?(r=plus.ios.importClass("NSBundle").mainBundle().bundleIdentifier(),n.packageName=r||"",n.carrier="iOS",n.ecology="iOS"):"harmonyos"===t.platform?(r=uni.getAppBaseInfo(),n.carrier="Harmony OS",n.ecology="Harmony OS",n.version=r.appVersion,n.packageName=r.packageName):n.ecology="unknown";return n}function getCurDeviceType(e){var t;return"web"===Global.platform?(t=e.ua.toLowerCase(),/(windows|win32|win64|wow64)/.test(t)?1:(/(linux|android)/.test(t)||/(macintosh|mac os x|iphone|ipad|ipod)/.test(t),2)):"pc"===e.deviceType?1:2}function getOSNameFormat(e){return"macos"===e.toLowerCase()?"macOS":"harmonyos"===e.toLowerCase()?"Harmony OS":"ios"===e.toLowerCase()?"iOS":"android"===e.toLowerCase()?"Android":"windows"===e.toLowerCase()?"Windows":"linux"===e.toLowerCase()?"Linux":"unknown"}function getDeviceInfo(e){return{lang:e.osLanguage||e.hostLanguage,brand:e.deviceBrand+" "+e.deviceModel,os:getOSNameFormat(e.osName),osVersion:e.osVersion,resolution:e.screenWidth+"x"+e.screenHeight,browser:e.browserName,browserVersion:e.browserVersion,color:"",deviceId:e.deviceId,deviceType:getCurDeviceType(e),network:""}}function getDeviceInfoError(){return{lang:"",brand:"",os:"",osVersion:"",resolution:"",browser:"",browserVersion:"",color:"",deviceId:"",deviceType:"",network:""}}function getTrackObj(e){var t=getCurrentPages(),n=t[t.length-1],r=Global.platform;let o="",i="",a="",s="";if("web"===r||"h5"===r?(o=window.location.href,i=window.location.hostname,document.referrer&&(r=new URL(document.referrer),a=r||"",s=r.hostname||"")):(o=n.route,a=(1<t.length?t[t.length-2]:n).route,i=Global.domain||n.route),n)return{path:n.route,busSegment:e.busSegment||0===e.busSegment?e.busSegment:"",module:e.module||0===e.module?e.module:"",properties:e.extend_param?JSON.stringify(e.extend_param):"",title:e.title||"",domain:i,url:o,visitPage:t.length,sourceDomain:s,sourceUrl:a,sendMode:e.sendMode}}function uUpdatePageExtraArray(e){var t=getCurrentPages();let n=t[t.length-1];t=pagesArray.findIndex(e=>e.path===n.route),e={path:n.route,properties:e.properties?JSON.stringify(e.properties):"",busSegment:e.busSegment||"",module:e.module||"",title:e.title||""};-1!==t?pagesArray[t]=e:pagesArray.push(e)}function isValidURL(e){return/^(https?:\/\/[^\s$.?#].[^\s]*)$/i.test(e)}function getUtmObj(){if("web"===Global.platform){var e=window.location.href;if(e&&!e.includes("file://")&&isValidURL(e)){var e=window.location.href.split("?")[1];if(e)return{utmSource:(e=new URLSearchParams(e)).get("utmSource")||"",utmCampaign:e.get("utmCampaign")||"",utmTerm:e.get("utmTerm")||"",utmContent:e.get("utmContent")||"",ctk:e.get("ctk")||""}}}return null}function insertPVUVData(e,t){let n=null;var r,o=(n=(Global.platform===wxMini?wx:uni).getStorageSync(BPNPVUV))?JSON.parse(n):[];0<o.length&&-1!==(r=o.findIndex(e=>e.uid===t))?o[r]={...o[r],...e}:o.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNPVUV,JSON.stringify(o))}function getBaseicInfo(){isWXMiniProgram()?(Global.platform=wxMini,Global.appData=getWxMiniInfo(),Global.deviceData=getWxMiniDeviceInfo(),Global.distinctId=getWxMiniUserId(),Global.anonymousId=getWxMiniAnonyMousId()):(uni.getSystemInfo({success:function(e){Global.uAgent=e.ua;var t,n=e.uniPlatform;n.includes("app")?(Global.platform=e.osName,Global.appData=getUniAppInfo(e),Global.platform="Harmony OS"):n.includes("web")||n.includes("h5")?(Global.platform="web",t=getUniWebH5Info(e),Global.appData={...t,version:Global.version||"unknown"}):n.includes("weixin")?(Global.platform="weixin",Global.appData=getUniWXInfo()):console.log("uni get platform getBaseicInfo error "),Global.deviceData=getDeviceInfo(e)},fail:function(e){Global.deviceData=getDeviceInfoError()},complete:function(){uni.getNetworkType({success(e){Global.deviceData.network=e.networkType}})}}),Global.distinctId=uni.getStorageSync(usrIdKey$1)||"",Global.anonymousId=uni.getStorageSync(anonIdKey$1),Global.anonymousId||(Global.anonymousId=randomUUID$1()),uni.setStorageSync(anonIdKey$1,Global.anonymousId))}var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function commonjsRequire(){throw new Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e.default||e}var _nodeResolve_empty={},_nodeResolve_empty$1=Object.freeze({__proto__:null,default:_nodeResolve_empty}),require$$0=getCjsExportFromNamespace(_nodeResolve_empty$1),core=createCommonjsModule(function(e,t){e.exports=(e=(u=>{var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),!(r=!(r=!(r="undefined"!=typeof globalThis&&globalThis.crypto?globalThis.crypto:r)&&"undefined"!=typeof window&&window.msCrypto?window.msCrypto:r)&&void 0!==commonjsGlobal&&commonjsGlobal.crypto?commonjsGlobal.crypto:r)&&"function"==typeof commonjsRequire)try{r=require$$0}catch(e){}var n=Object.create||function(e){return t.prototype=e,e=new t,t.prototype=null,e};function t(){}var e={},o=e.lib={},i=o.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=o.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||s).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,o=e.sigBytes;if(this.clamp(),r%4)for(var i=0;i<o;i++){var a=n[i>>>2]>>>24-i%4*8&255;t[r+i>>>2]|=a<<24-(r+i)%4*8}else for(var s=0;s<o;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=o,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=u.ceil(t/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push((()=>{if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")})());return new c.init(t,e)}}),a=e.enc={},s=a.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},l=a.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],o=0;o<n;o++){var i=t[o>>>2]>>>24-o%4*8&255;r.push(String.fromCharCode(i))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},p=a.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},d=o.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t,n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,a=o/(4*i),s=(a=e?u.ceil(a):u.max((0|a)-this._minBufferSize,0))*i,e=u.min(4*s,o);if(s){for(var l=0;l<s;l+=i)this._doProcessBlock(r,l);t=r.splice(0,s),n.sigBytes-=e}return new c.init(t,e)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),g=(o.Hasher=d.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){d.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(n){return function(e,t){return new n.init(t).finalize(e)}},_createHmacHelper:function(n){return function(e,t){return new g.HMAC.init(n,t).finalize(e)}}}),e.algo={});return e})(Math),e)}),sha256=createCommonjsModule(function(e,t){e.exports=(e=>{var o=Math,t=e,n=t.lib,r=n.WordArray,i=n.Hasher,n=t.algo,a=[],f=[];function s(e){for(var t=o.sqrt(e),n=2;n<=t;n++)if(!(e%n))return;return 1}function l(e){return 4294967296*(e-(0|e))|0}for(var u=2,c=0;c<64;)s(u)&&(c<8&&(a[c]=l(o.pow(u,.5))),f[c]=l(o.pow(u,1/3)),c++),u++;var m=[],n=n.SHA256=i.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],s=n[4],l=n[5],u=n[6],c=n[7],p=0;p<64;p++){m[p]=p<16?0|e[t+p]:(((d=m[p-15])<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+m[p-7]+(((d=m[p-2])<<15|d>>>17)^(d<<13|d>>>19)^d>>>10)+m[p-16];var d=r&o^r&i^o&i,g=c+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&l^~s&u)+f[p]+m[p],c=u,u=l,l=s,s=a+g|0,a=i,i=o,o=r,r=g+(((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+d)|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+l|0,n[6]=n[6]+u|0,n[7]=n[7]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=o.floor(n/4294967296),t[15+(64+r>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});return t.SHA256=i._createHelper(n),t.HmacSHA256=i._createHmacHelper(n),e.SHA256})(core)}),hmac=createCommonjsModule(function(e,t){var n,s;e.exports=(n=(e=core).lib.Base,s=e.enc.Utf8,void(e.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=s.parse(t));for(var n=e.blockSize,r=4*n,e=((t=t.sigBytes>r?e.finalize(t):t).clamp(),this._oKey=t.clone()),t=this._iKey=t.clone(),o=e.words,i=t.words,a=0;a<n;a++)o[a]^=1549556828,i[a]^=909522486;e.sigBytes=t.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,e=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(e))}})))}),hmacSha256=createCommonjsModule(function(e,t){e.exports=core.HmacSHA256});let localLsi=pk.lsi,secretKey="jCfeIQH52pMcgNUQoXYA";function encryptData(e){return hmacSha256(e,secretKey).toString()}function commonData(e){return{app:Global.appData,data:e,device:Global.deviceData,lsi:localLsi,projectId:Global.token,userAgent:Global.uAgent||"",anonymousId:Global.anonymousId,userId:Global.distinctId}}function reportTrackEventServer(e,t,n){var r;e?(r={...r=commonData(t),dataAbstract:encryptData(JSON.stringify(r))},Global.platform===wxMini?wx.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?wx.setStorageSync(n,JSON.stringify(t)):wx.setStorageSync(n,"")},fail:function(e){console.error(e),wx.setStorageSync(n,JSON.stringify(t))}}):uni.request({url:"event"===e?Global.upEventUrl:Global.upTrackUrl,method:"POST",header:{"Content-Type":"application/json",appKey:Global.token,projectId:Global.token},data:r,success:function(e){e&&e.data?uni.setStorageSync(n,JSON.stringify(t)):uni.setStorageSync(n,"")},fail:function(e){console.log("error: ",e),uni.setStorageSync(n,JSON.stringify(t))}})):console.error("please set upload data upType")}function queryTrackDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNPVUV),wx.setStorageSync(BPNPVUV,""),t=wx.getStorageSync(BPNPVUVFail),n=wx.getStorageSync(BPNPVUVFailOnce),wx):(e=uni.getStorageSync(BPNPVUV),uni.setStorageSync(BPNPVUV,""),t=uni.getStorageSync(BPNPVUVFail),n=uni.getStorageSync(BPNPVUVFailOnce),uni)).setStorageSync(BPNPVUVFailOnce,""),e?JSON.parse(e):[]),i=t?JSON.parse(t):[],a=n?JSON.parse(n):[];r.push(...o),r.push(...a),r.push(...i),r&&r.length&&(r.forEach(e=>{delete e.uid}),reportTrackEventServer("track",r,BPNPVUVFail))}function setReportUrl(e){return"test"!==e?{upEventApi:"https://buryingpoint.onebuygz.com/client/api/event",upTrackApi:"https://buryingpoint.onebuygz.com/client/api/track",eventListApi:"https://buryingpoint.onebuygz.com/api/event/query/eventList"}:{upEventApi:"https://buryingpoint.gcongo.com.cn/client/api/event",upTrackApi:"https://buryingpoint.gcongo.com.cn/client/api/track",eventListApi:"https://buryingpoint.gcongo.com.cn/api/event/query/eventList"}}var crypt=createCommonjsModule(function(e){var i,n;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];0<e;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var t=[],n=0;n<e.length;n+=3)for(var r=e[n]<<16|e[n+1]<<8|e[n+2],o=0;o<4;o++)8*n+6*o<=8*e.length?t.push(i.charAt(r>>>6*(3-o)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,r=0;n<e.length;r=++n%4)0!=r&&t.push((i.indexOf(e.charAt(n-1))&Math.pow(2,-2*r+8)-1)<<2*r|i.indexOf(e.charAt(n))>>>6-2*r);return t}},e.exports=n}),charenc={utf8:{stringToBytes:function(e){return charenc.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(charenc.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join("")}}},charenc_1=charenc,isBuffer_1=function(e){return null!=e&&(isBuffer(e)||isSlowBuffer(e)||!!e._isBuffer)};function isBuffer(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&isBuffer(e.slice(0,0))}var md5=createCommonjsModule(function(e){function y(e,t){e.constructor==String?e=(t&&"binary"===t.encoding?S:v).stringToBytes(e):b(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=h.bytesToWords(e),t=8*e.length,r=1732584193,o=-271733879,i=-1732584194,a=271733878,s=0;s<n.length;s++)n[s]=16711935&(n[s]<<8|n[s]>>>24)|4278255360&(n[s]<<24|n[s]>>>8);n[t>>>5]|=128<<t%32,n[14+(64+t>>>9<<4)]=t;for(var l=y._ff,u=y._gg,c=y._hh,p=y._ii,s=0;s<n.length;s+=16){var d=r,g=o,f=i,m=a,r=l(r,o,i,a,n[s+0],7,-680876936),a=l(a,r,o,i,n[s+1],12,-389564586),i=l(i,a,r,o,n[s+2],17,606105819),o=l(o,i,a,r,n[s+3],22,-1044525330);r=l(r,o,i,a,n[s+4],7,-176418897),a=l(a,r,o,i,n[s+5],12,1200080426),i=l(i,a,r,o,n[s+6],17,-1473231341),o=l(o,i,a,r,n[s+7],22,-45705983),r=l(r,o,i,a,n[s+8],7,1770035416),a=l(a,r,o,i,n[s+9],12,-1958414417),i=l(i,a,r,o,n[s+10],17,-42063),o=l(o,i,a,r,n[s+11],22,-1990404162),r=l(r,o,i,a,n[s+12],7,1804603682),a=l(a,r,o,i,n[s+13],12,-40341101),i=l(i,a,r,o,n[s+14],17,-1502002290),r=u(r,o=l(o,i,a,r,n[s+15],22,1236535329),i,a,n[s+1],5,-165796510),a=u(a,r,o,i,n[s+6],9,-1069501632),i=u(i,a,r,o,n[s+11],14,643717713),o=u(o,i,a,r,n[s+0],20,-373897302),r=u(r,o,i,a,n[s+5],5,-701558691),a=u(a,r,o,i,n[s+10],9,38016083),i=u(i,a,r,o,n[s+15],14,-660478335),o=u(o,i,a,r,n[s+4],20,-405537848),r=u(r,o,i,a,n[s+9],5,568446438),a=u(a,r,o,i,n[s+14],9,-1019803690),i=u(i,a,r,o,n[s+3],14,-187363961),o=u(o,i,a,r,n[s+8],20,1163531501),r=u(r,o,i,a,n[s+13],5,-1444681467),a=u(a,r,o,i,n[s+2],9,-51403784),i=u(i,a,r,o,n[s+7],14,1735328473),r=c(r,o=u(o,i,a,r,n[s+12],20,-1926607734),i,a,n[s+5],4,-378558),a=c(a,r,o,i,n[s+8],11,-2022574463),i=c(i,a,r,o,n[s+11],16,1839030562),o=c(o,i,a,r,n[s+14],23,-35309556),r=c(r,o,i,a,n[s+1],4,-1530992060),a=c(a,r,o,i,n[s+4],11,1272893353),i=c(i,a,r,o,n[s+7],16,-155497632),o=c(o,i,a,r,n[s+10],23,-1094730640),r=c(r,o,i,a,n[s+13],4,681279174),a=c(a,r,o,i,n[s+0],11,-358537222),i=c(i,a,r,o,n[s+3],16,-722521979),o=c(o,i,a,r,n[s+6],23,76029189),r=c(r,o,i,a,n[s+9],4,-640364487),a=c(a,r,o,i,n[s+12],11,-421815835),i=c(i,a,r,o,n[s+15],16,530742520),r=p(r,o=c(o,i,a,r,n[s+2],23,-995338651),i,a,n[s+0],6,-198630844),a=p(a,r,o,i,n[s+7],10,1126891415),i=p(i,a,r,o,n[s+14],15,-1416354905),o=p(o,i,a,r,n[s+5],21,-57434055),r=p(r,o,i,a,n[s+12],6,1700485571),a=p(a,r,o,i,n[s+3],10,-1894986606),i=p(i,a,r,o,n[s+10],15,-1051523),o=p(o,i,a,r,n[s+1],21,-2054922799),r=p(r,o,i,a,n[s+8],6,1873313359),a=p(a,r,o,i,n[s+15],10,-30611744),i=p(i,a,r,o,n[s+6],15,-1560198380),o=p(o,i,a,r,n[s+13],21,1309151649),r=p(r,o,i,a,n[s+4],6,-145523070),a=p(a,r,o,i,n[s+11],10,-1120210379),i=p(i,a,r,o,n[s+2],15,718787259),o=p(o,i,a,r,n[s+9],21,-343485551),r=r+d>>>0,o=o+g>>>0,i=i+f>>>0,a=a+m>>>0}return h.endian([r,o,i,a])}var h,v,b,S;h=crypt,v=charenc_1.utf8,b=isBuffer_1,S=charenc_1.bin,y._ff=function(e,t,n,r,o,i,a){e=e+(t&n|~t&r)+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._gg=function(e,t,n,r,o,i,a){e=e+(t&r|n&~r)+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._hh=function(e,t,n,r,o,i,a){e=e+(t^n^r)+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._ii=function(e,t,n,r,o,i,a){e=e+(n^(t|~r))+(o>>>0)+a;return(e<<i|e>>>32-i)+t},y._blocksize=16,y._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);e=h.wordsToBytes(y(e,t));return t&&t.asBytes?e:t&&t.asString?S.bytesToString(e):h.bytesToHex(e)}});let BPNEvent="UNIBPNEventSrcData",BPNEventFail="UNIBPNEventFailData",BPNEventFailOnce="UBPNEventFailOnce";function getCurPath(){var e=getCurrentPages(),e=e[e.length-1];return e?e.route:"/"}function eventCommonStore(e){var t=e.$page||"",n=t.path||getCurPath(),t={utm:e.$utm||getUtmObj(),duration:"",element:e.$element||null,eventId:e.$event_id||"",event:e.$event_code||"",groupId:"",busSegment:e.$busSegment||0===e.$busSegment?e.$busSegment:"",module:e.$module||0===e.$module?e.$module:"",page:{domain:t.domain||"",pageId:md5(n),path:n||"",title:t.title||"",url:n||""},properties:e.$extend_param?JSON.stringify(e.$extend_param):"",traceId:"",trackId:sdkTrackIdVal(),triggerTime:timeToStr(Date.now())};1==e.$sendMode?reportTrackEventServer("event",[t],BPNEventFailOnce):insertEventData(t)}function insertEventData(e){let t;var n=(t=(Global.platform===wxMini?wx:uni).getStorageSync(BPNEvent))?JSON.parse(t):[];n.push(e),(Global.platform===wxMini?wx:uni).setStorageSync(BPNEvent,JSON.stringify(n))}function queryEventDataUpload(){let e=null,t=null,n=null;var r=[],o=((Global.platform===wxMini?(e=wx.getStorageSync(BPNEvent),wx.setStorageSync(BPNEvent,""),t=wx.getStorageSync(BPNEventFail),n=wx.getStorageSync(BPNEventFailOnce),wx):(e=uni.getStorageSync(BPNEvent),uni.setStorageSync(BPNEvent,""),t=uni.getStorageSync(BPNEventFail),n=uni.getStorageSync(BPNEventFailOnce),uni)).setStorageSync(BPNEventFailOnce,""),e?JSON.parse(e):[]),i=t?JSON.parse(t):[],a=n?JSON.parse(n):[];r.push(...o),r.push(...i),r.push(...a),r&&r.length&&reportTrackEventServer("event",r,BPNEventFail)}let startTime,enterTimeLong,loopTimeLong,umlInterval,cirtemp,mObj,cPUUId,sMode;function uStartTrackPVData(e){umlInterval&&uDestoryTrackPVData(),e&&(clearInterval(umlInterval),uTrackPVData(AUTOTRACKTYPE.ENTER,e),umlInterval=setInterval(()=>{uTrackPVData(AUTOTRACKTYPE.LOOP,null)},15e3))}function uDestoryTrackPVData(){mObj&&uTrackPVData(AUTOTRACKTYPE.LEAVE,null),clearInterval(umlInterval),umlInterval=null,sMode=null}function uTrackPVData(e,t){e===AUTOTRACKTYPE.ENTER?(mObj=null,cPUUId=0,cirtemp=1,startTime=0,enterTimeLong=-1,loopTimeLong=-1,enterTimeLong=Date.now(),loopTimeLong=enterTimeLong,cPUUId=randomUUID$1(),mObj=getTrackObj(t),sMode=mObj.sendMode,visPagesArr.push(mObj.path)):e===AUTOTRACKTYPE.LOOP?(cirtemp=2,startTime=15,loopTimeLong=Date.now()):e===AUTOTRACKTYPE.LEAVE&&(cirtemp=3,t=Math.max(1,(Date.now()-loopTimeLong)/1e3),startTime=Math.ceil(t));e={busSegment:mObj.busSegment,circulation:cirtemp,domain:mObj.domain,duration:startTime,module:mObj.module,path:mObj.path,properties:mObj.properties,sourceDomain:mObj.sourceDomain,sourceUrl:mObj.sourceUrl,title:mObj.title,traceId:"",trackId:sdkTrackIdVal(),url:mObj.url,visitPage:visPagesArr.length,visitTime:timeToStr(enterTimeLong),utm:getUtmObj(),uid:cPUUId};!0===sMode?reportTrackEventServer("track",[e],BPNPVUVFailOnce):insertPVUVData(e,cPUUId)}let uglInterval=null;function init(e){var t;e?(t=setReportUrl(e.env),Global.upEventUrl=t.upEventApi,Global.upTrackUrl=t.upTrackApi,initGetTrackId(),Object.assign(Global,e),getBaseicInfo(),startGlobalTime()):console.log("init config error, please check config!")}function startGlobalTime(){clearInterval(uglInterval),uglInterval=null,uglInterval=setInterval(()=>{queryEventDataUpload(),queryTrackDataUpload()},15e3)}function setUserId(e){e?(Global.distinctId=e,(Global.platform===wxMini?wx:uni).setStorageSync(usrIdKey$1,e)):(Global.distinctId="",Global.platform===wxMini?wx.setStorageSync(usrIdKey$1,e):uni.setStorageSync(usrIdKey$1,""))}function setCustomEvent(e){e&&eventCommonStore(e)}function onStartTrack(e){uStartTrackPVData(e)}function onDestroyTrack(){uDestoryTrackPVData()}function setPageExtraObj(e){uUpdatePageExtraArray(e)}export{init,onDestroyTrack,onStartTrack,setCustomEvent,setPageExtraObj,setUserId};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "visual-buried-point-platform-uni",
3
- "version": "2.0.4-alpha.12",
4
- "lsi": "27b7c8c90574db0aeb2e7a5f9b90c56d#2.0.4-alpha.12",
3
+ "version": "2.0.4-alpha.13",
4
+ "lsi": "00df636c803f09ff4d7e3e742087f936#2.0.4-alpha.13",
5
5
  "description": "To make it easy for you to get started with GitLab, here's a list of recommended next steps.",
6
6
  "main": "dist/cjs/buried-point-uni.js",
7
7
  "module": "dist/esm/buried-point-uni.js",