4 Star 3 Fork 2

Ax/webpack-test-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sgm-web-3.0.6.js 18.18 KB
一键复制 编辑 原始数据 按行查看 历史
Ax 提交于 2023-06-16 17:02 +08:00 . tree-graph-react
/*! JD SGM Web前端监控脚本; Version 3.0.6; BuildTime 1679641645280; 京Me群82402193、yangjijiang@jd.com */var WIN=window;!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SgmWebSdkIndex=e()}(this,(function(){"use strict";function t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function e(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?t(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function i(t,e,n){return e&&o(t.prototype,e),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){if(null==t)return{};var n,r,o=function(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(o[n]=t[n])}return o}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){s=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var l=function(){function t(){r(this,t),this.PFinally(),this.RequestIdleCallback()}return i(t,[{key:"PFinally",value:function(){Promise&&Promise.prototype&&!Promise.prototype.finally&&(Promise.prototype.finally=function(t){return this.then((function(e){return Promise.resolve(t()).then((function(){return e}))}),(function(e){return Promise.resolve(t()).then((function(){throw e}))}))})}},{key:"RequestIdleCallback",value:function(){window.requestIdleCallback||(window.requestIdleCallback=function(t){var e=Date.now();return setTimeout((function(){t({timeRemaining:function(){return Math.max(0,50-(Date.now()-e))},didTimeout:!1})}),20)})}}]),t}();function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=document.location,n=e.origin,r=e.protocol,o=e.host,i=e.hostname,a=e.port;return 0===t.indexOf("http")?t:0===t.indexOf("//")?r+t:(n||"".concat(r,"//").concat(o||i+(a?":".concat(a):"")))+(0===t.indexOf("/")?t:"/".concat(t))}function h(){var t=document.location,e=t.origin,n=t.protocol,r=t.host,o=t.hostname,i=t.port;return e||"".concat(n,"//").concat(r||o+(i?":".concat(i):""))}function p(t){if(t){var e={js:["js"],css:["css"],img:["jpg","jpeg","png","gif","ico","svg","avif","apng","webp"],other:["woff","woff2","eot","ttf","otf","json","htm","html","txt","pdf","md","mp3","mp4","mov","ogg","webm"]};try{t=f(t);var n=new URL(t).pathname,r=n.lastIndexOf(".");if(r>1){var o=n.substring(r+1).toLowerCase(),i=Object.keys(e).find((function(t){return e[t].includes(o)}));if(i)return{type:i,href:t,extName:o}}}catch(t){}}}function d(t){if(!t)return!1;if(/^((http|https):)?\/\//.test(t)){var e=c(t.split("/"),3),n=e[0],r=e[2],o=document.location,i=o.origin,a=o.protocol,s=o.host,u=o.hostname,l=o.port;return(i||"".concat(a,"//").concat(s||u+(l?":".concat(l):"")))==="".concat(n||a,"//").concat(r)}return!0}function v(t,e){if(!t||!e||!e.length)return!1;t.indexOf("?")>-1&&(t=t.split("?")[0]);var n=!1;return e.forEach((function(e){if(!n)if(e.indexOf("!")===e.length-1&&"!"!==e){var r=e.substring(0,e.length-1);if("function"==typeof t.endsWith)n=t.endsWith(r);else{var o=t.length-r.length,i=t.substring(o,t.length);n=i===r}}else n=t.indexOf(e)>-1})),n}function g(t){var e=document,n=e.body,r=e.documentElement;return Math.max(n?n.scrollHeight:0,n?n.offsetHeight:0,r.clientHeight,r.scrollHeight,r.offsetHeight)}function y(t){return window.innerHeight||document.documentElement.clientHeight}function m(){var t=window.performance;if(t&&"function"==typeof t.now){if(t.timeOrigin)return t.timeOrigin+t.now();if(t.timing&&t.timing.navigationStart)return t.timing.navigationStart+t.now()}return"function"==typeof Date.now?Date.now():(new Date).getTime()}function b(){try{return window&&void 0!==window.crypto&&window.crypto.getRandomValues?+([1e3].toString()+-1e3+-4e3+-8e3+-1e6).replace(/[018]/g,(function(t){return(t^window.crypto.getRandomValues(new window.Uint8Array(1))[0]&15>>t/4).toString()})).replace(/-/g,"").substring(0,18):+"xxx-xxx-4xxx-yxxx-xxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString()})).replace(/-/g,"").substring(0,18)}catch(t){}return 0}!function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase())}();var w=function(){function t(){r(this,t),this.pathInfo={newURL:document.location.href,oldURL:document.referrer,eventType:""},["scroll"].forEach((function(e){document.addEventListener(e,(function(e){t.scrollInfo.soy=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,t.scrollInfo.soy>t.scrollInfo.som&&(t.scrollInfo.som=t.scrollInfo.soy),t.scrollInfo.rat=+(t.scrollInfo.soy/(g()-y())).toFixed(2),t.scrollInfo.ram=+(t.scrollInfo.som/(g()-y())).toFixed(2)}),{capture:!0,passive:!0})})),["click","touchstart","mousedown","keydown","mouseover"].forEach((function(e){document.addEventListener(e,(function(e){t.lastEvent=e}),{capture:!0,passive:!0})})),this.PathStateChange()}return i(t,[{key:"PathStateChange",value:function(){var t=this,e=function(t,e){return!(!e||"string"!=typeof e||e===t)&&(t=t.replace(/\?.*$/,"").replace(/#.*$/,""))!==(e=e.replace(/\?.*$/,"").replace(/#.*$/,""))},n=function(e,n){t.pathInfo=n;try{var r;window.CustomEvent?r=new CustomEvent(e,{detail:n}):((r=document.createEvent("HTMLEvents")).initEvent(e,!1,!0),r.detail=n),window.dispatchEvent(r)}catch(t){}};["pushState","replaceState"].forEach((function(t){var r=window.history[t];"function"==typeof r&&(window.history[t]=function(){var o=arguments[2];if(o){/^((http|https):)?\/\//.test(o)||(o=h()+(0!==o.indexOf("/")?"/".concat(o):o));var i=document.location.href;e(i,o)&&n("pathchange",{oldURL:i,newURL:o,eventType:t})}return r.apply(this,arguments)},history[t].toString="sgm custom: ".concat(t,"() { [native code] }"))})),window.addEventListener("hashchange",(function(t){var e=t.newURL,r=t.oldURL;n("pathchange",{oldURL:r,newURL:e,eventType:"hashChange"})}),!0)}},{key:"getURL",value:function(){var t=this.pathInfo,e=t.newURL,n=void 0===e?document.location.href:e,r=t.oldURL;return{pageUrl:n,referrer:(void 0===r?document.referrer:r)||void 0}}},{key:"getEvent",value:function(n){var r;try{t.lastEventList.push({key:n,lastEvent:t.lastEvent}),t.lastEventList.length>10&&t.lastEventList.shift();var o=t.lastEventList.find((function(t){return t.key===n}));return e({key:n,time:Date.now(),lastEvent:null!=(r=null==o?void 0:o.lastEvent)?r:t.lastEvent,scrollInfo:e({},t.scrollInfo),activeElement:document.activeElement},this.getURL())}catch(t){}return{}}}],[{key:"getInstance",value:function(){return void 0===this.info&&(this.info=new t),this.info}}]),t}(),E=w;E.lastEventList=[],E.scrollInfo={soy:0,som:0,rat:0,ram:0};var I={prefix:"__sgm__",isEncrypt:!0},x=function(t){try{var e=(n=S(t),window.localStorage.getItem(n)||"");return JSON.parse(I.isEncrypt?k(e):e).value||{}}catch(t){return{}}var n},S=function(t){var e,n,r,o=null!=(e=null==I?void 0:I.prefix)?e:"";return(null!=(r=null==(n=WIN[o])?void 0:n.id)?r:"")+o+t},k=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return atob(t)},L=["pageUrl"],O=["globStatus"],_="__sgm__",N=E.getInstance(),P=function(){function t(e,n,o){r(this,t);try{this.XHR(e,n,o),this.Fetch(n,o)}catch(t){e.sdkError(t)}}return i(t,[{key:"Fetch",value:function(n,r){function o(t){if(t[0]instanceof WIN.Request){var e=t[0];return[e.url,e.headers]}var n=c(t,2),r=n[0],o=n[1],i=void 0===o?{}:o;return i.headers||(i.headers={}),[r,i.headers]}var i=WIN.__sgm__oldFetch=WIN.fetch;WIN.fetch=function(){var a=arguments,s=b(),u=N.getEvent(s),l=o(arguments),f=c(l,2),h=f[0],d=f[1],v=p(h);v||t.appendRequestHeader.call(this,s,h,d);var g={},y=i.apply(this,arguments).then((function(t){try{g=t.clone()}catch(e){g=t}return t})).catch((function(t){throw g=t})).finally((function(){var t="fetch";v?g.ok||r&&r.push(t,g.status,g,v.href,u):n&&n.push(g,e(e({url:h},u),{},{requestType:t,args:a}))}));return y}}},{key:"XHR",value:function(n,r,o){var i=WIN.XMLHttpRequest,a=i.prototype.__sgm__oldXHROpen=i.prototype.open;i.prototype.open=function(t,e,n,r,o){return this._args_={method:t,url:e,async:n,username:r,password:o,eve:N.getEvent(b())},a.apply(this,arguments)};var s=i.prototype.__sgm__oldXHRSend=i.prototype.send;i.prototype.send=function(i){var a=this;try{var c=this._args_,u=c.url,l=c.method,f=c.eve,h=p(u);h||t.appendRequestHeader.call(this,f.key,u);var d=function(t){try{var a="xmlhttprequest";if(h){var s=(t.target||{}).status;(s<200||s>299)&&o&&o.push(a,s,t,h.href,f)}else r&&r.push(t,e(e({url:u,body:i,method:l},f),{},{requestType:a}))}catch(t){n.sdkError(t)}};["load","error","abort","timeout"].forEach((function(t){a.addEventListener(t,d)}))}catch(t){n.sdkError(t)}return s.apply(this,arguments)}}}],[{key:"appendRequestHeader",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e)try{var r=x("config")||{},o=r.corsWhiteList,i=f(e);if(d(i)||v(i,o)){var a="Sgm-Context",s="".concat(t,";").concat(t);this instanceof WIN.XMLHttpRequest?this.setRequestHeader(a,s):n instanceof WIN.Headers?n.append(a,s):n[a]=s}}catch(t){}}}]),t}(),R=function(){function t(n){r(this,t),this.app=n;var o=this;WIN[_].api=function(t,r){var i=t.url,a=t.status,s=t.method,c=void 0===s?"GET":s,u=t.requestBody,l=t.responseData,f=t.requestType,h=void 0===f?"script":f,p=t.code,d=t.msg;try{if(i&&void 0!==a){var v=N.getEvent(b()),g=r?WIN[_+r]:n;l||(l={},d&&(l.msg=d),p&&(l.code=p)),o.push(new WIN.Event("manual"),e(e({},v),{},{requestType:h,args:{url:i,status:a,method:c,requestBody:u,responseData:l}}),g)}}catch(t){n.sdkError(t)}}}return i(t,[{key:"push",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.app;try{requestIdleCallback((function(){if(r&&r.getStatus("api"))if("fetch"===(n=r.appendURL(n)).requestType)if(t instanceof WIN.Error){var o=new WIN.Event("fetchError");o.url=n.url,o.status=0,o.statusText="error",o._extend_=e(e({},n),{},{requestStatus:"error"}),r.apiStorage.push(o)}else{t._extend_=e(e({},n),{},{requestStatus:"load"});try{t.clone().text().then((function(e){t._extend_.responseText=e,r.apiStorage.push(t)}))}catch(e){r.apiStorage.push(t)}}else t._extend_=n,r.apiStorage.push(t)}))}catch(t){this.app.sdkError(t)}}}]),t}(),W=function(){function t(e,n){var o=this;r(this,t),WIN[_].error=function(n,r){n&&t.storagePush({app:r?WIN[_+r]:e,entry:n,mode:1})};var i=function(r){return function(i){o.resourceError(i,n)&&t.storagePush({app:e,entry:i,type:r})}};WIN.addEventListener("error",i(),!0),WIN.addEventListener("unhandledrejection",i("promise"),!0)}return i(t,[{key:"resourceError",value:function(t,e){var n=t.target,r=t.reason;return t&&WIN.Event===t.constructor&&n&&(n.src||n.href)?(e&&e.push(n.tagName,0,t,n.src||n.href),!1):!r||!r.initiatorType}}],[{key:"storagePush",value:function(t){var r=t.app,o=t.entry,i=t.mode,a=t.type;try{var s=N.getEvent(b());requestIdleCallback((function(){r&&r.getStatus("error")&&o&&"object"===n(o)&&(o._extend_=e({mode:i},r.appendURL(s)),o._t_=a,r.errorStorage.push(o))}))}catch(t){}}}]),t}(),j=function(){function t(e){var n=this;r(this,t),this.app=e;try{WIN.PerformanceResourceTiming&&WIN.PerformanceObserver&&new WIN.PerformanceObserver((function(t){t.getEntries().forEach((function(t){n.storagePush(t)}))})).observe({type:"resource",buffered:!0})}catch(t){e.sdkError(t)}}return i(t,[{key:"push",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;n&&(n.name=r,n.stu=e,n.initiatorType=t.toLowerCase(),this.storagePush(n,o))}},{key:"storagePush",value:function(t,e){var n=this,r=e||N.getEvent(b());requestIdleCallback((function(){n.app.getStatus("resource")&&t&&p(t.name)&&(t._extend_=n.app.appendURL(r),n.app.resourceStorage.push(t))}))}}]),t}(),T=i((function t(o){r(this,t),WIN[_].custom=function(t,r){var i=t.type,a=void 0===i?1:i,s=t.code,c=t.msg,u=t.cost1,l=void 0===u?0:u,f=t.cost2,h=void 0===f?0:f,p=t.cost3,d=void 0===p?0:p,v=t.cost4,g=void 0===v?0:v;if(c)try{requestIdleCallback((function(){var t=r?WIN[_+r]:o;t&&t.getStatus("custom")&&("object"===n(c)&&(c=JSON.stringify(c)),t.customStorage.push(e(e({},N.getEvent(b())),{},{type:a,code:s,msg:c,cost1:l,cost2:h,cost3:d,cost4:g})))}))}catch(t){o.sdkError(t)}}})),U=function(){function t(e){var n=this;r(this,t),WIN.addEventListener("beforeunload",(function(){n.onePush(e)}),!0),WIN.addEventListener("pagehide",(function(){n.onePush(e)}),!0),document.addEventListener("visibilitychange",(function(){document.hidden&&n.onePush(e)}),!0),WIN.addEventListener("pathchange",(function(t){var r;n.push(e,null==(r=null==t?void 0:t.detail)?void 0:r.eventType)}),!0),this.generateFmp(e)}return i(t,[{key:"generateFmp",value:function(e){var n,r=m(),o=[],i=this;function a(t,e,n){var r=0,o=t.tagName;if("SCRIPT"!==o&&"STYLE"!==o&&"META"!==o&&"HEAD"!==o){var i=t.children?t.children.length:0;if(i>0)for(var s=t.children,c=i-1;c>=0;c--)r+=a(s[c],e+1,r>0);if(r<=0&&!n)if(((t.getBoundingClientRect&&t.getBoundingClientRect()||{}).top||0)>(WIN.innerHeight||0))return 0;r+=1+.5*e}return r}WIN.MutationObserver&&(n=new WIN.MutationObserver((function(){try{var i=m()-r,s=document.body;if(s){var c=a(s,1,!1);o.push({score:c,time:i})}else o.push({score:0,time:i});"complete"===document.readyState&&(t.Fmp=function(t){t=function t(e){for(var n=1;n<e.length;n++)if(e[n].score<e[n-1].score)return e.splice(n,1),t(e);return e}(t);var e=null;if(1===t.length)e={time:t[0].time};else for(var n=1;n<t.length;n++)if(t[n].time>=t[n-1].time){var r=t[n].score-t[n-1].score;(!e||e.rate<=r)&&(e={time:t[n].time,rate:r})}return null==e?void 0:e.time}(o))}catch(t){n&&n.disconnect(),n=null,e.sdkError(t)}}))).observe(document,{childList:!0,subtree:!0}),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;setTimeout((function(){n&&n.disconnect(),n=null,i.onePush(e)}),t)}()}},{key:"onePush",value:function(e){t.IsPush||(t.IsPush=!0,this.push(e))}},{key:"push",value:function(n,r){if(n&&n.getStatus("page")){var o=N.getEvent(b()),i=o.pageUrl,a=s(o,L);r||(i=t.FirstPage),n.pageStorage.push(e({fmp:t.Fmp,openType:r,pageUrl:i},a))}}}]),t}(),q=U;q.FirstPage=document.location.href;var C=function(){function t(e,n,o,i,a,s){r(this,t),this.maxMessageLength=256,this.apiStorage=[],this.errorStorage=[],this.resourceStorage=[],this.customStorage=[],this.pageStorage=[],this.sid=e,this.appKey=n,this.sdkName=o,this.origin=i,this.userKeys=a,this.initDomain=s,WIN[_]={id:n,api:function(){},error:function(){},custom:function(){},onLaunch:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500;void 0!==this.onLaunch.type?t(this.onLaunch.type):(this.onLaunch.callbacks||(this.onLaunch.callbacks=[]),this.onLaunch.callbacks.push(t),setTimeout((function(){void 0===e.onLaunch.type&&(e.onLaunch.type=0,e.onLaunch.callbacks.forEach((function(t){return t(0)})))}),n))}};try{if(e&&n&&o){var c,u;WIN[_+n]=this;try{new l}catch(t){this.sdkError(t)}try{c=new R(this)}catch(t){this.sdkError(t)}try{u=new j(this)}catch(t){this.sdkError(t)}try{new q(this)}catch(t){this.sdkError(t)}try{new T(this)}catch(t){this.sdkError(t)}try{new W(this,u)}catch(t){}try{new P(this,c,u)}catch(t){this.sdkError(t)}i&&this.appendScript()}}catch(t){}}return i(t,[{key:"sdkError",value:function(t){t&&"object"===n(t)&&(t.appName="sgm-js",W.storagePush({app:this,entry:t,mode:1}))}},{key:"getStatus",value:function(t){var e,n=x("config")||{},r=n.globStatus,o=void 0===r||r,i=s(n,O),a=o&&(null==(e=i[t+"Status"])||e),c=this[t+"Storage"]||[];return a&&c.length<this.maxMessageLength}},{key:"appendURL",value:function(t){var e=N.getURL(),n=e.pageUrl,r=e.referrer;return Object.assign(t,{pageUrl:n,referrer:r})}},{key:"appendScript",value:function(){var t=document.createElement("script"),e=function(e,n){t.setAttribute(e,n)};t.async=!0,t.crossOrigin="anonymous",t.src="".concat(this.origin,"/sgm-web-main-","3.0.6",".js"),e("name",this.sdkName),e("sid",this.sid),e("pid",this.appKey),this.userKeys&&e("userKeys",this.userKeys),this.initDomain&&e("initDomain",this.initDomain),document.head&&document.head.appendChild(t)}}]),t}(),H=document.currentScript;if(H&&!WIN[_]){var D=function(t){return H.getAttribute(t)},F=new URL(H.src).href,M=D("sid"),A=D("pid")||D("appKey"),K=D("name"),X=D("userKeys"),$=D("initDomain"),B=WIN[D("rcn")||"__sgm_runtime_config__"];B&&B.initDomain&&($=B.initDomain),M&&A&&K?new C(M,A,K,F.substring(0,F.lastIndexOf("/")),X,$):WIN.console.warn("格式有误,正确格式:",'<script crossOrigin src="https://sgm-static.jd.com/sgm-x.x.x.js" name="SGMH5" sid="xxx" pid="xxx"/>')}return C}));
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/ajaxget/webpack-test-web.git
git@gitee.com:ajaxget/webpack-test-web.git
ajaxget
webpack-test-web
webpack-test-web
master

搜索帮助