function miniumRequestStack(){if(!global.__minium_request_stack){global.__minium_request_stack=new Map,global.__minium_wait_util=function(e=0,t=20){var r=(getCurrentPages().pop()||{}).__wxWebviewId__;return new Promise((_=>{var a=10*t,i=setInterval((()=>{a--;var t=global.__minium_request_stack.has(r)?global.__minium_request_stack.get(r).size:0;console.debug("[minitest] current stack size: ",t),t<=e?(clearInterval(i),_(!0)):a<0&&(clearInterval(i),_(!1))}),100)}))};var e=wx.request;return Object.defineProperty(wx,"request",{configurable:!0,get:()=>function(t){if("https://weapp.tencent.com/jscov_driver/CollectCovTimer"==t.url)return e(t);var r,_=(getCurrentPages().pop()||{}).__wxWebviewId__;global.__minium_request_stack.has(_)?r=global.__minium_request_stack.get(_):(r=new Map,global.__minium_request_stack.set(_,r));var a,i=t.complete;t.complete=e=>{r.delete(a),0===r.size&&global.__minium_request_stack.delete(_),i&&i(e)};var n=e(t);return a=n&&n.uniqueId||Math.random(),r.set(a,Date.now()),n}}),!0}return!1}
