/**! __BUGME_START__ */ !function(){"use strict";var ERuntimeRemoteObjectType,ERuntimeRemoteObjectSubType;!function(e){e.Object="object",e.Function="function",e.Undefined="undefined",e.String="string",e.Number="number",e.Boolean="boolean",e.Symbol="Symbol",e.Bigint="bigint",e.Wasm="wasm"}(ERuntimeRemoteObjectType||(ERuntimeRemoteObjectType={})),function(e){e.Error="error",e.Array="array",e.Null="null"}(ERuntimeRemoteObjectSubType||(ERuntimeRemoteObjectSubType={}));var appxStackLine=/https:\/\/appx\/af-appx\.worker\.min\.js:\d+:\d+/,nativeScriptLine=/https:\/\/www\.alipay\.com\/?:\d+:\d+|\[native code\]/,pluginWorkerStackLine=/https:\/\/\d+\.hybrid\.\S+\.com\/__plugins__\/(\d+)\/index\.worker\.js:\d+:\d+/,appWorkerStackLine=/https:\/\/\d+\.hybrid\.\S+\.com\/index\.worker\.js:\d+:\d+/;function transformSourceUrl(e){try{return pluginWorkerStackLine.test(e)?e.replace(pluginWorkerStackLine,"Plugin-$1"):e.replace(appWorkerStackLine,"App")}catch(t){return e}}function formatStack(e){var t=e.split("\n"),n=t[0],s=t.slice(1).filter((function(e){return!appxStackLine.test(e)&&!nativeScriptLine.test(e)})).map(transformSourceUrl).map((function(e){return" "===e[0]?e:" "+e}));return s.unshift(n),s.join("\n")}function error2RemoteObject(e){var t=e.name,n=e.message,s=e.stack;"string"!=typeof s&&(s=e.toString()),-1===s.indexOf(t)&&(s=e.toString()+"\n"+s);try{s=formatStack(s)}catch(e){}return{className:t,description:s,preview:{description:s,overflow:!1,properties:[{name:"stack",type:ERuntimeRemoteObjectType.String,value:s},{name:"message",type:ERuntimeRemoteObjectType.String,value:n}],subtype:ERuntimeRemoteObjectSubType.Error,type:ERuntimeRemoteObjectType.Object},subtype:ERuntimeRemoteObjectSubType.Error,type:ERuntimeRemoteObjectType.Object}}function isError(e){try{return"[object Error]"===Object.prototype.toString.call(e)}catch(e){return!1}}function getStartupParams(){if("undefined"!=typeof __appxStartupParams&&__appxStartupParams&&__appxStartupParams.appId)return __appxStartupParams;if("undefined"!=typeof my)try{return my.callSync("getStartupParams")||{}}catch(e){}return{}}var serverConfig={default:{domain:"hpmweb.alipay.com"},1:{domain:"hpmweb.alipay.com"}},ResponseEvent,RequestMethod,BreakStepType,FingerType;function getServerConfig(){var e=getStartupParams().remoteCh;return e&&serverConfig[e]?serverConfig[e]:serverConfig.default}!function(e){e.ById="Tyro.byId",e.Sticky="Tyro.sticky",e.StickyNotSendPaused="Tyro.stickyNotSendPaused",e.StickyAsync="Tyro.stickyAsync",e.ScriptSource="Tyro.scriptSource",e.Resumed="Debugger.resumed",e.ConsoleAPICalled="Runtime.consoleAPICalled"}(ResponseEvent||(ResponseEvent={})),function(e){e.DiscardConsoleEntries="Tyro.discardConsoleEntries",e.Evaluate="Tyro.evaluate",e.EvaluateOnCallFrame="Tyro.evaluateOnCallFrame",e.CallFunctionOn="Tyro.callFunctionOn",e.CompileScript="Tyro.compileScript",e.SetBreakpointsActive="Tyro.setBreakpointsActive",e.SetSkipAllPauses="Tyro.setSkipAllPauses",e.Resume="Tyro.resume",e.StepInto="Tyro.stepInto",e.StepOver="Tyro.stepOver",e.StepOut="Tyro.stepOut",e.Pause="Tyro.pause",e.GetPossibleBreakpoints="Tyro.getPossibleBreakpoints",e.SetBreakpointByUrl="Tyro.setBreakpointByUrl",e.SetBreakpoint="Tyro.setBreakpoint",e.RemoveBreakpoint="Tyro.removeBreakpoint",e.REPL="Tyro.repl",e.GetVariableValue="Tyro.getVariableValue",e.SetPauseOnExceptions="Tyro.setPauseOnExceptions",e.SetAsyncCallStackDepth="Tyro.setAsyncCallStackDepth",e.GetProperties="Tyro.getProperties"}(RequestMethod||(RequestMethod={})),function(e){e[e.Non=0]="Non",e[e.NextSticky=1]="NextSticky",e[e.StepOver=2]="StepOver",e[e.StepOut=3]="StepOut"}(BreakStepType||(BreakStepType={})),function(e){e[e.Entry=0]="Entry",e[e.Exit=1]="Exit"}(FingerType||(FingerType={}));var TyroUtil=function(){function e(){}return e.throwsMessage=function(e){return"[Throws: "+(e?e.message:"?")+"]"},e.safeGetValueFromPropertyOnObject=function(t,n){if(Object.prototype.hasOwnProperty.call(t,n))try{return t[n]}catch(t){return e.throwsMessage(t)}return t[n]},e.ensureProperties=function(t){var n=[];return function t(s){if(null===s||"object"!=typeof s)return s;if(-1!==n.indexOf(s))return"[Circular]";if(n.push(s),"function"==typeof s.toJSON)try{var r=t(s.toJSON());return n.pop(),r}catch(t){return e.throwsMessage(t)}if(Array.isArray(s)){var i=s.map(t);return n.pop(),i}var o=Object.keys(s).reduce((function(n,r){return n[r]=t(e.safeGetValueFromPropertyOnObject(s,r)),n}),{});return n.pop(),o}(t)},e.safeJSONStringify=function(t,n,s){return JSON.stringify(e.ensureProperties(t),n,s)},e.isWebIDE=function(){return!("undefined"==typeof navigator||!navigator)&&(navigator.swuserAgent||navigator.userAgent||"").indexOf("AlipayIDE")>-1},e}(),StickyFinger=function(){function StickyFinger(e,t,n,s){var r=this;this.isWebIDE=!1,this.asyncRequestMethod="tyroRequest",this.host=t,this.contextMap={},this.contextUrlMap={},this.breakpointMap={},this.breakpointIdMap={},this.debuggerMap={},this.objectMap={},this.originConsoleAPI={},this.requestTaskId=0,this.stickyMsgQueue=[],this.wsMsgQueue=[],this.wsIsOpen=!1,this.instrumentId=n,this.stickyFlag=s.stickyFlag,this.fingerFlag=s.fingerFlag,this.hookConsole(),this.stickyFlag&&(setTimeout((function(){r.socketTask=my.connectSocket({url:"wss://"+getServerConfig().domain+"/tyro/agent/"+r.instrumentId,multiple:!0});var e=function(){if(!r.wsIsOpen){r.originConsoleAPI.log("[tyro-agent] WebSocket 连接成功"),r.wsIsOpen=!0;for(var e=0,t=r.wsMsgQueue;e {\n const localObject = {};\n for (const key of Agent.getScopeVariables()) {\n localObject[key] = (() => {try{return eval(key)}catch(e){return undefined}})();\n }\n Agent.inflateStickyParamsObject(localObject);\n return true;\n })()"}this.originConsoleAPI.log("[tyro-agent] sticky sendStickyParams step 2"),s=this.stickyParams,this.sendStickyParams=!1}this.originConsoleAPI.log("[tyro-agent] sticky params "+TyroUtil.safeJSONStringify(s));var o=JSON.parse(this.xhrSend(ResponseEvent.Sticky,s));return this.handleSticky(o)}},StickyFinger.prototype.fingerEntry=function(e,t){var n=this.contextMap[e].path,s=this.contextMap[e].function[t],r=this.generateFingerId(),i={time:Date.now(),file:n,line:s.line,name:s.name,id:r,type:FingerType.Entry};return this.fingerCache.push(i),r},StickyFinger.prototype.fingerExit=function(e,t,n){var s=this.contextMap[e].path,r=this.contextMap[e].function[t],i={time:Date.now(),file:s,line:r.line,name:r.name,id:n,type:FingerType.Exit};this.fingerCache.push(i)},StickyFinger.prototype.sendPerf=function(e,t){self.bugmeAPI?self.bugmeAPI.send({method:e,params:t}):self.document?self.document.addEventListener("bugmeInjected",(function(){self.bugmeAPI.send({method:e,params:t})})):self.addEventListener&&self.addEventListener("bugmeInjected",(function(){self.bugmeAPI.send({method:e,params:t})}))},StickyFinger.prototype.hookConsole=function(){var e=this;this.originConsoleAPI.log=console.log.bind(console),this.originConsoleAPI.debug=console.debug.bind(console),this.originConsoleAPI.info=console.info.bind(console),this.originConsoleAPI.error=console.error.bind(console),this.originConsoleAPI.warn=console.warn.bind(console),console.log=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var r={type:"log",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,r,null,!1)}},console.debug=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var r={type:"debug",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,r,null,!1)}},console.info=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var r={type:"info",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,r,null,!1)}},console.error=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var r={type:"error",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,r,null,!1)}},console.warn=function(){for(var t,n=[],s=0;s0&&"string"==typeof n[0]&&(n[0].indexOf("[framework]")>=0||n[0].indexOf("dispatchEvent")>=0||n[0].indexOf("onMessage push")>=0))){var r={type:"warning",args:n.map((function(t){return e.objectToRemoteObject(t,null,"object"==typeof t)})),executionContextId:0,timestamp:(new Date).getTime()};e.xhrSend(ResponseEvent.ConsoleAPICalled,r,null,!1)}}},StickyFinger.prototype.inflateStickyParamsObject=function(e){if(0!==this.stickyParams.callFrames.length){this.generateObjectId+=1;var t=String(this.generateObjectId);this.objectMap[t]=e,this.stickyParams.callFrames[0].scopeChain.push({type:"local",name:this.stickyParams.callFrames[0].functionName,object:{className:"Object",description:"Object",objectId:t,type:"object"}})}},StickyFinger.prototype.processCallFrames=function(e,t,n,s){var r=this,i=[],o=s.slice(3,s.length).map((function(e){return e.substr(0,e.lastIndexOf(":")).replace(" at ","").replace(" (",":")})),a=0,c=!0;return o.map((function(t){var s=t.split(":"),o=s[0],p=r.contextMap[e].path,u=Number(s[s.length-1]),l=r.contextUrlMap[p]||"none",y=a+":"+u+":"+p;c&&(r.scopeVariables=void 0!==r.contextMap[e]?r.contextMap[e].scope[n]:[],c=!1);var h={callFrameId:y,functionName:o,location:{scriptId:l,lineNumber:u,columnNumber:0},url:p,scopeChain:[],this:{}};i.push(h),a+=1})),i},StickyFinger.prototype.processCallFramesPhone=function(e,t,n,s){var r=this,i=[],o=s.slice(2,s.length).map((function(e){return e.substr(0,e.lastIndexOf(":")).replace(" at ","").replace(" (",":").replace("@",":")})),a=0,c=!0;return o.map((function(s){var o=s.split(":"),p=o[0],u=r.contextMap[e].path,l=Number(o[o.length-1]),y=r.contextUrlMap[u]||"none",h=a+":"+l+":"+u;c&&(r.scopeVariables=void 0!==r.contextMap[e]?r.contextMap[e].scope[n]:[],r.originConsoleAPI.log("scopeVariables "+TyroUtil.safeJSONStringify(r.scopeVariables)),r.originConsoleAPI.log("scopeVariables "+TyroUtil.safeJSONStringify(r.contextMap[e])+" "+r.contextMap[e].scope+" "+n),c=!1);var d={callFrameId:h,functionName:p,location:{scriptId:y,lineNumber:t,columnNumber:0},url:u,scopeChain:[],this:{}};i.push(d),a+=1})),i},StickyFinger.prototype.stickyAsyncLoop=function(){this.xhrSend(ResponseEvent.StickyAsync,{})},StickyFinger.prototype.xhrSendJSAPI=function(e,t,n,s){var r,i=this;if(e===ResponseEvent.Sticky){var o;this.stickyMsgQueue.length>0?(this.stickyMsgQueue.push({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t}),o=TyroUtil.safeJSONStringify(this.stickyMsgQueue),this.stickyMsgQueue=[]):o=TyroUtil.safeJSONStringify({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t}),my.call("showRemoteDebugMask",{text:" ",buttonTitle:"断点命中",hide:!1}),this.stickyNotSendPaused=!1;var a=Date.now(),c=my.callSync("tyroRequest",{url:this.host+"/tyro/agent",method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8","instrument-id":this.instrumentId},data:o,timeout:6e5,blockTimeout:6e5,dataType:"json",requestTaskId:this.requestTaskId++});return my.call("showRemoteDebugMask",{hide:!0}),c.error||null===c?(null===c?this.originConsoleAPI.error("[tyro-agent] xhrSend error result is "+c):this.originConsoleAPI.error("[tyro-agent] xhrSend error "+c.error+" "+c.errorMessage),Date.now()-a>=5e3?this.xhrSendJSAPI(e,t,n,s):TyroUtil.safeJSONStringify({method:"default"})):200!==c.status?(this.originConsoleAPI.error("[tyro-agent] xhrSend status fail "+e+" "+c.status),TyroUtil.safeJSONStringify({method:"default"})):c.data}if(e===ResponseEvent.StickyAsync){var p=TyroUtil.safeJSONStringify({method:ResponseEvent.StickyAsync,params:t});this.originConsoleAPI.info("[tyro-agent] xhrSend async send "+p),my.call(this.asyncRequestMethod,{url:this.host+"/tyro/agent",method:"POST",headers:{"Content-Type":"application/json;charset=UTF-8","instrument-id":this.instrumentId},data:p,timeout:6e5,dataType:"json",requestTaskId:this.requestTaskId++,success:function(e){i.lastStickyAsyncError=0,i.stickyAsyncLoop(),200===e.status?(i.originConsoleAPI.info("[tyro-agent] xhrSend async success "+e.status+" "+e.data),i.handleStickyAsync(JSON.parse(e.data))):i.originConsoleAPI.error("[tyro-agent] xhrSend async fail "+e.status+" "+e.data)},fail:function(e){i.lastStickyAsyncError>=3?setTimeout((function(){i.stickyAsyncLoop()}),3e3):(i.lastStickyAsyncError+=1,i.stickyAsyncLoop()),i.originConsoleAPI.error("[tyro-agent] xhrSend async error "+TyroUtil.safeJSONStringify(e))}})}switch(e){case ResponseEvent.ById:r={id:n,result:t};break;case ResponseEvent.ScriptSource:r={method:ResponseEvent.ScriptSource,params:t};break;case ResponseEvent.Resumed:r={method:ResponseEvent.Resumed,params:t};break;case ResponseEvent.ConsoleAPICalled:r={method:ResponseEvent.ConsoleAPICalled,params:t};break;default:return}s?this.stickyMsgQueue.push(r):this.wsIsOpen?this.socketTask.send({data:TyroUtil.safeJSONStringify(r)}):this.wsMsgQueue.push(TyroUtil.safeJSONStringify(r))},StickyFinger.prototype.xhrSend=function(e,t,n,s){var r=this;if(Agent.isPhone)return this.xhrSendJSAPI(e,t,n,s);var i,o=new XMLHttpRequest;if(e===ResponseEvent.Sticky){var a;if(o.open("POST",this.host+"/tyro/agent",!1),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("instrument-id",this.instrumentId),this.stickyMsgQueue.length>0){this.stickyMsgQueue.push({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t});try{a=TyroUtil.safeJSONStringify(this.stickyMsgQueue)}catch(e){this.originConsoleAPI.error(e),a=TyroUtil.safeJSONStringify({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t})}finally{this.stickyMsgQueue=[]}}else a=TyroUtil.safeJSONStringify({method:this.stickyNotSendPaused?ResponseEvent.StickyNotSendPaused:ResponseEvent.Sticky,params:t});if(this.stickyNotSendPaused=!1,o.send(a),200===o.status)return o.responseText;throw new Error("[sticky-finger] xhrSend error "+e+" "+o.status)}if(e===ResponseEvent.StickyAsync)return o.open("POST",this.host+"/tyro/agent",!0),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("instrument-id",this.instrumentId),o.onload=function(){if(r.lastStickyAsyncError=0,r.stickyAsyncLoop(),4!==o.readyState||200!==o.status)throw new Error("[tyro-agent] xhrSend async fail "+e+" "+o.readyState+" "+o.status);r.handleStickyAsync(JSON.parse(o.responseText))},o.onerror=function(){throw r.lastStickyAsyncError>=3?setTimeout((function(){r.stickyAsyncLoop()}),3e3):(r.lastStickyAsyncError+=1,r.stickyAsyncLoop()),new Error("[tyro-agent] xhrSend async error "+e+" "+o.readyState+" "+o.status)},void o.send(TyroUtil.safeJSONStringify({method:ResponseEvent.StickyAsync,params:t}));switch(o.open("POST",this.host+"/tyro/agent",!0),o.setRequestHeader("Content-Type","application/json;charset=UTF-8"),o.setRequestHeader("instrument-id",this.instrumentId),o.onload=function(){if(4!==o.readyState||200!==o.status)throw new Error("[tyro-agent] xhrSend async fail "+e+" "+o.readyState+" "+o.status)},o.onerror=function(){throw new Error("[tyro-agent] xhrSend async error "+e+" "+o.readyState+" "+o.status)},e){case ResponseEvent.ById:i={id:n,result:t};break;case ResponseEvent.ScriptSource:i={method:ResponseEvent.ScriptSource,params:t};break;case ResponseEvent.Resumed:i={method:ResponseEvent.Resumed,params:t};break;case ResponseEvent.ConsoleAPICalled:i={method:ResponseEvent.ConsoleAPICalled,params:t};break;default:return}s?this.stickyMsgQueue.push(i):o.send(TyroUtil.safeJSONStringify(i))},StickyFinger.prototype.handleSticky=function(e){var t=e.id,n=e.method,s=e.params;switch(n){case RequestMethod.DiscardConsoleEntries:return this.stickyNotSendPaused=!0,this.originConsoleAPI.log("[tyro-agent] DiscardConsoleEntries success"),"(()=>{return true})()";case RequestMethod.CallFunctionOn:return this.stickyNotSendPaused=!0,this.originConsoleAPI.log("[tyro-agent] CallFunctionOn TODO sticky"),"(()=>{return true})()";case RequestMethod.CompileScript:return this.stickyNotSendPaused=!0,this.originConsoleAPI.log("[tyro-agent] CompileScript success, "+TyroUtil.safeJSONStringify(s)),"(()=>{return true})()";case RequestMethod.SetBreakpointsActive:return this.stickyNotSendPaused=!0,this.breakpointsActive=s.active,this.originConsoleAPI.log("[tyro-agent] SetBreakpointsActive success, breakpointsActive "+this.breakpointsActive),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.SetSkipAllPauses:return this.stickyNotSendPaused=!0,this.skipAllPauses=s.skip,this.originConsoleAPI.log("[tyro-agent] SetSkipAllPauses success, skipAllPauses "+this.skipAllPauses),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.Resume:return this.xhrSend(ResponseEvent.Resumed,{}),this.originConsoleAPI.log("[tyro-agent] Resume success"),"(()=>{return false})()";case RequestMethod.StepInto:return this.xhrSend(ResponseEvent.Resumed,{}),this.breakStepType=BreakStepType.NextSticky,this.originConsoleAPI.log("[tyro-agent] StepInto success"),"(()=>{return false})()";case RequestMethod.StepOver:return this.xhrSend(ResponseEvent.Resumed,{}),this.breakStepType=BreakStepType.StepOver,this.originConsoleAPI.log("[tyro-agent] StepOver success"),"(()=>{return false})()";case RequestMethod.StepOut:return this.xhrSend(ResponseEvent.Resumed,{}),this.breakStepType=BreakStepType.StepOut,this.originConsoleAPI.log("[tyro-agent] StepOut success"),"(()=>{return false})()";case RequestMethod.GetPossibleBreakpoints:return this.stickyNotSendPaused=!0,this.getPossibleBreakpoints(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.SetBreakpointByUrl:return this.stickyNotSendPaused=!0,this.setBreakpointByUrl(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.SetBreakpoint:return this.stickyNotSendPaused=!0,this.setBreakpoint(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.RemoveBreakpoint:return this.stickyNotSendPaused=!0,this.removeBreakpoint(t,s),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.REPL:return this.stickyNotSendPaused=!0,this.breakStepType=BreakStepType.NextSticky,"(()=>{(()=>{"+s.statement+"})();return true})()";case RequestMethod.GetVariableValue:this.stickyNotSendPaused=!0;var r=e.params;return this.breakStepType=BreakStepType.NextSticky,"(()=>{(()=>{\n Agent.variableValue({"+r.map((function(e){return e+": (() => {try{return "+e+"}catch(e){return undefined}})()"})).join(",")+"})\n })();return true})()";case RequestMethod.SetPauseOnExceptions:return this.stickyNotSendPaused=!0,this.setPauseOnExceptions(t,s),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.SetAsyncCallStackDepth:return this.stickyNotSendPaused=!0,this.setAsyncCallStackDepth(t,s),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";case RequestMethod.EvaluateOnCallFrame:return this.stickyNotSendPaused=!0,this.evaluateOnCallFrameExpression=s.expression,this.breakStepType=BreakStepType.NextSticky,"(()=>{\n let tyroRet,tyroErr;\n try{tyroRet=eval(Agent.getEvaluateOnCallFrameExpression())}\n catch(e){tyroErr=e}\n Agent.evaluateOnCallFrame("+t+",tyroRet,tyroErr,"+s.generatePreview+");\n return true;\n })()";case RequestMethod.GetProperties:return this.stickyNotSendPaused=!0,this.getProperties(t,s,!0),this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()";default:return this.breakStepType=BreakStepType.NextSticky,"(()=>{return true})()"}},StickyFinger.prototype.handleStickyAsync=function(e){var t=e.id,n=e.method,s=e.params;switch(this.originConsoleAPI.log("[tyro-agent] handleStickyAsync "+t+", "+n+", "+s),n){case RequestMethod.DiscardConsoleEntries:this.originConsoleAPI.log("[tyro-agent] DiscardConsoleEntries success");break;case RequestMethod.Evaluate:this.originConsoleAPI.log("[tyro-agent] Evaluate start, expression "+s.expression);var r=this.evaluate(this.globalExecutionContext,t,s);this.originConsoleAPI.log("[tyro-agent] Evaluate success, expression "+s.expression+", result "+TyroUtil.safeJSONStringify(r));break;case RequestMethod.CallFunctionOn:this.originConsoleAPI.log("[tyro-agent] CallFunctionOn TODO stickyAsync");break;case RequestMethod.CompileScript:this.originConsoleAPI.log("[tyro-agent] CompileScript success, params "+TyroUtil.safeJSONStringify(s));break;case RequestMethod.SetBreakpointsActive:this.breakpointsActive=s.active,this.originConsoleAPI.log("[tyro-agent] SetBreakpointsActive success, breakpointsActive "+this.breakpointsActive);break;case RequestMethod.SetSkipAllPauses:this.skipAllPauses=s.skip,this.originConsoleAPI.log("[tyro-agent] SetSkipAllPauses success, skipAllPauses "+this.skipAllPauses);break;case RequestMethod.Pause:this.breakStepType=BreakStepType.NextSticky,this.originConsoleAPI.log("[tyro-agent] Pause success");break;case RequestMethod.GetPossibleBreakpoints:this.getPossibleBreakpoints(t,s);break;case RequestMethod.SetBreakpointByUrl:this.setBreakpointByUrl(t,s);break;case RequestMethod.SetBreakpoint:this.setBreakpoint(t,s);break;case RequestMethod.RemoveBreakpoint:this.removeBreakpoint(t,s);break;case RequestMethod.SetPauseOnExceptions:this.setPauseOnExceptions(t,s);break;case RequestMethod.SetAsyncCallStackDepth:this.setAsyncCallStackDepth(t,s);break;case RequestMethod.GetProperties:this.getProperties(t,s)}},StickyFinger.prototype.objectToRemoteObject=function(e,t,n){var s={};if(isError(e)&&(t=e),t)return error2RemoteObject(t);switch(s.type=typeof e,s.type){case"undefined":break;case"object":if(null===e){s.subtype="null",s.value=null;break}if(void 0!==e.constructor&&(s.className=e.constructor.name),void 0!==e.toString)try{s.description=e.toString()}catch(e){s.description="[object Object]"}else s.description="[object Object]";if(this.generateObjectId+=1,s.objectId=String(this.generateObjectId),this.objectMap[String(this.generateObjectId)]=e,n)for(var r in s.preview={type:"object",description:"Object",overflow:!1,properties:[]},e){var i=typeof e[r];s.preview.properties.push({name:r,type:i,value:"object"===i?"Object":"function"===i?"":e[r]})}break;case"function":s.description=e.toString(),s.className="Function";break;default:s.value=e,s.description=e.toString()}return s},StickyFinger.prototype.evaluateOnCallFrame=function(e,t,n,s){var r=this.objectToRemoteObject(t,n,s);return this.xhrSend(ResponseEvent.ById,{result:r},e,!0),r},StickyFinger.prototype.evaluate=function(executionContext,id,params){var returnValue,error;try{returnValue=function(expression){return"function"==typeof eval?eval(expression):Agent.evalReference(expression)}.call(executionContext,params.expression)}catch(e){error=e}var result=this.objectToRemoteObject(returnValue,error,params.generatePreview);return this.xhrSend(ResponseEvent.ById,{result:result},id),result},StickyFinger.prototype.getPossibleBreakpoints=function(e,t,n){var s=t.scriptId,r=t.startLine,i=t.endLine===t.startLine?t.endLine+1:t.endLine,o={locations:[]};if(this.contextMap[s])for(var a=this.contextMap[s].stickyLine,c=r;c5242880?r.debug("[bugme] socket send failed, size: ",n.length):this.socketTask?(this.messageQueue.length&&(this.messageQueue.forEach((function(e){t.socketTask.send({data:e})})),this.messageQueue=[]),this.socketTask.send({data:n})):this.messageQueue.push(n)},close:function(){this.socketTask?this.socketTask.close():r.getBridge().showToast({content:"请点击右上角关闭按钮退出",duration:1e3})},connect:function(e){var t=this,n=r.getBridge(),o=n.connectSocket({url:e,multiple:!0}),s=function(){t.socketTask||(t.socketTask=o,t.onopen(),r.debug("[bugme] websocket connected"))};o.onOpen((function(){s()})),o.onMessage((function(e){t.socketTask||s(),t.onmessage(e)})),o.onClose((function(){t.onclose()})),o.onError((function(){t.socketTask||(u(),n.showToast({content:"本次真机调试已结束,请重新生成调试版本",duration:2e3}))}))},open:function(){var e=this,t=r.getStartupParams(),n=t.channelId,o=t.channelAuthPair,s=t.remoteCh,c=self.__LyraWSWorkerOrigin;if(n||c){i();var u=a.wssConfig.default.openchannel;s&&a.wssConfig[s]&&a.wssConfig[s].openchannel&&(u=a.wssConfig[s].openchannel);var l=r.getBridge(),p=c?c+"/worker":"wss://"+u+"/group/connect/"+n+"?scene=tinyAppDebug&roleType=TINYAPP&roleId=0";if(o&&(p+="?"+o.key+"="+o.value),r.checkIOS()&&!r.isLyra()){this.connect(p);var f=l.connectSocket;l.connectSocket=function(e){if(e&&e.multiple)return f(e);l.showToast({content:"iOS 真机调试暂不支持 connectSocket JSAPI",duration:1e3})},l.onSocketOpen=l.offSocketOpen=l.onSocketMessage=l.offSocketMessage=l.closeSocket=function(){}}else setTimeout((function(){e.connect(p)}),1200)}else r.debug("[bugme] missing channelId in startup params")},onopen:function(){var e=r.getBridge(),t=e.getSystemInfoSync();this.send({method:s.RemoteXMethods.Connect,params:{userAgent:r.getUserAgent(),sdkVersion:e.SDKVersion,alipayVersion:t.version,model:t.model,system:t.system}}),c()},onmessage:function(e){try{var t=JSON.parse(e.data.data),n=t.method,a=t.id,i=t.params;if(n===s.RemoteXMethods.Disconnect)this.close();else if(n===s.RemoteXMethods.EvaluteScript){if(i&&i.code)try{var c=r.evaluateScript(i.code);this.send({returnId:a,payload:o.stringify(c)})}catch(e){r.debug("[remoteX worker evaluateScript] ",e)}}else n===s.RemoteXMethods.Ping&&this.send({method:s.RemoteXMethods.Pong,params:{returnId:a}})}catch(t){r.debug("RemoteX onSocketMessage error",t,e)}},onclose:function(){this.socketTask=null,this.messageQueue=[],u(),[1,2].forEach((function(e){r.getBridge().call("closeSocket",{socketTaskId:e})}))}}}}); /**! __BUGME_END__ */ if(!self.__appxInited) { self.__appxInited = 1; require('@alipay/appx-compiler/lib/sjsEnvInit'); require('./config$'); require('./importScripts$'); var AFAppX = self.AFAppX; self.getCurrentPages = AFAppX.getCurrentPages; self.getApp = AFAppX.getApp; self.Page = AFAppX.Page; self.App = AFAppX.App; self.my = AFAppX.bridge || AFAppX.abridge; self.abridge = self.my; self.Component = AFAppX.WorkerComponent || function(){}; self.$global = AFAppX.$global; self.requirePlugin = AFAppX.requirePlugin; if(AFAppX.registerApp) { AFAppX.registerApp({ appJSON: appXAppJson, }); } if(AFAppX.compilerConfig){ AFAppX.compilerConfig.component2 = true; } function success() { require('../../app'); require('../../node_modules/mini-ali-ui/es/badge/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/am-icon/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/tabs/index?hash=4a98b35daa3eee1b62960d4d5bbcbf254cbf11e3'); require('../../node_modules/mini-ali-ui/es/tabs/tab-content/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/search-bar/index?hash=5a0c180d5ccf7c9d483dd4817cdab5489824013c'); require('../../node_modules/mini-ali-ui/es/popup/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/collapse/index?hash=a11fdcdff8ea970c65f185a8731cafe48f67047c'); require('../../node_modules/mini-ali-ui/es/collapse/collapse-item/index?hash=5a0c180d5ccf7c9d483dd4817cdab5489824013c'); require('../../components/fitler/fitler?hash=354cb92cdc6053453b91b49e22977b08efde6a61'); require('../../node_modules/mini-ali-ui/es/loading/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/list/index?hash=e1617a0257fb9de746f60d50b03404ad924976c9'); require('../../node_modules/mini-ali-ui/es/input-item/index?hash=5a0c180d5ccf7c9d483dd4817cdab5489824013c'); require('../../node_modules/mini-ali-ui/es/verify-code/index?hash=5a0c180d5ccf7c9d483dd4817cdab5489824013c'); require('../../node_modules/mini-ali-ui/es/long-password/index?hash=5a0c180d5ccf7c9d483dd4817cdab5489824013c'); require('../../node_modules/mini-ali-ui/es/avatar/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/button/index?hash=e1617a0257fb9de746f60d50b03404ad924976c9'); require('../../node_modules/mini-ali-ui/es/modal/index?hash=febd4c40992222524e0db12a74760a28f8f9b339'); require('../../node_modules/mini-ali-ui/es/picker-item/index?hash=5a0c180d5ccf7c9d483dd4817cdab5489824013c'); require('../../components/orderTrial/orderTrial?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../components/QRCodeView/QRCodeView?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/am-radio/index?hash=5a0c180d5ccf7c9d483dd4817cdab5489824013c'); require('../../node_modules/mini-ali-ui/es/list/auto-size-img/index?hash=05d2a9730dd6009bf9446182f9c985f40f8c0f43'); require('../../node_modules/mini-ali-ui/es/list/list-item/index?hash=a5465b8c889360e3f854461d3ac41cf414aec633'); require('../../pages/home/home?hash=9676af08f02ab6877f66c88a5599f6228f076a67'); require('../../pages/index/index?hash=95bcfeb33689b813cb703b11c35da0864d69d6fc'); require('../../pages/paypage/paypage?hash=32d7d2807ed4e666ef03b4b3fe8c38ecf2e34e68'); require('../../pages/forgetPassword/forgetPassword?hash=95bcfeb33689b813cb703b11c35da0864d69d6fc'); require('../../pages/userCenter/userCenter?hash=c0825856d8ab7db321bdd0ebdd2606fa94d544f0'); require('../../pages/businessData/businessData?hash=02e5d22beb4d8b5ce9fe01e2245252aaa9b53562'); require('../../pages/hbfqPage/orderInfo/orderInfo?hash=ade6a15b5771b52c79e75af0b49fdf71e51fb2b4'); require('../../pages/hbfqPage/qrCode/qrCode?hash=14138944b7ae79add9366738dd067287d1b4b5a8'); require('../../pages/shskPage/orderInfo/orderInfo?hash=ade6a15b5771b52c79e75af0b49fdf71e51fb2b4'); require('../../pages/shskPage/qrCode/qrCode?hash=14138944b7ae79add9366738dd067287d1b4b5a8'); require('../../pages/changePassword/changePassword?hash=ade6a15b5771b52c79e75af0b49fdf71e51fb2b4'); require('../../pages/changeUser/changeUser?hash=3930b793bedbb5bce57252b2568d4e1a9ad8ea1b'); require('../../pages/order/hbfqOrder/hbfqOrder?hash=b7340e58f6e63dafeccfeef5e60d8e039095703c'); require('../../pages/order/shskOrder/shskOrder?hash=ade6a15b5771b52c79e75af0b49fdf71e51fb2b4'); } self.bootstrapApp ? self.bootstrapApp({ success }) : success(); }