mockforme 4.0.1 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
 
4
4
  mockforme npm package can be used to intercept APIs and return mock responses created by you on your personalized dashboard on [mockforme](https://www.mockforme.com)
5
5
 
6
+ ### [Mockforme Documentation](https://docs.mockforme.com)
7
+
6
8
  ### How to set up? ###
7
9
 
8
10
  #### Prerequisites ####
@@ -41,7 +43,7 @@ yarn add mockforme
41
43
 
42
44
  * You can also directly use mockforme through script file using jsdelivr CDN.
43
45
  ```
44
- <script src="https://cdn.jsdelivr.net/npm/mockforme@4.0.1/dist/mockforme.client.umd.js"></script>
46
+ <script src="https://cdn.jsdelivr.net/npm/mockforme@4.1.0/dist/mockforme.client.umd.js"></script>
45
47
 
46
48
  <script>
47
49
  console.log(window.mockforme);
package/dist/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html><head><meta charset="utf-8"><title>mockforme - The best way to mock your APIs</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="mockforme.client.cjs.js"></script></head><body></body></html>
1
+ <!doctype html><html><head><meta charset="utf-8"><title>mockforme - The best way to mock your APIs</title><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="mockforme.client.umd.js"></script></head><body></body></html>
@@ -1 +1 @@
1
- function a0_0x1b3a(_0xe79b81,_0x572871){const _0x2bf2ca=a0_0x2bf2();return a0_0x1b3a=function(_0x1b3af8,_0x36959a){_0x1b3af8=_0x1b3af8-0x1cc;let _0x3de274=_0x2bf2ca[_0x1b3af8];return _0x3de274;},a0_0x1b3a(_0xe79b81,_0x572871);}function a0_0x2bf2(){const _0x2d29ff=['undefined','match','x-mfm-key','startsWith','fromCharCode','34pYczln','responseText','object','apply','async','concat','apiEndpoint','/mockforme','from','value','5537778vHtARD','ActiveXObject','url','601437lfHKpt','exports','unable\x20to\x20process\x20ajax','localhost','913388ypfKdz','length','send','XMLHttpRequest','toString','25Jbpujw','call','://','mockforme\x20token\x20cannot\x20be\x20null','log','headers','split','location','params','defineProperty','_ri_','get','5458754AowmoO','hasOwnProperty','116436qhEUGS','utf8','Module','31391100dhigbG','5146024QeoWRd','search','open','getResponseHeader','toLowerCase','setRequestHeader','fetch','https://api.mockforme.com','Microsoft.XMLHTTP','toStringTag','mockforme',':any','map','prototype','protocol','method'];a0_0x2bf2=function(){return _0x2d29ff;};return a0_0x2bf2();}(function(_0xfe0d5a,_0x248600){const _0x3be083=a0_0x1b3a,_0x23ced3=_0xfe0d5a();while(!![]){try{const _0x4fc30e=-parseInt(_0x3be083(0x207))/0x1+-parseInt(_0x3be083(0x1fa))/0x2*(parseInt(_0x3be083(0x1e1))/0x3)+-parseInt(_0x3be083(0x1ce))/0x4*(parseInt(_0x3be083(0x1d3))/0x5)+parseInt(_0x3be083(0x204))/0x6+-parseInt(_0x3be083(0x1df))/0x7+-parseInt(_0x3be083(0x1e5))/0x8+parseInt(_0x3be083(0x1e4))/0x9;if(_0x4fc30e===_0x248600)break;else _0x23ced3['push'](_0x23ced3['shift']());}catch(_0x515204){_0x23ced3['push'](_0x23ced3['shift']());}}}(a0_0x2bf2,0x8ec6c),((()=>{'use strict';const _0x55e3fe=a0_0x1b3a;var _0x182f25={'d':(_0x1db049,_0x11cb88)=>{const _0x10c097=a0_0x1b3a;for(var _0x4666bb in _0x11cb88)_0x182f25['o'](_0x11cb88,_0x4666bb)&&!_0x182f25['o'](_0x1db049,_0x4666bb)&&Object[_0x10c097(0x1dc)](_0x1db049,_0x4666bb,{'enumerable':!0x0,'get':_0x11cb88[_0x4666bb]});},'o':(_0x1fa721,_0x39066e)=>Object[_0x55e3fe(0x1f2)][_0x55e3fe(0x1e0)]['call'](_0x1fa721,_0x39066e),'r':_0x1a29d9=>{const _0x403ad2=_0x55e3fe,_0x2a53a8={};_0x2a53a8[_0x403ad2(0x203)]=_0x403ad2(0x1e3);const _0x41619c={};_0x41619c[_0x403ad2(0x203)]=!0x0,(_0x403ad2(0x1f5)!=typeof Symbol&&Symbol[_0x403ad2(0x1ee)]&&Object['defineProperty'](_0x1a29d9,Symbol[_0x403ad2(0x1ee)],_0x2a53a8),Object[_0x403ad2(0x1dc)](_0x1a29d9,'__esModule',_0x41619c));}},_0x41c885={};const _0x3219bc={};_0x3219bc[_0x55e3fe(0x1ef)]=()=>_0x2a34b9,(_0x182f25['r'](_0x41c885),_0x182f25['d'](_0x41c885,_0x3219bc));const _0x2c6eaf=_0x11476e=>{const _0x546a66=_0x55e3fe;try{return _0x11476e?_0x11476e[_0x546a66(0x1e9)]():_0x11476e;}catch(_0x142bae){return console[_0x546a66(0x1d7)](_0x142bae),null;}},_0xe61ac6=()=>_0x55e3fe(0x1f5)==typeof window,_0x1b8afe=function(_0xe4c327,_0x2a8885,_0x2384e9){const _0x547c06=_0x55e3fe,_0x5b635d=_0xe61ac6();var _0x5cad4f;function _0x39d537(){const _0x2952e2=a0_0x1b3a;if(0x4==_0x5cad4f['readyState']){if(_0x5cad4f['status'][_0x2952e2(0x1d2)]()[_0x2952e2(0x1f6)](/^20[0-9]$/)){var _0x190bd9=(function(){const _0x1c5c42=_0x2952e2;var _0x2d4188=_0x5cad4f[_0x1c5c42(0x1e8)]('Content-Type'),_0x4e4b76=_0x5cad4f['responseText'];if(_0x2d4188){var _0x4965ca=_0x2d4188[_0x1c5c42(0x1d9)](';');try{return'application/json'===_0x4965ca[0x0]?JSON['parse'](_0x4e4b76):_0x4e4b76;}catch(_0x18c467){throw'Unable\x20to\x20convert\x20response\x20header';}}}());_0x2a8885[_0x2952e2(0x1d4)](this,_0x190bd9,_0x5cad4f);}else _0x2384e9['call'](this,_0x5cad4f[_0x2952e2(0x1fb)],_0x5cad4f);}}function _0x4d246c(_0x125ec4,_0x4ba94a){const _0x104d93=a0_0x1b3a;var _0x1caf26=[];for(var _0x5f36cf in _0x125ec4)if(_0x125ec4['hasOwnProperty'](_0x5f36cf)){var _0x244ce3=_0x4ba94a?_0x4ba94a+'['+_0x5f36cf+']':_0x5f36cf,_0x1c4fbd=_0x125ec4[_0x5f36cf];_0x1caf26['push'](_0x104d93(0x1fc)==typeof _0x1c4fbd?_0x4d246c(_0x1c4fbd,_0x244ce3):encodeURIComponent(_0x244ce3)+'='+encodeURIComponent(_0x1c4fbd));}return _0x1caf26['join']('&');}return _0x5b635d||(window['XMLHttpRequest']?_0x5cad4f=new XMLHttpRequest():window[_0x547c06(0x205)]&&(_0x5cad4f=new ActiveXObject(_0x547c06(0x1ed)))),{'request':function(){const _0x452468=_0x547c06;if(!_0x5b635d){if(window[_0x452468(0x1d1)])_0x5cad4f['onload']=_0x39d537;else{if(!window[_0x452468(0x205)])throw _0x452468(0x1cc);_0x5cad4f['onreadystatechange']=_0x39d537;}var _0x187b13=_0x4d246c(_0xe4c327['params']);if(_0x452468(0x1de)==_0xe4c327[_0x452468(0x1f4)]['toLowerCase']()&&'object'==typeof _0xe4c327[_0x452468(0x1db)]){if(-0x1==_0xe4c327['url']['indexOf']('?'))_0xe4c327[_0x452468(0x206)]+='?';else{var _0x53d49e=_0xe4c327[_0x452468(0x206)]['split']('?');_0x53d49e[0x1]&&_0x53d49e[0x1][_0x452468(0x1d9)]('=')[0x1]&&(_0xe4c327['url']+='&');}_0xe4c327[_0x452468(0x206)]+=_0x187b13;}_0xe4c327['hasOwnProperty']('async')||(_0xe4c327['async']=!0x0),_0x5cad4f['open'](_0xe4c327[_0x452468(0x1f4)],_0xe4c327['url'],_0xe4c327['async']),_0xe4c327[_0x452468(0x1d8)]&&function(_0x4ca63f){const _0x2ca3bf=_0x452468;for(let _0x1c7a3a in _0x4ca63f)_0x5cad4f[_0x2ca3bf(0x1ea)](_0x1c7a3a,_0x4ca63f[_0x1c7a3a]);}(_0xe4c327[_0x452468(0x1d8)]),_0x5cad4f[_0x452468(0x1d0)](_0x187b13);}}};},_0x20b786=(_0x8f302e,_0x18d61f)=>{const _0x51f739=_0x55e3fe,_0x9eeefd=_0x8f302e['split']('/'),_0x350a22=_0x18d61f[_0x51f739(0x1d9)]('/');if(_0x9eeefd[_0x51f739(0x1cf)]!==_0x350a22[_0x51f739(0x1cf)])return!0x1;for(let _0x24ccfd=0x0;_0x24ccfd<_0x9eeefd[_0x51f739(0x1cf)];_0x24ccfd++){const _0x53166c=_0x9eeefd[_0x24ccfd];if(_0x53166c!==_0x350a22[_0x24ccfd]&&_0x51f739(0x1f0)!==_0x53166c)return!0x1;}return!0x0;},_0x35a2f1=_0x42d7c7=>{const _0x5a0478=_0x55e3fe;if(_0xe61ac6())return;const _0x25a8f5=_0x5a0478(0x1ec),_0x3e0580=_0x25a8f5+_0x5a0478(0x201);let _0x235ead=_0x25a8f5+'/gateway/3f4eae522b';const _0x219a98=_0x5a0478(0x1ef),_0x323769='mfmver',_0x4ef37a='4.0.0';let _0xff11d7=null,_0x4aa947=null,_0x482850=null,_0x995910=[];const _0xd95ff5=window[_0x5a0478(0x1da)],_0x43aa62=_0xd95ff5[_0x5a0478(0x1f3)];if(_0xd95ff5['host'],_0xd95ff5['port'],!_0x42d7c7)throw _0x5a0478(0x1d6);const _0x5e6900=()=>_0x3e0580+'/'+_0xff11d7+'/'+_0x4aa947,_0x3fc812=(_0x46a524,_0x5a3857='get')=>{const _0x375b49=_0x5a0478;let _0x1930d7=null;if(!Array['isArray'](_0x995910))return _0x1930d7;for(let _0x135310=0x0;_0x135310<_0x995910['length'];_0x135310++){const _0xebbd04=_0x995910[_0x135310];if(_0x2c6eaf(_0xebbd04['apiMethod'])===_0x2c6eaf(_0x5a3857)&&(_0xebbd04[_0x375b49(0x200)]===_0x46a524||_0x20b786(_0xebbd04[_0x375b49(0x200)],_0x46a524))){const _0xb60a0f={};_0xb60a0f[_0x375b49(0x206)]=_0x46a524,_0xb60a0f[_0x375b49(0x1f4)]=_0xebbd04['apiMethod'],(_0x1930d7=_0xb60a0f,_0xebbd04['_ri_']&&(_0x1930d7[_0x375b49(0x1dd)]=_0xebbd04['_ri_']));break;}}return _0x1930d7;},_0x390471=()=>{((()=>{const _0xbff850=a0_0x1b3a,_0x52d709=window[_0xbff850(0x1eb)];window['fetch']=function(_0x5ec7f0,_0x2cd330={}){const _0x4706c3=_0xbff850;_0x2cd330[_0x4706c3(0x1f4)]||(_0x2cd330[_0x4706c3(0x1f4)]='get');let _0x461200=arguments;_0x5ec7f0&&(_0x5ec7f0['startsWith']('//')?_0x5ec7f0=''+window[_0x4706c3(0x1da)][_0x4706c3(0x1f3)]+_0x5ec7f0:_0x5ec7f0[_0x4706c3(0x1f8)]('/')&&(_0x5ec7f0=''+window['location']['origin']+_0x5ec7f0));const _0x333e1d=new URL(_0x5ec7f0),_0x1c38f9=_0x333e1d&&_0x333e1d['pathname'],_0x3f0839=_0x333e1d&&_0x333e1d[_0x4706c3(0x1e6)],_0x5b6c23=_0x3fc812(_0x1c38f9,_0x2cd330['method']),_0x396a65={};return _0x396a65[_0x219a98]=_0x42d7c7,_0x396a65[_0x323769]=_0x4ef37a,(_0x5b6c23&&(_0x5ec7f0=''+_0x5e6900()+_0x5b6c23['url']+_0x3f0839,_0x461200[0x0]=_0x5ec7f0,_0x2cd330['headers']=_0x396a65,_0x5b6c23&&_0x5b6c23[_0x4706c3(0x1dd)]&&(_0x2cd330['headers']['_ri_']=_0x5b6c23[_0x4706c3(0x1dd)]),_0x482850&&(_0x2cd330['headers'][_0x4706c3(0x1f7)]=_0x482850)),_0x52d709[_0x4706c3(0x1d4)](this,_0x5ec7f0,_0x2cd330));};})()),((()=>{const _0x4650bd=a0_0x1b3a;let _0x1a2f81=window['XMLHttpRequest'][_0x4650bd(0x1f2)][_0x4650bd(0x1e7)];window[_0x4650bd(0x1d1)][_0x4650bd(0x1f2)]['open']=function(_0x1c089c,_0x247180,_0x25250e,_0xd2dae0,_0x8ba3f8){const _0x59afa3=_0x4650bd;try{_0x247180&&(_0x247180['startsWith']('//')?_0x247180=''+window['location']['protocol']+_0x247180:_0x247180[_0x59afa3(0x1f8)]('/')?_0x247180=''+window[_0x59afa3(0x1da)]['origin']+_0x247180:_0x247180['indexOf'](_0x59afa3(0x1d5))>-0x1||(_0x247180=_0x43aa62+'//'+_0x247180));const _0x25914e=new URL(_0x247180),_0x1580ba=_0x25914e&&_0x25914e['pathname'],_0x526326=_0x25914e&&_0x25914e[_0x59afa3(0x1e6)];let _0x38f2d6=arguments;const _0x5b472a=_0x3fc812(_0x1580ba,_0x1c089c);return _0x5b472a&&(_0x38f2d6[0x1]=''+_0x5e6900()+_0x5b472a[_0x59afa3(0x206)]+_0x526326),this['onreadystatechange']=function(){const _0x2e6335=_0x59afa3;if(0x1==this['readyState']){const _0x3304b7=['api.mockforme.com','dashboard.mockforme.com',_0x2e6335(0x1cd)],_0x6b9999=new URL(_0x38f2d6[0x1]);_0x3304b7['includes'](_0x6b9999['hostname'])&&(this[_0x2e6335(0x1ea)](_0x219a98,_0x42d7c7),this['setRequestHeader'](_0x323769,_0x4ef37a),_0x482850&&this[_0x2e6335(0x1ea)](_0x2e6335(0x1f7),_0x482850),_0x5b472a&&_0x5b472a['_ri_']&&this['setRequestHeader']('_ri_',_0x5b472a[_0x2e6335(0x1dd)]));}},_0x1a2f81[_0x59afa3(0x1fd)](this,_0x38f2d6);}catch(_0x31c42f){return console['log']('Error\x20in\x20mock\x20api,\x20could\x20be\x20invalid\x20url',_0x31c42f),_0x1a2f81[_0x59afa3(0x1fd)](this,arguments);}};})());},_0x489295=_0x136a1d=>{const _0x59f0e0=_0x5a0478,_0x26dc8a={};_0x26dc8a['method']='get',_0x26dc8a[_0x59f0e0(0x206)]=_0x235ead,_0x26dc8a[_0x59f0e0(0x1fe)]=!0x1,_0x1b8afe(_0x26dc8a,_0x366cde=>{const _0x3617f1=_0x59f0e0;if(_0x366cde){const {di:_0x3d36c1,iv:_0x3cea4c,_o:_0x463eed,_mck:_0x200e22,mk:_0x328c58}=_0x366cde;_0xff11d7=_0x463eed,_0x4aa947=_0x328c58,_0x482850=_0x200e22;const _0x5184f5=function({di:_0x5d46bf,iv:_0x292b11},_0x161526){const _0x53873=a0_0x1b3a;var _0x396bc3;const _0x44624f=function(_0x3f1818,_0x2fc969){const _0x3c3999=a0_0x1b3a,_0x1233fd=_0x2fc969[_0x3c3999(0x1cf)];return _0x3f1818['split']('')[_0x3c3999(0x1f1)]((_0x115592,_0x375ae0)=>String[_0x3c3999(0x1f9)](_0x115592['charCodeAt'](0x0)^_0x2fc969['charCodeAt'](_0x375ae0%_0x1233fd)))['join']('');}((_0x396bc3=_0x5d46bf,'undefined'!=typeof Buffer?Buffer[_0x53873(0x202)](_0x396bc3,'base64')[_0x53873(0x1d2)](_0x53873(0x1e2)):decodeURIComponent(escape(atob(_0x396bc3)))),_0x161526+_0x292b11);return JSON['parse'](_0x44624f);}({'di':_0x3d36c1,'iv':_0x3cea4c},_0x463eed);_0x5184f5&&(_0x478217=_0x5184f5,_0x995910=_0x995910[_0x3617f1(0x1ff)](_0x478217),_0x136a1d(_0x5184f5));}var _0x478217;},()=>{console['log']('Error\x20in\x20loading\x20mocked\x20apis');})['request']();};return{'run':_0xe4b73c=>{_0x390471(),_0x489295(_0x30d980=>{_0xe4b73c&&_0xe4b73c(_0x30d980);});}};},_0x5ac11a=_0xe61ac6();_0x5ac11a||(window['mockforme']=_0x35a2f1);let _0x2b0b34=_0x35a2f1;_0x5ac11a&&(_0x2b0b34=_0x3dbd5c=>({'run':()=>{}}));const _0x2a34b9=_0x2b0b34;module[_0x55e3fe(0x208)]=_0x41c885;})()));
1
+ (function(_0x318132,_0x239035){const _0x4311fb=a0_0x4d2b,_0xd532c9=_0x318132();while(!![]){try{const _0xf84468=-parseInt(_0x4311fb(0x17a))/0x1*(parseInt(_0x4311fb(0x17e))/0x2)+parseInt(_0x4311fb(0x186))/0x3*(parseInt(_0x4311fb(0x182))/0x4)+-parseInt(_0x4311fb(0x18d))/0x5+-parseInt(_0x4311fb(0x17d))/0x6*(-parseInt(_0x4311fb(0x173))/0x7)+-parseInt(_0x4311fb(0x163))/0x8+parseInt(_0x4311fb(0x154))/0x9+parseInt(_0x4311fb(0x16d))/0xa;if(_0xf84468===_0x239035)break;else _0xd532c9['push'](_0xd532c9['shift']());}catch(_0x2b901b){_0xd532c9['push'](_0xd532c9['shift']());}}}(a0_0x5cee,0x2bef3),((()=>{'use strict';const _0x3c29a8=a0_0x4d2b;var _0x41ccde={'d':(_0x558cc1,_0x48bab2)=>{const _0x4264cf=a0_0x4d2b;for(var _0x41ab73 in _0x48bab2)_0x41ccde['o'](_0x48bab2,_0x41ab73)&&!_0x41ccde['o'](_0x558cc1,_0x41ab73)&&Object[_0x4264cf(0x14f)](_0x558cc1,_0x41ab73,{'enumerable':!0x0,'get':_0x48bab2[_0x41ab73]});},'o':(_0x31808b,_0x405617)=>Object[_0x3c29a8(0x153)]['hasOwnProperty'][_0x3c29a8(0x181)](_0x31808b,_0x405617),'r':_0x26c009=>{const _0x109d7e=_0x3c29a8,_0xbbe1c9={};_0xbbe1c9['value']=_0x109d7e(0x174);const _0x36d6b3={};_0x36d6b3[_0x109d7e(0x18f)]=!0x0,(_0x109d7e(0x18a)!=typeof Symbol&&Symbol[_0x109d7e(0x15f)]&&Object[_0x109d7e(0x14f)](_0x26c009,Symbol['toStringTag'],_0xbbe1c9),Object['defineProperty'](_0x26c009,'__esModule',_0x36d6b3));}},_0x47f4eb={};const _0x3429a9={};_0x3429a9[_0x3c29a8(0x183)]=()=>_0x2f9f01,(_0x41ccde['r'](_0x47f4eb),_0x41ccde['d'](_0x47f4eb,_0x3429a9));const _0x4b74f5=_0x5eb898=>{try{return _0x5eb898?_0x5eb898['toLowerCase']():_0x5eb898;}catch(_0x2b196e){return console['log'](_0x2b196e),null;}},_0x3c460d=()=>'undefined'==typeof window,_0x3a523b=function(_0x34ce80,_0x278e85,_0x16fbc6){const _0x42948f=_0x3c29a8,_0x447f2e=_0x3c460d();var _0x44f18;function _0x133831(){const _0x599b1d=a0_0x4d2b;if(0x4==_0x44f18[_0x599b1d(0x152)]){if(_0x44f18[_0x599b1d(0x158)]['toString']()[_0x599b1d(0x179)](/^20[0-9]$/)){var _0x3db1da=(function(){const _0x269e80=_0x599b1d;var _0x373740=_0x44f18[_0x269e80(0x151)](_0x269e80(0x188)),_0x38e785=_0x44f18['responseText'];if(_0x373740){var _0x3c99de=_0x373740['split'](';');try{return _0x269e80(0x169)===_0x3c99de[0x0]?JSON['parse'](_0x38e785):_0x38e785;}catch(_0x5d394c){throw'Unable\x20to\x20convert\x20response\x20header';}}}());_0x278e85[_0x599b1d(0x181)](this,_0x3db1da,_0x44f18);}else _0x16fbc6['call'](this,_0x44f18[_0x599b1d(0x160)],_0x44f18);}}function _0x20dc2f(_0x18d52a,_0x7d5d85){const _0xf19ab9=a0_0x4d2b;var _0x1ba514=[];for(var _0x46505e in _0x18d52a)if(_0x18d52a[_0xf19ab9(0x176)](_0x46505e)){var _0x2048f2=_0x7d5d85?_0x7d5d85+'['+_0x46505e+']':_0x46505e,_0x59bda2=_0x18d52a[_0x46505e];_0x1ba514[_0xf19ab9(0x150)](_0xf19ab9(0x168)==typeof _0x59bda2?_0x20dc2f(_0x59bda2,_0x2048f2):encodeURIComponent(_0x2048f2)+'='+encodeURIComponent(_0x59bda2));}return _0x1ba514['join']('&');}return _0x447f2e||(window[_0x42948f(0x15b)]?_0x44f18=new XMLHttpRequest():window['ActiveXObject']&&(_0x44f18=new ActiveXObject('Microsoft.XMLHTTP'))),{'request':function(){const _0x45656b=_0x42948f;if(!_0x447f2e){if(window[_0x45656b(0x15b)])_0x44f18['onload']=_0x133831;else{if(!window[_0x45656b(0x162)])throw'unable\x20to\x20process\x20ajax';_0x44f18[_0x45656b(0x164)]=_0x133831;}var _0x1d0ea8=_0x20dc2f(_0x34ce80[_0x45656b(0x177)]);if(_0x45656b(0x155)==_0x34ce80[_0x45656b(0x16e)][_0x45656b(0x192)]()&&_0x45656b(0x168)==typeof _0x34ce80['params']){if(-0x1==_0x34ce80[_0x45656b(0x15a)]['indexOf']('?'))_0x34ce80['url']+='?';else{var _0x59b611=_0x34ce80[_0x45656b(0x15a)][_0x45656b(0x18b)]('?');_0x59b611[0x1]&&_0x59b611[0x1]['split']('=')[0x1]&&(_0x34ce80['url']+='&');}_0x34ce80[_0x45656b(0x15a)]+=_0x1d0ea8;}_0x34ce80['hasOwnProperty']('async')||(_0x34ce80['async']=!0x0),_0x44f18['open'](_0x34ce80['method'],_0x34ce80[_0x45656b(0x15a)],_0x34ce80['async']),_0x34ce80['headers']&&function(_0x15f71b){const _0x5e3170=_0x45656b;for(let _0x5d8a0e in _0x15f71b)_0x44f18[_0x5e3170(0x191)](_0x5d8a0e,_0x15f71b[_0x5d8a0e]);}(_0x34ce80[_0x45656b(0x190)]),_0x44f18['send'](_0x1d0ea8);}}};},_0x12d2aa=(_0x109cf1,_0x1c2e48)=>{const _0xfd66f=_0x3c29a8,_0x22f3c7=_0x109cf1['split']('/'),_0x4ec9c7=_0x1c2e48[_0xfd66f(0x18b)]('/');if(_0x22f3c7[_0xfd66f(0x165)]!==_0x4ec9c7['length'])return!0x1;for(let _0xcf5c4f=0x0;_0xcf5c4f<_0x22f3c7['length'];_0xcf5c4f++){const _0x578d7f=_0x22f3c7[_0xcf5c4f];if(_0x578d7f!==_0x4ec9c7[_0xcf5c4f]&&_0xfd66f(0x16a)!==_0x578d7f)return!0x1;}return!0x0;};let _0x44e7e6=null;const _0x40fe4c=(_0x339711,_0x1ddb97=null,_0x329ae9='JAVASCRIPT')=>{const _0x1b7b50=_0x3c29a8,_0x5d7545={};_0x5d7545['mappings']=[],_0x5d7545['_o']=null,_0x5d7545['mk']=null,_0x5d7545['_mck']=null,(_0x44e7e6=_0x339711,_0x1ddb97||(_0x1ddb97=_0x5d7545));const _0x5418aa=_0x1ddb97[_0x1b7b50(0x16f)]||[],_0x1b2eb2=_0x1ddb97['_o']||null,_0x5c190c=_0x1ddb97['mk']||null,_0x340436=_0x1ddb97['_mck']||null;if(_0x3c460d())return;const _0x5077d2='https://api.mockforme.com',_0x4c039f=_0x5077d2+'/mockforme';let _0x2560a3=_0x5077d2+'/gateway/3f4eae522b';const _0x2af11e=_0x1b7b50(0x183),_0x5c022f=_0x1b7b50(0x178),_0x102395=_0x1b7b50(0x170);let _0x5c43b0=_0x1b2eb2||null,_0x2e159e=_0x5c190c,_0x294170=_0x340436,_0x2064ec=_0x5418aa||[];const _0x59b059=window[_0x1b7b50(0x172)];if(_0x59b059['protocol'],_0x59b059[_0x1b7b50(0x187)],_0x59b059['port'],!_0x339711)throw'mockforme\x20token\x20cannot\x20be\x20null';const _0x159143=()=>_0x4c039f+'/'+_0x5c43b0+'/'+_0x2e159e,_0x214b2e=(_0x53ccdc,_0x161354='get')=>{const _0x509123=_0x1b7b50;let _0x1c498c=null;if(!Array[_0x509123(0x18e)](_0x2064ec))return _0x1c498c;for(let _0x57ba62=0x0;_0x57ba62<_0x2064ec[_0x509123(0x165)];_0x57ba62++){const _0x30a272=_0x2064ec[_0x57ba62];if(_0x4b74f5(_0x30a272['apiMethod'])===_0x4b74f5(_0x161354)&&(_0x30a272[_0x509123(0x166)]===_0x53ccdc||_0x12d2aa(_0x30a272[_0x509123(0x166)],_0x53ccdc))){const _0x209ee8={};_0x209ee8['url']=_0x53ccdc,_0x209ee8['method']=_0x30a272['apiMethod'],(_0x1c498c=_0x209ee8,_0x30a272[_0x509123(0x17c)]&&(_0x1c498c['_ri_']=_0x30a272['_ri_']));break;}}return _0x1c498c;},_0x3e1974=()=>{((()=>{const _0x1b711b=a0_0x4d2b,_0x21d432=window['fetch'];window[_0x1b711b(0x171)]=function(_0x3b1855,_0x95b04c){const _0x44bbec=_0x1b711b;let _0x5cac7d=_0x3b1855;try{'string'==typeof _0x3b1855&&(_0x3b1855['startsWith']('//')?_0x5cac7d=''+window[_0x44bbec(0x172)]['protocol']+_0x3b1855:_0x3b1855['startsWith']('/')?_0x5cac7d=''+window['location']['origin']+_0x3b1855:_0x3b1855['includes']('://')||(_0x5cac7d=new URL(_0x3b1855,window['location'][_0x44bbec(0x15e)])['toString']()));let _0x44c02e='',_0x37d52f='';try{const _0x5559e3=new URL(_0x5cac7d);_0x44c02e=_0x5559e3[_0x44bbec(0x15d)],_0x37d52f=_0x5559e3['search'];}catch(_0x2059d7){console['warn']('Failed\x20to\x20parse\x20fetch\x20URL:',_0x5cac7d,_0x2059d7);}(_0x95b04c=_0x95b04c||{})[_0x44bbec(0x16e)]||(_0x95b04c[_0x44bbec(0x16e)]='get');const _0x2d7f0d=_0x95b04c['method'],_0xd16aee=_0x214b2e(_0x44c02e,_0x2d7f0d);return _0xd16aee&&(_0x5cac7d=''+_0x159143()+_0xd16aee[_0x44bbec(0x15a)]+_0x37d52f,_0x95b04c['headers']={..._0x95b04c['headers']||{},[_0x2af11e]:_0x44e7e6,[_0x5c022f]:_0x102395,'x-mfm-adaptor':_0x329ae9},_0x294170&&(_0x95b04c[_0x44bbec(0x190)]['x-mfm-key']=_0x294170),_0xd16aee['_ri_']&&(_0x95b04c['headers']['_ri_']=_0xd16aee['_ri_'])),_0x21d432['call'](this,_0x5cac7d,_0x95b04c);}catch(_0x56f06f){return console[_0x44bbec(0x159)]('Fetch\x20interceptor\x20error:',_0x56f06f),_0x21d432[_0x44bbec(0x185)](this,arguments);}};})()),((()=>{const _0x2d2c36=a0_0x4d2b,_0xb59625=window['XMLHttpRequest']['prototype'][_0x2d2c36(0x14e)];window['XMLHttpRequest']['prototype'][_0x2d2c36(0x14e)]=function(_0x4c1d3b,_0x40248e,_0x313e90,_0x4e2693,_0x4503d8){const _0x183e86=_0x2d2c36,_0x5be5b2=arguments;try{let _0xf4e2c0=_0x40248e;try{_0xf4e2c0=_0x40248e[_0x183e86(0x167)]('//')?''+window[_0x183e86(0x172)][_0x183e86(0x14d)]+_0x40248e:_0x40248e[_0x183e86(0x167)]('/')?''+window['location'][_0x183e86(0x15e)]+_0x40248e:_0x40248e['includes']('://')?_0x40248e:new URL(_0x40248e,window['location']['origin'])[_0x183e86(0x16c)]();}catch(_0xdf90be){console[_0x183e86(0x156)](_0x183e86(0x180),_0x40248e,_0xdf90be);}let _0xf03c0='',_0x236f5d='';try{const _0x229232=new URL(_0xf4e2c0);_0xf03c0=_0x229232['pathname'],_0x236f5d=_0x229232['search'];}catch(_0x15c194){console[_0x183e86(0x156)]('Failed\x20to\x20parse\x20finalUrl:',_0xf4e2c0,_0x15c194);}const _0x41b585=_0x214b2e(_0xf03c0,_0x4c1d3b);return _0x41b585&&(_0xf4e2c0=''+_0x159143()+_0x41b585['url']+_0x236f5d),_0x5be5b2[0x1]=_0xf4e2c0,this['onreadystatechange']=function(){const _0xfbd400=_0x183e86;if(0x1===this[_0xfbd400(0x152)])try{const _0x3f4fd1=new URL(_0xf4e2c0);[_0xfbd400(0x161),'dashboard.mockforme.com'][_0xfbd400(0x157)](_0x3f4fd1[_0xfbd400(0x189)])&&(this['setRequestHeader'](_0x2af11e,_0x44e7e6),this[_0xfbd400(0x191)](_0x5c022f,_0x102395),this[_0xfbd400(0x191)]('x-mfm-adaptor',_0x329ae9),_0x294170&&this['setRequestHeader']('x-mfm-key',_0x294170),_0x41b585&&_0x41b585['_ri_']&&this[_0xfbd400(0x191)](_0xfbd400(0x17c),_0x41b585['_ri_']));}catch(_0x524dbc){console['warn']('Error\x20setting\x20headers:',_0xf4e2c0,_0x524dbc);}},_0xb59625[_0x183e86(0x185)](this,_0x5be5b2);}catch(_0x47c5d3){return console['error']('XHR\x20interceptor\x20failed:',_0x47c5d3),_0xb59625['apply'](this,arguments);}};})());},_0x55e681=(_0x1fa907,_0x2858be)=>{const _0x754f6c=_0x1b7b50,_0x480912={};_0x480912['method']=_0x754f6c(0x155),_0x480912['url']=_0x2560a3,_0x480912['async']=!0x1,_0x3a523b(_0x480912,_0x55a076=>{if(_0x55a076){const {di:_0x54f298,iv:_0x34eb01,_o:_0x3e1668,_mck:_0x36ca76,mk:_0x20a506}=_0x55a076;_0x5c43b0=_0x3e1668,_0x2e159e=_0x20a506,_0x294170=_0x36ca76;const _0x42c686=function({di:_0x180f3d,iv:_0x5b7b98},_0x2aec2e){const _0x3d06a5=a0_0x4d2b;var _0x2c912c;const _0x1b2501=function(_0x47a36c,_0x5a87a2){const _0x2c21d9=a0_0x4d2b,_0x339f6=_0x5a87a2[_0x2c21d9(0x165)];return _0x47a36c['split']('')['map']((_0x4311b3,_0x30ddc3)=>String[_0x2c21d9(0x17b)](_0x4311b3['charCodeAt'](0x0)^_0x5a87a2[_0x2c21d9(0x175)](_0x30ddc3%_0x339f6)))['join']('');}((_0x2c912c=_0x180f3d,_0x3d06a5(0x18a)!=typeof Buffer?Buffer['from'](_0x2c912c,_0x3d06a5(0x184))['toString'](_0x3d06a5(0x18c)):decodeURIComponent(escape(atob(_0x2c912c)))),_0x2aec2e+_0x5b7b98);return JSON['parse'](_0x1b2501);}({'di':_0x54f298,'iv':_0x34eb01},_0x3e1668);_0x42c686&&(_0x57aa36=_0x42c686,_0x2064ec=_0x2064ec['concat'](_0x57aa36),_0x1fa907(_0x42c686));}var _0x57aa36;},_0x3d5eb2=>{const _0x10da99=_0x754f6c;console[_0x10da99(0x17f)]('Error\x20in\x20loading\x20mocked\x20apis'),_0x2858be(_0x3d5eb2);})[_0x754f6c(0x16b)]();};return{'run':(_0x4b5fe9,_0x34ac33=()=>{})=>{_0x3e1974(),_0x5c43b0&&_0x2e159e?_0x4b5fe9(_0x2064ec,{'_o':_0x5c43b0,'mk':_0x2e159e,'_mck':_0x294170}):_0x55e681(_0x185146=>{const _0x2d8f4e={};_0x2d8f4e['_o']=_0x5c43b0,_0x2d8f4e['mk']=_0x2e159e,_0x2d8f4e['_mck']=_0x294170,_0x4b5fe9&&_0x4b5fe9(_0x185146,_0x2d8f4e);},_0x34ac33);}};},_0x1437c8=_0x3c460d();_0x1437c8||(window[_0x3c29a8(0x183)]=_0x40fe4c);let _0x32bc68=_0x40fe4c;_0x1437c8&&(_0x32bc68=_0x53a0ed=>({'run':()=>{}}));const _0x2f9f01=_0x32bc68;module[_0x3c29a8(0x15c)]=_0x47f4eb;})()));function a0_0x4d2b(_0x5bfaf5,_0x283f16){const _0x5ceeb2=a0_0x5cee();return a0_0x4d2b=function(_0x4d2b5e,_0x310fd5){_0x4d2b5e=_0x4d2b5e-0x14d;let _0x32452e=_0x5ceeb2[_0x4d2b5e];return _0x32452e;},a0_0x4d2b(_0x5bfaf5,_0x283f16);}function a0_0x5cee(){const _0xac0a9f=['Failed\x20to\x20normalize\x20URL:','call','908qyIDpb','mockforme','base64','apply','3093bHMzlb','host','Content-Type','hostname','undefined','split','utf8','1466590IYcCpH','isArray','value','headers','setRequestHeader','toLowerCase','protocol','open','defineProperty','push','getResponseHeader','readyState','prototype','351396ytILVN','get','warn','includes','status','error','url','XMLHttpRequest','exports','pathname','origin','toStringTag','responseText','api.mockforme.com','ActiveXObject','1817728uQzEig','onreadystatechange','length','apiEndpoint','startsWith','object','application/json',':any','request','toString','5459610DxwxPp','method','mappings','4.1.0','fetch','location','880691Ajlewv','Module','charCodeAt','hasOwnProperty','params','mfmver','match','2003Bkkgzo','fromCharCode','_ri_','6OLCxzX','244FmiYDQ','log'];a0_0x5cee=function(){return _0xac0a9f;};return a0_0x5cee();}
@@ -1 +1 @@
1
- function a0_0x1138(){const _0x25d898=['apply','/mockforme','Content-Type','866152CTphWQ','join','indexOf','parse','toLowerCase','_ri_','defineProperty','Error\x20in\x20loading\x20mocked\x20apis','apiEndpoint','XMLHttpRequest','1902612aJvZZX','map','Unable\x20to\x20convert\x20response\x20header','20VoAXUP','async','://','234102QzlKLC','request','258118tGlgjA','hasOwnProperty','url','open','get','16QmxkFw','mockforme','4.0.0','responseText','apiMethod','fetch','1tUdwjx','113748knyDCj','call','method','undefined','33WbjwEK','api.mockforme.com','/gateway/3f4eae522b','831230mxkNzB','length','onload','mfmver','push','send','prototype','origin','28MbegBR','charCodeAt','protocol','location','startsWith','port','split','toString','2052540uBWgwM','mockforme\x20token\x20cannot\x20be\x20null','ActiveXObject',':any','headers','readyState','onreadystatechange','log'];a0_0x1138=function(){return _0x25d898;};return a0_0x1138();}function a0_0x3d44(_0x17f9aa,_0x384021){const _0x1138ca=a0_0x1138();return a0_0x3d44=function(_0x3d44a0,_0x51ad8c){_0x3d44a0=_0x3d44a0-0x11e;let _0x583a99=_0x1138ca[_0x3d44a0];return _0x583a99;},a0_0x3d44(_0x17f9aa,_0x384021);}const a0_0x383848=a0_0x3d44;(function(_0x1b7e1d,_0x3868a6){const _0x25e82b=a0_0x3d44,_0x137219=_0x1b7e1d();while(!![]){try{const _0x523e1f=parseInt(_0x25e82b(0x124))/0x1*(-parseInt(_0x25e82b(0x159))/0x2)+parseInt(_0x25e82b(0x125))/0x3*(parseInt(_0x25e82b(0x134))/0x4)+-parseInt(_0x25e82b(0x154))/0x5*(-parseInt(_0x25e82b(0x157))/0x6)+-parseInt(_0x25e82b(0x147))/0x7*(parseInt(_0x25e82b(0x11e))/0x8)+-parseInt(_0x25e82b(0x13c))/0x9+-parseInt(_0x25e82b(0x12c))/0xa+-parseInt(_0x25e82b(0x129))/0xb*(-parseInt(_0x25e82b(0x151))/0xc);if(_0x523e1f===_0x3868a6)break;else _0x137219['push'](_0x137219['shift']());}catch(_0x42aded){_0x137219['push'](_0x137219['shift']());}}}(a0_0x1138,0x3320b));var e={'d':(_0x4f4c9b,_0x15393c)=>{const _0x358033=a0_0x3d44;for(var _0x349b4d in _0x15393c)e['o'](_0x15393c,_0x349b4d)&&!e['o'](_0x4f4c9b,_0x349b4d)&&Object[_0x358033(0x14d)](_0x4f4c9b,_0x349b4d,{'enumerable':!0x0,'get':_0x15393c[_0x349b4d]});},'o':(_0xedf6b7,_0x4d8bf3)=>Object[a0_0x383848(0x132)]['hasOwnProperty'][a0_0x383848(0x126)](_0xedf6b7,_0x4d8bf3)},t={};const a0_0x508601={};a0_0x508601['_']=()=>l,e['d'](t,a0_0x508601);const o=_0x4c2dda=>{try{return _0x4c2dda?_0x4c2dda['toLowerCase']():_0x4c2dda;}catch(_0x44cff6){return console['log'](_0x44cff6),null;}},n=()=>a0_0x383848(0x128)==typeof window,r=function(_0x4ce072,_0x193992,_0x3545e1){const _0x2d80b6=a0_0x383848,_0x368a45=n();var _0x147653;function _0x4e3560(){const _0x371566=a0_0x3d44;if(0x4==_0x147653[_0x371566(0x141)]){if(_0x147653['status'][_0x371566(0x13b)]()['match'](/^20[0-9]$/)){var _0x44fa76=(function(){const _0x5185e0=_0x371566;var _0x2c4bf0=_0x147653['getResponseHeader'](_0x5185e0(0x146)),_0x4813a5=_0x147653['responseText'];if(_0x2c4bf0){var _0x5306df=_0x2c4bf0[_0x5185e0(0x13a)](';');try{return'application/json'===_0x5306df[0x0]?JSON['parse'](_0x4813a5):_0x4813a5;}catch(_0x443af1){throw _0x5185e0(0x153);}}}());_0x193992['call'](this,_0x44fa76,_0x147653);}else _0x3545e1['call'](this,_0x147653[_0x371566(0x121)],_0x147653);}}function _0x76a257(_0x327908,_0x30d7d4){const _0x10ca31=a0_0x3d44;var _0x3a88d6=[];for(var _0xc4a19 in _0x327908)if(_0x327908[_0x10ca31(0x15a)](_0xc4a19)){var _0x26aa88=_0x30d7d4?_0x30d7d4+'['+_0xc4a19+']':_0xc4a19,_0x215557=_0x327908[_0xc4a19];_0x3a88d6[_0x10ca31(0x130)]('object'==typeof _0x215557?_0x76a257(_0x215557,_0x26aa88):encodeURIComponent(_0x26aa88)+'='+encodeURIComponent(_0x215557));}return _0x3a88d6['join']('&');}return _0x368a45||(window['XMLHttpRequest']?_0x147653=new XMLHttpRequest():window[_0x2d80b6(0x13e)]&&(_0x147653=new ActiveXObject('Microsoft.XMLHTTP'))),{'request':function(){const _0x6a7dfd=_0x2d80b6;if(!_0x368a45){if(window['XMLHttpRequest'])_0x147653[_0x6a7dfd(0x12e)]=_0x4e3560;else{if(!window['ActiveXObject'])throw'unable\x20to\x20process\x20ajax';_0x147653[_0x6a7dfd(0x142)]=_0x4e3560;}var _0xcabdfa=_0x76a257(_0x4ce072['params']);if(_0x6a7dfd(0x15d)==_0x4ce072[_0x6a7dfd(0x127)][_0x6a7dfd(0x14b)]()&&'object'==typeof _0x4ce072['params']){if(-0x1==_0x4ce072[_0x6a7dfd(0x15b)]['indexOf']('?'))_0x4ce072['url']+='?';else{var _0x318d04=_0x4ce072['url'][_0x6a7dfd(0x13a)]('?');_0x318d04[0x1]&&_0x318d04[0x1]['split']('=')[0x1]&&(_0x4ce072['url']+='&');}_0x4ce072['url']+=_0xcabdfa;}_0x4ce072['hasOwnProperty'](_0x6a7dfd(0x155))||(_0x4ce072['async']=!0x0),_0x147653[_0x6a7dfd(0x15c)](_0x4ce072[_0x6a7dfd(0x127)],_0x4ce072['url'],_0x4ce072[_0x6a7dfd(0x155)]),_0x4ce072['headers']&&function(_0x48d99c){for(let _0xe24d65 in _0x48d99c)_0x147653['setRequestHeader'](_0xe24d65,_0x48d99c[_0xe24d65]);}(_0x4ce072[_0x6a7dfd(0x140)]),_0x147653[_0x6a7dfd(0x131)](_0xcabdfa);}}};},i=(_0x101f55,_0x568781)=>{const _0x51c248=a0_0x383848,_0x2e27bb=_0x101f55[_0x51c248(0x13a)]('/'),_0x163a47=_0x568781['split']('/');if(_0x2e27bb['length']!==_0x163a47[_0x51c248(0x12d)])return!0x1;for(let _0x4b14be=0x0;_0x4b14be<_0x2e27bb[_0x51c248(0x12d)];_0x4b14be++){const _0x15e826=_0x2e27bb[_0x4b14be];if(_0x15e826!==_0x163a47[_0x4b14be]&&_0x51c248(0x13f)!==_0x15e826)return!0x1;}return!0x0;},s=_0x280311=>{const _0x4cb6f9=a0_0x383848;if(n())return;const _0x266d3e='https://api.mockforme.com',_0x43326c=_0x266d3e+_0x4cb6f9(0x145);let _0x4f47a3=_0x266d3e+_0x4cb6f9(0x12b);const _0x290fc8='mockforme',_0xff2a92=_0x4cb6f9(0x12f),_0xdae685=_0x4cb6f9(0x120);let _0x2cfffa=null,_0x4386e8=null,_0x353db6=null,_0x5a32fe=[];const _0x2af14e=window[_0x4cb6f9(0x137)],_0x242234=_0x2af14e[_0x4cb6f9(0x136)];if(_0x2af14e['host'],_0x2af14e[_0x4cb6f9(0x139)],!_0x280311)throw _0x4cb6f9(0x13d);const _0xe9fcf3=()=>_0x43326c+'/'+_0x2cfffa+'/'+_0x4386e8,_0x44d99d=(_0x3c03e1,_0x542829=_0x4cb6f9(0x15d))=>{const _0x545406=_0x4cb6f9;let _0x4a3416=null;if(!Array['isArray'](_0x5a32fe))return _0x4a3416;for(let _0xc13513=0x0;_0xc13513<_0x5a32fe[_0x545406(0x12d)];_0xc13513++){const _0x277774=_0x5a32fe[_0xc13513];if(o(_0x277774[_0x545406(0x122)])===o(_0x542829)&&(_0x277774[_0x545406(0x14f)]===_0x3c03e1||i(_0x277774[_0x545406(0x14f)],_0x3c03e1))){const _0x2bc59b={};_0x2bc59b['url']=_0x3c03e1,_0x2bc59b['method']=_0x277774['apiMethod'],(_0x4a3416=_0x2bc59b,_0x277774[_0x545406(0x14c)]&&(_0x4a3416[_0x545406(0x14c)]=_0x277774[_0x545406(0x14c)]));break;}}return _0x4a3416;},_0x4c4f4e=()=>{((()=>{const _0x1a4f66=a0_0x3d44,_0x1e1949=window[_0x1a4f66(0x123)];window[_0x1a4f66(0x123)]=function(_0xc192b2,_0x2ab6e3={}){const _0x56df2b=_0x1a4f66;_0x2ab6e3[_0x56df2b(0x127)]||(_0x2ab6e3[_0x56df2b(0x127)]=_0x56df2b(0x15d));let _0x24088e=arguments;_0xc192b2&&(_0xc192b2[_0x56df2b(0x138)]('//')?_0xc192b2=''+window[_0x56df2b(0x137)]['protocol']+_0xc192b2:_0xc192b2['startsWith']('/')&&(_0xc192b2=''+window['location'][_0x56df2b(0x133)]+_0xc192b2));const _0x2ed464=new URL(_0xc192b2),_0x31e820=_0x2ed464&&_0x2ed464['pathname'],_0x46e2f4=_0x2ed464&&_0x2ed464['search'],_0x5c7b04=_0x44d99d(_0x31e820,_0x2ab6e3[_0x56df2b(0x127)]),_0x48351d={};return _0x48351d[_0x290fc8]=_0x280311,_0x48351d[_0xff2a92]=_0xdae685,(_0x5c7b04&&(_0xc192b2=''+_0xe9fcf3()+_0x5c7b04['url']+_0x46e2f4,_0x24088e[0x0]=_0xc192b2,_0x2ab6e3[_0x56df2b(0x140)]=_0x48351d,_0x5c7b04&&_0x5c7b04[_0x56df2b(0x14c)]&&(_0x2ab6e3['headers']['_ri_']=_0x5c7b04[_0x56df2b(0x14c)]),_0x353db6&&(_0x2ab6e3[_0x56df2b(0x140)]['x-mfm-key']=_0x353db6)),_0x1e1949[_0x56df2b(0x126)](this,_0xc192b2,_0x2ab6e3));};})()),((()=>{const _0x3ee2a5=a0_0x3d44;let _0xeb34c3=window['XMLHttpRequest']['prototype']['open'];window[_0x3ee2a5(0x150)][_0x3ee2a5(0x132)]['open']=function(_0x381064,_0x8f43b2,_0x5c67d3,_0x557c56,_0x34fe01){const _0x4b92c7=_0x3ee2a5;try{_0x8f43b2&&(_0x8f43b2['startsWith']('//')?_0x8f43b2=''+window[_0x4b92c7(0x137)][_0x4b92c7(0x136)]+_0x8f43b2:_0x8f43b2[_0x4b92c7(0x138)]('/')?_0x8f43b2=''+window[_0x4b92c7(0x137)]['origin']+_0x8f43b2:_0x8f43b2[_0x4b92c7(0x149)](_0x4b92c7(0x156))>-0x1||(_0x8f43b2=_0x242234+'//'+_0x8f43b2));const _0x2dc8e4=new URL(_0x8f43b2),_0xf4aa63=_0x2dc8e4&&_0x2dc8e4['pathname'],_0x2181f7=_0x2dc8e4&&_0x2dc8e4['search'];let _0x25c215=arguments;const _0x112265=_0x44d99d(_0xf4aa63,_0x381064);return _0x112265&&(_0x25c215[0x1]=''+_0xe9fcf3()+_0x112265['url']+_0x2181f7),this['onreadystatechange']=function(){const _0x2d4512=_0x4b92c7;if(0x1==this['readyState']){const _0x2a6e28=[_0x2d4512(0x12a),'dashboard.mockforme.com','localhost'],_0xf77e44=new URL(_0x25c215[0x1]);_0x2a6e28['includes'](_0xf77e44['hostname'])&&(this['setRequestHeader'](_0x290fc8,_0x280311),this['setRequestHeader'](_0xff2a92,_0xdae685),_0x353db6&&this['setRequestHeader']('x-mfm-key',_0x353db6),_0x112265&&_0x112265[_0x2d4512(0x14c)]&&this['setRequestHeader']('_ri_',_0x112265[_0x2d4512(0x14c)]));}},_0xeb34c3[_0x4b92c7(0x144)](this,_0x25c215);}catch(_0x558a50){return console[_0x4b92c7(0x143)]('Error\x20in\x20mock\x20api,\x20could\x20be\x20invalid\x20url',_0x558a50),_0xeb34c3[_0x4b92c7(0x144)](this,arguments);}};})());},_0x25bbc8=_0x280aaf=>{const _0x5c1161=_0x4cb6f9,_0x18fa3c={};_0x18fa3c[_0x5c1161(0x127)]='get',_0x18fa3c['url']=_0x4f47a3,_0x18fa3c['async']=!0x1,r(_0x18fa3c,_0x3e39e3=>{if(_0x3e39e3){const {di:_0x138a4f,iv:_0x15e436,_o:_0x416d22,_mck:_0x3c7a93,mk:_0xecef2}=_0x3e39e3;_0x2cfffa=_0x416d22,_0x4386e8=_0xecef2,_0x353db6=_0x3c7a93;const _0x377fb3=function({di:_0x1062a0,iv:_0x3f0586},_0x52515e){const _0x366885=a0_0x3d44;var _0x97ef5a;const _0x3d7b1a=function(_0xdf9377,_0x2c38c6){const _0x56527a=a0_0x3d44,_0x34e7c8=_0x2c38c6['length'];return _0xdf9377['split']('')[_0x56527a(0x152)]((_0x471ab5,_0x37e6f3)=>String['fromCharCode'](_0x471ab5['charCodeAt'](0x0)^_0x2c38c6[_0x56527a(0x135)](_0x37e6f3%_0x34e7c8)))[_0x56527a(0x148)]('');}((_0x97ef5a=_0x1062a0,_0x366885(0x128)!=typeof Buffer?Buffer['from'](_0x97ef5a,'base64')[_0x366885(0x13b)]('utf8'):decodeURIComponent(escape(atob(_0x97ef5a)))),_0x52515e+_0x3f0586);return JSON[_0x366885(0x14a)](_0x3d7b1a);}({'di':_0x138a4f,'iv':_0x15e436},_0x416d22);_0x377fb3&&(_0x5333fa=_0x377fb3,_0x5a32fe=_0x5a32fe['concat'](_0x5333fa),_0x280aaf(_0x377fb3));}var _0x5333fa;},()=>{const _0xbbaffb=_0x5c1161;console[_0xbbaffb(0x143)](_0xbbaffb(0x14e));})[_0x5c1161(0x158)]();};return{'run':_0x230e4e=>{_0x4c4f4e(),_0x25bbc8(_0x349f8a=>{_0x230e4e&&_0x230e4e(_0x349f8a);});}};},a=n();a||(window[a0_0x383848(0x11f)]=s);let c=s;a&&(c=_0x45287d=>({'run':()=>{}}));const l=c;var d=t['_'];export{d as mockforme};
1
+ const a0_0x499a1b=a0_0x2ec6;(function(_0x502567,_0x345e2c){const _0x2ee177=a0_0x2ec6,_0x1944f8=_0x502567();while(!![]){try{const _0x11c7c0=parseInt(_0x2ee177(0xb3))/0x1+-parseInt(_0x2ee177(0xc8))/0x2+parseInt(_0x2ee177(0xaa))/0x3+-parseInt(_0x2ee177(0xe8))/0x4+-parseInt(_0x2ee177(0xd2))/0x5+parseInt(_0x2ee177(0xc3))/0x6*(-parseInt(_0x2ee177(0xdd))/0x7)+parseInt(_0x2ee177(0xea))/0x8;if(_0x11c7c0===_0x345e2c)break;else _0x1944f8['push'](_0x1944f8['shift']());}catch(_0x593d6b){_0x1944f8['push'](_0x1944f8['shift']());}}}(a0_0x3cb0,0xebc08));var t={'d':(_0x5c9575,_0x2b91ba)=>{const _0x3fabb5=a0_0x2ec6;for(var _0x20943b in _0x2b91ba)t['o'](_0x2b91ba,_0x20943b)&&!t['o'](_0x5c9575,_0x20943b)&&Object[_0x3fabb5(0xbd)](_0x5c9575,_0x20943b,{'enumerable':!0x0,'get':_0x2b91ba[_0x20943b]});},'o':(_0xcaf97d,_0x59de51)=>Object[a0_0x499a1b(0xb6)][a0_0x499a1b(0xd1)]['call'](_0xcaf97d,_0x59de51)},e={};const a0_0x2b0ed8={};a0_0x2b0ed8['_']=()=>d,t['d'](e,a0_0x2b0ed8);function a0_0x3cb0(){const _0x65ca26=['pathname','request','get','Content-Type','location','startsWith','setRequestHeader','316504EkUjLw','protocol','send','prototype',':any','mappings','length','utf8','_mck','_ri_','defineProperty','responseText','Error\x20in\x20loading\x20mocked\x20apis','ActiveXObject','call','api.mockforme.com','504RPcaGm','map','unable\x20to\x20process\x20ajax','base64','readyState','3859956PvEqSW','dashboard.mockforme.com','toLowerCase','onreadystatechange','JAVASCRIPT','url','includes','charCodeAt','match','hasOwnProperty','9052260XtTFKy','apply','origin','split','port','XMLHttpRequest','search','async','toString','status','error','62797NkLRGv','mockforme','https://api.mockforme.com','Fetch\x20interceptor\x20error:','x-mfm-adaptor','warn','fromCharCode','isArray','params','apiEndpoint','object','5376892wRJBUV','apiMethod','44149528qOnqyQ','parse','headers','log','method','2905986ZOVAvu','join'];a0_0x3cb0=function(){return _0x65ca26;};return a0_0x3cb0();}const o=_0x1c72cb=>{const _0x1b8a06=a0_0x499a1b;try{return _0x1c72cb?_0x1c72cb[_0x1b8a06(0xca)]():_0x1c72cb;}catch(_0x34f5d9){return console[_0x1b8a06(0xed)](_0x34f5d9),null;}},n=()=>'undefined'==typeof window,r=function(_0x3f28f8,_0x2925a0,_0x695f99){const _0x27a59a=a0_0x499a1b,_0x3f82bb=n();var _0x355482;function _0x24e748(){const _0x27f24f=a0_0x2ec6;if(0x4==_0x355482[_0x27f24f(0xc7)]){if(_0x355482[_0x27f24f(0xdb)][_0x27f24f(0xda)]()[_0x27f24f(0xd0)](/^20[0-9]$/)){var _0x4b5f80=(function(){const _0x134e15=_0x27f24f;var _0x893520=_0x355482['getResponseHeader'](_0x134e15(0xaf)),_0x3890a2=_0x355482['responseText'];if(_0x893520){var _0x518219=_0x893520[_0x134e15(0xd5)](';');try{return'application/json'===_0x518219[0x0]?JSON[_0x134e15(0xeb)](_0x3890a2):_0x3890a2;}catch(_0x574b21){throw'Unable\x20to\x20convert\x20response\x20header';}}}());_0x2925a0[_0x27f24f(0xc1)](this,_0x4b5f80,_0x355482);}else _0x695f99[_0x27f24f(0xc1)](this,_0x355482[_0x27f24f(0xbe)],_0x355482);}}function _0x3d4c19(_0x42ba3e,_0x285721){const _0x1348d3=a0_0x2ec6;var _0x443c6d=[];for(var _0x71a966 in _0x42ba3e)if(_0x42ba3e['hasOwnProperty'](_0x71a966)){var _0x59882f=_0x285721?_0x285721+'['+_0x71a966+']':_0x71a966,_0x1dceff=_0x42ba3e[_0x71a966];_0x443c6d['push']('object'==typeof _0x1dceff?_0x3d4c19(_0x1dceff,_0x59882f):encodeURIComponent(_0x59882f)+'='+encodeURIComponent(_0x1dceff));}return _0x443c6d[_0x1348d3(0xab)]('&');}return _0x3f82bb||(window[_0x27a59a(0xd7)]?_0x355482=new XMLHttpRequest():window[_0x27a59a(0xc0)]&&(_0x355482=new ActiveXObject('Microsoft.XMLHTTP'))),{'request':function(){const _0x269136=_0x27a59a;if(!_0x3f82bb){if(window['XMLHttpRequest'])_0x355482['onload']=_0x24e748;else{if(!window[_0x269136(0xc0)])throw _0x269136(0xc5);_0x355482[_0x269136(0xcb)]=_0x24e748;}var _0x510795=_0x3d4c19(_0x3f28f8[_0x269136(0xe5)]);if(_0x269136(0xae)==_0x3f28f8['method'][_0x269136(0xca)]()&&_0x269136(0xe7)==typeof _0x3f28f8[_0x269136(0xe5)]){if(-0x1==_0x3f28f8['url']['indexOf']('?'))_0x3f28f8['url']+='?';else{var _0x313c75=_0x3f28f8['url']['split']('?');_0x313c75[0x1]&&_0x313c75[0x1]['split']('=')[0x1]&&(_0x3f28f8[_0x269136(0xcd)]+='&');}_0x3f28f8['url']+=_0x510795;}_0x3f28f8['hasOwnProperty']('async')||(_0x3f28f8['async']=!0x0),_0x355482['open'](_0x3f28f8[_0x269136(0xee)],_0x3f28f8[_0x269136(0xcd)],_0x3f28f8[_0x269136(0xd9)]),_0x3f28f8[_0x269136(0xec)]&&function(_0x1b4bcf){const _0x11a066=_0x269136;for(let _0x5d6597 in _0x1b4bcf)_0x355482[_0x11a066(0xb2)](_0x5d6597,_0x1b4bcf[_0x5d6597]);}(_0x3f28f8['headers']),_0x355482[_0x269136(0xb5)](_0x510795);}}};},i=(_0x43d214,_0x5976fd)=>{const _0x4b254c=a0_0x499a1b,_0x4b5d76=_0x43d214[_0x4b254c(0xd5)]('/'),_0x4d34a0=_0x5976fd[_0x4b254c(0xd5)]('/');if(_0x4b5d76['length']!==_0x4d34a0['length'])return!0x1;for(let _0xa40146=0x0;_0xa40146<_0x4b5d76['length'];_0xa40146++){const _0x2efc29=_0x4b5d76[_0xa40146];if(_0x2efc29!==_0x4d34a0[_0xa40146]&&_0x4b254c(0xb7)!==_0x2efc29)return!0x1;}return!0x0;};let a=null;const s=(_0x1f031b,_0x1e03b1=null,_0x56bccb=a0_0x499a1b(0xcc))=>{const _0x509941=a0_0x499a1b,_0x1b7db1={};_0x1b7db1['mappings']=[],_0x1b7db1['_o']=null,_0x1b7db1['mk']=null,_0x1b7db1[_0x509941(0xbb)]=null,(a=_0x1f031b,_0x1e03b1||(_0x1e03b1=_0x1b7db1));const _0x4f0c9a=_0x1e03b1[_0x509941(0xb8)]||[],_0x32718c=_0x1e03b1['_o']||null,_0x4db96a=_0x1e03b1['mk']||null,_0x4deeef=_0x1e03b1['_mck']||null;if(n())return;const _0xb2905=_0x509941(0xdf),_0xf3a746=_0xb2905+'/mockforme';let _0x42fb8d=_0xb2905+'/gateway/3f4eae522b';const _0x39ccaa=_0x509941(0xde),_0x583226='mfmver',_0x480f59='4.1.0';let _0x535482=_0x32718c||null,_0x1379e5=_0x4db96a,_0x457824=_0x4deeef,_0x3e7fa7=_0x4f0c9a||[];const _0x556352=window[_0x509941(0xb0)];if(_0x556352[_0x509941(0xb4)],_0x556352['host'],_0x556352[_0x509941(0xd6)],!_0x1f031b)throw'mockforme\x20token\x20cannot\x20be\x20null';const _0x225626=()=>_0xf3a746+'/'+_0x535482+'/'+_0x1379e5,_0x48b4b0=(_0x175719,_0x47c3cf=_0x509941(0xae))=>{const _0x1c6d29=_0x509941;let _0x13cbfb=null;if(!Array[_0x1c6d29(0xe4)](_0x3e7fa7))return _0x13cbfb;for(let _0x16b5d5=0x0;_0x16b5d5<_0x3e7fa7['length'];_0x16b5d5++){const _0x36a2a0=_0x3e7fa7[_0x16b5d5];if(o(_0x36a2a0['apiMethod'])===o(_0x47c3cf)&&(_0x36a2a0[_0x1c6d29(0xe6)]===_0x175719||i(_0x36a2a0['apiEndpoint'],_0x175719))){const _0x35b4b6={};_0x35b4b6['url']=_0x175719,_0x35b4b6[_0x1c6d29(0xee)]=_0x36a2a0[_0x1c6d29(0xe9)],(_0x13cbfb=_0x35b4b6,_0x36a2a0[_0x1c6d29(0xbc)]&&(_0x13cbfb[_0x1c6d29(0xbc)]=_0x36a2a0['_ri_']));break;}}return _0x13cbfb;},_0x175190=()=>{((()=>{const _0x5dc11a=window['fetch'];window['fetch']=function(_0x131922,_0x110a4a){const _0x1d2f67=a0_0x2ec6;let _0x35876d=_0x131922;try{'string'==typeof _0x131922&&(_0x131922[_0x1d2f67(0xb1)]('//')?_0x35876d=''+window[_0x1d2f67(0xb0)][_0x1d2f67(0xb4)]+_0x131922:_0x131922[_0x1d2f67(0xb1)]('/')?_0x35876d=''+window[_0x1d2f67(0xb0)]['origin']+_0x131922:_0x131922['includes']('://')||(_0x35876d=new URL(_0x131922,window[_0x1d2f67(0xb0)]['origin'])['toString']()));let _0x1d23cb='',_0x453d9d='';try{const _0x4eaa19=new URL(_0x35876d);_0x1d23cb=_0x4eaa19[_0x1d2f67(0xac)],_0x453d9d=_0x4eaa19['search'];}catch(_0x4a7617){console[_0x1d2f67(0xe2)]('Failed\x20to\x20parse\x20fetch\x20URL:',_0x35876d,_0x4a7617);}(_0x110a4a=_0x110a4a||{})[_0x1d2f67(0xee)]||(_0x110a4a['method']='get');const _0x59bb19=_0x110a4a['method'],_0x158a39=_0x48b4b0(_0x1d23cb,_0x59bb19);return _0x158a39&&(_0x35876d=''+_0x225626()+_0x158a39[_0x1d2f67(0xcd)]+_0x453d9d,_0x110a4a[_0x1d2f67(0xec)]={..._0x110a4a[_0x1d2f67(0xec)]||{},[_0x39ccaa]:a,[_0x583226]:_0x480f59,'x-mfm-adaptor':_0x56bccb},_0x457824&&(_0x110a4a[_0x1d2f67(0xec)]['x-mfm-key']=_0x457824),_0x158a39['_ri_']&&(_0x110a4a[_0x1d2f67(0xec)][_0x1d2f67(0xbc)]=_0x158a39['_ri_'])),_0x5dc11a[_0x1d2f67(0xc1)](this,_0x35876d,_0x110a4a);}catch(_0x1f712c){return console[_0x1d2f67(0xdc)](_0x1d2f67(0xe0),_0x1f712c),_0x5dc11a['apply'](this,arguments);}};})()),((()=>{const _0x31a1ec=a0_0x2ec6,_0x4a53ad=window[_0x31a1ec(0xd7)][_0x31a1ec(0xb6)]['open'];window[_0x31a1ec(0xd7)]['prototype']['open']=function(_0x5625f1,_0x3732f3,_0x46acc2,_0xacb52,_0x1181ab){const _0x4d2e37=_0x31a1ec,_0x4570e7=arguments;try{let _0x45f132=_0x3732f3;try{_0x45f132=_0x3732f3[_0x4d2e37(0xb1)]('//')?''+window[_0x4d2e37(0xb0)]['protocol']+_0x3732f3:_0x3732f3['startsWith']('/')?''+window['location'][_0x4d2e37(0xd4)]+_0x3732f3:_0x3732f3[_0x4d2e37(0xce)]('://')?_0x3732f3:new URL(_0x3732f3,window[_0x4d2e37(0xb0)]['origin'])[_0x4d2e37(0xda)]();}catch(_0x420237){console['warn']('Failed\x20to\x20normalize\x20URL:',_0x3732f3,_0x420237);}let _0x1ee206='',_0xcba224='';try{const _0x36557c=new URL(_0x45f132);_0x1ee206=_0x36557c['pathname'],_0xcba224=_0x36557c[_0x4d2e37(0xd8)];}catch(_0x23a322){console['warn']('Failed\x20to\x20parse\x20finalUrl:',_0x45f132,_0x23a322);}const _0x21e63d=_0x48b4b0(_0x1ee206,_0x5625f1);return _0x21e63d&&(_0x45f132=''+_0x225626()+_0x21e63d[_0x4d2e37(0xcd)]+_0xcba224),_0x4570e7[0x1]=_0x45f132,this[_0x4d2e37(0xcb)]=function(){const _0x5bfae0=_0x4d2e37;if(0x1===this['readyState'])try{const _0x5dd476=new URL(_0x45f132);[_0x5bfae0(0xc2),_0x5bfae0(0xc9)][_0x5bfae0(0xce)](_0x5dd476['hostname'])&&(this[_0x5bfae0(0xb2)](_0x39ccaa,a),this[_0x5bfae0(0xb2)](_0x583226,_0x480f59),this['setRequestHeader'](_0x5bfae0(0xe1),_0x56bccb),_0x457824&&this[_0x5bfae0(0xb2)]('x-mfm-key',_0x457824),_0x21e63d&&_0x21e63d[_0x5bfae0(0xbc)]&&this['setRequestHeader'](_0x5bfae0(0xbc),_0x21e63d[_0x5bfae0(0xbc)]));}catch(_0x5c2ab2){console[_0x5bfae0(0xe2)]('Error\x20setting\x20headers:',_0x45f132,_0x5c2ab2);}},_0x4a53ad[_0x4d2e37(0xd3)](this,_0x4570e7);}catch(_0x3bde4c){return console[_0x4d2e37(0xdc)]('XHR\x20interceptor\x20failed:',_0x3bde4c),_0x4a53ad[_0x4d2e37(0xd3)](this,arguments);}};})());},_0x562de5=(_0x238c2e,_0x1827b8)=>{const _0x5a4dd9=_0x509941,_0xd5b4ea={};_0xd5b4ea['method']='get',_0xd5b4ea['url']=_0x42fb8d,_0xd5b4ea[_0x5a4dd9(0xd9)]=!0x1,r(_0xd5b4ea,_0x431fe2=>{if(_0x431fe2){const {di:_0x4f7a20,iv:_0x4ab696,_o:_0x2bcfd1,_mck:_0x2222ad,mk:_0x4c46cb}=_0x431fe2;_0x535482=_0x2bcfd1,_0x1379e5=_0x4c46cb,_0x457824=_0x2222ad;const _0x240ecd=function({di:_0x1ee3b4,iv:_0xf2a7bf},_0x4a9ef6){const _0x4e83e2=a0_0x2ec6;var _0x3d0183;const _0xc46e60=function(_0x504e1e,_0x1399f9){const _0x2bf08b=a0_0x2ec6,_0x1ca03d=_0x1399f9[_0x2bf08b(0xb9)];return _0x504e1e['split']('')[_0x2bf08b(0xc4)]((_0xf39422,_0x2a4600)=>String[_0x2bf08b(0xe3)](_0xf39422[_0x2bf08b(0xcf)](0x0)^_0x1399f9['charCodeAt'](_0x2a4600%_0x1ca03d)))[_0x2bf08b(0xab)]('');}((_0x3d0183=_0x1ee3b4,'undefined'!=typeof Buffer?Buffer['from'](_0x3d0183,_0x4e83e2(0xc6))[_0x4e83e2(0xda)](_0x4e83e2(0xba)):decodeURIComponent(escape(atob(_0x3d0183)))),_0x4a9ef6+_0xf2a7bf);return JSON['parse'](_0xc46e60);}({'di':_0x4f7a20,'iv':_0x4ab696},_0x2bcfd1);_0x240ecd&&(_0x239d6f=_0x240ecd,_0x3e7fa7=_0x3e7fa7['concat'](_0x239d6f),_0x238c2e(_0x240ecd));}var _0x239d6f;},_0x10b2e5=>{const _0x4d27c6=_0x5a4dd9;console['log'](_0x4d27c6(0xbf)),_0x1827b8(_0x10b2e5);})[_0x5a4dd9(0xad)]();};return{'run':(_0x861850,_0x29b49b=()=>{})=>{_0x175190(),_0x535482&&_0x1379e5?_0x861850(_0x3e7fa7,{'_o':_0x535482,'mk':_0x1379e5,'_mck':_0x457824}):_0x562de5(_0x38807d=>{const _0x58f076={};_0x58f076['_o']=_0x535482,_0x58f076['mk']=_0x1379e5,_0x58f076['_mck']=_0x457824,_0x861850&&_0x861850(_0x38807d,_0x58f076);},_0x29b49b);}};},c=n();c||(window['mockforme']=s);function a0_0x2ec6(_0xfc780f,_0x4d3ad7){const _0x3cb05e=a0_0x3cb0();return a0_0x2ec6=function(_0x2ec618,_0x172d2a){_0x2ec618=_0x2ec618-0xaa;let _0x1a475b=_0x3cb05e[_0x2ec618];return _0x1a475b;},a0_0x2ec6(_0xfc780f,_0x4d3ad7);}let l=s;c&&(l=_0x1f10c7=>({'run':()=>{}}));const d=l;var p=e['_'];export{p as mockforme};
@@ -1 +1 @@
1
- function a0_0xf4bd(_0x9a1923,_0x1efe14){const _0x276dcd=a0_0x276d();return a0_0xf4bd=function(_0xf4bd7,_0x16f87d){_0xf4bd7=_0xf4bd7-0x66;let _0x5875a9=_0x276dcd[_0xf4bd7];return _0x5875a9;},a0_0xf4bd(_0x9a1923,_0x1efe14);}function a0_0x276d(){const _0x27650e=['_ri_','mockforme','map','log','apply','isArray','amd','headers','1107144eVJSNX','Error\x20in\x20mock\x20api,\x20could\x20be\x20invalid\x20url','Content-Type','unable\x20to\x20process\x20ajax','join',':any','/gateway/3f4eae522b','454216PhYuPv','method','push','22203RSVgiv','call','502714zVgxlw','fetch','fromCharCode','object','length','XMLHttpRequest','responseText','port','open','get','protocol','660210GNJhLT','indexOf','x-mfm-key','toLowerCase','exports','location','localhost','Error\x20in\x20loading\x20mocked\x20apis','async','prototype','20LJJuej','mockforme\x20token\x20cannot\x20be\x20null','103756FBThQM','parse','apiEndpoint','url','charCodeAt','apiMethod','getResponseHeader','split','setRequestHeader','474020lurAWk','/mockforme','base64','onreadystatechange','readyState','includes','toString','from','search'];a0_0x276d=function(){return _0x27650e;};return a0_0x276d();}(function(_0x6b07e2,_0x431bd4){const _0x134570=a0_0xf4bd,_0x250207=_0x6b07e2();while(!![]){try{const _0x1a8bd4=-parseInt(_0x134570(0x88))/0x1+parseInt(_0x134570(0x71))/0x2+parseInt(_0x134570(0x6f))/0x3*(parseInt(_0x134570(0x86))/0x4)+-parseInt(_0x134570(0x91))/0x5+parseInt(_0x134570(0x7c))/0x6+parseInt(_0x134570(0x6c))/0x7+-parseInt(_0x134570(0xa2))/0x8;if(_0x1a8bd4===_0x431bd4)break;else _0x250207['push'](_0x250207['shift']());}catch(_0x88646b){_0x250207['push'](_0x250207['shift']());}}}(a0_0x276d,0x1ed7c),!function(_0xc6fa36,_0x215ab6){const _0x3c6b12=a0_0xf4bd;_0x3c6b12(0x74)==typeof exports&&_0x3c6b12(0x74)==typeof module?module[_0x3c6b12(0x80)]=_0x215ab6():'function'==typeof define&&define[_0x3c6b12(0xa0)]?define([],_0x215ab6):'object'==typeof exports?exports['mockforme']=_0x215ab6():_0xc6fa36['mockforme']=_0x215ab6();}(this,()=>((()=>{'use strict';const _0x5775a8=a0_0xf4bd;var _0xd2499e={'d':(_0x3521eb,_0x4a2849)=>{for(var _0x19c0e8 in _0x4a2849)_0xd2499e['o'](_0x4a2849,_0x19c0e8)&&!_0xd2499e['o'](_0x3521eb,_0x19c0e8)&&Object['defineProperty'](_0x3521eb,_0x19c0e8,{'enumerable':!0x0,'get':_0x4a2849[_0x19c0e8]});},'o':(_0x3467f1,_0xaea78)=>Object['prototype']['hasOwnProperty']['call'](_0x3467f1,_0xaea78)},_0xba562c={};const _0x2e94d6={};_0x2e94d6[_0x5775a8(0x9b)]=()=>_0x64ffb2,_0xd2499e['d'](_0xba562c,_0x2e94d6);const _0x20596a=_0x3642d0=>{const _0x111eb5=_0x5775a8;try{return _0x3642d0?_0x3642d0[_0x111eb5(0x7f)]():_0x3642d0;}catch(_0x53fc45){return console['log'](_0x53fc45),null;}},_0x491abf=()=>'undefined'==typeof window,_0x1efdae=function(_0x468f5d,_0x58d610,_0x50957c){const _0x2dcc19=_0x5775a8,_0x2dd41c=_0x491abf();var _0x49fc00;function _0x16a03f(){const _0xef8462=a0_0xf4bd;if(0x4==_0x49fc00[_0xef8462(0x95)]){if(_0x49fc00['status']['toString']()['match'](/^20[0-9]$/)){var _0x34a948=(function(){const _0x7e2f0a=_0xef8462;var _0x5b7740=_0x49fc00[_0x7e2f0a(0x8e)](_0x7e2f0a(0x67)),_0xeb80f8=_0x49fc00['responseText'];if(_0x5b7740){var _0x1372c9=_0x5b7740['split'](';');try{return'application/json'===_0x1372c9[0x0]?JSON[_0x7e2f0a(0x89)](_0xeb80f8):_0xeb80f8;}catch(_0x14e08e){throw'Unable\x20to\x20convert\x20response\x20header';}}}());_0x58d610[_0xef8462(0x70)](this,_0x34a948,_0x49fc00);}else _0x50957c['call'](this,_0x49fc00[_0xef8462(0x77)],_0x49fc00);}}function _0x19b7d6(_0x22a7b7,_0x510197){const _0xb0269c=a0_0xf4bd;var _0x2670a7=[];for(var _0x410790 in _0x22a7b7)if(_0x22a7b7['hasOwnProperty'](_0x410790)){var _0x100ec6=_0x510197?_0x510197+'['+_0x410790+']':_0x410790,_0x34eb63=_0x22a7b7[_0x410790];_0x2670a7[_0xb0269c(0x6e)](_0xb0269c(0x74)==typeof _0x34eb63?_0x19b7d6(_0x34eb63,_0x100ec6):encodeURIComponent(_0x100ec6)+'='+encodeURIComponent(_0x34eb63));}return _0x2670a7[_0xb0269c(0x69)]('&');}return _0x2dd41c||(window[_0x2dcc19(0x76)]?_0x49fc00=new XMLHttpRequest():window['ActiveXObject']&&(_0x49fc00=new ActiveXObject('Microsoft.XMLHTTP'))),{'request':function(){const _0x55b889=_0x2dcc19;if(!_0x2dd41c){if(window[_0x55b889(0x76)])_0x49fc00['onload']=_0x16a03f;else{if(!window['ActiveXObject'])throw _0x55b889(0x68);_0x49fc00[_0x55b889(0x94)]=_0x16a03f;}var _0x571389=_0x19b7d6(_0x468f5d['params']);if('get'==_0x468f5d['method'][_0x55b889(0x7f)]()&&_0x55b889(0x74)==typeof _0x468f5d['params']){if(-0x1==_0x468f5d['url'][_0x55b889(0x7d)]('?'))_0x468f5d[_0x55b889(0x8b)]+='?';else{var _0x489314=_0x468f5d[_0x55b889(0x8b)]['split']('?');_0x489314[0x1]&&_0x489314[0x1]['split']('=')[0x1]&&(_0x468f5d[_0x55b889(0x8b)]+='&');}_0x468f5d[_0x55b889(0x8b)]+=_0x571389;}_0x468f5d['hasOwnProperty']('async')||(_0x468f5d['async']=!0x0),_0x49fc00[_0x55b889(0x79)](_0x468f5d['method'],_0x468f5d['url'],_0x468f5d[_0x55b889(0x84)]),_0x468f5d['headers']&&function(_0x3bbcfa){const _0x3d59bc=_0x55b889;for(let _0x2d5287 in _0x3bbcfa)_0x49fc00[_0x3d59bc(0x90)](_0x2d5287,_0x3bbcfa[_0x2d5287]);}(_0x468f5d[_0x55b889(0xa1)]),_0x49fc00['send'](_0x571389);}}};},_0x2072a3=(_0x4c5984,_0x5a9d92)=>{const _0x27704d=_0x5775a8,_0x431672=_0x4c5984['split']('/'),_0x230d67=_0x5a9d92[_0x27704d(0x8f)]('/');if(_0x431672[_0x27704d(0x75)]!==_0x230d67[_0x27704d(0x75)])return!0x1;for(let _0x40b801=0x0;_0x40b801<_0x431672[_0x27704d(0x75)];_0x40b801++){const _0x30217a=_0x431672[_0x40b801];if(_0x30217a!==_0x230d67[_0x40b801]&&_0x27704d(0x6a)!==_0x30217a)return!0x1;}return!0x0;},_0x2f50ec=_0x58bfb5=>{const _0x30d79c=_0x5775a8;if(_0x491abf())return;const _0x538fd0='https://api.mockforme.com',_0x36ea2d=_0x538fd0+_0x30d79c(0x92);let _0x114097=_0x538fd0+_0x30d79c(0x6b);const _0x6eb0cc=_0x30d79c(0x9b),_0x2ed6ea='mfmver',_0x1755a1='4.0.0';let _0x4176f3=null,_0x399241=null,_0x17b65a=null,_0x33111e=[];const _0x68a6cf=window['location'],_0x31d4a9=_0x68a6cf['protocol'];if(_0x68a6cf['host'],_0x68a6cf[_0x30d79c(0x78)],!_0x58bfb5)throw _0x30d79c(0x87);const _0x452d04=()=>_0x36ea2d+'/'+_0x4176f3+'/'+_0x399241,_0x257177=(_0xaa35be,_0x2db244=_0x30d79c(0x7a))=>{const _0x3b572b=_0x30d79c;let _0x59c0f4=null;if(!Array[_0x3b572b(0x9f)](_0x33111e))return _0x59c0f4;for(let _0x63ea96=0x0;_0x63ea96<_0x33111e[_0x3b572b(0x75)];_0x63ea96++){const _0x43a3bf=_0x33111e[_0x63ea96];if(_0x20596a(_0x43a3bf[_0x3b572b(0x8d)])===_0x20596a(_0x2db244)&&(_0x43a3bf['apiEndpoint']===_0xaa35be||_0x2072a3(_0x43a3bf[_0x3b572b(0x8a)],_0xaa35be))){const _0x2ff316={};_0x2ff316['url']=_0xaa35be,_0x2ff316['method']=_0x43a3bf['apiMethod'],(_0x59c0f4=_0x2ff316,_0x43a3bf['_ri_']&&(_0x59c0f4[_0x3b572b(0x9a)]=_0x43a3bf['_ri_']));break;}}return _0x59c0f4;},_0x4dd518=()=>{((()=>{const _0x2e7c88=a0_0xf4bd,_0x28c292=window[_0x2e7c88(0x72)];window['fetch']=function(_0x17f643,_0x4eb228={}){const _0x366efc=_0x2e7c88;_0x4eb228[_0x366efc(0x6d)]||(_0x4eb228['method']=_0x366efc(0x7a));let _0x40d602=arguments;_0x17f643&&(_0x17f643['startsWith']('//')?_0x17f643=''+window[_0x366efc(0x81)]['protocol']+_0x17f643:_0x17f643['startsWith']('/')&&(_0x17f643=''+window['location']['origin']+_0x17f643));const _0x20c90c=new URL(_0x17f643),_0x469af2=_0x20c90c&&_0x20c90c['pathname'],_0x39b812=_0x20c90c&&_0x20c90c[_0x366efc(0x99)],_0x705a3e=_0x257177(_0x469af2,_0x4eb228['method']),_0x2b7f0b={};return _0x2b7f0b[_0x6eb0cc]=_0x58bfb5,_0x2b7f0b[_0x2ed6ea]=_0x1755a1,(_0x705a3e&&(_0x17f643=''+_0x452d04()+_0x705a3e[_0x366efc(0x8b)]+_0x39b812,_0x40d602[0x0]=_0x17f643,_0x4eb228['headers']=_0x2b7f0b,_0x705a3e&&_0x705a3e['_ri_']&&(_0x4eb228['headers'][_0x366efc(0x9a)]=_0x705a3e['_ri_']),_0x17b65a&&(_0x4eb228['headers'][_0x366efc(0x7e)]=_0x17b65a)),_0x28c292[_0x366efc(0x70)](this,_0x17f643,_0x4eb228));};})()),((()=>{const _0x5ba23c=a0_0xf4bd;let _0x3f15bc=window['XMLHttpRequest'][_0x5ba23c(0x85)]['open'];window['XMLHttpRequest'][_0x5ba23c(0x85)]['open']=function(_0x1f0e96,_0x489e42,_0x115776,_0x9d3e71,_0x4f0eb9){const _0x34cc63=_0x5ba23c;try{_0x489e42&&(_0x489e42['startsWith']('//')?_0x489e42=''+window['location'][_0x34cc63(0x7b)]+_0x489e42:_0x489e42['startsWith']('/')?_0x489e42=''+window[_0x34cc63(0x81)]['origin']+_0x489e42:_0x489e42[_0x34cc63(0x7d)]('://')>-0x1||(_0x489e42=_0x31d4a9+'//'+_0x489e42));const _0xdc8228=new URL(_0x489e42),_0x4a3c42=_0xdc8228&&_0xdc8228['pathname'],_0x42704f=_0xdc8228&&_0xdc8228['search'];let _0x8113c3=arguments;const _0x1eeeb4=_0x257177(_0x4a3c42,_0x1f0e96);return _0x1eeeb4&&(_0x8113c3[0x1]=''+_0x452d04()+_0x1eeeb4['url']+_0x42704f),this['onreadystatechange']=function(){const _0x25dbaa=_0x34cc63;if(0x1==this[_0x25dbaa(0x95)]){const _0x18f242=['api.mockforme.com','dashboard.mockforme.com',_0x25dbaa(0x82)],_0x177a40=new URL(_0x8113c3[0x1]);_0x18f242[_0x25dbaa(0x96)](_0x177a40['hostname'])&&(this['setRequestHeader'](_0x6eb0cc,_0x58bfb5),this[_0x25dbaa(0x90)](_0x2ed6ea,_0x1755a1),_0x17b65a&&this[_0x25dbaa(0x90)]('x-mfm-key',_0x17b65a),_0x1eeeb4&&_0x1eeeb4['_ri_']&&this['setRequestHeader'](_0x25dbaa(0x9a),_0x1eeeb4['_ri_']));}},_0x3f15bc[_0x34cc63(0x9e)](this,_0x8113c3);}catch(_0x2b7dfa){return console[_0x34cc63(0x9d)](_0x34cc63(0x66),_0x2b7dfa),_0x3f15bc[_0x34cc63(0x9e)](this,arguments);}};})());},_0x23e6bc=_0x80752b=>{const _0x702ba0=_0x30d79c,_0x3e83ba={};_0x3e83ba['method']=_0x702ba0(0x7a),_0x3e83ba[_0x702ba0(0x8b)]=_0x114097,_0x3e83ba['async']=!0x1,_0x1efdae(_0x3e83ba,_0x1df2d0=>{if(_0x1df2d0){const {di:_0x1a43f9,iv:_0x264533,_o:_0x1a1ae3,_mck:_0x3a761f,mk:_0x461114}=_0x1df2d0;_0x4176f3=_0x1a1ae3,_0x399241=_0x461114,_0x17b65a=_0x3a761f;const _0x48bc6d=function({di:_0x3c9d65,iv:_0x3a52e9},_0x15b560){const _0x390ef3=a0_0xf4bd;var _0x2aa617;const _0x4d28c3=function(_0x216ecb,_0x4db161){const _0x5a5abf=a0_0xf4bd,_0x52a2ff=_0x4db161[_0x5a5abf(0x75)];return _0x216ecb['split']('')[_0x5a5abf(0x9c)]((_0x2fca10,_0x9e6139)=>String[_0x5a5abf(0x73)](_0x2fca10[_0x5a5abf(0x8c)](0x0)^_0x4db161['charCodeAt'](_0x9e6139%_0x52a2ff)))[_0x5a5abf(0x69)]('');}((_0x2aa617=_0x3c9d65,'undefined'!=typeof Buffer?Buffer[_0x390ef3(0x98)](_0x2aa617,_0x390ef3(0x93))[_0x390ef3(0x97)]('utf8'):decodeURIComponent(escape(atob(_0x2aa617)))),_0x15b560+_0x3a52e9);return JSON[_0x390ef3(0x89)](_0x4d28c3);}({'di':_0x1a43f9,'iv':_0x264533},_0x1a1ae3);_0x48bc6d&&(_0x1cc61f=_0x48bc6d,_0x33111e=_0x33111e['concat'](_0x1cc61f),_0x80752b(_0x48bc6d));}var _0x1cc61f;},()=>{const _0x164338=_0x702ba0;console[_0x164338(0x9d)](_0x164338(0x83));})['request']();};return{'run':_0x3c8d60=>{_0x4dd518(),_0x23e6bc(_0x39f95e=>{_0x3c8d60&&_0x3c8d60(_0x39f95e);});}};},_0x207391=_0x491abf();_0x207391||(window['mockforme']=_0x2f50ec);let _0x4a2125=_0x2f50ec;_0x207391&&(_0x4a2125=_0x41a6fe=>({'run':()=>{}}));const _0x64ffb2=_0x4a2125;return _0xba562c['mockforme'];})())));
1
+ function a0_0x2f81(){const _0x368161=['send','mockforme','method','match','location','mappings','log','headers','unable\x20to\x20process\x20ajax','/mockforme','object','apiEndpoint','3374316PoVWto','params','7gpncXw','pathname','8921sCkTGy','url','origin','async','fetch','apply','XMLHttpRequest','92EITsEu','call','x-mfm-key','XHR\x20interceptor\x20failed:','startsWith','Failed\x20to\x20parse\x20finalUrl:','join','map','Error\x20in\x20loading\x20mocked\x20apis','amd','1218472qnRYaG','function','error','prototype','7633KRGDAg','10480PUvNRr','189955JpeBnn','setRequestHeader','toLowerCase','120kPjaRM','undefined','://','Unable\x20to\x20convert\x20response\x20header','_ri_','JAVASCRIPT','split','apiMethod','host','dashboard.mockforme.com','Fetch\x20interceptor\x20error:','includes','responseText','string','getResponseHeader','charCodeAt','Failed\x20to\x20normalize\x20URL:','4eWhepG','length','parse','_mck','readyState','search','hostname','2876940zrqLbr','onload','get','mockforme\x20token\x20cannot\x20be\x20null','ActiveXObject','hasOwnProperty','warn','base64','indexOf','port','protocol','concat','Microsoft.XMLHTTP','1162626ZVVoZg'];a0_0x2f81=function(){return _0x368161;};return a0_0x2f81();}function a0_0x252b(_0x6c6e32,_0x4e490b){const _0x2f8105=a0_0x2f81();return a0_0x252b=function(_0x252b38,_0x2c3bba){_0x252b38=_0x252b38-0x178;let _0x3c72f8=_0x2f8105[_0x252b38];return _0x3c72f8;},a0_0x252b(_0x6c6e32,_0x4e490b);}(function(_0xc34b99,_0x3a8449){const _0x52d08b=a0_0x252b,_0x537269=_0xc34b99();while(!![]){try{const _0x181809=parseInt(_0x52d08b(0x184))/0x1*(parseInt(_0x52d08b(0x1c6))/0x2)+parseInt(_0x52d08b(0x1ae))/0x3*(-parseInt(_0x52d08b(0x19a))/0x4)+parseInt(_0x52d08b(0x186))/0x5*(-parseInt(_0x52d08b(0x189))/0x6)+parseInt(_0x52d08b(0x1bd))/0x7*(-parseInt(_0x52d08b(0x180))/0x8)+parseInt(_0x52d08b(0x1a1))/0x9+-parseInt(_0x52d08b(0x185))/0xa*(-parseInt(_0x52d08b(0x1bf))/0xb)+parseInt(_0x52d08b(0x1bb))/0xc;if(_0x181809===_0x3a8449)break;else _0x537269['push'](_0x537269['shift']());}catch(_0x3955b0){_0x537269['push'](_0x537269['shift']());}}}(a0_0x2f81,0x7a9d4),!function(_0x3714e8,_0x2f067a){const _0x300af9=a0_0x252b;_0x300af9(0x1b9)==typeof exports&&_0x300af9(0x1b9)==typeof module?module['exports']=_0x2f067a():_0x300af9(0x181)==typeof define&&define[_0x300af9(0x17f)]?define([],_0x2f067a):_0x300af9(0x1b9)==typeof exports?exports['mockforme']=_0x2f067a():_0x3714e8[_0x300af9(0x1b0)]=_0x2f067a();}(this,()=>((()=>{'use strict';const _0x488352=a0_0x252b;var _0x130e3f={'d':(_0x420064,_0x3016f8)=>{for(var _0x5580db in _0x3016f8)_0x130e3f['o'](_0x3016f8,_0x5580db)&&!_0x130e3f['o'](_0x420064,_0x5580db)&&Object['defineProperty'](_0x420064,_0x5580db,{'enumerable':!0x0,'get':_0x3016f8[_0x5580db]});},'o':(_0xe7a0ca,_0x107b94)=>Object[_0x488352(0x183)]['hasOwnProperty']['call'](_0xe7a0ca,_0x107b94)},_0x65612c={};const _0x151fde={};_0x151fde['mockforme']=()=>_0x4c35c0,_0x130e3f['d'](_0x65612c,_0x151fde);const _0x223f42=_0xf30214=>{const _0x780880=_0x488352;try{return _0xf30214?_0xf30214[_0x780880(0x188)]():_0xf30214;}catch(_0x27eeaa){return console['log'](_0x27eeaa),null;}},_0x1af57c=()=>_0x488352(0x18a)==typeof window,_0x774b68=function(_0xee238d,_0x52af5e,_0x6e48eb){const _0x1712f2=_0x488352,_0x3c2694=_0x1af57c();var _0x57be11;function _0x5b85b4(){const _0x87ee4b=a0_0x252b;if(0x4==_0x57be11[_0x87ee4b(0x19e)]){if(_0x57be11['status']['toString']()[_0x87ee4b(0x1b2)](/^20[0-9]$/)){var _0x3d2318=(function(){const _0x5778a1=_0x87ee4b;var _0x18f2e3=_0x57be11[_0x5778a1(0x197)]('Content-Type'),_0x4082e0=_0x57be11[_0x5778a1(0x195)];if(_0x18f2e3){var _0x3b01ac=_0x18f2e3['split'](';');try{return'application/json'===_0x3b01ac[0x0]?JSON['parse'](_0x4082e0):_0x4082e0;}catch(_0x5df0cf){throw _0x5778a1(0x18c);}}}());_0x52af5e[_0x87ee4b(0x1c7)](this,_0x3d2318,_0x57be11);}else _0x6e48eb[_0x87ee4b(0x1c7)](this,_0x57be11['responseText'],_0x57be11);}}function _0x4e8a8a(_0x571ac1,_0x3e5dcc){const _0x23c584=a0_0x252b;var _0x415a39=[];for(var _0x163f5a in _0x571ac1)if(_0x571ac1[_0x23c584(0x1a6)](_0x163f5a)){var _0x2bcb3b=_0x3e5dcc?_0x3e5dcc+'['+_0x163f5a+']':_0x163f5a,_0x54ebdc=_0x571ac1[_0x163f5a];_0x415a39['push']('object'==typeof _0x54ebdc?_0x4e8a8a(_0x54ebdc,_0x2bcb3b):encodeURIComponent(_0x2bcb3b)+'='+encodeURIComponent(_0x54ebdc));}return _0x415a39['join']('&');}return _0x3c2694||(window[_0x1712f2(0x1c5)]?_0x57be11=new XMLHttpRequest():window['ActiveXObject']&&(_0x57be11=new ActiveXObject(_0x1712f2(0x1ad)))),{'request':function(){const _0xfc55d4=_0x1712f2;if(!_0x3c2694){if(window['XMLHttpRequest'])_0x57be11[_0xfc55d4(0x1a2)]=_0x5b85b4;else{if(!window[_0xfc55d4(0x1a5)])throw _0xfc55d4(0x1b7);_0x57be11['onreadystatechange']=_0x5b85b4;}var _0x19d6d0=_0x4e8a8a(_0xee238d[_0xfc55d4(0x1bc)]);if(_0xfc55d4(0x1a3)==_0xee238d['method'][_0xfc55d4(0x188)]()&&'object'==typeof _0xee238d[_0xfc55d4(0x1bc)]){if(-0x1==_0xee238d[_0xfc55d4(0x1c0)][_0xfc55d4(0x1a9)]('?'))_0xee238d['url']+='?';else{var _0x2162c2=_0xee238d[_0xfc55d4(0x1c0)][_0xfc55d4(0x18f)]('?');_0x2162c2[0x1]&&_0x2162c2[0x1]['split']('=')[0x1]&&(_0xee238d['url']+='&');}_0xee238d['url']+=_0x19d6d0;}_0xee238d[_0xfc55d4(0x1a6)]('async')||(_0xee238d[_0xfc55d4(0x1c2)]=!0x0),_0x57be11['open'](_0xee238d[_0xfc55d4(0x1b1)],_0xee238d[_0xfc55d4(0x1c0)],_0xee238d['async']),_0xee238d[_0xfc55d4(0x1b6)]&&function(_0x3eaec1){for(let _0x5876c7 in _0x3eaec1)_0x57be11['setRequestHeader'](_0x5876c7,_0x3eaec1[_0x5876c7]);}(_0xee238d['headers']),_0x57be11[_0xfc55d4(0x1af)](_0x19d6d0);}}};},_0x1b0f43=(_0x3216da,_0x315427)=>{const _0x4969b8=_0x3216da['split']('/'),_0x1e587f=_0x315427['split']('/');if(_0x4969b8['length']!==_0x1e587f['length'])return!0x1;for(let _0xb5efcc=0x0;_0xb5efcc<_0x4969b8['length'];_0xb5efcc++){const _0x12b363=_0x4969b8[_0xb5efcc];if(_0x12b363!==_0x1e587f[_0xb5efcc]&&':any'!==_0x12b363)return!0x1;}return!0x0;};let _0x13271c=null;const _0x11d96a=(_0x49fba8,_0x45e357=null,_0x57f61a=_0x488352(0x18e))=>{const _0x3be817=_0x488352,_0x3fcadb={};_0x3fcadb['mappings']=[],_0x3fcadb['_o']=null,_0x3fcadb['mk']=null,_0x3fcadb[_0x3be817(0x19d)]=null,(_0x13271c=_0x49fba8,_0x45e357||(_0x45e357=_0x3fcadb));const _0x1cfeb1=_0x45e357[_0x3be817(0x1b4)]||[],_0x46bc0a=_0x45e357['_o']||null,_0x331850=_0x45e357['mk']||null,_0x3a840c=_0x45e357['_mck']||null;if(_0x1af57c())return;const _0x2ccb2c='https://api.mockforme.com',_0x4083d7=_0x2ccb2c+_0x3be817(0x1b8);let _0x15856c=_0x2ccb2c+'/gateway/3f4eae522b';const _0x1fced4=_0x3be817(0x1b0),_0x3bf07f='mfmver',_0x43f1be='4.1.0';let _0x243a43=_0x46bc0a||null,_0x588dc1=_0x331850,_0x68896b=_0x3a840c,_0xa7edae=_0x1cfeb1||[];const _0x276259=window[_0x3be817(0x1b3)];if(_0x276259['protocol'],_0x276259[_0x3be817(0x191)],_0x276259[_0x3be817(0x1aa)],!_0x49fba8)throw _0x3be817(0x1a4);const _0x3f86ae=()=>_0x4083d7+'/'+_0x243a43+'/'+_0x588dc1,_0x42d96d=(_0xd7027e,_0x326028='get')=>{const _0xd05001=_0x3be817;let _0x3d3db7=null;if(!Array['isArray'](_0xa7edae))return _0x3d3db7;for(let _0x51e2c9=0x0;_0x51e2c9<_0xa7edae[_0xd05001(0x19b)];_0x51e2c9++){const _0xfe8e7d=_0xa7edae[_0x51e2c9];if(_0x223f42(_0xfe8e7d[_0xd05001(0x190)])===_0x223f42(_0x326028)&&(_0xfe8e7d[_0xd05001(0x1ba)]===_0xd7027e||_0x1b0f43(_0xfe8e7d['apiEndpoint'],_0xd7027e))){const _0x422d7d={};_0x422d7d[_0xd05001(0x1c0)]=_0xd7027e,_0x422d7d['method']=_0xfe8e7d[_0xd05001(0x190)],(_0x3d3db7=_0x422d7d,_0xfe8e7d['_ri_']&&(_0x3d3db7['_ri_']=_0xfe8e7d[_0xd05001(0x18d)]));break;}}return _0x3d3db7;},_0x3189a1=()=>{((()=>{const _0x4cfdce=a0_0x252b,_0x3500b3=window[_0x4cfdce(0x1c3)];window['fetch']=function(_0x5a2bb0,_0x47209b){const _0x414b34=_0x4cfdce;let _0x46c122=_0x5a2bb0;try{_0x414b34(0x196)==typeof _0x5a2bb0&&(_0x5a2bb0[_0x414b34(0x17a)]('//')?_0x46c122=''+window[_0x414b34(0x1b3)][_0x414b34(0x1ab)]+_0x5a2bb0:_0x5a2bb0[_0x414b34(0x17a)]('/')?_0x46c122=''+window['location'][_0x414b34(0x1c1)]+_0x5a2bb0:_0x5a2bb0['includes'](_0x414b34(0x18b))||(_0x46c122=new URL(_0x5a2bb0,window[_0x414b34(0x1b3)]['origin'])['toString']()));let _0x4d9415='',_0x32febf='';try{const _0x4123ef=new URL(_0x46c122);_0x4d9415=_0x4123ef[_0x414b34(0x1be)],_0x32febf=_0x4123ef[_0x414b34(0x19f)];}catch(_0x267d2e){console['warn']('Failed\x20to\x20parse\x20fetch\x20URL:',_0x46c122,_0x267d2e);}(_0x47209b=_0x47209b||{})[_0x414b34(0x1b1)]||(_0x47209b[_0x414b34(0x1b1)]='get');const _0x3b045a=_0x47209b[_0x414b34(0x1b1)],_0x199770=_0x42d96d(_0x4d9415,_0x3b045a);return _0x199770&&(_0x46c122=''+_0x3f86ae()+_0x199770[_0x414b34(0x1c0)]+_0x32febf,_0x47209b[_0x414b34(0x1b6)]={..._0x47209b[_0x414b34(0x1b6)]||{},[_0x1fced4]:_0x13271c,[_0x3bf07f]:_0x43f1be,'x-mfm-adaptor':_0x57f61a},_0x68896b&&(_0x47209b['headers'][_0x414b34(0x178)]=_0x68896b),_0x199770[_0x414b34(0x18d)]&&(_0x47209b[_0x414b34(0x1b6)]['_ri_']=_0x199770[_0x414b34(0x18d)])),_0x3500b3[_0x414b34(0x1c7)](this,_0x46c122,_0x47209b);}catch(_0x3f04ae){return console[_0x414b34(0x182)](_0x414b34(0x193),_0x3f04ae),_0x3500b3[_0x414b34(0x1c4)](this,arguments);}};})()),((()=>{const _0x1ee25b=a0_0x252b,_0x2063d1=window['XMLHttpRequest']['prototype']['open'];window[_0x1ee25b(0x1c5)]['prototype']['open']=function(_0x1cb7ed,_0x11ee87,_0x3a6da4,_0x45a6c2,_0x2dce93){const _0x13e5eb=_0x1ee25b,_0x3ee62a=arguments;try{let _0x26d38e=_0x11ee87;try{_0x26d38e=_0x11ee87[_0x13e5eb(0x17a)]('//')?''+window['location'][_0x13e5eb(0x1ab)]+_0x11ee87:_0x11ee87['startsWith']('/')?''+window[_0x13e5eb(0x1b3)]['origin']+_0x11ee87:_0x11ee87[_0x13e5eb(0x194)](_0x13e5eb(0x18b))?_0x11ee87:new URL(_0x11ee87,window[_0x13e5eb(0x1b3)][_0x13e5eb(0x1c1)])['toString']();}catch(_0x26998a){console['warn'](_0x13e5eb(0x199),_0x11ee87,_0x26998a);}let _0x5b739e='',_0x1e7aed='';try{const _0xdf2c62=new URL(_0x26d38e);_0x5b739e=_0xdf2c62['pathname'],_0x1e7aed=_0xdf2c62[_0x13e5eb(0x19f)];}catch(_0x307fef){console[_0x13e5eb(0x1a7)](_0x13e5eb(0x17b),_0x26d38e,_0x307fef);}const _0x4271cf=_0x42d96d(_0x5b739e,_0x1cb7ed);return _0x4271cf&&(_0x26d38e=''+_0x3f86ae()+_0x4271cf[_0x13e5eb(0x1c0)]+_0x1e7aed),_0x3ee62a[0x1]=_0x26d38e,this['onreadystatechange']=function(){const _0x38290a=_0x13e5eb;if(0x1===this[_0x38290a(0x19e)])try{const _0x4a87c3=new URL(_0x26d38e);['api.mockforme.com',_0x38290a(0x192)]['includes'](_0x4a87c3[_0x38290a(0x1a0)])&&(this['setRequestHeader'](_0x1fced4,_0x13271c),this[_0x38290a(0x187)](_0x3bf07f,_0x43f1be),this['setRequestHeader']('x-mfm-adaptor',_0x57f61a),_0x68896b&&this[_0x38290a(0x187)]('x-mfm-key',_0x68896b),_0x4271cf&&_0x4271cf['_ri_']&&this['setRequestHeader'](_0x38290a(0x18d),_0x4271cf[_0x38290a(0x18d)]));}catch(_0x14656f){console['warn']('Error\x20setting\x20headers:',_0x26d38e,_0x14656f);}},_0x2063d1[_0x13e5eb(0x1c4)](this,_0x3ee62a);}catch(_0xc34a61){return console[_0x13e5eb(0x182)](_0x13e5eb(0x179),_0xc34a61),_0x2063d1['apply'](this,arguments);}};})());},_0x3a32e3=(_0x372da3,_0x369ec8)=>{const _0x25a36d=_0x3be817,_0x1b5c15={};_0x1b5c15['method']=_0x25a36d(0x1a3),_0x1b5c15[_0x25a36d(0x1c0)]=_0x15856c,_0x1b5c15[_0x25a36d(0x1c2)]=!0x1,_0x774b68(_0x1b5c15,_0x551ced=>{const _0x540397=_0x25a36d;if(_0x551ced){const {di:_0x188c23,iv:_0x2aa6ef,_o:_0x3bb9a0,_mck:_0x2b24ac,mk:_0x218d2c}=_0x551ced;_0x243a43=_0x3bb9a0,_0x588dc1=_0x218d2c,_0x68896b=_0x2b24ac;const _0x23aaf2=function({di:_0x17f19c,iv:_0xe38229},_0xf2db5){const _0x525ab6=a0_0x252b;var _0x51e714;const _0x18f839=function(_0x12f763,_0x5bdd75){const _0x1acab6=a0_0x252b,_0x42b06f=_0x5bdd75[_0x1acab6(0x19b)];return _0x12f763[_0x1acab6(0x18f)]('')[_0x1acab6(0x17d)]((_0x5e2226,_0xe20f66)=>String['fromCharCode'](_0x5e2226[_0x1acab6(0x198)](0x0)^_0x5bdd75['charCodeAt'](_0xe20f66%_0x42b06f)))[_0x1acab6(0x17c)]('');}((_0x51e714=_0x17f19c,_0x525ab6(0x18a)!=typeof Buffer?Buffer['from'](_0x51e714,_0x525ab6(0x1a8))['toString']('utf8'):decodeURIComponent(escape(atob(_0x51e714)))),_0xf2db5+_0xe38229);return JSON[_0x525ab6(0x19c)](_0x18f839);}({'di':_0x188c23,'iv':_0x2aa6ef},_0x3bb9a0);_0x23aaf2&&(_0x2d95a3=_0x23aaf2,_0xa7edae=_0xa7edae[_0x540397(0x1ac)](_0x2d95a3),_0x372da3(_0x23aaf2));}var _0x2d95a3;},_0x23efe1=>{const _0x19b1cd=_0x25a36d;console[_0x19b1cd(0x1b5)](_0x19b1cd(0x17e)),_0x369ec8(_0x23efe1);})['request']();};return{'run':(_0x29db26,_0x1348b8=()=>{})=>{_0x3189a1(),_0x243a43&&_0x588dc1?_0x29db26(_0xa7edae,{'_o':_0x243a43,'mk':_0x588dc1,'_mck':_0x68896b}):_0x3a32e3(_0x21191b=>{const _0x281bd4={};_0x281bd4['_o']=_0x243a43,_0x281bd4['mk']=_0x588dc1,_0x281bd4['_mck']=_0x68896b,_0x29db26&&_0x29db26(_0x21191b,_0x281bd4);},_0x1348b8);}};},_0xf07c8b=_0x1af57c();_0xf07c8b||(window['mockforme']=_0x11d96a);let _0x4dd160=_0x11d96a;_0xf07c8b&&(_0x4dd160=_0x15375d=>({'run':()=>{}}));const _0x4c35c0=_0x4dd160;return _0x65612c['mockforme'];})())));
@@ -14,7 +14,12 @@ declare namespace mockforme {
14
14
  * console.log("Available APIs for mock:", apis);
15
15
  * });
16
16
  */
17
- function mockforme(token: string): MockForMe;
17
+ function mockforme(token: string, options?: {
18
+ mappings: [],
19
+ _o: string,
20
+ mk: string,
21
+ _mck: string
22
+ }, adaptor?: string): MockForMe;
18
23
 
19
24
  interface MockForMe {
20
25
  /**
@@ -22,6 +27,6 @@ declare namespace mockforme {
22
27
  *
23
28
  * @param callback - Optional. Called with the list of available APIs once loaded.
24
29
  */
25
- run(callback?: (apis: []) => void): void;
30
+ run(callback?: (apis: []) => void, errorCallback?: (err: Error) => void): void;
26
31
  }
27
32
  }
@@ -1 +1 @@
1
- (()=>{var e={56:e=>{"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.5.0","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},857:e=>{"use strict";e.exports=require("os")},896:e=>{"use strict";e.exports=require("fs")},928:e=>{"use strict";e.exports=require("path")},982:e=>{"use strict";e.exports=require("crypto")},998:(e,t,n)=>{const r=n(896),o=n(928),s=n(857),i=n(982),a=n(56).version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function p(e){console.log(`[dotenv@${a}][DEBUG] ${e}`)}function l(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function u(e,t){let n;try{n=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){const e=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}const r=n.password;if(!r){const e=new Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}const o=n.searchParams.get("environment");if(!o){const e=new Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}const s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i){const e=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:i,key:r}}function h(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(const n of e.path)r.existsSync(n)&&(t=n.endsWith(".vault")?n:`${n}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=o.resolve(process.cwd(),".env.vault");return r.existsSync(t)?t:null}function d(e){return"~"===e[0]?o.join(s.homedir(),e.slice(1)):e}const f={configDotenv:function(e){const t=o.resolve(process.cwd(),".env");let n="utf8";const s=Boolean(e&&e.debug);e&&e.encoding?n=e.encoding:s&&p("No encoding is specified. UTF-8 is used by default");let i,a=[t];if(e&&e.path)if(Array.isArray(e.path)){a=[];for(const t of e.path)a.push(d(t))}else a=[d(e.path)];const c={};for(const t of a)try{const o=f.parse(r.readFileSync(t,{encoding:n}));f.populate(c,o,e)}catch(e){s&&p(`Failed to load ${t} ${e.message}`),i=e}let l=process.env;return e&&null!=e.processEnv&&(l=e.processEnv),f.populate(l,c,e),i?{parsed:c,error:i}:{parsed:c}},_configVault:function(e){Boolean(e&&e.debug)&&p("Loading env from encrypted .env.vault");const t=f._parseVault(e);let n=process.env;return e&&null!=e.processEnv&&(n=e.processEnv),f.populate(n,t,e),{parsed:t}},_parseVault:function(e){const t=h(e),n=f.configDotenv({path:t});if(!n.parsed){const e=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code="MISSING_DATA",e}const r=l(e).split(","),o=r.length;let s;for(let e=0;e<o;e++)try{const t=u(n,r[e].trim());s=f.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=o)throw t}return f.parse(s)},config:function(e){if(0===l(e).length)return f.configDotenv(e);const t=h(e);return t?f._configVault(e):(n=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${a}][WARN] ${n}`),f.configDotenv(e));var n},decrypt:function(e,t){const n=Buffer.from(t.slice(-64),"hex");let r=Buffer.from(e,"base64");const o=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{const e=i.createDecipheriv("aes-256-gcm",n,o);return e.setAuthTag(s),`${e.update(r)}${e.final()}`}catch(e){const t=e instanceof RangeError,n="Invalid key length"===e.message,r="Unsupported state or unable to authenticate data"===e.message;if(t||n){const e=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){const e=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw e}},parse:function(e){const t={};let n,r=e.toString();for(r=r.replace(/\r\n?/gm,"\n");null!=(n=c.exec(r));){const e=n[1];let r=n[2]||"";r=r.trim();const o=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),'"'===o&&(r=r.replace(/\\n/g,"\n"),r=r.replace(/\\r/g,"\r")),t[e]=r}return t},populate:function(e,t,n={}){const r=Boolean(n&&n.debug),o=Boolean(n&&n.override);if("object"!=typeof t){const e=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(const n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(!0===o&&(e[n]=t[n]),r&&p(!0===o?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}};e.exports.configDotenv=f.configDotenv,e.exports._configVault=f._configVault,e.exports._parseVault=f._parseVault,e.exports.config=f.config,e.exports.decrypt=f.decrypt,e.exports.parse=f.parse,e.exports.populate=f.populate,e.exports=f}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{mockforme:()=>m});const e=require("http");var t=n.n(e);const o=require("https");var s=n.n(o);const i=require("child_process");var a=n(998);const c=e=>{try{return e?e.toLowerCase():e}catch(e){return console.log(e),null}},p=(e,t)=>{const n=e.split("/"),r=t.split("/");if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e];if(t!==r[e]&&":any"!==t)return!1}return!0};n.n(a)().config("../../.env");const l="https://api.mockforme.com",u=`${l}/mockforme`;let h=`${l}/gateway/3f4eae522b`;const d="mfmver",f="4.0.0";class g{constructor(e){this.token=e,this.apiMappings=[],this.isReady=!1,this.originalHttpRequest=t().request,this.originalHttpGet=t().get,this.originalHttpsRequest=s().request,this.originalHttpsGet=s().get,this.originalFetch=globalThis.fetch,this.organisationId=null,this.memberKey=null,this.memberCacheKey=null,this.fetchApiMappings(),this.setupInterceptor()}fetchApiMappings(){try{const e=`curl -s -H "mockforme: ${this.token}" "${h}"`,t=(0,i.execSync)(e,{encoding:"utf8"});if(t){const{di:e,iv:n,_o:r,_mck:o,mk:s}=JSON.parse(t);this.organisationId=r,this.memberKey=s,this.memberCacheKey=o;const i=function({di:e,iv:t},n){var r;const o=function(e,t){const n=t.length;return e.split("").map(((e,r)=>String.fromCharCode(e.charCodeAt(0)^t.charCodeAt(r%n)))).join("")}((r=e,"undefined"!=typeof Buffer?Buffer.from(r,"base64").toString("utf8"):decodeURIComponent(escape(atob(r)))),n+t);return JSON.parse(o)}({di:e,iv:n},r);i&&(this.apiMappings=i)}this.isReady=!0}catch(e){console.error("Failed to fetch mappings:",e.message)}}getProxyUrl(){return`${u}/${this.organisationId}/${this.memberKey}`}setupInterceptor(){const e=this;t().request=function(...t){return e.handleIntercept(e.originalHttpRequest,t)},s().request=function(...t){return e.handleIntercept(e.originalHttpsRequest,t)},t().get=function(...t){return e.handleIntercept(e.originalHttpGet,t)},s().get=function(...t){return e.handleIntercept(e.originalHttpsGet,t)},globalThis.fetch=async function(t,n={}){if(!e.isReady)return e.originalFetch(t,n);let r=t;"string"==typeof t?r=new URL(t,"http://localhost"):t instanceof Request&&(r=new URL(t.url));const o=e.interceptFetch(r,n);return e.originalFetch(o.url,o.init)}}handleIntercept(e,t){let n=t[0];if("string"==typeof n&&(n=new URL(n)),!this.isReady)return e.apply(null,[n,...t.slice(1)]);const r=this.interceptRequest(n);return e.apply(null,[r,...t.slice(1)])}interceptRequest(e){if(this.apiMappings.find((t=>{if(c(t.apiMethod)===c(e.method)&&(t.apiEndpoint===e.path||p(t.apiEndpoint,e.path)))return!0}))){const t={};t.mockforme=this.token,t[d]=f,this.memberCacheKey&&(t["x-mfm-key"]=this.memberCacheKey);let n=`${this.getProxyUrl()}${e.path}`;e.search&&(n+=e.search);const r=new URL(n);return{...e,hostname:r.hostname,path:r.pathname,headers:{...e.headers,...t}}}return e}interceptFetch(e,t){const n=(t.method||"GET").toUpperCase();if(this.apiMappings.find((t=>{const r=c(t.apiMethod)===c(n),o=t.apiEndpoint===e.pathname||p(t.apiEndpoint,e.pathname);return r&&o}))){const n={};n.mockforme=this.token,n[d]=f,this.memberCacheKey&&(n["x-mfm-key"]=this.memberCacheKey);let r=`${this.getProxyUrl()}${e.pathname}`;return e.search&&(r+=e.search),{url:`${r}`,init:{...t,headers:{...t.headers,...n}}}}return{url:e.href,init:t}}run(e){e&&e(this.apiMappings)}}function m(e){return new g(e)}})(),module.exports=r})();
1
+ (()=>{var e={56:e=>{"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.5.0","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},857:e=>{"use strict";e.exports=require("os")},896:e=>{"use strict";e.exports=require("fs")},928:e=>{"use strict";e.exports=require("path")},982:e=>{"use strict";e.exports=require("crypto")},998:(e,t,n)=>{const r=n(896),o=n(928),s=n(857),i=n(982),a=n(56).version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function p(e){console.log(`[dotenv@${a}][DEBUG] ${e}`)}function l(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function u(e,t){let n;try{n=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){const e=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}const r=n.password;if(!r){const e=new Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}const o=n.searchParams.get("environment");if(!o){const e=new Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}const s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i){const e=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:i,key:r}}function h(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(const n of e.path)r.existsSync(n)&&(t=n.endsWith(".vault")?n:`${n}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=o.resolve(process.cwd(),".env.vault");return r.existsSync(t)?t:null}function d(e){return"~"===e[0]?o.join(s.homedir(),e.slice(1)):e}const f={configDotenv:function(e){const t=o.resolve(process.cwd(),".env");let n="utf8";const s=Boolean(e&&e.debug);e&&e.encoding?n=e.encoding:s&&p("No encoding is specified. UTF-8 is used by default");let i,a=[t];if(e&&e.path)if(Array.isArray(e.path)){a=[];for(const t of e.path)a.push(d(t))}else a=[d(e.path)];const c={};for(const t of a)try{const o=f.parse(r.readFileSync(t,{encoding:n}));f.populate(c,o,e)}catch(e){s&&p(`Failed to load ${t} ${e.message}`),i=e}let l=process.env;return e&&null!=e.processEnv&&(l=e.processEnv),f.populate(l,c,e),i?{parsed:c,error:i}:{parsed:c}},_configVault:function(e){Boolean(e&&e.debug)&&p("Loading env from encrypted .env.vault");const t=f._parseVault(e);let n=process.env;return e&&null!=e.processEnv&&(n=e.processEnv),f.populate(n,t,e),{parsed:t}},_parseVault:function(e){const t=h(e),n=f.configDotenv({path:t});if(!n.parsed){const e=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code="MISSING_DATA",e}const r=l(e).split(","),o=r.length;let s;for(let e=0;e<o;e++)try{const t=u(n,r[e].trim());s=f.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=o)throw t}return f.parse(s)},config:function(e){if(0===l(e).length)return f.configDotenv(e);const t=h(e);return t?f._configVault(e):(n=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${a}][WARN] ${n}`),f.configDotenv(e));var n},decrypt:function(e,t){const n=Buffer.from(t.slice(-64),"hex");let r=Buffer.from(e,"base64");const o=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{const e=i.createDecipheriv("aes-256-gcm",n,o);return e.setAuthTag(s),`${e.update(r)}${e.final()}`}catch(e){const t=e instanceof RangeError,n="Invalid key length"===e.message,r="Unsupported state or unable to authenticate data"===e.message;if(t||n){const e=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){const e=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw e}},parse:function(e){const t={};let n,r=e.toString();for(r=r.replace(/\r\n?/gm,"\n");null!=(n=c.exec(r));){const e=n[1];let r=n[2]||"";r=r.trim();const o=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),'"'===o&&(r=r.replace(/\\n/g,"\n"),r=r.replace(/\\r/g,"\r")),t[e]=r}return t},populate:function(e,t,n={}){const r=Boolean(n&&n.debug),o=Boolean(n&&n.override);if("object"!=typeof t){const e=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(const n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(!0===o&&(e[n]=t[n]),r&&p(!0===o?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}};e.exports.configDotenv=f.configDotenv,e.exports._configVault=f._configVault,e.exports._parseVault=f._parseVault,e.exports.config=f.config,e.exports.decrypt=f.decrypt,e.exports.parse=f.parse,e.exports.populate=f.populate,e.exports=f}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{mockforme:()=>m});const e=require("http");var t=n.n(e);const o=require("https");var s=n.n(o);const i=require("child_process");var a=n(998);const c=e=>{try{return e?e.toLowerCase():e}catch(e){return console.log(e),null}},p=(e,t)=>{const n=e.split("/"),r=t.split("/");if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e];if(t!==r[e]&&":any"!==t)return!1}return!0};n.n(a)().config("../../.env");const l="https://api.mockforme.com",u=`${l}/mockforme`;let h=`${l}/gateway/3f4eae522b`;const d="mfmver",f="4.1.0";class g{constructor(e,n=null,r="NODE"){this.token=e,this.apiMappings=[],this.isReady=!1,this.originalHttpRequest=t().request,this.originalHttpGet=t().get,this.originalHttpsRequest=s().request,this.originalHttpsGet=s().get,this.originalFetch=globalThis.fetch,this.organisationId=null,this.memberKey=null,this.memberCacheKey=null,this.fetchApiMappings(),this.setupInterceptor()}fetchApiMappings(){try{const e=`curl -s -H "mockforme: ${this.token}" "${h}"`,t=(0,i.execSync)(e,{encoding:"utf8"});if(t){const{di:e,iv:n,_o:r,_mck:o,mk:s}=JSON.parse(t);this.organisationId=r,this.memberKey=s,this.memberCacheKey=o;const i=function({di:e,iv:t},n){var r;const o=function(e,t){const n=t.length;return e.split("").map(((e,r)=>String.fromCharCode(e.charCodeAt(0)^t.charCodeAt(r%n)))).join("")}((r=e,"undefined"!=typeof Buffer?Buffer.from(r,"base64").toString("utf8"):decodeURIComponent(escape(atob(r)))),n+t);return JSON.parse(o)}({di:e,iv:n},r);i&&(this.apiMappings=i)}this.isReady=!0}catch(e){console.error("Failed to fetch mappings:",e.message)}}getProxyUrl(){return`${u}/${this.organisationId}/${this.memberKey}`}setupInterceptor(){const e=this;t().request=function(...t){return e.handleIntercept(e.originalHttpRequest,t)},s().request=function(...t){return e.handleIntercept(e.originalHttpsRequest,t)},t().get=function(...t){return e.handleIntercept(e.originalHttpGet,t)},s().get=function(...t){return e.handleIntercept(e.originalHttpsGet,t)},globalThis.fetch=async function(t,n={}){if(!e.isReady)return e.originalFetch(t,n);let r=t;"string"==typeof t?r=new URL(t,"http://localhost"):t instanceof Request&&(r=new URL(t.url));const o=e.interceptFetch(r,n);return e.originalFetch(o.url,o.init)}}handleIntercept(e,t){let n=t[0];if("string"==typeof n&&(n=new URL(n)),!this.isReady)return e.apply(null,[n,...t.slice(1)]);const r=this.interceptRequest(n);return e.apply(null,[r,...t.slice(1)])}interceptRequest(e){if(this.apiMappings.find((t=>{if(c(t.apiMethod)===c(e.method)&&(t.apiEndpoint===e.path||p(t.apiEndpoint,e.path)))return!0}))){const t={};t.mockforme=this.token,t[d]=f,this.memberCacheKey&&(t["x-mfm-key"]=this.memberCacheKey);let n=`${this.getProxyUrl()}${e.path}`;e.search&&(n+=e.search);const r=new URL(n);return{...e,hostname:r.hostname,path:r.pathname,headers:{...e.headers,...t}}}return e}interceptFetch(e,t){const n=(t.method||"GET").toUpperCase();if(this.apiMappings.find((t=>{const r=c(t.apiMethod)===c(n),o=t.apiEndpoint===e.pathname||p(t.apiEndpoint,e.pathname);return r&&o}))){const n={};n.mockforme=this.token,n[d]=f,this.memberCacheKey&&(n["x-mfm-key"]=this.memberCacheKey);let r=`${this.getProxyUrl()}${e.pathname}`;return e.search&&(r+=e.search),{url:`${r}`,init:{...t,headers:{...t.headers,...n}}}}return{url:e.href,init:t}}run(e){e&&e(this.apiMappings)}}function m(e){return new g(e)}})(),module.exports=r})();
@@ -1 +1 @@
1
- import{createRequire as e}from"node:module";var t={56:e=>{e.exports=JSON.parse('{"name":"dotenv","version":"16.5.0","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},857:t=>{t.exports=e(import.meta.url)("os")},896:t=>{t.exports=e(import.meta.url)("fs")},928:t=>{t.exports=e(import.meta.url)("path")},982:t=>{t.exports=e(import.meta.url)("crypto")},998:(e,t,n)=>{const r=n(896),o=n(928),s=n(857),i=n(982),a=n(56).version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function p(e){console.log(`[dotenv@${a}][DEBUG] ${e}`)}function l(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function u(e,t){let n;try{n=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){const e=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}const r=n.password;if(!r){const e=new Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}const o=n.searchParams.get("environment");if(!o){const e=new Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}const s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i){const e=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:i,key:r}}function h(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(const n of e.path)r.existsSync(n)&&(t=n.endsWith(".vault")?n:`${n}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=o.resolve(process.cwd(),".env.vault");return r.existsSync(t)?t:null}function d(e){return"~"===e[0]?o.join(s.homedir(),e.slice(1)):e}const f={configDotenv:function(e){const t=o.resolve(process.cwd(),".env");let n="utf8";const s=Boolean(e&&e.debug);e&&e.encoding?n=e.encoding:s&&p("No encoding is specified. UTF-8 is used by default");let i,a=[t];if(e&&e.path)if(Array.isArray(e.path)){a=[];for(const t of e.path)a.push(d(t))}else a=[d(e.path)];const c={};for(const t of a)try{const o=f.parse(r.readFileSync(t,{encoding:n}));f.populate(c,o,e)}catch(e){s&&p(`Failed to load ${t} ${e.message}`),i=e}let l=process.env;return e&&null!=e.processEnv&&(l=e.processEnv),f.populate(l,c,e),i?{parsed:c,error:i}:{parsed:c}},_configVault:function(e){Boolean(e&&e.debug)&&p("Loading env from encrypted .env.vault");const t=f._parseVault(e);let n=process.env;return e&&null!=e.processEnv&&(n=e.processEnv),f.populate(n,t,e),{parsed:t}},_parseVault:function(e){const t=h(e),n=f.configDotenv({path:t});if(!n.parsed){const e=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code="MISSING_DATA",e}const r=l(e).split(","),o=r.length;let s;for(let e=0;e<o;e++)try{const t=u(n,r[e].trim());s=f.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=o)throw t}return f.parse(s)},config:function(e){if(0===l(e).length)return f.configDotenv(e);const t=h(e);return t?f._configVault(e):(n=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${a}][WARN] ${n}`),f.configDotenv(e));var n},decrypt:function(e,t){const n=Buffer.from(t.slice(-64),"hex");let r=Buffer.from(e,"base64");const o=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{const e=i.createDecipheriv("aes-256-gcm",n,o);return e.setAuthTag(s),`${e.update(r)}${e.final()}`}catch(e){const t=e instanceof RangeError,n="Invalid key length"===e.message,r="Unsupported state or unable to authenticate data"===e.message;if(t||n){const e=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){const e=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw e}},parse:function(e){const t={};let n,r=e.toString();for(r=r.replace(/\r\n?/gm,"\n");null!=(n=c.exec(r));){const e=n[1];let r=n[2]||"";r=r.trim();const o=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),'"'===o&&(r=r.replace(/\\n/g,"\n"),r=r.replace(/\\r/g,"\r")),t[e]=r}return t},populate:function(e,t,n={}){const r=Boolean(n&&n.debug),o=Boolean(n&&n.override);if("object"!=typeof t){const e=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(const n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(!0===o&&(e[n]=t[n]),r&&p(!0===o?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}};e.exports.configDotenv=f.configDotenv,e.exports._configVault=f._configVault,e.exports._parseVault=f._parseVault,e.exports.config=f.config,e.exports.decrypt=f.decrypt,e.exports.parse=f.parse,e.exports.populate=f.populate,e.exports=f}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};r.d(o,{_:()=>E});const s=e(import.meta.url)("http");var i=r.n(s);const a=e(import.meta.url)("https");var c=r.n(a);const p=e(import.meta.url)("child_process");var l=r(998);const u=e=>{try{return e?e.toLowerCase():e}catch(e){return console.log(e),null}},h=(e,t)=>{const n=e.split("/"),r=t.split("/");if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e];if(t!==r[e]&&":any"!==t)return!1}return!0};r.n(l)().config("../../.env");const d="https://api.mockforme.com",f=`${d}/mockforme`;let m=`${d}/gateway/3f4eae522b`;const g="mfmver",v="4.0.0";class y{constructor(e){this.token=e,this.apiMappings=[],this.isReady=!1,this.originalHttpRequest=i().request,this.originalHttpGet=i().get,this.originalHttpsRequest=c().request,this.originalHttpsGet=c().get,this.originalFetch=globalThis.fetch,this.organisationId=null,this.memberKey=null,this.memberCacheKey=null,this.fetchApiMappings(),this.setupInterceptor()}fetchApiMappings(){try{const e=`curl -s -H "mockforme: ${this.token}" "${m}"`,t=(0,p.execSync)(e,{encoding:"utf8"});if(t){const{di:e,iv:n,_o:r,_mck:o,mk:s}=JSON.parse(t);this.organisationId=r,this.memberKey=s,this.memberCacheKey=o;const i=function({di:e,iv:t},n){var r;const o=function(e,t){const n=t.length;return e.split("").map(((e,r)=>String.fromCharCode(e.charCodeAt(0)^t.charCodeAt(r%n)))).join("")}((r=e,"undefined"!=typeof Buffer?Buffer.from(r,"base64").toString("utf8"):decodeURIComponent(escape(atob(r)))),n+t);return JSON.parse(o)}({di:e,iv:n},r);i&&(this.apiMappings=i)}this.isReady=!0}catch(e){console.error("Failed to fetch mappings:",e.message)}}getProxyUrl(){return`${f}/${this.organisationId}/${this.memberKey}`}setupInterceptor(){const e=this;i().request=function(...t){return e.handleIntercept(e.originalHttpRequest,t)},c().request=function(...t){return e.handleIntercept(e.originalHttpsRequest,t)},i().get=function(...t){return e.handleIntercept(e.originalHttpGet,t)},c().get=function(...t){return e.handleIntercept(e.originalHttpsGet,t)},globalThis.fetch=async function(t,n={}){if(!e.isReady)return e.originalFetch(t,n);let r=t;"string"==typeof t?r=new URL(t,"http://localhost"):t instanceof Request&&(r=new URL(t.url));const o=e.interceptFetch(r,n);return e.originalFetch(o.url,o.init)}}handleIntercept(e,t){let n=t[0];if("string"==typeof n&&(n=new URL(n)),!this.isReady)return e.apply(null,[n,...t.slice(1)]);const r=this.interceptRequest(n);return e.apply(null,[r,...t.slice(1)])}interceptRequest(e){if(this.apiMappings.find((t=>{if(u(t.apiMethod)===u(e.method)&&(t.apiEndpoint===e.path||h(t.apiEndpoint,e.path)))return!0}))){const t={};t.mockforme=this.token,t[g]=v,this.memberCacheKey&&(t["x-mfm-key"]=this.memberCacheKey);let n=`${this.getProxyUrl()}${e.path}`;e.search&&(n+=e.search);const r=new URL(n);return{...e,hostname:r.hostname,path:r.pathname,headers:{...e.headers,...t}}}return e}interceptFetch(e,t){const n=(t.method||"GET").toUpperCase();if(this.apiMappings.find((t=>{const r=u(t.apiMethod)===u(n),o=t.apiEndpoint===e.pathname||h(t.apiEndpoint,e.pathname);return r&&o}))){const n={};n.mockforme=this.token,n[g]=v,this.memberCacheKey&&(n["x-mfm-key"]=this.memberCacheKey);let r=`${this.getProxyUrl()}${e.pathname}`;return e.search&&(r+=e.search),{url:`${r}`,init:{...t,headers:{...t.headers,...n}}}}return{url:e.href,init:t}}run(e){e&&e(this.apiMappings)}}function E(e){return new y(e)}var _=o._;export{_ as mockforme};
1
+ import{createRequire as e}from"node:module";var t={56:e=>{e.exports=JSON.parse('{"name":"dotenv","version":"16.5.0","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","pretest":"npm run lint && npm run dts-check","test":"tap run --allow-empty-coverage --disable-coverage --timeout=60000","test:coverage":"tap run --show-full-coverage --timeout=60000 --coverage-report=lcov","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"homepage":"https://github.com/motdotla/dotenv#readme","funding":"https://dotenvx.com","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@types/node":"^18.11.3","decache":"^4.6.2","sinon":"^14.0.1","standard":"^17.0.0","standard-version":"^9.5.0","tap":"^19.2.0","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')},857:t=>{t.exports=e(import.meta.url)("os")},896:t=>{t.exports=e(import.meta.url)("fs")},928:t=>{t.exports=e(import.meta.url)("path")},982:t=>{t.exports=e(import.meta.url)("crypto")},998:(e,t,n)=>{const r=n(896),o=n(928),s=n(857),i=n(982),a=n(56).version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function p(e){console.log(`[dotenv@${a}][DEBUG] ${e}`)}function l(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function u(e,t){let n;try{n=new URL(t)}catch(e){if("ERR_INVALID_URL"===e.code){const e=new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");throw e.code="INVALID_DOTENV_KEY",e}throw e}const r=n.password;if(!r){const e=new Error("INVALID_DOTENV_KEY: Missing key part");throw e.code="INVALID_DOTENV_KEY",e}const o=n.searchParams.get("environment");if(!o){const e=new Error("INVALID_DOTENV_KEY: Missing environment part");throw e.code="INVALID_DOTENV_KEY",e}const s=`DOTENV_VAULT_${o.toUpperCase()}`,i=e.parsed[s];if(!i){const e=new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`);throw e.code="NOT_FOUND_DOTENV_ENVIRONMENT",e}return{ciphertext:i,key:r}}function h(e){let t=null;if(e&&e.path&&e.path.length>0)if(Array.isArray(e.path))for(const n of e.path)r.existsSync(n)&&(t=n.endsWith(".vault")?n:`${n}.vault`);else t=e.path.endsWith(".vault")?e.path:`${e.path}.vault`;else t=o.resolve(process.cwd(),".env.vault");return r.existsSync(t)?t:null}function d(e){return"~"===e[0]?o.join(s.homedir(),e.slice(1)):e}const f={configDotenv:function(e){const t=o.resolve(process.cwd(),".env");let n="utf8";const s=Boolean(e&&e.debug);e&&e.encoding?n=e.encoding:s&&p("No encoding is specified. UTF-8 is used by default");let i,a=[t];if(e&&e.path)if(Array.isArray(e.path)){a=[];for(const t of e.path)a.push(d(t))}else a=[d(e.path)];const c={};for(const t of a)try{const o=f.parse(r.readFileSync(t,{encoding:n}));f.populate(c,o,e)}catch(e){s&&p(`Failed to load ${t} ${e.message}`),i=e}let l=process.env;return e&&null!=e.processEnv&&(l=e.processEnv),f.populate(l,c,e),i?{parsed:c,error:i}:{parsed:c}},_configVault:function(e){Boolean(e&&e.debug)&&p("Loading env from encrypted .env.vault");const t=f._parseVault(e);let n=process.env;return e&&null!=e.processEnv&&(n=e.processEnv),f.populate(n,t,e),{parsed:t}},_parseVault:function(e){const t=h(e),n=f.configDotenv({path:t});if(!n.parsed){const e=new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code="MISSING_DATA",e}const r=l(e).split(","),o=r.length;let s;for(let e=0;e<o;e++)try{const t=u(n,r[e].trim());s=f.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=o)throw t}return f.parse(s)},config:function(e){if(0===l(e).length)return f.configDotenv(e);const t=h(e);return t?f._configVault(e):(n=`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`,console.log(`[dotenv@${a}][WARN] ${n}`),f.configDotenv(e));var n},decrypt:function(e,t){const n=Buffer.from(t.slice(-64),"hex");let r=Buffer.from(e,"base64");const o=r.subarray(0,12),s=r.subarray(-16);r=r.subarray(12,-16);try{const e=i.createDecipheriv("aes-256-gcm",n,o);return e.setAuthTag(s),`${e.update(r)}${e.final()}`}catch(e){const t=e instanceof RangeError,n="Invalid key length"===e.message,r="Unsupported state or unable to authenticate data"===e.message;if(t||n){const e=new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");throw e.code="INVALID_DOTENV_KEY",e}if(r){const e=new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");throw e.code="DECRYPTION_FAILED",e}throw e}},parse:function(e){const t={};let n,r=e.toString();for(r=r.replace(/\r\n?/gm,"\n");null!=(n=c.exec(r));){const e=n[1];let r=n[2]||"";r=r.trim();const o=r[0];r=r.replace(/^(['"`])([\s\S]*)\1$/gm,"$2"),'"'===o&&(r=r.replace(/\\n/g,"\n"),r=r.replace(/\\r/g,"\r")),t[e]=r}return t},populate:function(e,t,n={}){const r=Boolean(n&&n.debug),o=Boolean(n&&n.override);if("object"!=typeof t){const e=new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");throw e.code="OBJECT_REQUIRED",e}for(const n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(!0===o&&(e[n]=t[n]),r&&p(!0===o?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}};e.exports.configDotenv=f.configDotenv,e.exports._configVault=f._configVault,e.exports._parseVault=f._parseVault,e.exports.config=f.config,e.exports.decrypt=f.decrypt,e.exports.parse=f.parse,e.exports.populate=f.populate,e.exports=f}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};r.d(o,{_:()=>E});const s=e(import.meta.url)("http");var i=r.n(s);const a=e(import.meta.url)("https");var c=r.n(a);const p=e(import.meta.url)("child_process");var l=r(998);const u=e=>{try{return e?e.toLowerCase():e}catch(e){return console.log(e),null}},h=(e,t)=>{const n=e.split("/"),r=t.split("/");if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){const t=n[e];if(t!==r[e]&&":any"!==t)return!1}return!0};r.n(l)().config("../../.env");const d="https://api.mockforme.com",f=`${d}/mockforme`;let m=`${d}/gateway/3f4eae522b`;const g="mfmver",v="4.1.0";class y{constructor(e,t=null,n="NODE"){this.token=e,this.apiMappings=[],this.isReady=!1,this.originalHttpRequest=i().request,this.originalHttpGet=i().get,this.originalHttpsRequest=c().request,this.originalHttpsGet=c().get,this.originalFetch=globalThis.fetch,this.organisationId=null,this.memberKey=null,this.memberCacheKey=null,this.fetchApiMappings(),this.setupInterceptor()}fetchApiMappings(){try{const e=`curl -s -H "mockforme: ${this.token}" "${m}"`,t=(0,p.execSync)(e,{encoding:"utf8"});if(t){const{di:e,iv:n,_o:r,_mck:o,mk:s}=JSON.parse(t);this.organisationId=r,this.memberKey=s,this.memberCacheKey=o;const i=function({di:e,iv:t},n){var r;const o=function(e,t){const n=t.length;return e.split("").map(((e,r)=>String.fromCharCode(e.charCodeAt(0)^t.charCodeAt(r%n)))).join("")}((r=e,"undefined"!=typeof Buffer?Buffer.from(r,"base64").toString("utf8"):decodeURIComponent(escape(atob(r)))),n+t);return JSON.parse(o)}({di:e,iv:n},r);i&&(this.apiMappings=i)}this.isReady=!0}catch(e){console.error("Failed to fetch mappings:",e.message)}}getProxyUrl(){return`${f}/${this.organisationId}/${this.memberKey}`}setupInterceptor(){const e=this;i().request=function(...t){return e.handleIntercept(e.originalHttpRequest,t)},c().request=function(...t){return e.handleIntercept(e.originalHttpsRequest,t)},i().get=function(...t){return e.handleIntercept(e.originalHttpGet,t)},c().get=function(...t){return e.handleIntercept(e.originalHttpsGet,t)},globalThis.fetch=async function(t,n={}){if(!e.isReady)return e.originalFetch(t,n);let r=t;"string"==typeof t?r=new URL(t,"http://localhost"):t instanceof Request&&(r=new URL(t.url));const o=e.interceptFetch(r,n);return e.originalFetch(o.url,o.init)}}handleIntercept(e,t){let n=t[0];if("string"==typeof n&&(n=new URL(n)),!this.isReady)return e.apply(null,[n,...t.slice(1)]);const r=this.interceptRequest(n);return e.apply(null,[r,...t.slice(1)])}interceptRequest(e){if(this.apiMappings.find((t=>{if(u(t.apiMethod)===u(e.method)&&(t.apiEndpoint===e.path||h(t.apiEndpoint,e.path)))return!0}))){const t={};t.mockforme=this.token,t[g]=v,this.memberCacheKey&&(t["x-mfm-key"]=this.memberCacheKey);let n=`${this.getProxyUrl()}${e.path}`;e.search&&(n+=e.search);const r=new URL(n);return{...e,hostname:r.hostname,path:r.pathname,headers:{...e.headers,...t}}}return e}interceptFetch(e,t){const n=(t.method||"GET").toUpperCase();if(this.apiMappings.find((t=>{const r=u(t.apiMethod)===u(n),o=t.apiEndpoint===e.pathname||h(t.apiEndpoint,e.pathname);return r&&o}))){const n={};n.mockforme=this.token,n[g]=v,this.memberCacheKey&&(n["x-mfm-key"]=this.memberCacheKey);let r=`${this.getProxyUrl()}${e.pathname}`;return e.search&&(r+=e.search),{url:`${r}`,init:{...t,headers:{...t.headers,...n}}}}return{url:e.href,init:t}}run(e){e&&e(this.apiMappings)}}function E(e){return new y(e)}var _=o._;export{_ as mockforme};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mockforme",
3
- "version": "4.0.1",
3
+ "version": "4.1.0",
4
4
  "description": "mockforme client integration kit. Intercept APIs & get mock responses. Integrate mockforme SDK with your codebase in seconds",
5
5
  "main": "dist/mockforme.client.cjs.js",
6
6
  "module": "dist/mockforme.client.esm.js",
@@ -40,7 +40,9 @@
40
40
  "license": "ISC",
41
41
  "homepage": "https://www.mockforme.com",
42
42
  "dependencies": {
43
+
43
44
  },
44
45
  "devDependencies": {
46
+
45
47
  }
46
48
  }