function hijackWxMethod(){if(!global.__minium__.initedHijack){var a=function(a,b,c,d){var e=c.get(a);return e[b]||(e[b]=d),e[b]},b=function(a){return{hijacked:r.get(a),hijack_before:n.get(a),hijack_after:o.get(a),hijack_callback:p.get(a),hijack_mock:q.get(a)}},c=function(a){return!!(a.endsWith("Sync")||a.startsWith("create"))||t.has(a)},d=function(a){return t.has(a)},e=function(a,b){var c;return c=s[b]?s[b]:s[b]=[],function(){c.push(a);try{return a.apply(void 0,arguments)}finally{c.pop()}}},f=function(b,f){if(b&&!r.get(b)[f]){var g=a(b,f,n,{}),h=a(b,f,o,{}),i=a(b,f,p,{});q.has(b)||q.set(b,{});var j=global.__minium__.getSrcMethod(b,f);if(!j&&(j=global.__minium__.setSrcMethod(b,f),void 0===j))return void(r.get(b)[f]=!0);var k=function miniumHijackFn(){for(var a=arguments.length,e=Array(a),k=0;k<a;k++)e[k]=arguments[k];var l=e[0],m=!1,n=c(f),o=!n||d(f),p=q.get(b)[f];n||l&&(l.success||l.fail||l.complete)||(m=!0);var r=s[f].length;if(1<r)return j.apply(void 0,e);var t=Math.random();Object.values(g).forEach(function(a){return a.apply(void 0,e.concat([t]))});var u;if(n){if(o&&l&&Object.keys(i).length){var v=l.complete;l.complete=function(a){Object.values(i).forEach(function(b){return b(a,t)}),v&&v(a)}}u=(p||j).apply(void 0,e)}else if(!(p||Object.keys(i).length))u=j.apply(void 0,e);else if(m||p)u=(p||j).apply(void 0,e).then(function(a){return Object.values(i).forEach(function(b){return b(a,t)}),l&&(l.success&&l.success(a),l.complete&&l.complete(a)),a})["catch"](function(a){throw console.warn("[minium] ".concat(f," ").concat(p?"mockFn":"origin"," catch ").concat(a)),Object.values(i).forEach(function(b){return b(a,t)}),l&&(l.fail&&l.fail(a),l.complete&&l.complete(a)),a});else{if(l){var w=l.complete;l.complete=function(a){Object.values(i).forEach(function(b){return b(a,t)}),w&&w(a)}}u=j.apply(void 0,e)}return Object.values(h).forEach(function(a){return a(u,t)}),u};global.__minium__.defineMethod(b,f,e(k,f)),r.get(b)[f]=!0}},g=function tryCatch(a){return function(){try{for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];return a.call.apply(a,[this].concat(c))}catch(a){return a}}},h=function removeCallId(a){return function(){return g(a).apply(this,Array.from(arguments).slice(0,-1))}},i=function setCall(a,b,c){var d=c.before,e=c.after,j=c.callback,k=!!(3<arguments.length&&arguments[3]!==void 0)&&arguments[3];(m?[wx,m]:[wx]).forEach(function(c,l){f(c,a,l),d&&(n.get(c)[a]["".concat(b)]=k?g(d):h(d)),e&&(o.get(c)[a]["".concat(b)]=k?g(e):h(e)),j&&(p.get(c)[a]["".concat(b)]=k?g(j):h(j))})},j=function delCall(a,b){(m?[wx,m]:[wx]).forEach(function(c){if(r.get(c)[a]){var d=n.get(c)[a],e=o.get(c)[a],f=p.get(c)[a];b?(delete d["".concat(b)],delete e["".concat(b)],delete f["".concat(b)]):(Object.entries(d).forEach(function(a){var b=global.babelHelpers.slicedToArray(a,1),c=b[0];delete d[c]}),Object.entries(e).forEach(function(a){var b=global.babelHelpers.slicedToArray(a,1),c=b[0];delete e[c]}),Object.entries(f).forEach(function(a){var b=global.babelHelpers.slicedToArray(a,1),c=b[0];delete f[c]}))}})},k=function setMock(a,b,d){(m?[wx,m]:[wx]).forEach(function(e){f(e,a);var g=global.__minium__.getSrcMethod(e,a),h={origin:global.__minium__.bind(g,e)};q.get(e)[a]=c(a)?function(){return b.apply(h,Array.from(arguments).concat(d))}:function(){var a=arguments;return new Promise(function(c){c(b.apply(h,Array.from(a).concat(d)))})}})},l=function delMock(a){(m?[wx,m]:[wx]).forEach(function(b){q.get(b)[a]=void 0})};global.__minium__.initedHijack=!0;var m=wx._MINI_WX_PROXY_,n=new Map,o=new Map,p=new Map,q=new Map,r=new Map;r.set(wx,{}),n.set(wx,{}),o.set(wx,{}),p.set(wx,{}),q.set(wx,{}),m&&(r.set(m,{}),n.set(m,{}),o.set(m,{}),p.set(m,{}),q.set(m,{})),global.__minium__.hijackTest=b;var s={},t=new Set(["request","downloadFile","uploadFile","connectSocket"]);global.__minium__.setCall=i,global.__minium__.delCall=j,global.__minium__.canHook=!0,global.__minium__.setMock=k,global.__minium__.delMock=l,global.__minium__.canMock=!0}}