Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hippy/vanilla-js-devtools

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hippy/vanilla-js-devtools - npm Package Compare versions

Comparing version 0.1.10 to 0.1.11

4

dist/index.js

@@ -1,3 +0,3 @@

/*! @hippy/vanilla-js-devtools v0.1.10 http://hippyjs.org */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VanillaJSDevtools=t():e.VanillaJSDevtools=t()}((0,eval)("this"),(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([function(e,t,n){var r=n(15),o=n(3),i=n(26);t=function(e,t,n){var u,a;if(t=i(t,n),r(e))for(u=0,a=e.length;u<a;u++)t(e[u],u,e);else{var s=o(e);for(u=0,a=s.length;u<a;u++)t(e[s[u]],s[u],e)}return e},e.exports=t},function(e,t){var n=Object.prototype.toString;t=function(e){return n.call(e)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){var t=r(e);return"[object Function]"===t||"[object GeneratorFunction]"===t||"[object AsyncFunction]"===t},e.exports=t},function(e,t,n){var r=n(9);t=Object.keys?Object.keys:function(e){var t=[];for(var n in e)r(e,n)&&t.push(n);return t},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object String]"===r(e)},e.exports=t},function(e,t){t=function(e){var t=typeof e;return!!e&&("function"===t||"object"===t)},e.exports=t},function(e,t,n){var r=n(1);t=Array.isArray?Array.isArray:function(e){return"[object Array]"===r(e)},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(23));class i extends o.default{trigger(e,t){this.emit("message",JSON.stringify({method:e,params:t}))}}t.default=new i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setDomains=t.getDomains=void 0;let r=[];t.getDomains=()=>r,t.setDomains=e=>r=e},function(e,t){var n=Object.prototype.hasOwnProperty;t=function(e,t){return n.call(e,t)},e.exports=t},function(e,t,n){var r=n(29),o=n(3),i=n(15);t=function(e,t,n){t=r(t,n);for(var u=!i(e)&&o(e),a=(u||e).length,s=Array(a),c=0;c<a;c++){var l=u?u[c]:c;s[c]=t(e[l],l,e)}return s},e.exports=t},function(e,t,n){t=n(58)(n(60),2),e.exports=t},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof global&&(n=global)}e.exports=n},function(e,t,n){t=n(25)(n(27)),e.exports=t},function(e,t){t=function(e){return void 0===e},e.exports=t},function(e,t,n){var r=n(16),o=n(2),i=Math.pow(2,53)-1;t=function(e){if(!e)return!1;var t=e.length;return r(t)&&t>=0&&t<=i&&!o(e)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object Number]"===r(e)},e.exports=t},function(e,t,n){var r=n(15),o=n(10),i=n(6),u=n(4);t=function(e){return e?i(e)?e:r(e)&&!u(e)?o(e):[e]:[]},e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=void 0,t.log=new Proxy({},{get:(e,t)=>["log","warn","error","info"].includes(t)?(...e)=>{console[t]("%c[devtools]%c","color: yellow","color: auto",...e)}:()=>{}})},function(e,t){t=function(){},e.exports=t},function(e,t,n){var r=n(68);t=function(e){if(r(e))return"";try{return o.call(e)}catch(e){}try{return e+""}catch(e){}return""};var o=Function.prototype.toString;e.exports=t},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hookFunction=t.hookClass=void 0,t.hookClass=(e,t)=>{Object.entries(Object.getOwnPropertyDescriptors(e.prototype)).forEach(([n,r])=>{const o=t[n];if(o&&"constructor"!==n){if(r.set)return e.prototype["_"+n]=e.prototype[n],void Object.defineProperty(e.prototype,n,Object.assign(Object.assign({},r),{set:function(e){let t=e;this.inSetter=!0,(null==o?void 0:o.argsBefore)&&(t=o.argsBefore.apply(this,[e])),(null==o?void 0:o.before)&&o.before.apply(this,[e]);const n=r.set.apply(this,[t]);return(null==o?void 0:o.after)&&o.after.apply(this,[e].concat(n)),n}}));e.prototype["_"+n]=e.prototype[n],e.prototype[n]=function(...e){let t;return(null==o?void 0:o.before)&&o.before.apply(this,e),t=(null==o?void 0:o.current)?o.current.apply(this,e):this["_"+n](...e),(null==o?void 0:o.after)&&o.after.apply(this,e.concat(t)),t}}})},t.hookFunction=(e,t,{before:n,after:o,error:i,isAsync:u=!1})=>{e[t]&&(e[t]=u?new Proxy(e[t],{apply:(e,t,u)=>r(void 0,void 0,void 0,(function*(){const r={};let a;n&&n.apply(t,[r].concat(u));try{a=yield e.apply(t,u)}catch(e){throw i&&i.apply(t,[r,e].concat(u)),e}return o&&o.apply(t,[r,a].concat(u)),a}))}):new Proxy(e[t],{apply:(e,t,r)=>{const i={};n&&n.apply(t,[i].concat(r));const u=e.apply(t,r);return o&&o.apply(t,[i,u].concat(r)),u}}))}},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hookWebSocket=t.hookHttpRequest=t.hookFetch=t.setCookie=t.getCookieAPI=t.getResponseBody=t.getCookies=t.deleteCookies=t.enable=void 0;const i=o(n(39)),u=o(n(0)),a=o(n(87)),s=o(n(11)),c=o(n(4)),l=o(n(37)),f=n(44),d=o(n(7)),p=n(21),h=n(92),g=n(8),v=n(44),m=new Map;let y=!1,b=[];t.enable=s.default((function(){y=!0,b.forEach(e=>d.default.trigger(...e)),b=[]})),t.deleteCookies=function(e){const n=t.getCookieAPI();if(!n)return;const{name:r,domain:o,url:i}=e,u=new Date(Date.now()-1e5);let a=g.getDomains().find(e=>e.includes(o));if(a)return n.set(a,r+"=",u);i&&!i.startsWith("http")&&(n.set("http://"+i,r+"=",u),n.set("https://"+i,r+"=",u))},t.getCookies=function(e){return r(this,void 0,void 0,(function*(){const{urls:n}=e,r=t.getCookieAPI();if(!r)return{cookies:[]};const o=[];return yield Promise.all(n.map(e=>r.getAll(e).then(t=>{o.push(...w(t,e))}))),{cookies:o}}))},t.getResponseBody=function(e){return{base64Encoded:!1,body:m.get(e.requestId)}},t.getCookieAPI=()=>{try{const t=e.Hippy.bridge.callNative,n=e.Hippy.bridge.callNativeWithPromise;return{getAll(e){if(!e)throw new TypeError("Cookie.getAll() must have url argument");return n.call(this,"network","getCookie",e)},set(e,n,r){if(!e)throw new TypeError("Cookie.getAll() must have url argument");if("string"!=typeof n)throw new TypeError("Cookie.getAll() only receive string type of keyValue");let o="";if(r){if(!(r instanceof Date))throw new TypeError("Cookie.getAll() only receive Date type of expires");o=r.toUTCString()}t.call(this,"network","setCookie",e,n,o)}}}catch(e){}},t.setCookie=e=>{const n=t.getCookieAPI();if(!n)return;const{name:r,url:o,value:i}=e;n.set(o,`${r}=${i}`)},t.hookFetch=s.default(()=>{p.hookFunction(e,"fetch",{isAsync:!0,before:function(e,t,n){e.id=h.createId();const r=(null==n?void 0:n.headers)||{},o=(null==n?void 0:n.method)||"GET",i=c.default(null==n?void 0:n.body)?null==n?void 0:n.body:"";e.reqHeaders=r;_(["Network.requestWillBeSent",{requestId:e.id,type:"Fetch",request:{method:o,url:t,headers:r,postData:i},timestamp:l.default()/1e3}])},after:function(e,t,n,r){const{id:o}=e,{status:i,headers:u}=t;Object.keys(u).forEach((function(e){u[e]=u[e][0]}));const a=v.getType(u["Content-Type"]||u["content-type"]).subType;t.text().then(e=>{m.set(o,e);const r=["Network.responseReceived",{requestId:o,type:"Fetch",response:{url:n,status:i,headers:u,mimeType:a},timestamp:l.default()/1e3}],s=["Network.loadingFinished",{requestId:o,encodedDataLength:f.getFetchSize(t,e),timestamp:l.default()/1e3}];_(r),_(s)})},error:function(e,t,n){_(["Network.loadingFailed",{requestId:e.id,type:"Fetch",timestamp:l.default()/1e3,errorText:t.code}])}})}),t.hookHttpRequest=s.default(()=>{var t,n;const r=e.Hippy.bridge.callNative,o=function(e){return(t,n)=>{const r=h.createId(),o=(null==t?void 0:t.headers)||{},i=(null==t?void 0:t.method)||"GET",u=t.url,a=JSON.stringify(t.data||{});return _(["Network.requestWillBeSent",{requestId:r,type:"Fetch",request:{method:i,url:u,headers:o,postData:a},timestamp:l.default()/1e3}]),e("http","request",t,e=>{const t=JSON.stringify(e.data||{});m.set(r,t);const o=["Network.responseReceived",{requestId:r,type:"Fetch",response:{url:u,status:e.code,headers:e.headers||{}},timestamp:l.default()/1e3}],i=["Network.loadingFinished",{requestId:r,encodedDataLength:f.getFetchSize(e,t),timestamp:l.default()/1e3}];_(o),_(i),n(e)})}}(r);(null===(n=null===(t=null==e?void 0:e.Hippy)||void 0===t?void 0:t.bridge)||void 0===n?void 0:n.callNative)&&(e.Hippy.bridge.callNative=function(e,t,...n){switch(`${e}:${t}`){case"http:request":return o(...n)}return r(e,t,...n)})}),t.hookWebSocket=s.default(()=>{p.hookClass(WebSocket,{send:{before:function(...e){this.ignoreMonitor||_(["Network.webSocketFrameSent",{requestId:this.requestId,timestamp:Date.now()/1e3,response:{opcode:1,mask:!1,payloadData:e[0]}}])}},close:{before:function(){this.ignoreMonitor||_(["Network.webSocketClosed",{requestId:this.requestId,timestamp:Date.now()/1e3}])}},onmessage:{argsBefore:function(e){return new Proxy(e,{apply:(e,t,n)=>{const r=e.apply(t,n);if(!this.ignoreMonitor){let e;e="object"==typeof n[0]?JSON.stringify(n[0]):n[0].toString(),_(["Network.webSocketFrameReceived",{requestId:this.requestId,timestamp:Date.now()/1e3,response:{opcode:1,mask:!1,payloadData:e}}])}return r}})}},onWebSocketEvent:{current:function(...e){setTimeout(()=>{this._onWebSocketEvent(...e)},100)}},onopen:{argsBefore:function(e){return new Proxy(e,{apply:(e,t,n)=>{const r=e.apply(t,n);return this.ignoreMonitor||_(["Network.webSocketHandshakeResponseReceived",{requestId:this.requestId,timestamp:Date.now()/1e3,response:{status:101,headers:{}}}]),r}})}},onclose:{argsBefore:function(e){return new Proxy(e,{apply:(e,t,n)=>{const r=e.apply(t,n);return this.ignoreMonitor||_(["Network.webSocketClosed",{requestId:this.requestId,timestamp:Date.now()/1e3}]),r}})}}}),e.WebSocket=new Proxy(WebSocket,{construct(e,t){const n=new e(...t);n.ignoreMonitor=!1,4===t.length&&(n.ignoreMonitor=t[3]);return((...e)=>{if(!n.ignoreMonitor){const[,t,r]=e,o=r||{};Array.isArray(t)&&t.length>0?o["Sec-WebSocket-Protocol"]=t.join(","):"string"==typeof t&&(o["Sec-WebSocket-Protocol"]=t),n.requestId=h.createId();const i=Date.now();_(["Network.webSocketCreated",{requestId:n.requestId,url:n.url}]),_(["Network.webSocketWillSendHandshakeRequest",{requestId:n.requestId,timestamp:i/1e3,wallTime:i/1e3,request:{headers:o}}])}}).apply(n,t),n}})});const w=(e,t)=>{const n=[];return e?(""!==i.default(e)&&u.default(e.split(";"),(function(e){e=e.split("=");const r=i.default(e.shift());e=a.default(e.join("=")),n.push({name:r,value:e,path:"/",secure:t.startsWith("https"),session:!1,domain:t.replace(/^https?\:\/\//,"")})})),n):n};function _(e){y?d.default.trigger(...e):b.push(e)}}).call(this,n(12))},function(e,t,n){var r=n(24),o=n(9),i=n(0),u=n(57),a=n(11),s=n(31);t=r({initialize:function(){this._events=this._events||{}},on:function(e,t){return this._events[e]=this._events[e]||[],this._events[e].push(t),this},off:function(e,t){var n=this._events;if(o(n,e)){var r=n[e].indexOf(t);return r>-1&&n[e].splice(r,1),this}},once:function(e,t){return this.on(e,a(t)),this},emit:function(e){var t=this;if(o(this._events,e)){var n=u(arguments,1),r=s(this._events[e]);return i(r,(function(e){return e.apply(t,n)}),this),this}},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this}},{mixin:function(e){i(["on","off","once","emit","removeAllListeners"],(function(n){e[n]=t.prototype[n]})),e._events=e._events||{}}}),e.exports=t},function(e,t,n){var r=n(13),o=n(17),i=n(54),u=n(30),a=n(56);var s=(t=function(e,t){return s.extend(e,t)}).Base=function e(t,n,s){s=s||{};var c=n.className||u(n,"initialize.name")||"";delete n.className;var l=function(){var e=o(arguments);return this.initialize&&this.initialize.apply(this,e)||this};if(!a)try{l=new Function("toArr","return function "+c+"(){var args = toArr(arguments);return this.initialize ? this.initialize.apply(this, args) || this : this;};")(o)}catch(e){}return i(l,t),l.prototype.constructor=l,l.extend=function(t,n){return e(l,t,n)},l.inherits=function(e){i(l,e)},l.methods=function(e){return r(l.prototype,e),l},l.statics=function(e){return r(l,e),l},l.methods(n).statics(s),l}(Object,{className:"Base",callSuper:function(e,t,n){return e.prototype[t].apply(this,n)},toString:function(){return this.constructor.name}});e.exports=t},function(e,t,n){var r=n(14),o=n(0);t=function(e,t){return function(n){return o(arguments,(function(i,u){if(0!==u){var a=e(i);o(a,(function(e){t&&!r(n[e])||(n[e]=i[e])}))}})),n}},e.exports=t},function(e,t,n){var r=n(14);t=function(e,t,n){if(r(t))return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)}}return function(){return e.apply(t,arguments)}},e.exports=t},function(e,t,n){var r=n(3),o=n(28),i=n(46),u=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols;t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prototype,s=void 0===n||n,c=t.unenumerable,l=void 0!==c&&c,f=t.symbol,d=void 0!==f&&f,p=[];if((l||d)&&u){var h=r;l&&u&&(h=u);do{p=p.concat(h(e)),d&&a&&(p=p.concat(a(e)))}while(s&&(e=o(e))&&e!==Object.prototype);p=i(p)}else if(s)for(var g in e)p.push(g);else p=r(e);return p},e.exports=t},function(e,t,n){var r=n(5),o=n(2),i=Object.getPrototypeOf,u={}.constructor;t=function(e){if(r(e)){if(i)return i(e);var t=e.__proto__;return t||null===t?t:o(e.constructor)?e.constructor.prototype:e instanceof u?u.prototype:void 0}},e.exports=t},function(e,t,n){var r=n(2),o=n(5),i=n(6),u=n(26),a=n(48),s=n(51),c=n(52);t=function(e,t,n){return null==e?s:r(e)?u(e,t,n):o(e)&&!i(e)?a(e):c(e)},e.exports=t},function(e,t,n){var r=n(14),o=n(53);t=function(e,t){var n;for(n=(t=o(t,e)).shift();!r(n);){if(null==(e=e[n]))return;n=t.shift()}return e},e.exports=t},function(e,t,n){var r=n(5),o=n(6),i=n(13);t=function(e){return r(e)?o(e)?e.slice():i({},e):e},e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWSProtocolByHttpProtocol=t.makeUrl=t.parseURL=void 0,t.parseURL=e=>{const t={};if("string"==typeof e&&""!==e){const n=e.substr(1).split("&");for(let e=0;e<n.length;e++){const r=n[e].split("=");t[r[0]]=decodeURIComponent(r[1])}}return t},t.makeUrl=(e,t={})=>{let n=e;const r=Object.keys(t);for(const[e,o]of r.entries())0===e?-1===n.indexOf("?")&&(n+="?"):n+="&",n+=`${o}=${encodeURIComponent(t[o])}`;return n},t.getWSProtocolByHttpProtocol=e=>({https:"wss",http:"ws"}[e]||"ws")},function(e,t){t=function(e,t,n){null==t&&(t=e,e=0);var r=Math.random();return n||e%1||t%1?Math.min(e+r*(t-e+parseFloat("1e-"+((r+"").length-1))),t):e+Math.floor(r*(t-e+1))},e.exports=t},function(e,t){t="object"==typeof global&&"object"==typeof document&&9===document.nodeType,e.exports=t},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hookConsole=t.releaseObject=t.evaluate=t.getProperties=t.discardConsoleEntries=t.enable=t.callFunctionOn=void 0;const s=a(n(7)),c=a(n(0)),l=a(n(10)),f=a(n(37)),d=a(n(4)),p=a(n(67)),h=a(n(70)),g=a(n(38)),v=a(n(11)),m=a(n(39)),y=i(n(74)),b=i(n(85)),w=n(21);let _=!1,x=[];const O={id:1,name:"top",origin:""};t.callFunctionOn=function(e){return u(this,void 0,void 0,(function*(){const{functionDeclaration:t,objectId:n}=e;let r=e.arguments||[];r=l.default(r,e=>{const{objectId:t,value:n}=e;if(t){const e=y.getObj(t);if(e)return e}return n});let o=null;return n&&(o=y.getObj(n)),{result:y.wrap(yield I(t,r,o))}}))},t.enable=function(){_||(_=!0,h.default.start(),s.default.trigger("Runtime.executionContextCreated",{context:O}),x.forEach(e=>s.default.trigger(...e)),x=[])},t.discardConsoleEntries=function(){y.clear()},t.getProperties=function(e){return y.getProperties(e)},t.evaluate=function(e){const t={};let n;try{n=b.default(e.expression),b.setGlobal("$_",n),t.result=y.wrap(n)}catch(e){t.exceptionDetails={exception:y.wrap(e),text:"Uncaught"},t.result=y.wrap(e,{generatePreview:!0})}return t},t.releaseObject=function(e){y.releaseObj(e.objectId)},t.hookConsole=v.default((function(){const e={log:"log",warn:"warning",error:"error",info:"info",dir:"dir",table:"table",group:"startGroup",groupCollapsed:"startGroupCollapsed",groupEnd:"endGroup",debug:"debug",clear:"clear"},t=t=>({after:(n,r,...o)=>{if(function(e){const t=["Runtime"];return e.some(e=>{if(!(e instanceof Array))return!1;if("hippyWebsocketEvents"!==e[0])return!1;try{const n=JSON.parse(e[1].data.data);return t.some(e=>new RegExp(`^${e}\\.`).test(n.method))}catch(e){return!1}})}(o))return;o=l.default(o,e=>y.wrap(e,{generatePreview:!0}));const i=e[t],u=["Runtime.consoleAPICalled",{type:i,args:o,stackTrace:{callFrames:"error"===i||"warning"===i?j():[]},executionContextId:O.id,timestamp:f.default()}];_?s.default.trigger(...u):x.push(u)}});c.default(e,(e,n)=>{w.hookFunction(console,n,t(n)),w.hookFunction(ConsoleModule,n,t(n))})}));const k=global.Function,S=Object.getPrototypeOf((function(){return u(this,void 0,void 0,(function*(){}))})).constructor;function I(e,t,n=null){return u(this,void 0,void 0,(function*(){const r=function(e){const t=p.default(e);return"}"!==e[e.length-1]?t.push("return "+e.slice(e.indexOf("=>")+2)):t.push(e.slice(e.indexOf("{")+1,e.lastIndexOf("}"))),t}(e);let o;return g.default(e,"async")?(o=S.apply(null,r),yield o.apply(n,t)):(o=k.apply(null,r),o.apply(n,t))}))}function j(e){let t=[];const n=e?e.stack:function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=(new Error).stack;return Error.prepareStackTrace=e,t}();return d.default(n)?(t=n.split("\n"),t=l.default(t,e=>{const t=e.match(/^(.*)\@(.*)\:(\d+)\:(\d+)$/);return t?{functionName:t[1],url:t[2],lineNumber:Number(t[3]),columnNumber:Number(t[4])}:{functionName:m.default(e)}})):(n.shift(),t=l.default(n,e=>({functionName:e.getFunctionName(),lineNumber:e.getLineNumber(),columnNumber:e.getColumnNumber(),url:e.getFileName()}))),t}h.default.addListener(e=>{const t=["Runtime.exceptionThrown",{exceptionDetails:{exception:y.wrap(e),stackTrace:{callFrames:j(e)},text:"Uncaught"},timestamp:f.default}];_?s.default.trigger(...t):x.push(t)})},function(e,t){t=Date.now?Date.now:function(){return(new Date).getTime()},e.exports=t},function(e,t){t=function(e,t){return 0===e.indexOf(t)},e.exports=t},function(e,t,n){var r=n(72),o=n(73);t=function(e,t){return null==t&&e.trim?e.trim():r(o(e,t),t)},e.exports=t},function(e,t){t=function(e){return null==e?"":e.toString()},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hookLocalStorage=t.setDOMStorageItem=t.removeDOMStorageItem=t.getDOMStorageItems=t.clear=t.enable=void 0;const i=o(n(0)),u=o(n(4)),a=o(n(11)),s=o(n(7)),c=n(8),l=n(21),f=n(42);let d=!1;function p(e){const{isLocalStorage:t}=e;return t?localStorage:null}function h({key:e,newValue:t,storageId:n}){return r(this,void 0,void 0,(function*(){const r=yield localStorage.getItem(e);r?s.default.trigger("DOMStorage.domStorageItemUpdated",{key:e,newValue:t,oldValue:r,storageId:n}):s.default.trigger("DOMStorage.domStorageItemAdded",{key:e,newValue:t,storageId:n})}))}function g({key:e,storageId:t}){return r(this,void 0,void 0,(function*(){(yield localStorage.getItem(e))&&s.default.trigger("DOMStorage.domStorageItemRemoved",{key:e,storageId:t})}))}t.enable=function(){f.triggerFrameUpdated(),d=!0},t.clear=function(e){return r(this,void 0,void 0,(function*(){const{storageId:t}=e,n=p(t);if(!n)return;const r=yield n.getAllKeys();n.storageId=t,n.multiRemove(r)}))},t.getDOMStorageItems=function(e){return r(this,void 0,void 0,(function*(){const t=p(e.storageId);if(!t)return{entries:[]};const n=yield t.getAllKeys();return{entries:yield t.multiGet(n)}}))},t.removeDOMStorageItem=function(e){const{key:t,storageId:n}=e,r=p(n);r&&u.default(t)&&t&&(r.storageId=n,r.removeItem(t))},t.setDOMStorageItem=function(e){const{key:t,value:n,storageId:r}=e,o=p(r);o&&u.default(t)&&u.default(n)&&n&&t&&(o.storageId=r,o.setItem(t,n))},t.hookLocalStorage=a.default(()=>{const e={securityOrigin:c.getDomains()[0],isLocalStorage:!0};l.hookFunction(localStorage,"setItem",{before:function(t,n,r){d&&u.default(n)&&u.default(r)&&h({key:n,newValue:r,storageId:this.storageId||e})}}),l.hookFunction(localStorage,"removeItem",{before:function(t,n){d&&u.default(n)&&g({key:n,storageId:this.storageId||e})}}),l.hookFunction(localStorage,"multiSet",{before:function(t,n){d&&i.default(n,([t,n])=>{u.default(t)&&u.default(n)&&h({key:t,newValue:n,storageId:this.storageId||e})})}}),l.hookFunction(localStorage,"multiRemove",{before:function(t,n){i.default(n,t=>{g({key:t,storageId:this.storageId||e})})}})})},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.triggerFrameUpdated=t.getResourceTree=void 0;const o=n(8),i=r(n(7));function u(){return{frameTree:{frame:{id:"0",mimeType:"text/html",securityOrigin:"http://localhost:38989",url:"http://localhost:38989",secureContextType:"Secure",crossOriginIsolatedContextType:"NotIsolated",gatedAPIFeatures:[]},childFrames:o.getDomains().slice(0).map((e,t)=>({frame:{id:""+t,parentId:"0",mimeType:"text/html",securityOrigin:e,url:e,secureContextType:"Secure",crossOriginIsolatedContextType:"NotIsolatedFeatureDisabled",gatedAPIFeatures:[]},resources:[]}))||[],resources:[]}}}t.getResourceTree=u,t.triggerFrameUpdated=()=>{const e=u();i.default.trigger("Page.frameUpdated",e)}},function(e,t,n){var r=n(88),o=n(10);t={encode:function(e){return e.length<32768?String.fromCodePoint.apply(String,e):o(r(e,32767),(function(e){return String.fromCodePoint.apply(String,e)})).join("")},decode:function(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getType=t.getFetchSize=void 0;const o=r(n(90)),i=r(n(91));t.getFetchSize=function(e,t){var n,r;let o=0;const u=(null===(n=null==e?void 0:e.headers)||void 0===n?void 0:n["Content-Length"])||(null===(r=null==e?void 0:e.headers)||void 0===r?void 0:r["content-length"]);return o=u?i.default(u):function(e){const t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)}(t),o},t.getType=function(e){if(!e)return{type:"unknown",subType:"unknown"};const t=e.split(";");return{type:t[0],subType:o.default(t)}}},function(e,t,n){"use strict";(function(e){var r,o,i,u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=a(n(7)),c=n(61),l=a(n(19)),f=a(n(63)),d=a(n(66)),p=a(n(0)),h=a(n(23)),g=n(22),v=n(36),m=n(41),y=n(32),b=n(8),w=n(18);class _{constructor(){this.resolves=new Map,this.domains=new Map,this.onMessage=l.default,s.default.on("message",e=>{const t=JSON.parse(e),n=this.resolves.get(t.id);if(n&&n(t.result),!t.id){const[e,n]=t.method.split("."),r=this.domains.get(e);r&&r.emit(n,t.params)}this.onMessage(e)}),this.initDomains()}domain(e){return this.domains.get(e)}setOnMessage(e){this.onMessage=e}sendMessage(e,t={}){const n=f.default();return this.sendRawMessage(JSON.stringify({id:n,method:e,params:t})),new Promise(e=>{this.resolves.set(n,e)})}sendRawMessage(e){return u(this,void 0,void 0,(function*(){const t=JSON.parse(e),{method:n,params:r,id:o}=t,i={id:o};try{i.result=yield this.callMethod(n,r)}catch(e){i.error={message:e.message}}s.default.emit("message",JSON.stringify(i))}))}initDomains(){const e=this.domains;p.default(d.default,(t,n)=>{const[r,o]=n.split(".");let i=e.get(r);i||(i={},h.default.mixin(i)),i[o]=t,e.set(r,i)})}callMethod(e,t){return u(this,void 0,void 0,(function*(){if(d.default[e])return d.default[e](t)||{};throw Error(e+" unimplemented")}))}}let{domains:x}=y.parseURL(__resourceQuery);try{x=JSON.parse(x)}catch(e){x=[]}b.setDomains(x);"ios"===(null===(i=null===(o=null===(r=null==e?void 0:e.Hippy)||void 0===r?void 0:r.device)||void 0===o?void 0:o.platform)||void 0===i?void 0:i.OS)&&v.hookConsole(),g.hookFetch(),g.hookHttpRequest(),m.hookLocalStorage(),setTimeout(()=>{(()=>{w.log.info("enable inspect Network, Cookie, Storage");let e=!1;const t=new _,n=c.createBridge({onOpen:()=>{e=!0},onClose:()=>{e=!1},onMessage:e=>{t.sendRawMessage(e.data)}});t.setOnMessage(t=>{e&&n.send(t)})})()},2e3)}).call(this,n(12))},function(e,t,n){var r=n(47);function o(e,t){return e===t}t=function(e,t){return t=t||o,r(e,(function(e,n,r){for(var o=r.length;++n<o;)if(t(e,r[n]))return!1;return!0}))},e.exports=t},function(e,t,n){var r=n(29),o=n(0);t=function(e,t,n){var i=[];return t=r(t,n),o(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i},e.exports=t},function(e,t,n){var r=n(49),o=n(50);t=function(e){return e=r({},e),function(t){return o(t,e)}},e.exports=t},function(e,t,n){var r=n(3);t=n(25)(r),e.exports=t},function(e,t,n){var r=n(3);t=function(e,t){var n=r(t),o=n.length;if(null==e)return!o;e=Object(e);for(var i=0;i<o;i++){var u=n[i];if(t[u]!==e[u]||!(u in e))return!1}return!0},e.exports=t},function(e,t){t=function(e){return e},e.exports=t},function(e,t,n){var r=n(6),o=n(30);t=function(e){return r(e)?function(t){return o(t,e)}:(t=e,function(e){return null==e?void 0:e[t]});var t},e.exports=t},function(e,t,n){var r=n(9),o=n(6);t=function(e,t){if(o(e))return e;if(t&&r(t,e))return[e];var n=[];return e.replace(i,(function(e,t,r,o){n.push(r?o.replace(u,"$1"):t||e)})),n};var i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;e.exports=t},function(e,t,n){var r=n(55);t=function(e,t){e.prototype=r(t.prototype)},e.exports=t},function(e,t,n){var r=n(5);t=function(e){if(!r(e))return{};if(o)return o(e);function t(){}return t.prototype=e,new t};var o=Object.create;e.exports=t},function(e,t,n){var r=n(2);t="undefined"!=typeof wx&&r(wx.openLocation),e.exports=t},function(e,t){t=function(e,t,n){var r=e.length;t=null==t?0:t<0?Math.max(r+t,0):Math.min(t,r),n=null==n?r:n<0?Math.max(r+n,0):Math.min(n,r);for(var o=[];t<n;)o.push(e[t++]);return o},e.exports=t},function(e,t,n){var r=n(59),o=n(17);t=r((function(e,t){return function(){var n=[];return n=(n=n.concat(t)).concat(o(arguments)),e.apply(this,n)}})),e.exports=t},function(e,t){t=function(e,t){return t=null==t?e.length-1:+t,function(){var n,r=Math.max(arguments.length-t,0),o=new Array(r);for(n=0;n<r;n++)o[n]=arguments[n+t];switch(t){case 0:return e.call(this,o);case 1:return e.call(this,arguments[0],o);case 2:return e.call(this,arguments[0],arguments[1],o)}var i=new Array(t+1);for(n=0;n<t;n++)i[n]=arguments[n];return i[t]=o,e.apply(this,i)}},e.exports=t},function(e,t){t=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},e.exports=t},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createBridge=void 0;const r=n(32),o=n(62),i=n(18);var u;t.createBridge=t=>{var n,a,s;const c=r.parseURL(__resourceQuery),l=r.getWSProtocolByHttpProtocol(c.protocol||"http"),f=c.host||"localhost",d=c.port||38989;let p;try{p=e.__HIPPYNATIVEGLOBAL__.Debug.debugClientId}catch(e){i.log.warn("get devtools clientId failed, please update hippy sdk to ^2.13.4")}const h=r.makeUrl(`${l}://${f}:${d}/debugger-proxy`,{role:"vanilla_js_runtime",contextName:"contextName",clientId:p,platform:"ios"===(null===(s=null===(a=null===(n=null==e?void 0:e.Hippy)||void 0===n?void 0:n.device)||void 0===a?void 0:a.platform)||void 0===s?void 0:s.OS)?u.IOS:u.Android});return o.socketWithRetry(h,t)},function(e){e.Unknown="0",e.IOS="1",e.Android="2"}(u||(u={}))}).call(this,n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.socketWithRetry=void 0;const r=n(18);let o=0;const i=()=>{},u="[vanilla js devtools]";t.socketWithRetry=(e,n)=>{const{onOpen:a=i,onClose:s=i,onMessage:c=i}=n;let l=new WebSocket(e,void 0,{},!0);return l.onopen=a,l.onclose=i=>{if(0===o&&s(i),r.log.warn(u,i),l=void 0,o<10){const i=1e3*Math.pow(2,o)+100*Math.random();o+=1,r.log.warn(u,"Trying to reconnect..."),setTimeout(()=>{l=t.socketWithRetry(e,n)},i)}},l.onmessage=e=>{o=0,c(e)},l.send=new Proxy(l.send,{apply:(e,t,n)=>{if(l)return e.apply(t,n)}}),l.close=new Proxy(l.close,{apply:(e,t,n)=>{if(l)return e.apply(t,n)}}),l}},function(e,t,n){var r=n(64);t=function(){var e=r(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,o[e[0]]+o[e[1]]+o[e[2]]+o[e[3]]+"-"+o[e[4]]+o[e[5]]+"-"+o[e[6]]+o[e[7]]+"-"+o[e[8]]+o[e[9]]+"-"+o[e[10]]+o[e[11]]+o[e[12]]+o[e[13]]+o[e[14]]+o[e[15]]};for(var o=[],i=0;i<256;i++)o[i]=(i+256).toString(16).substr(1);e.exports=t},function(module,exports,__webpack_require__){var random=__webpack_require__(33),isBrowser=__webpack_require__(34),isNode=__webpack_require__(65),crypto;exports=function(e){for(var t=new Uint8Array(e),n=0;n<e;n++)t[n]=random(0,255);return t},isBrowser?(crypto=global.crypto||global.msCrypto,crypto&&(exports=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t})):isNode&&(crypto=eval("require")("crypto"),exports=function(e){return crypto.randomBytes(e)}),module.exports=exports},function(e,t,n){(function(r){var o=n(1);t=void 0!==r&&"[object process]"===o(r),e.exports=t}).call(this,n(35))},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=u(n(19)),s=i(n(36)),c=i(n(41)),l=i(n(22)),f=i(n(94)),d=i(n(42)),p={"Log.clear":a.default,"Log.enable":a.default,"Log.startViolationsReport":a.default,"Network.deleteCookies":l.deleteCookies,"Network.enable":l.enable,"Network.getCookies":l.getCookies,"Network.getResponseBody":l.getResponseBody,"Network.setCookie":l.setCookie,"Page.getResourceTree":d.getResourceTree,"Runtime.callFunctionOn":s.callFunctionOn,"Runtime.compileScript":a.default,"Runtime.discardConsoleEntries":s.discardConsoleEntries,"Runtime.enable":s.enable,"Runtime.evaluate":s.evaluate,"Runtime.getIsolateId":a.default,"Runtime.getProperties":s.getProperties,"Runtime.releaseObject":a.default,"Runtime.releaseObjectGroup":a.default,"Runtime.runIfWaitingForDebugger":a.default,"DOMStorage.clear":c.clear,"DOMStorage.enable":c.enable,"DOMStorage.getDOMStorageItems":c.getDOMStorageItems,"DOMStorage.removeDOMStorageItem":c.removeDOMStorageItem,"DOMStorage.setDOMStorageItem":c.setDOMStorageItem,"HeapProfiler.enable":a.default,"Inspector.enable":a.default,"IndexedDB.enable":a.default,"IndexedDB.requestDatabaseNames":a.default,"Storage.trackCacheStorageForOrigin":a.default,"Storage.trackIndexedDBForOrigin":a.default,"Storage.clearDataForOrigin":f.clearDataForOrigin};t.default=p},function(e,t,n){var r=n(20),o=n(69),i=n(38),u=n(4);t=function(e){var t,n,s=o(u(e)?e:r(e));i(s,"async")||i(s,"function")||i(s,"(")?(t=s.indexOf("(")+1,n=s.indexOf(")")):(t=0,n=s.indexOf("=>"));var c=s.slice(t,n);return null===(c=c.match(a))?[]:c};var a=/[^\s,]+/g;e.exports=t},function(e,t){t=function(e){return null==e},e.exports=t},function(e,t){t=function(e){for(var t={singleQuote:!1,doubleQuote:!1,regex:!1,blockComment:!1,lineComment:!1,condComp:!1},n=0,r=(e=("__"+e+"__").split("")).length;n<r;n++)if(t.regex)"/"===e[n]&&"\\"!==e[n-1]&&(t.regex=!1);else if(t.singleQuote)"'"===e[n]&&"\\"!==e[n-1]&&(t.singleQuote=!1);else if(t.doubleQuote)'"'===e[n]&&"\\"!==e[n-1]&&(t.doubleQuote=!1);else if(t.blockComment)"*"===e[n]&&"/"===e[n+1]&&(e[n+1]="",t.blockComment=!1),e[n]="";else if(t.lineComment)"\n"===e[n+1]&&(t.lineComment=!1),e[n]="";else if(t.doubleQuote='"'===e[n],t.singleQuote="'"===e[n],"/"===e[n]){if("*"===e[n+1]){e[n]="",t.blockComment=!0;continue}if("/"===e[n+1]){e[n]="",t.lineComment=!0;continue}t.regex=!0}return e.join("").slice(2,-2)},e.exports=t},function(e,t,n){(function(r){var o=n(34),i=n(71),u=!1;function a(e){u&&t.emit(e)}t={start:function(){u=!0},stop:function(){u=!1}},i.mixin(t),o?(global.addEventListener("error",(function(e){a(e.error)})),global.addEventListener("unhandledrejection",(function(e){a(e.reason)}))):(r.on("uncaughtException",a),r.on("unhandledRejection",a)),e.exports=t}).call(this,n(35))},function(e,t,n){var r=n(24),o=n(31),i=n(0),u=n(17);t=r({initialize:function(){this._listeners=[]},addListener:function(e){this._listeners.push(e)},rmListener:function(e){var t=this._listeners.indexOf(e);t>-1&&this._listeners.splice(t,1)},rmAllListeners:function(){this._listeners=[]},emit:function(){var e=this,t=u(arguments),n=o(this._listeners);i(n,(function(n){return n.apply(e,t)}),this)}},{mixin:function(e){i(["addListener","rmListener","emit","rmAllListeners"],(function(n){e[n]=t.prototype[n]})),e._listeners=e._listeners||[]}}),e.exports=t},function(e,t){var n=/^\s+/;t=function(e,t){if(null==t)return e.trimLeft?e.trimLeft():e.replace(n,"");for(var r,o,i=0,u=e.length,a=t.length,s=!0;s&&i<u;)for(s=!1,r=-1,o=e.charAt(i);++r<a;)if(o===t[r]){s=!0,i++;break}return i>=u?"":e.substr(i,u)},e.exports=t},function(e,t){t=function(e,t){if(null==t){if(e.trimRight)return e.trimRight();t=" \r\n\t\f\v"}for(var n,r,o=e.length-1,i=t.length,u=!0;u&&o>=0;)for(u=!1,n=-1,r=e.charAt(o);++n<i;)if(r===t[n]){u=!0,o--;break}return o>=0?e.substring(0,o+1):""},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getProperties=t.releaseObj=t.getObj=t.wrap=t.clear=void 0;const o=r(n(40)),i=r(n(75)),u=r(n(6)),a=r(n(2)),s=r(n(76)),c=r(n(77)),l=r(n(78)),f=r(n(79)),d=r(n(3)),p=r(n(20)),h=r(n(27)),g=r(n(83)),v=r(n(28)),m=r(n(84)),y=r(n(9)),b=new Map,w=new Map,_=new Map;let x=1;function O(e,t){let n=w.get(e);return n||(n=JSON.stringify({injectedScriptId:0,id:x++}),w.set(e,n),b.set(n,e),_.set(n,t),n)}function k(e,{generatePreview:t=!1,self:n=e}={}){const r=I(e),{type:i,subtype:u}=r;return"undefined"===i?r:"string"===i||"boolean"===i||"null"===u?(r.value=e,r):"number"===i?(r.description=o.default(e),r.value=e,r):"symbol"===i?(r.objectId=O(e,n),r.description=o.default(e),r):("function"===i?(r.className="Function",r.description=p.default(e)):"array"===u?(r.className="Array",r.description=`Array(${e.length})`):"regexp"===u?(r.className="RegExp",r.description=o.default(e)):"error"===u?(r.className=e.name,r.description=e.stack):(r.className=f.default(e,!1),r.description=r.className),t&&(r.preview=Object.assign(Object.assign({},r),function(e,t){let n=!1;const r=[],i=d.default(e);let u=i.length;u>5&&(u=5,n=!0);for(let e=0;e<u;e++){const n=i[e],u=t[n],a=I(u);a.name=n;const{subtype:s,type:c}=a;let l;l="object"===c?"null"===s?"null":"array"===s?`Array(${u.length})`:f.default(u,!1):o.default(u),a.value=l,r.push(a)}return{overflow:n,properties:r}}(e,n))),r.objectId=O(e,n),r)}function S(e){return b.get(e)}t.clear=function(){b.clear(),w.clear(),_.clear()},t.wrap=k,t.getObj=S,t.releaseObj=function(e){const t=S(e);w.delete(t),_.delete(e),b.delete(e)},t.getProperties=function(e){const{accessorPropertiesOnly:t,objectId:n,ownProperties:r,generatePreview:i}=e,u=[],s={prototype:!r,unenumerable:!0,symbol:!t},c=b.get(n),l=_.get(n),f=c?h.default(c,s):[],d=v.default(c);for(let e=0,n=f.length;e<n;e++){const n=f[e];let r;try{r=l[n]}catch(e){}const s={name:o.default(n),isOwn:y.default(l,n)};let p=Object.getOwnPropertyDescriptor(c,n);if(!p&&d&&(p=Object.getOwnPropertyDescriptor(d,n)),p){if(t&&!p.get&&!p.set)continue;s.configurable=p.configurable,s.enumerable=p.enumerable,s.writable=p.writable,p.get&&(s.get=k(p.get)),p.set&&(s.set=k(p.set))}d&&y.default(d,n)&&s.enumerable&&(s.isOwn=!0);let h=!0;!s.isOwn&&s.get&&(h=!1),h&&(m.default(n)?(s.symbol=k(n),s.value={type:"undefined"}):s.value=k(r,{generatePreview:i})),t&&a.default(r)&&g.default(r)||u.push(s)}return d&&u.push({name:"__proto__",configurable:!0,enumerable:!1,isOwn:y.default(c,"__proto__"),value:k(d,{self:l}),writable:!1}),{result:u}};function I(e){const t={type:typeof e};if(i.default(e))t.subtype="null";else if(u.default(e))t.subtype="array";else if(l.default(e))t.subtype="regexp";else if(c.default(e))t.subtype="error";else try{s.default(e)&&(t.subtype="node")}catch(e){}return t}},function(e,t){t=function(e){return null===e},e.exports=t},function(e,t){t=function(e){return!(!e||1!==e.nodeType)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object Error]"===r(e)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object RegExp]"===r(e)},e.exports=t},function(e,t,n){var r=n(1),o=n(80),i=n(81),u=n(82);t=function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null===e&&(t="Null"),void 0===e&&(t="Undefined"),o(e)&&(t="NaN"),u(e)&&(t="Buffer"),t||(t=r(e).match(a))&&(t=t[1]),t?n?i(t):t:""};var a=/^\[object\s+(.*?)]$/;e.exports=t},function(e,t,n){var r=n(16);t=function(e){return r(e)&&e!==+e},e.exports=t},function(e,t,n){var r=n(40);t=function(e){return r(e).toLocaleLowerCase()},e.exports=t},function(e,t,n){var r=n(2);t=function(e){return null!=e&&(!!e._isBuffer||e.constructor&&r(e.constructor.isBuffer)&&e.constructor.isBuffer(e))},e.exports=t},function(e,t,n){var r=n(5),o=n(2),i=n(20);t=function(e){return!!r(e)&&(o(e)?a.test(i(e)):s.test(i(e)))};var u=Object.prototype.hasOwnProperty,a=new RegExp("^"+i(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),s=/^\[object .+?Constructor\]$/;e.exports=t},function(e,t){t=function(e){return"symbol"==typeof e},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setGlobal=void 0;const o=r(n(4)),i=r(n(86)),u=r(n(3)),a=r(n(0)),s={copy(e){o.default(e)||(e=JSON.stringify(e,null,2)),i.default(e)},keys:e=>u.default(e)};t.setGlobal=function(e,t){s[e]=t},t.default=function(e){let t;a.default(s,(e,t)=>{s[t]||(s[t]=e)});try{t=eval.call(s,`(${e})`)}catch(n){t=eval.call(s,e)}return a.default(s,(e,t)=>{s[t]&&s[t]===e&&delete s[t]}),t}},function(e,t,n){var r=n(13),o=n(19);t=function(e,t){t=t||o;var n=document.createElement("textarea"),i=document.body;r(n.style,{fontSize:"12pt",border:"0",padding:"0",margin:"0",position:"absolute",left:"-9999px"}),n.value=e,i.appendChild(n),n.setAttribute("readonly",""),n.select(),n.setSelectionRange(0,e.length);try{document.execCommand("copy"),t()}catch(e){t(e)}finally{i.removeChild(n)}},e.exports=t},function(e,t,n){var r=n(0),o=n(43),i=n(10),u=n(89);function a(e){return+("0x"+e)}t=function(e){try{return decodeURIComponent(e)}catch(n){var t=e.match(s);return t?(r(t,(function(t){e=e.replace(t,function(e){e=e.split("%").slice(1);var t=i(e,a);return e=o.encode(t),e=u.decode(e,!0)}(t))})),e):e}};var s=/(%[a-f0-9]{2})+/gi;e.exports=t},function(e,t){t=function(e,t){var n=[];t=t||1;for(var r=0,o=Math.ceil(e.length/t);r<o;r++){var i=r*t,u=i+t;n.push(e.slice(i,u))}return n},e.exports=t},function(e,t,n){var r=n(43);t={encode:function(e){for(var t=r.decode(e),n="",o=0,i=t.length;o<i;o++)n+=p(t[o]);return n},decode:function(e,t){o=r.decode(e),i=0,u=o.length,a=0,s=0,c=0,l=128,f=191;for(var n,d=[];!1!==(n=h(t));)d.push(n);return r.encode(d)}};var o,i,u,a,s,c,l,f,d=String.fromCharCode;function p(e){if(0==(4294967168&e))return d(e);var t,n,r="";for(0==(4294965248&e)?(t=1,n=192):0==(4294901760&e)?(t=2,n=224):0==(4292870144&e)&&(t=3,n=240),r+=d((e>>6*t)+n);t>0;){r+=d(128|63&e>>6*(t-1)),t--}return r}function h(e){for(;;){if(i>=u&&c){if(e)return g();throw new Error("Invalid byte index")}if(i===u)return!1;var t=o[i];if(i++,c){if(t<l||t>f){if(e)return i--,g();throw new Error("Invalid continuation byte")}if(l=128,f=191,a=a<<6|63&t,++s===c){var n=a;return a=0,c=0,s=0,n}}else{if(0==(128&t))return t;if(192==(224&t))c=1,a=31&t;else if(224==(240&t))224===t&&(l=160),237===t&&(f=159),c=2,a=15&t;else{if(240!=(248&t)){if(e)return g();throw new Error("Invalid UTF-8 detected")}240===t&&(l=144),244===t&&(f=143),c=3,a=7&t}}}}function g(){var e=i-s-1;return i=e+1,a=0,c=0,s=0,l=128,f=191,o[e]}e.exports=t},function(e,t){t=function(e){var t=e?e.length:0;if(t)return e[t-1]},e.exports=t},function(e,t,n){var r=n(16),o=n(5),i=n(2),u=n(4);t=function(e){if(r(e))return e;if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}return u(e)?+e:0===e?e:+e},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createId=void 0;const o=r(n(93)),i=r(n(33)).default(1e3,9999)+".";t.createId=function(){return o.default(i)}},function(e,t){var n=0;t=function(e){var t=++n+"";return e?e+t:t},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.clearDataForOrigin=t.getUsageAndQuota=void 0;const i=o(n(0)),u=n(22),a=n(8);t.getUsageAndQuota=function(){return{quota:0,usage:0,usageBreakdown:[]}},t.clearDataForOrigin=function(e){const t=e.storageTypes.split(","),n=a.getDomains();i.default(t,e=>r(this,void 0,void 0,(function*(){if("cookies"===e){const e=u.getCookieAPI();e&&n.forEach(t=>{e.set(t,"")})}else"local_storage"===e&&localStorage.clear()})))}}])}));
/*! @hippy/vanilla-js-devtools v0.1.11 http://hippyjs.org */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VanillaJSDevtools=t():e.VanillaJSDevtools=t()}((0,eval)("this"),(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([function(e,t,n){var r=n(15),o=n(3),i=n(26);t=function(e,t,n){var u,a;if(t=i(t,n),r(e))for(u=0,a=e.length;u<a;u++)t(e[u],u,e);else{var s=o(e);for(u=0,a=s.length;u<a;u++)t(e[s[u]],s[u],e)}return e},e.exports=t},function(e,t){var n=Object.prototype.toString;t=function(e){return n.call(e)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){var t=r(e);return"[object Function]"===t||"[object GeneratorFunction]"===t||"[object AsyncFunction]"===t},e.exports=t},function(e,t,n){var r=n(9);t=Object.keys?Object.keys:function(e){var t=[];for(var n in e)r(e,n)&&t.push(n);return t},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object String]"===r(e)},e.exports=t},function(e,t){t=function(e){var t=typeof e;return!!e&&("function"===t||"object"===t)},e.exports=t},function(e,t,n){var r=n(1);t=Array.isArray?Array.isArray:function(e){return"[object Array]"===r(e)},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=r(n(23));class i extends o.default{trigger(e,t){this.emit("message",JSON.stringify({method:e,params:t}))}}t.default=new i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setDomains=t.getDomains=void 0;let r=[];t.getDomains=()=>r,t.setDomains=e=>r=e},function(e,t){var n=Object.prototype.hasOwnProperty;t=function(e,t){return n.call(e,t)},e.exports=t},function(e,t,n){var r=n(29),o=n(3),i=n(15);t=function(e,t,n){t=r(t,n);for(var u=!i(e)&&o(e),a=(u||e).length,s=Array(a),c=0;c<a;c++){var l=u?u[c]:c;s[c]=t(e[l],l,e)}return s},e.exports=t},function(e,t,n){t=n(58)(n(60),2),e.exports=t},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof global&&(n=global)}e.exports=n},function(e,t,n){t=n(25)(n(27)),e.exports=t},function(e,t){t=function(e){return void 0===e},e.exports=t},function(e,t,n){var r=n(16),o=n(2),i=Math.pow(2,53)-1;t=function(e){if(!e)return!1;var t=e.length;return r(t)&&t>=0&&t<=i&&!o(e)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object Number]"===r(e)},e.exports=t},function(e,t,n){var r=n(15),o=n(10),i=n(6),u=n(4);t=function(e){return e?i(e)?e:r(e)&&!u(e)?o(e):[e]:[]},e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=void 0,t.log=new Proxy({},{get:(e,t)=>["log","warn","error","info"].includes(t)?(...e)=>{console[t]("%c[devtools]%c","color: yellow","color: auto",...e)}:()=>{}})},function(e,t){t=function(){},e.exports=t},function(e,t,n){var r=n(68);t=function(e){if(r(e))return"";try{return o.call(e)}catch(e){}try{return e+""}catch(e){}return""};var o=Function.prototype.toString;e.exports=t},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.hookFunction=t.hookClass=void 0,t.hookClass=(e,t)=>{Object.entries(Object.getOwnPropertyDescriptors(e.prototype)).forEach(([n,r])=>{const o=t[n];if(o&&"constructor"!==n){if(r.set)return e.prototype["_"+n]=e.prototype[n],void Object.defineProperty(e.prototype,n,Object.assign(Object.assign({},r),{set:function(e){let t=e;this.inSetter=!0,(null==o?void 0:o.argsBefore)&&(t=o.argsBefore.apply(this,[e])),(null==o?void 0:o.before)&&o.before.apply(this,[e]);const n=r.set.apply(this,[t]);return(null==o?void 0:o.after)&&o.after.apply(this,[e].concat(n)),n}}));e.prototype["_"+n]=e.prototype[n],e.prototype[n]=function(...e){let t;return(null==o?void 0:o.before)&&o.before.apply(this,e),t=(null==o?void 0:o.current)?o.current.apply(this,e):this["_"+n](...e),(null==o?void 0:o.after)&&o.after.apply(this,e.concat(t)),t}}})},t.hookFunction=(e,t,{before:n,after:o,error:i,isAsync:u=!1})=>{e[t]&&(e[t]=u?new Proxy(e[t],{apply:(e,t,u)=>r(void 0,void 0,void 0,(function*(){const r={};let a;n&&n.apply(t,[r].concat(u));try{a=yield e.apply(t,u)}catch(e){throw i&&i.apply(t,[r,e].concat(u)),e}return o&&o.apply(t,[r,a].concat(u)),a}))}):new Proxy(e[t],{apply:(e,t,r)=>{const i={};n&&n.apply(t,[i].concat(r));const u=e.apply(t,r);return o&&o.apply(t,[i,u].concat(r)),u}}))}},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hookWebSocket=t.hookHttpRequest=t.hookFetch=t.setCookie=t.getCookieAPI=t.getResponseBody=t.getCookies=t.deleteCookies=t.enable=void 0;const i=o(n(39)),u=o(n(0)),a=o(n(87)),s=o(n(11)),c=o(n(4)),l=o(n(37)),f=n(44),d=o(n(7)),p=n(21),h=n(92),g=n(8),v=n(44),m=new Map;let y=!1,b=[];t.enable=s.default((function(){y=!0,b.forEach(e=>d.default.trigger(...e)),b=[]})),t.deleteCookies=function(e){const n=t.getCookieAPI();if(!n)return;const{name:r,domain:o,url:i}=e,u=new Date(Date.now()-1e5);let a=g.getDomains().find(e=>e.includes(o));if(a)return n.set(a,r+"=",u);i&&!i.startsWith("http")&&(n.set("http://"+i,r+"=",u),n.set("https://"+i,r+"=",u))},t.getCookies=function(e){return r(this,void 0,void 0,(function*(){const{urls:n}=e,r=t.getCookieAPI();if(!r)return{cookies:[]};const o=[];return yield Promise.all(n.map(e=>r.getAll(e).then(t=>{o.push(...w(t,e))}))),{cookies:o}}))},t.getResponseBody=function(e){return{base64Encoded:!1,body:m.get(e.requestId)}},t.getCookieAPI=()=>{try{const t=e.Hippy.bridge.callNative,n=e.Hippy.bridge.callNativeWithPromise;return{getAll(e){if(!e)throw new TypeError("Cookie.getAll() must have url argument");return n.call(this,"network","getCookie",e)},set(e,n,r){if(!e)throw new TypeError("Cookie.getAll() must have url argument");if("string"!=typeof n)throw new TypeError("Cookie.getAll() only receive string type of keyValue");let o="";if(r){if(!(r instanceof Date))throw new TypeError("Cookie.getAll() only receive Date type of expires");o=r.toUTCString()}t.call(this,"network","setCookie",e,n,o)}}}catch(e){}},t.setCookie=e=>{const n=t.getCookieAPI();if(!n)return;const{name:r,url:o,value:i}=e;n.set(o,`${r}=${i}`)},t.hookFetch=s.default(()=>{p.hookFunction(e,"fetch",{isAsync:!0,before:function(e,t,n){e.id=h.createId();const r=(null==n?void 0:n.headers)||{},o=(null==n?void 0:n.method)||"GET",i=c.default(null==n?void 0:n.body)?null==n?void 0:n.body:"";e.reqHeaders=r;_(["Network.requestWillBeSent",{requestId:e.id,type:"Fetch",request:{method:o,url:t,headers:r,postData:i},timestamp:l.default()/1e3}])},after:function(e,t,n,r){const{id:o}=e,{status:i,headers:u}=t,a=v.getType(u["Content-Type"]||u["content-type"]).subType;t.text().then(e=>{m.set(o,e);const r=["Network.responseReceived",{requestId:o,type:"Fetch",response:{url:n,status:i,headers:u,mimeType:a},timestamp:l.default()/1e3}],s=["Network.loadingFinished",{requestId:o,encodedDataLength:f.getFetchSize(t,e),timestamp:l.default()/1e3}];_(r),_(s)})},error:function(e,t,n){_(["Network.loadingFailed",{requestId:e.id,type:"Fetch",timestamp:l.default()/1e3,errorText:t.code}])}})}),t.hookHttpRequest=s.default(()=>{var t,n;const r=e.Hippy.bridge.callNative,o=function(e){return(t,n)=>{const r=h.createId(),o=(null==t?void 0:t.headers)||{},i=(null==t?void 0:t.method)||"GET",u=t.url,a=JSON.stringify(t.data||{});return _(["Network.requestWillBeSent",{requestId:r,type:"Fetch",request:{method:i,url:u,headers:o,postData:a},timestamp:l.default()/1e3}]),e("http","request",t,e=>{const t=JSON.stringify(e.data||{});m.set(r,t);const o=["Network.responseReceived",{requestId:r,type:"Fetch",response:{url:u,status:e.code,headers:e.headers||{}},timestamp:l.default()/1e3}],i=["Network.loadingFinished",{requestId:r,encodedDataLength:f.getFetchSize(e,t),timestamp:l.default()/1e3}];_(o),_(i),n(e)})}}(r);(null===(n=null===(t=null==e?void 0:e.Hippy)||void 0===t?void 0:t.bridge)||void 0===n?void 0:n.callNative)&&(e.Hippy.bridge.callNative=function(e,t,...n){switch(`${e}:${t}`){case"http:request":return o(...n)}return r(e,t,...n)})}),t.hookWebSocket=s.default(()=>{p.hookClass(WebSocket,{send:{before:function(...e){this.ignoreMonitor||_(["Network.webSocketFrameSent",{requestId:this.requestId,timestamp:Date.now()/1e3,response:{opcode:1,mask:!1,payloadData:e[0]}}])}},close:{before:function(){this.ignoreMonitor||_(["Network.webSocketClosed",{requestId:this.requestId,timestamp:Date.now()/1e3}])}},onmessage:{argsBefore:function(e){return new Proxy(e,{apply:(e,t,n)=>{const r=e.apply(t,n);if(!this.ignoreMonitor){let e;e="object"==typeof n[0]?JSON.stringify(n[0]):n[0].toString(),_(["Network.webSocketFrameReceived",{requestId:this.requestId,timestamp:Date.now()/1e3,response:{opcode:1,mask:!1,payloadData:e}}])}return r}})}},onWebSocketEvent:{current:function(...e){setTimeout(()=>{this._onWebSocketEvent(...e)},100)}},onopen:{argsBefore:function(e){return new Proxy(e,{apply:(e,t,n)=>{const r=e.apply(t,n);return this.ignoreMonitor||_(["Network.webSocketHandshakeResponseReceived",{requestId:this.requestId,timestamp:Date.now()/1e3,response:{status:101,headers:{}}}]),r}})}},onclose:{argsBefore:function(e){return new Proxy(e,{apply:(e,t,n)=>{const r=e.apply(t,n);return this.ignoreMonitor||_(["Network.webSocketClosed",{requestId:this.requestId,timestamp:Date.now()/1e3}]),r}})}}}),e.WebSocket=new Proxy(WebSocket,{construct(e,t){const n=new e(...t);n.ignoreMonitor=!1,4===t.length&&(n.ignoreMonitor=t[3]);return((...e)=>{if(!n.ignoreMonitor){const[,t,r]=e,o=r||{};Array.isArray(t)&&t.length>0?o["Sec-WebSocket-Protocol"]=t.join(","):"string"==typeof t&&(o["Sec-WebSocket-Protocol"]=t),n.requestId=h.createId();const i=Date.now();_(["Network.webSocketCreated",{requestId:n.requestId,url:n.url}]),_(["Network.webSocketWillSendHandshakeRequest",{requestId:n.requestId,timestamp:i/1e3,wallTime:i/1e3,request:{headers:o}}])}}).apply(n,t),n}})});const w=(e,t)=>{const n=[];return e?(""!==i.default(e)&&u.default(e.split(";"),(function(e){e=e.split("=");const r=i.default(e.shift());e=a.default(e.join("=")),n.push({name:r,value:e,path:"/",secure:t.startsWith("https"),session:!1,domain:t.replace(/^https?\:\/\//,"")})})),n):n};function _(e){y?d.default.trigger(...e):b.push(e)}}).call(this,n(12))},function(e,t,n){var r=n(24),o=n(9),i=n(0),u=n(57),a=n(11),s=n(31);t=r({initialize:function(){this._events=this._events||{}},on:function(e,t){return this._events[e]=this._events[e]||[],this._events[e].push(t),this},off:function(e,t){var n=this._events;if(o(n,e)){var r=n[e].indexOf(t);return r>-1&&n[e].splice(r,1),this}},once:function(e,t){return this.on(e,a(t)),this},emit:function(e){var t=this;if(o(this._events,e)){var n=u(arguments,1),r=s(this._events[e]);return i(r,(function(e){return e.apply(t,n)}),this),this}},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this}},{mixin:function(e){i(["on","off","once","emit","removeAllListeners"],(function(n){e[n]=t.prototype[n]})),e._events=e._events||{}}}),e.exports=t},function(e,t,n){var r=n(13),o=n(17),i=n(54),u=n(30),a=n(56);var s=(t=function(e,t){return s.extend(e,t)}).Base=function e(t,n,s){s=s||{};var c=n.className||u(n,"initialize.name")||"";delete n.className;var l=function(){var e=o(arguments);return this.initialize&&this.initialize.apply(this,e)||this};if(!a)try{l=new Function("toArr","return function "+c+"(){var args = toArr(arguments);return this.initialize ? this.initialize.apply(this, args) || this : this;};")(o)}catch(e){}return i(l,t),l.prototype.constructor=l,l.extend=function(t,n){return e(l,t,n)},l.inherits=function(e){i(l,e)},l.methods=function(e){return r(l.prototype,e),l},l.statics=function(e){return r(l,e),l},l.methods(n).statics(s),l}(Object,{className:"Base",callSuper:function(e,t,n){return e.prototype[t].apply(this,n)},toString:function(){return this.constructor.name}});e.exports=t},function(e,t,n){var r=n(14),o=n(0);t=function(e,t){return function(n){return o(arguments,(function(i,u){if(0!==u){var a=e(i);o(a,(function(e){t&&!r(n[e])||(n[e]=i[e])}))}})),n}},e.exports=t},function(e,t,n){var r=n(14);t=function(e,t,n){if(r(t))return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,o){return e.call(t,n,r,o)};case 4:return function(n,r,o,i){return e.call(t,n,r,o,i)}}return function(){return e.apply(t,arguments)}},e.exports=t},function(e,t,n){var r=n(3),o=n(28),i=n(46),u=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols;t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prototype,s=void 0===n||n,c=t.unenumerable,l=void 0!==c&&c,f=t.symbol,d=void 0!==f&&f,p=[];if((l||d)&&u){var h=r;l&&u&&(h=u);do{p=p.concat(h(e)),d&&a&&(p=p.concat(a(e)))}while(s&&(e=o(e))&&e!==Object.prototype);p=i(p)}else if(s)for(var g in e)p.push(g);else p=r(e);return p},e.exports=t},function(e,t,n){var r=n(5),o=n(2),i=Object.getPrototypeOf,u={}.constructor;t=function(e){if(r(e)){if(i)return i(e);var t=e.__proto__;return t||null===t?t:o(e.constructor)?e.constructor.prototype:e instanceof u?u.prototype:void 0}},e.exports=t},function(e,t,n){var r=n(2),o=n(5),i=n(6),u=n(26),a=n(48),s=n(51),c=n(52);t=function(e,t,n){return null==e?s:r(e)?u(e,t,n):o(e)&&!i(e)?a(e):c(e)},e.exports=t},function(e,t,n){var r=n(14),o=n(53);t=function(e,t){var n;for(n=(t=o(t,e)).shift();!r(n);){if(null==(e=e[n]))return;n=t.shift()}return e},e.exports=t},function(e,t,n){var r=n(5),o=n(6),i=n(13);t=function(e){return r(e)?o(e)?e.slice():i({},e):e},e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getWSProtocolByHttpProtocol=t.makeUrl=t.parseURL=void 0,t.parseURL=e=>{const t={};if("string"==typeof e&&""!==e){const n=e.substr(1).split("&");for(let e=0;e<n.length;e++){const r=n[e].split("=");t[r[0]]=decodeURIComponent(r[1])}}return t},t.makeUrl=(e,t={})=>{let n=e;const r=Object.keys(t);for(const[e,o]of r.entries())0===e?-1===n.indexOf("?")&&(n+="?"):n+="&",n+=`${o}=${encodeURIComponent(t[o])}`;return n},t.getWSProtocolByHttpProtocol=e=>({https:"wss",http:"ws"}[e]||"ws")},function(e,t){t=function(e,t,n){null==t&&(t=e,e=0);var r=Math.random();return n||e%1||t%1?Math.min(e+r*(t-e+parseFloat("1e-"+((r+"").length-1))),t):e+Math.floor(r*(t-e+1))},e.exports=t},function(e,t){t="object"==typeof global&&"object"==typeof document&&9===document.nodeType,e.exports=t},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var s,c=[],l=!1,f=-1;function d(){l&&s&&(l=!1,s.length?c=s.concat(c):f=-1,c.length&&p())}function p(){if(!l){var e=a(d);l=!0;for(var t=c.length;t;){for(s=c,c=[];++f<t;)s&&s[f].run();f=-1,t=c.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new h(e,t)),1!==c.length||l||a(p)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hookConsole=t.releaseObject=t.evaluate=t.getProperties=t.discardConsoleEntries=t.enable=t.callFunctionOn=void 0;const s=a(n(7)),c=a(n(0)),l=a(n(10)),f=a(n(37)),d=a(n(4)),p=a(n(67)),h=a(n(70)),g=a(n(38)),v=a(n(11)),m=a(n(39)),y=i(n(74)),b=i(n(85)),w=n(21);let _=!1,x=[];const O={id:1,name:"top",origin:""};t.callFunctionOn=function(e){return u(this,void 0,void 0,(function*(){const{functionDeclaration:t,objectId:n}=e;let r=e.arguments||[];r=l.default(r,e=>{const{objectId:t,value:n}=e;if(t){const e=y.getObj(t);if(e)return e}return n});let o=null;return n&&(o=y.getObj(n)),{result:y.wrap(yield I(t,r,o))}}))},t.enable=function(){_||(_=!0,h.default.start(),s.default.trigger("Runtime.executionContextCreated",{context:O}),x.forEach(e=>s.default.trigger(...e)),x=[])},t.discardConsoleEntries=function(){y.clear()},t.getProperties=function(e){return y.getProperties(e)},t.evaluate=function(e){const t={};let n;try{n=b.default(e.expression),b.setGlobal("$_",n),t.result=y.wrap(n)}catch(e){t.exceptionDetails={exception:y.wrap(e),text:"Uncaught"},t.result=y.wrap(e,{generatePreview:!0})}return t},t.releaseObject=function(e){y.releaseObj(e.objectId)},t.hookConsole=v.default((function(){const e={log:"log",warn:"warning",error:"error",info:"info",dir:"dir",table:"table",group:"startGroup",groupCollapsed:"startGroupCollapsed",groupEnd:"endGroup",debug:"debug",clear:"clear"},t=t=>({after:(n,r,...o)=>{if(function(e){const t=["Runtime"];return e.some(e=>{if(!(e instanceof Array))return!1;if("hippyWebsocketEvents"!==e[0])return!1;try{const n=JSON.parse(e[1].data.data);return t.some(e=>new RegExp(`^${e}\\.`).test(n.method))}catch(e){return!1}})}(o))return;o=l.default(o,e=>y.wrap(e,{generatePreview:!0}));const i=e[t],u=["Runtime.consoleAPICalled",{type:i,args:o,stackTrace:{callFrames:"error"===i||"warning"===i?j():[]},executionContextId:O.id,timestamp:f.default()}];_?s.default.trigger(...u):x.push(u)}});c.default(e,(e,n)=>{w.hookFunction(console,n,t(n)),w.hookFunction(ConsoleModule,n,t(n))})}));const k=global.Function,S=Object.getPrototypeOf((function(){return u(this,void 0,void 0,(function*(){}))})).constructor;function I(e,t,n=null){return u(this,void 0,void 0,(function*(){const r=function(e){const t=p.default(e);return"}"!==e[e.length-1]?t.push("return "+e.slice(e.indexOf("=>")+2)):t.push(e.slice(e.indexOf("{")+1,e.lastIndexOf("}"))),t}(e);let o;return g.default(e,"async")?(o=S.apply(null,r),yield o.apply(n,t)):(o=k.apply(null,r),o.apply(n,t))}))}function j(e){let t=[];const n=e?e.stack:function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=(new Error).stack;return Error.prepareStackTrace=e,t}();return d.default(n)?(t=n.split("\n"),t=l.default(t,e=>{const t=e.match(/^(.*)\@(.*)\:(\d+)\:(\d+)$/);return t?{functionName:t[1],url:t[2],lineNumber:Number(t[3]),columnNumber:Number(t[4])}:{functionName:m.default(e)}})):(n.shift(),t=l.default(n,e=>({functionName:e.getFunctionName(),lineNumber:e.getLineNumber(),columnNumber:e.getColumnNumber(),url:e.getFileName()}))),t}h.default.addListener(e=>{const t=["Runtime.exceptionThrown",{exceptionDetails:{exception:y.wrap(e),stackTrace:{callFrames:j(e)},text:"Uncaught"},timestamp:f.default}];_?s.default.trigger(...t):x.push(t)})},function(e,t){t=Date.now?Date.now:function(){return(new Date).getTime()},e.exports=t},function(e,t){t=function(e,t){return 0===e.indexOf(t)},e.exports=t},function(e,t,n){var r=n(72),o=n(73);t=function(e,t){return null==t&&e.trim?e.trim():r(o(e,t),t)},e.exports=t},function(e,t){t=function(e){return null==e?"":e.toString()},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.hookLocalStorage=t.setDOMStorageItem=t.removeDOMStorageItem=t.getDOMStorageItems=t.clear=t.enable=void 0;const i=o(n(0)),u=o(n(4)),a=o(n(11)),s=o(n(7)),c=n(8),l=n(21),f=n(42);let d=!1;function p(e){const{isLocalStorage:t}=e;return t?localStorage:null}function h({key:e,newValue:t,storageId:n}){return r(this,void 0,void 0,(function*(){const r=yield localStorage.getItem(e);r?s.default.trigger("DOMStorage.domStorageItemUpdated",{key:e,newValue:t,oldValue:r,storageId:n}):s.default.trigger("DOMStorage.domStorageItemAdded",{key:e,newValue:t,storageId:n})}))}function g({key:e,storageId:t}){return r(this,void 0,void 0,(function*(){(yield localStorage.getItem(e))&&s.default.trigger("DOMStorage.domStorageItemRemoved",{key:e,storageId:t})}))}t.enable=function(){f.triggerFrameUpdated(),d=!0},t.clear=function(e){return r(this,void 0,void 0,(function*(){const{storageId:t}=e,n=p(t);if(!n)return;const r=yield n.getAllKeys();n.storageId=t,n.multiRemove(r)}))},t.getDOMStorageItems=function(e){return r(this,void 0,void 0,(function*(){const t=p(e.storageId);if(!t)return{entries:[]};const n=yield t.getAllKeys();return{entries:yield t.multiGet(n)}}))},t.removeDOMStorageItem=function(e){const{key:t,storageId:n}=e,r=p(n);r&&u.default(t)&&t&&(r.storageId=n,r.removeItem(t))},t.setDOMStorageItem=function(e){const{key:t,value:n,storageId:r}=e,o=p(r);o&&u.default(t)&&u.default(n)&&n&&t&&(o.storageId=r,o.setItem(t,n))},t.hookLocalStorage=a.default(()=>{const e={securityOrigin:c.getDomains()[0],isLocalStorage:!0};l.hookFunction(localStorage,"setItem",{before:function(t,n,r){d&&u.default(n)&&u.default(r)&&h({key:n,newValue:r,storageId:this.storageId||e})}}),l.hookFunction(localStorage,"removeItem",{before:function(t,n){d&&u.default(n)&&g({key:n,storageId:this.storageId||e})}}),l.hookFunction(localStorage,"multiSet",{before:function(t,n){d&&i.default(n,([t,n])=>{u.default(t)&&u.default(n)&&h({key:t,newValue:n,storageId:this.storageId||e})})}}),l.hookFunction(localStorage,"multiRemove",{before:function(t,n){i.default(n,t=>{g({key:t,storageId:this.storageId||e})})}})})},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.triggerFrameUpdated=t.getResourceTree=void 0;const o=n(8),i=r(n(7));function u(){return{frameTree:{frame:{id:"0",mimeType:"text/html",securityOrigin:"http://localhost:38989",url:"http://localhost:38989",secureContextType:"Secure",crossOriginIsolatedContextType:"NotIsolated",gatedAPIFeatures:[]},childFrames:o.getDomains().slice(0).map((e,t)=>({frame:{id:""+t,parentId:"0",mimeType:"text/html",securityOrigin:e,url:e,secureContextType:"Secure",crossOriginIsolatedContextType:"NotIsolatedFeatureDisabled",gatedAPIFeatures:[]},resources:[]}))||[],resources:[]}}}t.getResourceTree=u,t.triggerFrameUpdated=()=>{const e=u();i.default.trigger("Page.frameUpdated",e)}},function(e,t,n){var r=n(88),o=n(10);t={encode:function(e){return e.length<32768?String.fromCodePoint.apply(String,e):o(r(e,32767),(function(e){return String.fromCodePoint.apply(String,e)})).join("")},decode:function(e){for(var t=[],n=0,r=e.length;n<r;){var o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){var i=e.charCodeAt(n++);56320==(64512&i)?t.push(((1023&o)<<10)+(1023&i)+65536):(t.push(o),n--)}else t.push(o)}return t}},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getType=t.getFetchSize=void 0;const o=r(n(90)),i=r(n(91));t.getFetchSize=function(e,t){var n,r;let o=0;const u=(null===(n=null==e?void 0:e.headers)||void 0===n?void 0:n["Content-Length"])||(null===(r=null==e?void 0:e.headers)||void 0===r?void 0:r["content-length"]);return o=u?i.default(u):function(e){const t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)}(t),o},t.getType=function(e){if(!e)return{type:"unknown",subType:"unknown"};const t=e.split(";");return{type:t[0],subType:o.default(t)}}},function(e,t,n){"use strict";(function(e){var r,o,i,u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=a(n(7)),c=n(61),l=a(n(19)),f=a(n(63)),d=a(n(66)),p=a(n(0)),h=a(n(23)),g=n(22),v=n(36),m=n(41),y=n(32),b=n(8),w=n(18);class _{constructor(){this.resolves=new Map,this.domains=new Map,this.onMessage=l.default,s.default.on("message",e=>{const t=JSON.parse(e),n=this.resolves.get(t.id);if(n&&n(t.result),!t.id){const[e,n]=t.method.split("."),r=this.domains.get(e);r&&r.emit(n,t.params)}this.onMessage(e)}),this.initDomains()}domain(e){return this.domains.get(e)}setOnMessage(e){this.onMessage=e}sendMessage(e,t={}){const n=f.default();return this.sendRawMessage(JSON.stringify({id:n,method:e,params:t})),new Promise(e=>{this.resolves.set(n,e)})}sendRawMessage(e){return u(this,void 0,void 0,(function*(){const t=JSON.parse(e),{method:n,params:r,id:o}=t,i={id:o};try{i.result=yield this.callMethod(n,r)}catch(e){i.error={message:e.message}}s.default.emit("message",JSON.stringify(i))}))}initDomains(){const e=this.domains;p.default(d.default,(t,n)=>{const[r,o]=n.split(".");let i=e.get(r);i||(i={},h.default.mixin(i)),i[o]=t,e.set(r,i)})}callMethod(e,t){return u(this,void 0,void 0,(function*(){if(d.default[e])return d.default[e](t)||{};throw Error(e+" unimplemented")}))}}let{domains:x}=y.parseURL(__resourceQuery);try{x=JSON.parse(x)}catch(e){x=[]}b.setDomains(x);"ios"===(null===(i=null===(o=null===(r=null==e?void 0:e.Hippy)||void 0===r?void 0:r.device)||void 0===o?void 0:o.platform)||void 0===i?void 0:i.OS)&&v.hookConsole(),g.hookFetch(),g.hookHttpRequest(),m.hookLocalStorage(),setTimeout(()=>{(()=>{w.log.info("enable inspect Network, Cookie, Storage");let e=!1;const t=new _,n=c.createBridge({onOpen:()=>{e=!0},onClose:()=>{e=!1},onMessage:e=>{t.sendRawMessage(e.data)}});t.setOnMessage(t=>{e&&n.send(t)})})()},2e3)}).call(this,n(12))},function(e,t,n){var r=n(47);function o(e,t){return e===t}t=function(e,t){return t=t||o,r(e,(function(e,n,r){for(var o=r.length;++n<o;)if(t(e,r[n]))return!1;return!0}))},e.exports=t},function(e,t,n){var r=n(29),o=n(0);t=function(e,t,n){var i=[];return t=r(t,n),o(e,(function(e,n,r){t(e,n,r)&&i.push(e)})),i},e.exports=t},function(e,t,n){var r=n(49),o=n(50);t=function(e){return e=r({},e),function(t){return o(t,e)}},e.exports=t},function(e,t,n){var r=n(3);t=n(25)(r),e.exports=t},function(e,t,n){var r=n(3);t=function(e,t){var n=r(t),o=n.length;if(null==e)return!o;e=Object(e);for(var i=0;i<o;i++){var u=n[i];if(t[u]!==e[u]||!(u in e))return!1}return!0},e.exports=t},function(e,t){t=function(e){return e},e.exports=t},function(e,t,n){var r=n(6),o=n(30);t=function(e){return r(e)?function(t){return o(t,e)}:(t=e,function(e){return null==e?void 0:e[t]});var t},e.exports=t},function(e,t,n){var r=n(9),o=n(6);t=function(e,t){if(o(e))return e;if(t&&r(t,e))return[e];var n=[];return e.replace(i,(function(e,t,r,o){n.push(r?o.replace(u,"$1"):t||e)})),n};var i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/\\(\\)?/g;e.exports=t},function(e,t,n){var r=n(55);t=function(e,t){e.prototype=r(t.prototype)},e.exports=t},function(e,t,n){var r=n(5);t=function(e){if(!r(e))return{};if(o)return o(e);function t(){}return t.prototype=e,new t};var o=Object.create;e.exports=t},function(e,t,n){var r=n(2);t="undefined"!=typeof wx&&r(wx.openLocation),e.exports=t},function(e,t){t=function(e,t,n){var r=e.length;t=null==t?0:t<0?Math.max(r+t,0):Math.min(t,r),n=null==n?r:n<0?Math.max(r+n,0):Math.min(n,r);for(var o=[];t<n;)o.push(e[t++]);return o},e.exports=t},function(e,t,n){var r=n(59),o=n(17);t=r((function(e,t){return function(){var n=[];return n=(n=n.concat(t)).concat(o(arguments)),e.apply(this,n)}})),e.exports=t},function(e,t){t=function(e,t){return t=null==t?e.length-1:+t,function(){var n,r=Math.max(arguments.length-t,0),o=new Array(r);for(n=0;n<r;n++)o[n]=arguments[n+t];switch(t){case 0:return e.call(this,o);case 1:return e.call(this,arguments[0],o);case 2:return e.call(this,arguments[0],arguments[1],o)}var i=new Array(t+1);for(n=0;n<t;n++)i[n]=arguments[n];return i[t]=o,e.apply(this,i)}},e.exports=t},function(e,t){t=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},e.exports=t},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.createBridge=void 0;const r=n(32),o=n(62),i=n(18);var u;t.createBridge=t=>{var n,a,s;const c=r.parseURL(__resourceQuery),l=r.getWSProtocolByHttpProtocol(c.protocol||"http"),f=c.host||"localhost",d=c.port||38989;let p;try{p=e.__HIPPYNATIVEGLOBAL__.Debug.debugClientId}catch(e){i.log.warn("get devtools clientId failed, please update hippy sdk to ^2.13.4")}const h=r.makeUrl(`${l}://${f}:${d}/debugger-proxy`,{role:"vanilla_js_runtime",contextName:"contextName",clientId:p,platform:"ios"===(null===(s=null===(a=null===(n=null==e?void 0:e.Hippy)||void 0===n?void 0:n.device)||void 0===a?void 0:a.platform)||void 0===s?void 0:s.OS)?u.IOS:u.Android});return o.socketWithRetry(h,t)},function(e){e.Unknown="0",e.IOS="1",e.Android="2"}(u||(u={}))}).call(this,n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.socketWithRetry=void 0;const r=n(18);let o=0;const i=()=>{},u="[vanilla js devtools]";t.socketWithRetry=(e,n)=>{const{onOpen:a=i,onClose:s=i,onMessage:c=i}=n;let l=new WebSocket(e,void 0,{},!0);return l.onopen=a,l.onclose=i=>{if(0===o&&s(i),r.log.warn(u,i),l=void 0,o<10){const i=1e3*Math.pow(2,o)+100*Math.random();o+=1,r.log.warn(u,"Trying to reconnect..."),setTimeout(()=>{l=t.socketWithRetry(e,n)},i)}},l.onmessage=e=>{o=0,c(e)},l.send=new Proxy(l.send,{apply:(e,t,n)=>{if(l)return e.apply(t,n)}}),l.close=new Proxy(l.close,{apply:(e,t,n)=>{if(l)return e.apply(t,n)}}),l}},function(e,t,n){var r=n(64);t=function(){var e=r(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,o[e[0]]+o[e[1]]+o[e[2]]+o[e[3]]+"-"+o[e[4]]+o[e[5]]+"-"+o[e[6]]+o[e[7]]+"-"+o[e[8]]+o[e[9]]+"-"+o[e[10]]+o[e[11]]+o[e[12]]+o[e[13]]+o[e[14]]+o[e[15]]};for(var o=[],i=0;i<256;i++)o[i]=(i+256).toString(16).substr(1);e.exports=t},function(module,exports,__webpack_require__){var random=__webpack_require__(33),isBrowser=__webpack_require__(34),isNode=__webpack_require__(65),crypto;exports=function(e){for(var t=new Uint8Array(e),n=0;n<e;n++)t[n]=random(0,255);return t},isBrowser?(crypto=global.crypto||global.msCrypto,crypto&&(exports=function(e){var t=new Uint8Array(e);return crypto.getRandomValues(t),t})):isNode&&(crypto=eval("require")("crypto"),exports=function(e){return crypto.randomBytes(e)}),module.exports=exports},function(e,t,n){(function(r){var o=n(1);t=void 0!==r&&"[object process]"===o(r),e.exports=t}).call(this,n(35))},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=u(n(19)),s=i(n(36)),c=i(n(41)),l=i(n(22)),f=i(n(94)),d=i(n(42)),p={"Log.clear":a.default,"Log.enable":a.default,"Log.startViolationsReport":a.default,"Network.deleteCookies":l.deleteCookies,"Network.enable":l.enable,"Network.getCookies":l.getCookies,"Network.getResponseBody":l.getResponseBody,"Network.setCookie":l.setCookie,"Page.getResourceTree":d.getResourceTree,"Runtime.callFunctionOn":s.callFunctionOn,"Runtime.compileScript":a.default,"Runtime.discardConsoleEntries":s.discardConsoleEntries,"Runtime.enable":s.enable,"Runtime.evaluate":s.evaluate,"Runtime.getIsolateId":a.default,"Runtime.getProperties":s.getProperties,"Runtime.releaseObject":a.default,"Runtime.releaseObjectGroup":a.default,"Runtime.runIfWaitingForDebugger":a.default,"DOMStorage.clear":c.clear,"DOMStorage.enable":c.enable,"DOMStorage.getDOMStorageItems":c.getDOMStorageItems,"DOMStorage.removeDOMStorageItem":c.removeDOMStorageItem,"DOMStorage.setDOMStorageItem":c.setDOMStorageItem,"HeapProfiler.enable":a.default,"Inspector.enable":a.default,"IndexedDB.enable":a.default,"IndexedDB.requestDatabaseNames":a.default,"Storage.trackCacheStorageForOrigin":a.default,"Storage.trackIndexedDBForOrigin":a.default,"Storage.clearDataForOrigin":f.clearDataForOrigin};t.default=p},function(e,t,n){var r=n(20),o=n(69),i=n(38),u=n(4);t=function(e){var t,n,s=o(u(e)?e:r(e));i(s,"async")||i(s,"function")||i(s,"(")?(t=s.indexOf("(")+1,n=s.indexOf(")")):(t=0,n=s.indexOf("=>"));var c=s.slice(t,n);return null===(c=c.match(a))?[]:c};var a=/[^\s,]+/g;e.exports=t},function(e,t){t=function(e){return null==e},e.exports=t},function(e,t){t=function(e){for(var t={singleQuote:!1,doubleQuote:!1,regex:!1,blockComment:!1,lineComment:!1,condComp:!1},n=0,r=(e=("__"+e+"__").split("")).length;n<r;n++)if(t.regex)"/"===e[n]&&"\\"!==e[n-1]&&(t.regex=!1);else if(t.singleQuote)"'"===e[n]&&"\\"!==e[n-1]&&(t.singleQuote=!1);else if(t.doubleQuote)'"'===e[n]&&"\\"!==e[n-1]&&(t.doubleQuote=!1);else if(t.blockComment)"*"===e[n]&&"/"===e[n+1]&&(e[n+1]="",t.blockComment=!1),e[n]="";else if(t.lineComment)"\n"===e[n+1]&&(t.lineComment=!1),e[n]="";else if(t.doubleQuote='"'===e[n],t.singleQuote="'"===e[n],"/"===e[n]){if("*"===e[n+1]){e[n]="",t.blockComment=!0;continue}if("/"===e[n+1]){e[n]="",t.lineComment=!0;continue}t.regex=!0}return e.join("").slice(2,-2)},e.exports=t},function(e,t,n){(function(r){var o=n(34),i=n(71),u=!1;function a(e){u&&t.emit(e)}t={start:function(){u=!0},stop:function(){u=!1}},i.mixin(t),o?(global.addEventListener("error",(function(e){if(e.error)a(e.error);else if(e.message){var t=new Error(e.message);t.stack="Error: ".concat(e.message," \n at ").concat(e.filename,":").concat(e.lineno,":").concat(e.colno),a(t)}})),global.addEventListener("unhandledrejection",(function(e){a(e.reason)}))):(r.on("uncaughtException",a),r.on("unhandledRejection",a)),e.exports=t}).call(this,n(35))},function(e,t,n){var r=n(24),o=n(31),i=n(0),u=n(17);t=r({initialize:function(){this._listeners=[]},addListener:function(e){this._listeners.push(e)},rmListener:function(e){var t=this._listeners.indexOf(e);t>-1&&this._listeners.splice(t,1)},rmAllListeners:function(){this._listeners=[]},emit:function(){var e=this,t=u(arguments),n=o(this._listeners);i(n,(function(n){return n.apply(e,t)}),this)}},{mixin:function(e){i(["addListener","rmListener","emit","rmAllListeners"],(function(n){e[n]=t.prototype[n]})),e._listeners=e._listeners||[]}}),e.exports=t},function(e,t){var n=/^\s+/;t=function(e,t){if(null==t)return e.trimLeft?e.trimLeft():e.replace(n,"");for(var r,o,i=0,u=e.length,a=t.length,s=!0;s&&i<u;)for(s=!1,r=-1,o=e.charAt(i);++r<a;)if(o===t[r]){s=!0,i++;break}return i>=u?"":e.substr(i,u)},e.exports=t},function(e,t){t=function(e,t){if(null==t){if(e.trimRight)return e.trimRight();t=" \r\n\t\f\v"}for(var n,r,o=e.length-1,i=t.length,u=!0;u&&o>=0;)for(u=!1,n=-1,r=e.charAt(o);++n<i;)if(r===t[n]){u=!0,o--;break}return o>=0?e.substring(0,o+1):""},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getProperties=t.releaseObj=t.getObj=t.wrap=t.clear=void 0;const o=r(n(40)),i=r(n(75)),u=r(n(6)),a=r(n(2)),s=r(n(76)),c=r(n(77)),l=r(n(78)),f=r(n(79)),d=r(n(3)),p=r(n(20)),h=r(n(27)),g=r(n(83)),v=r(n(28)),m=r(n(84)),y=r(n(9)),b=new Map,w=new Map,_=new Map;let x=1;function O(e,t){let n=w.get(e);return n||(n=JSON.stringify({injectedScriptId:0,id:x++}),w.set(e,n),b.set(n,e),_.set(n,t),n)}function k(e,{generatePreview:t=!1,self:n=e}={}){const r=I(e),{type:i,subtype:u}=r;return"undefined"===i?r:"string"===i||"boolean"===i||"null"===u?(r.value=e,r):"number"===i?(r.description=o.default(e),r.value=e,r):"symbol"===i?(r.objectId=O(e,n),r.description=o.default(e),r):("function"===i?(r.className="Function",r.description=p.default(e)):"array"===u?(r.className="Array",r.description=`Array(${e.length})`):"regexp"===u?(r.className="RegExp",r.description=o.default(e)):"error"===u?(r.className=e.name,r.description=e.stack):(r.className=f.default(e,!1),r.description=r.className),t&&(r.preview=Object.assign(Object.assign({},r),function(e,t){let n=!1;const r=[],i=d.default(e);let u=i.length;u>5&&(u=5,n=!0);for(let e=0;e<u;e++){const n=i[e],u=t[n],a=I(u);a.name=n;const{subtype:s,type:c}=a;let l;l="object"===c?"null"===s?"null":"array"===s?`Array(${u.length})`:f.default(u,!1):o.default(u),a.value=l,r.push(a)}return{overflow:n,properties:r}}(e,n))),r.objectId=O(e,n),r)}function S(e){return b.get(e)}t.clear=function(){b.clear(),w.clear(),_.clear()},t.wrap=k,t.getObj=S,t.releaseObj=function(e){const t=S(e);w.delete(t),_.delete(e),b.delete(e)},t.getProperties=function(e){const{accessorPropertiesOnly:t,objectId:n,ownProperties:r,generatePreview:i}=e,u=[],s={prototype:!r,unenumerable:!0,symbol:!t},c=b.get(n),l=_.get(n),f=c?h.default(c,s):[],d=v.default(c);for(let e=0,n=f.length;e<n;e++){const n=f[e];let r;try{r=l[n]}catch(e){}const s={name:o.default(n),isOwn:y.default(l,n)};let p=Object.getOwnPropertyDescriptor(c,n);if(!p&&d&&(p=Object.getOwnPropertyDescriptor(d,n)),p){if(t&&!p.get&&!p.set)continue;s.configurable=p.configurable,s.enumerable=p.enumerable,s.writable=p.writable,p.get&&(s.get=k(p.get)),p.set&&(s.set=k(p.set))}d&&y.default(d,n)&&s.enumerable&&(s.isOwn=!0);let h=!0;!s.isOwn&&s.get&&(h=!1),h&&(m.default(n)?(s.symbol=k(n),s.value={type:"undefined"}):s.value=k(r,{generatePreview:i})),t&&a.default(r)&&g.default(r)||u.push(s)}return d&&u.push({name:"__proto__",configurable:!0,enumerable:!1,isOwn:y.default(c,"__proto__"),value:k(d,{self:l}),writable:!1}),{result:u}};function I(e){const t={type:typeof e};if(i.default(e))t.subtype="null";else if(u.default(e))t.subtype="array";else if(l.default(e))t.subtype="regexp";else if(c.default(e))t.subtype="error";else try{s.default(e)&&(t.subtype="node")}catch(e){}return t}},function(e,t){t=function(e){return null===e},e.exports=t},function(e,t){t=function(e){return!(!e||1!==e.nodeType)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object Error]"===r(e)},e.exports=t},function(e,t,n){var r=n(1);t=function(e){return"[object RegExp]"===r(e)},e.exports=t},function(e,t,n){var r=n(1),o=n(80),i=n(81),u=n(82);t=function(e){var t,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return null===e&&(t="Null"),void 0===e&&(t="Undefined"),o(e)&&(t="NaN"),u(e)&&(t="Buffer"),t||(t=r(e).match(a))&&(t=t[1]),t?n?i(t):t:""};var a=/^\[object\s+(.*?)]$/;e.exports=t},function(e,t,n){var r=n(16);t=function(e){return r(e)&&e!==+e},e.exports=t},function(e,t,n){var r=n(40);t=function(e){return r(e).toLocaleLowerCase()},e.exports=t},function(e,t,n){var r=n(2);t=function(e){return null!=e&&(!!e._isBuffer||e.constructor&&r(e.constructor.isBuffer)&&e.constructor.isBuffer(e))},e.exports=t},function(e,t,n){var r=n(5),o=n(2),i=n(20);t=function(e){return!!r(e)&&(o(e)?a.test(i(e)):s.test(i(e)))};var u=Object.prototype.hasOwnProperty,a=new RegExp("^"+i(u).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),s=/^\[object .+?Constructor\]$/;e.exports=t},function(e,t){t=function(e){return"symbol"==typeof e},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.setGlobal=void 0;const o=r(n(4)),i=r(n(86)),u=r(n(3)),a=r(n(0)),s={copy(e){o.default(e)||(e=JSON.stringify(e,null,2)),i.default(e)},keys:e=>u.default(e)};t.setGlobal=function(e,t){s[e]=t},t.default=function(e){let t;a.default(s,(e,t)=>{s[t]||(s[t]=e)});try{t=eval.call(s,`(${e})`)}catch(n){t=eval.call(s,e)}return a.default(s,(e,t)=>{s[t]&&s[t]===e&&delete s[t]}),t}},function(e,t,n){var r=n(13),o=n(19);t=function(e,t){t=t||o;var n=document.createElement("textarea"),i=document.body;r(n.style,{fontSize:"12pt",border:"0",padding:"0",margin:"0",position:"absolute",left:"-9999px"}),n.value=e,i.appendChild(n),n.setAttribute("readonly",""),n.select(),n.setSelectionRange(0,e.length);try{document.execCommand("copy"),t()}catch(e){t(e)}finally{i.removeChild(n)}},e.exports=t},function(e,t,n){var r=n(0),o=n(43),i=n(10),u=n(89);function a(e){return+("0x"+e)}t=function(e){try{return decodeURIComponent(e)}catch(n){var t=e.match(s);return t?(r(t,(function(t){e=e.replace(t,function(e){e=e.split("%").slice(1);var t=i(e,a);return e=o.encode(t),e=u.decode(e,!0)}(t))})),e):e}};var s=/(%[a-f0-9]{2})+/gi;e.exports=t},function(e,t){t=function(e,t){var n=[];t=t||1;for(var r=0,o=Math.ceil(e.length/t);r<o;r++){var i=r*t,u=i+t;n.push(e.slice(i,u))}return n},e.exports=t},function(e,t,n){var r=n(43);t={encode:function(e){for(var t=r.decode(e),n="",o=0,i=t.length;o<i;o++)n+=p(t[o]);return n},decode:function(e,t){o=r.decode(e),i=0,u=o.length,a=0,s=0,c=0,l=128,f=191;for(var n,d=[];!1!==(n=h(t));)d.push(n);return r.encode(d)}};var o,i,u,a,s,c,l,f,d=String.fromCharCode;function p(e){if(0==(4294967168&e))return d(e);var t,n,r="";for(0==(4294965248&e)?(t=1,n=192):0==(4294901760&e)?(t=2,n=224):0==(4292870144&e)&&(t=3,n=240),r+=d((e>>6*t)+n);t>0;){r+=d(128|63&e>>6*(t-1)),t--}return r}function h(e){for(;;){if(i>=u&&c){if(e)return g();throw new Error("Invalid byte index")}if(i===u)return!1;var t=o[i];if(i++,c){if(t<l||t>f){if(e)return i--,g();throw new Error("Invalid continuation byte")}if(l=128,f=191,a=a<<6|63&t,++s===c){var n=a;return a=0,c=0,s=0,n}}else{if(0==(128&t))return t;if(192==(224&t))c=1,a=31&t;else if(224==(240&t))224===t&&(l=160),237===t&&(f=159),c=2,a=15&t;else{if(240!=(248&t)){if(e)return g();throw new Error("Invalid UTF-8 detected")}240===t&&(l=144),244===t&&(f=143),c=3,a=7&t}}}}function g(){var e=i-s-1;return i=e+1,a=0,c=0,s=0,l=128,f=191,o[e]}e.exports=t},function(e,t){t=function(e){var t=e?e.length:0;if(t)return e[t-1]},e.exports=t},function(e,t,n){var r=n(16),o=n(5),i=n(2),u=n(4);t=function(e){if(r(e))return e;if(o(e)){var t=i(e.valueOf)?e.valueOf():e;e=o(t)?t+"":t}return u(e)?+e:0===e?e:+e},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.createId=void 0;const o=r(n(93)),i=r(n(33)).default(1e3,9999)+".";t.createId=function(){return o.default(i)}},function(e,t){var n=0;t=function(e){var t=++n+"";return e?e+t:t},e.exports=t},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function u(e){try{s(r.next(e))}catch(e){i(e)}}function a(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(u,a)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.clearDataForOrigin=t.getUsageAndQuota=void 0;const i=o(n(0)),u=n(22),a=n(8);t.getUsageAndQuota=function(){return{quota:0,usage:0,usageBreakdown:[]}},t.clearDataForOrigin=function(e){const t=e.storageTypes.split(","),n=a.getDomains();i.default(t,e=>r(this,void 0,void 0,(function*(){if("cookies"===e){const e=u.getCookieAPI();e&&n.forEach(t=>{e.set(t,"")})}else"local_storage"===e&&localStorage.clear()})))}}])}));
//# sourceMappingURL=index.js.map
{
"name": "@hippy/vanilla-js-devtools",
"version": "0.1.10",
"version": "0.1.11",
"description": "Chrome devtools protocol JavaScript implementation",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc