hina-cloud-js-sdk 3.1.3 → 3.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- var e;e=function(){var e=document.createElement("script");e.async="async",e.src="https://cdn.staticfile.org/jquery/3.0.0/jquery.min.js",e.type="text/javascript",e.addEventListener("load",(function(){var e,n,t,o=!1,i=315,l=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;!function(e){var n=document.createElement("style");n.type="text/css";try{n.appendChild(document.createTextNode(e))}catch(t){n.styleSheet.cssText=e}var t=document.getElementsByTagName("head")[0],o=document.getElementsByTagName("script")[0];t?t.children.length?t.insertBefore(n,t.children[0]):t.appendChild(n):o.parentNode.insertBefore(n,o)}('\n .hina-click-area:before{\n pointer-events: none;\n cursor: pointer;\n content: "";\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: rgba(56, 166, 251, 0.6);\n box-shadow: rgba(0, 0, 0, 0.6) 0px 2px 4px;\n cursor: pointer\n }\n .hina-click-area:after{\n pointer-events: none;\n height: 14px;\n line-height: 14px;\n margin: -7px 0 0 -28px;\n width: 56px;\n color: #fff;\n content: attr(data-click);\n font-size: 14px;\n font-weight: 700;\n left: 50%;\n line-height: 1em;\n position: absolute;\n text-align: center;\n text-indent: 0;\n text-shadow: 1px 1px 2px #000;\n top: 50%;\n z-index: 999;\n}\n'),window.addEventListener("message",(function(e){var n,t,d,a,r=null===(n=e.data)||void 0===n?void 0:n.type;if("view"===r){var s,c,p,v,u=null===(s=e.data)||void 0===s?void 0:s.lastGraph;$("body > .shadeBoxWrap").remove();for(var h=0;h<(null==u?void 0:u.length);h++){var x=u[h].H_element_selector;$(x).removeClass("hina-click-area")}o=!1,window.removeEventListener("scroll",(function(){}),!0);for(var f=null===(c=e.data)||void 0===c||null===(p=c.viewData)||void 0===p?void 0:p[0],y=null===(v=[null==f?void 0:f.view100,null==f?void 0:f.view90,null==f?void 0:f.view80,null==f?void 0:f.view70,null==f?void 0:f.view60,null==f?void 0:f.view50,null==f?void 0:f.view40,null==f?void 0:f.view30,null==f?void 0:f.view20,null==f?void 0:f.view10])||void 0===v?void 0:v.map((function(e){return e+l})),b=new Array(10).fill(1).map((function(e,n){return 10*(n+1)})).reverse(),g=function(e){return"\n <span \n style='\n font-size:12px;\n position:absolute;\n padding: 0 12px;\n top: -24px;\n height: 26px;\n line-height: 26px;\n left: 0;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n '>\n ".concat(e,"%\n </span>\n ")},m=0;m<b.length;m++){var w=document.createElement("div");w.setAttribute("style","\n border-bottom: 1px dashed #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n top: 50px;\n z-index:999;\n "),w.setAttribute("class","viewBaseLineStyle");var _=f["view".concat(b[m])];w.style.top="".concat(_+l,"px"),0!==m?f["view".concat(b[m])]-f["view".concat(b[m-1])]>26&&(w.innerHTML=g(b[m])):f["view".concat(b[m])]>26&&(w.innerHTML=g(b[m])),document.body.appendChild(w)}var k=document.createElement("div");k.setAttribute("style","\n border-bottom: 1px solid #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n z-index: 9999;\n top: 0;\n "),k.setAttribute("class","viewMoveLineStyle"),document.body.appendChild(k),$(document).on("mousemove",(t=function(e){k.style.top="".concat(e.pageY,"px");var n=function(e,n){for(var t=0;t<e.length;t++)if(e[t]>n)return t}(y,e.pageY),t=b[n];k.innerHTML="\n <span \n style='\n font-size:12px;\n height:26px;\n line-height: 26px;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n left:50%;\n margin-left:-65px;\n position: absolute;\n top:-13px;\n padding: 0 5px;\n '>\n ".concat(t||0,"%的用户浏览到这里\n </span>\n ")},d=150,a=Date.now(),function(){var e=arguments;Date.now()-a>=d&&(t.apply(this,e),a=Date.now())}))}else if("click"===r){var E,H,B;o=!0,$("body > .viewBaseLineStyle").remove(),$("body > .viewMoveLineStyle").remove();var C=null===(E=e.data)||void 0===E?void 0:E.hotData,A=null===(H=e.data)||void 0===H?void 0:H.isResize,L=null===(B=e.data)||void 0===B?void 0:B.lastGraph;if(A&&$("body > .shadeBoxWrap").remove(),null==C||!C.length){for(var z=0;z<(null==L?void 0:L.length);z++){var T=L[z].H_element_selector;$(T).removeClass("hina-click-area")}return}for(var W=function(){var e,n,t,o,l,d,a,r,s=C[M];s.H_element_content;var c=s.H_element_selector;s.button_click_prop;var p=s.button_click_rate;s.button_click_times,s.button_click_users,s.his_H_element_content;var v=document.createElement("div");v.setAttribute("style","position: relative;\n "),v.setAttribute("class","hina-click-area");var u=function(e){var n=e.H_element_content;e.H_element_selector;var t=e.button_click_prop,o=e.button_click_rate,l=e.button_click_times,d=e.button_click_users,a=e.his_H_element_content,r="\n <div style='padding: 8px;'>\n <div style='color: #CACACA'>当前内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>".concat(n||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <table style='width:100%;color:#fff;font-size:13px;background:#333;border:1px solid #333;'>\n <tr>\n <td>点击次数:</td>\n <td style='text-align:right;'>").concat(l,"</td>\n </tr>\n <tr>\n <td>点击人数:</td>\n <td style='text-align:right;'>").concat(d,"</td>\n </tr>\n <tr>\n <td>点击率:</td>\n <td style='text-align:right;'>").concat(o,"</td>\n </tr>\n <tr>\n <td>点击占比:</td>\n <td style='text-align:right;'>").concat(t,"</td>\n </tr>\n </table>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <div style='color: #CACACA;'>历史内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>").concat(a||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 6px 8px;' class='user-list' hina-tag-disable='true'>\n <p style='color:#2a90e2;text-decoration: none;'>查看用户列表</p>\n </div>\n "),s=document.createElement("div");return document.body.appendChild(s),s.setAttribute("class","shadeBoxWrap"),s.setAttribute("style","\n border-radius:3px;\n display: none;\n border:1px solid #000;\n cursor: pointer;\n position: absolute;\n left:0;\n top:0;\n background: #333;\n line-height:24px;\n font-size:13px;\n width:".concat(220,"px;\n height:").concat(i,"px;\n color: #fff;\n box-shadow: 0 2px 4px rgba(0,0,0,0.24);\n z-index:9999;\n ")),s.innerHTML=r,s}(C[M]),h=null===(e=$(c))||void 0===e||null===(n=e.offset())||void 0===n?void 0:n.left,x=window.scrollY,f=$(window).width(),y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,b=null===(t=$(c))||void 0===t||null===(o=t.position())||void 0===o?void 0:o.top,g=null===(l=$(c))||void 0===l||null===(d=l.offset())||void 0===d?void 0:d.top,m=null===(a=$(c))||void 0===a?void 0:a.css("width"),w=null===(r=$(c))||void 0===r?void 0:r.css("height");$(c).addClass("hina-click-area"),$(c).css("position","relative"),$("".concat(c,":before")).css("position","absolute"),$(c).attr("data-click",p),[m,w,"undefined"].includes("0px")&&($(c).removeClass("display","inline-block"),$(c).css("width","15px"),$(c).css("height","15px")),$(c).mouseenter((function(){if($("body > .shadeBoxWrap > .user-list > p").attr("drillSelector",c),g<50?$("body > .shadeBoxWrap").css("position","fixed"):$("body > .shadeBoxWrap").css("position","absolute"),u.style.display="block",f-h<220)return u.style.left="".concat(h-220,"px"),void(u.style.top="".concat(g>i?g+parseFloat(w)-i:g,"px"));u.style.left="".concat(h,"px"),y-g>i?window.scrollY>i?u.style.top="".concat(b+parseFloat(w),"px"):u.style.top="".concat(g+parseFloat(w)-x,"px"):u.style.top="".concat(g-i,"px")})),$(c).mouseleave((function(){$("body > .shadeBoxWrap").css("display","none")})),u.addEventListener("mouseenter",(function(){u.style.display="block"})),u.addEventListener("mouseleave",(function(){$("body > .shadeBoxWrap").css("display","none")}))},M=0;M<(null==C?void 0:C.length);M++)W();$("body > .shadeBoxWrap > .user-list > p").on("click",(function(n){var t,o,i;e.stopPropagation(),window.parent.postMessage({eleSelector:null==n||null===(t=n.target)||void 0===t||null===(o=t.attributes)||void 0===o||null===(i=o.drillselector)||void 0===i?void 0:i.value},"*")}))}}),!1),window.addEventListener("scroll",(e=function(){o&&window.parent.postMessage({isRefush:!0},"*")},n=800,t=null,function(){null!==t&&clearTimeout(t),t=setTimeout(e,n)}),!0)})),document.head.appendChild(e)},"function"==typeof define&&define.amd?define(e):e();
1
+ var e,t;e=this,t=function(){var e=document.createElement("script");function t(){var e=!1,t=315,n=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0;!function(e){var t=document.createElement("style");t.type="text/css";try{t.appendChild(document.createTextNode(e))}catch(n){t.styleSheet.cssText=e}var n=document.getElementsByTagName("head")[0],o=document.getElementsByTagName("script")[0];n?n.children.length?n.insertBefore(t,n.children[0]):n.appendChild(t):o.parentNode.insertBefore(t,o)}('\n .hina-click-area:before{\n pointer-events: none;\n cursor: pointer;\n content: "";\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n background: rgba(56, 166, 251, 0.6);\n box-shadow: rgba(0, 0, 0, 0.6) 0px 2px 4px;\n cursor: pointer\n }\n .hina-click-area:after{\n pointer-events: none;\n height: 14px;\n line-height: 14px;\n margin: -7px 0 0 -28px;\n width: 56px;\n color: #fff;\n content: attr(data-click);\n font-size: 14px;\n font-weight: 700;\n left: 50%;\n line-height: 1em;\n position: absolute;\n text-align: center;\n text-indent: 0;\n text-shadow: 1px 1px 2px #000;\n top: 50%;\n z-index: 999;\n}\n');var o,i,l,d=function(o){var i,l,d,a,s=null===(i=o.data)||void 0===i?void 0:i.type;if("view"===s){var r,c,p,u,v=null===(r=o.data)||void 0===r?void 0:r.lastGraph;$("body > .shadeBoxWrap").remove();for(var h=0;h<(null==v?void 0:v.length);h++){var x=v[h].H_element_selector;$(x).removeClass("hina-click-area")}e=!1,window.removeEventListener("scroll",(function(){}),!0);for(var f=null===(c=o.data)||void 0===c||null===(p=c.viewData)||void 0===p?void 0:p[0],w=null===(u=[null==f?void 0:f.view100,null==f?void 0:f.view90,null==f?void 0:f.view80,null==f?void 0:f.view70,null==f?void 0:f.view60,null==f?void 0:f.view50,null==f?void 0:f.view40,null==f?void 0:f.view30,null==f?void 0:f.view20,null==f?void 0:f.view10])||void 0===u?void 0:u.map((function(e){return e+n})),b=new Array(10).fill(1).map((function(e,t){return 10*(t+1)})).reverse(),m=function(e){return"\n <span \n style='\n font-size:12px;\n position:absolute;\n padding: 0 12px;\n top: -24px;\n height: 26px;\n line-height: 26px;\n left: 0;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n '>\n ".concat(e,"%\n </span>\n ")},y=0;y<b.length;y++){var g=document.createElement("div");g.setAttribute("style","\n border-bottom: 1px dashed #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n top: 50px;\n z-index:999;\n "),g.setAttribute("class","viewBaseLineStyle");var _=f["view".concat(b[y])];g.style.top="".concat(_+n,"px"),0!==y?f["view".concat(b[y])]-f["view".concat(b[y-1])]>26&&(g.innerHTML=m(b[y])):f["view".concat(b[y])]>26&&(g.innerHTML=m(b[y])),document.body.appendChild(g)}var k=document.createElement("div");k.setAttribute("style","\n border-bottom: 1px solid #0174df;\n height: 1px;\n width: 100%;\n position: absolute;\n z-index: 9999;\n top: 0;\n "),k.setAttribute("class","viewMoveLineStyle"),document.body.appendChild(k),$(document).on("mousemove",(l=function(e){k.style.top="".concat(e.pageY,"px");var t=function(e,t){for(var n=0;n<e.length;n++)if(e[n]>t)return n}(w,e.pageY),n=b[t];k.innerHTML="\n <span \n style='\n font-size:12px;\n height:26px;\n line-height: 26px;\n background: #E6F1FB;\n color: #0174df;\n border-radius: 2px;\n left:50%;\n margin-left:-65px;\n position: absolute;\n top:-13px;\n padding: 0 5px;\n '>\n ".concat(n||0,"%的用户浏览到这里\n </span>\n ")},d=150,a=Date.now(),function(){var e=arguments;Date.now()-a>=d&&(l.apply(this,e),a=Date.now())}))}else if("click"===s){var E,H,B;e=!0,$("body > .viewBaseLineStyle").remove(),$("body > .viewMoveLineStyle").remove();var C=null===(E=o.data)||void 0===E?void 0:E.hotData,A=null===(H=o.data)||void 0===H?void 0:H.isResize,L=null===(B=o.data)||void 0===B?void 0:B.lastGraph;if(A&&$("body > .shadeBoxWrap").remove(),null==C||!C.length){for(var W=0;W<(null==L?void 0:L.length);W++){var T=L[W].H_element_selector;$(T).removeClass("hina-click-area")}return}for(var S=function(){var e,n,o,i,l,d,a,s,r=C[z];r.H_element_content;var c=r.H_element_selector;r.button_click_prop;var p=r.button_click_rate;r.button_click_times,r.button_click_users,r.his_H_element_content;var u=document.createElement("div");u.setAttribute("style","position: relative;\n "),u.setAttribute("class","hina-click-area");var v=function(e){var n=e.H_element_content;e.H_element_selector;var o=e.button_click_prop,i=e.button_click_rate,l=e.button_click_times,d=e.button_click_users,a=e.his_H_element_content,s="\n <div style='padding: 8px;'>\n <div style='color: #CACACA'>当前内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>".concat(n||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <table style='width:100%;color:#fff;font-size:13px;background:#333;border:1px solid #333;'>\n <tr>\n <td>点击次数:</td>\n <td style='text-align:right;'>").concat(l,"</td>\n </tr>\n <tr>\n <td>点击人数:</td>\n <td style='text-align:right;'>").concat(d,"</td>\n </tr>\n <tr>\n <td>点击率:</td>\n <td style='text-align:right;'>").concat(i,"</td>\n </tr>\n <tr>\n <td>点击占比:</td>\n <td style='text-align:right;'>").concat(o,"</td>\n </tr>\n </table>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 8px;'>\n <div style='color: #CACACA;'>历史内容:</div>\n <div style='white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>").concat(a||"-","</div>\n </div>\n <div style='background: #444; height:1px;'></div>\n <div style='padding: 6px 8px;' class='user-list' hina-tag-disable='true'>\n <p style='color:#2a90e2;text-decoration: none;'>查看用户列表</p>\n </div>\n "),r=document.createElement("div");return document.body.appendChild(r),r.setAttribute("class","shadeBoxWrap"),r.setAttribute("style","\n border-radius:3px;\n display: none;\n border:1px solid #000;\n cursor: pointer;\n position: absolute;\n left:0;\n top:0;\n background: #333;\n line-height:24px;\n font-size:13px;\n width:".concat(220,"px;\n height:").concat(t,"px;\n color: #fff;\n box-shadow: 0 2px 4px rgba(0,0,0,0.24);\n z-index:9999;\n ")),r.innerHTML=s,r}(C[z]),h=null===(e=$(c))||void 0===e||null===(n=e.offset())||void 0===n?void 0:n.left,x=window.scrollY,f=$(window).width(),w=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight||0,b=null===(o=$(c))||void 0===o||null===(i=o.position())||void 0===i?void 0:i.top,m=null===(l=$(c))||void 0===l||null===(d=l.offset())||void 0===d?void 0:d.top,y=null===(a=$(c))||void 0===a?void 0:a.css("width"),g=null===(s=$(c))||void 0===s?void 0:s.css("height");$(c).addClass("hina-click-area"),$(c).css("position","relative"),$("".concat(c,":before")).css("position","absolute"),$(c).attr("data-click",p),[y,g,"undefined"].includes("0px")&&($(c).removeClass("display","inline-block"),$(c).css("width","15px"),$(c).css("height","15px")),$(c).mouseenter((function(){if($("body > .shadeBoxWrap > .user-list > p").attr("drillSelector",c),m<50?$("body > .shadeBoxWrap").css("position","fixed"):$("body > .shadeBoxWrap").css("position","absolute"),v.style.display="block",f-h<220)return v.style.left="".concat(h-220,"px"),void(v.style.top="".concat(m>t?m+parseFloat(g)-t:m,"px"));v.style.left="".concat(h,"px"),w-m>t?window.scrollY>t?v.style.top="".concat(b+parseFloat(g),"px"):v.style.top="".concat(m+parseFloat(g)-x,"px"):v.style.top="".concat(m-t,"px");var e=parseInt(v.style.top);e-=window.__POWERED_BY_WUJIE__?40:0,v.style.top=e+"px"})),$(c).mouseleave((function(){})),v.addEventListener("mouseenter",(function(){v.style.display="block"})),v.addEventListener("mouseleave",(function(){$("body > .shadeBoxWrap").css("display","none")}))},z=0;z<(null==C?void 0:C.length);z++)S();$("body > .shadeBoxWrap > .user-list > p").on("click",(function(e){var t,n,i,l,d,a;o.stopPropagation(),window.__POWERED_BY_WUJIE__?window.$wujie.bus.$emit("hotClick",{eleSelector:null==e||null===(t=e.target)||void 0===t||null===(n=t.attributes)||void 0===n||null===(i=n.drillselector)||void 0===i?void 0:i.value,isHotSdkPost:!0}):window.parent.postMessage({eleSelector:null==e||null===(l=e.target)||void 0===l||null===(d=l.attributes)||void 0===d||null===(a=d.drillselector)||void 0===a?void 0:a.value,isHotSdkPost:!0},"*")}))}};return window.__POWERED_BY_WUJIE__?window.$wujie.bus.$on("hotView",(function(e){d(e)})):window.addEventListener("message",(function(e){d(e)}),!1),window.addEventListener("scroll",(o=function(){e&&window.parent.postMessage({isRefush:!0,isHotSdkPost:!0},"*")},i=800,l=null,function(){null!==l&&clearTimeout(l),l=setTimeout(o,i)}),!0),{getHotClickData:d}}return e.async="async",e.src="https://s3-model.hinadt.com/files/jquery.min.js",e.type="text/javascript",e.addEventListener("load",t),document.head.appendChild(e),t},"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self)["hina-epm"]=t();
package/package.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "hina-cloud-js-sdk",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "description": "hinaCloud javascript sdk",
5
5
  "main": "build/hina.min.js",
6
6
  "jsnext:main": "build/hina.esm.min.js",
7
-
8
7
  "scripts": {
9
8
  "test": "echo \"Error: no test specified\" && exit 1",
10
9
  "build": "rollup -c",
@@ -19,8 +18,9 @@
19
18
  },
20
19
  "keywords": [
21
20
  "sdk",
22
- "javascript",
23
- "hinaCloud"
21
+ "hinaCloud",
22
+ "hina-cloud-js-sdk",
23
+ "hinaCloudJsSdk"
24
24
  ],
25
25
  "devDependencies": {
26
26
  "@babel/cli": "^7.23.9",
@@ -33,7 +33,7 @@
33
33
  "rollup": "^2.53.1",
34
34
  "rollup-plugin-babel": "^4.4.0",
35
35
  "rollup-plugin-copy": "^3.5.0",
36
- "rollup-plugin-javascript-obfuscator": "^1.0.8",
36
+ "rollup-plugin-javascript-obfuscator": "^1.0.4",
37
37
  "rollup-plugin-uglify": "^6.0.4",
38
38
  "rollup-watch": "^4.3.1"
39
39
  },
@@ -43,6 +43,8 @@
43
43
  "@sentry/browser": "^7.105.0",
44
44
  "axios": "^1.6.7",
45
45
  "crypto": "^1.0.1",
46
+ "hina-cloud-js-sdk": "^3.1.4",
47
+ "jquery": "^3.7.1",
46
48
  "mobile-detect": "^1.4.5",
47
49
  "raven-js": "^3.27.2"
48
50
  }