-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
2 lines (2 loc) · 56.4 KB
/
main.js
1
2
require("source-map-support/source-map-support.js").install(),module.exports=function(e){var t={};function __webpack_require__(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=e,__webpack_require__.c=t,__webpack_require__.d=function(e,t,r){__webpack_require__.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.t=function(e,t){if(1&t&&(e=__webpack_require__(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(__webpack_require__.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)__webpack_require__.d(r,n,function(t){return e[t]}.bind(null,n));return r},__webpack_require__.n=function(e){var t=e&&e.__esModule?function getDefault(){return e.default}:function getModuleExports(){return e};return __webpack_require__.d(t,"a",t),t},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=19)}([function(e,t){e.exports=require("electron")},function(e,t){e.exports=require("path")},function(e,t,r){"use strict";var n=r(6),o=Object.prototype.toString;function isArray(e){return"[object Array]"===o.call(e)}function isUndefined(e){return void 0===e}function isObject(e){return null!==e&&"object"==typeof e}function isPlainObject(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function isFunction(e){return"[object Function]"===o.call(e)}function forEach(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),isArray(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}e.exports={isArray:isArray,isArrayBuffer:function isArrayBuffer(e){return"[object ArrayBuffer]"===o.call(e)},isBuffer:function isBuffer(e){return null!==e&&!isUndefined(e)&&null!==e.constructor&&!isUndefined(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function isFormData(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function isArrayBufferView(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function isString(e){return"string"==typeof e},isNumber:function isNumber(e){return"number"==typeof e},isObject:isObject,isPlainObject:isPlainObject,isUndefined:isUndefined,isDate:function isDate(e){return"[object Date]"===o.call(e)},isFile:function isFile(e){return"[object File]"===o.call(e)},isBlob:function isBlob(e){return"[object Blob]"===o.call(e)},isFunction:isFunction,isStream:function isStream(e){return isObject(e)&&isFunction(e.pipe)},isURLSearchParams:function isURLSearchParams(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function isStandardBrowserEnv(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:forEach,merge:function merge(){var e={};function assignValue(t,r){isPlainObject(e[r])&&isPlainObject(t)?e[r]=merge(e[r],t):isPlainObject(t)?e[r]=merge({},t):isArray(t)?e[r]=t.slice():e[r]=t}for(var t=0,r=arguments.length;t<r;t++)forEach(arguments[t],assignValue);return e},extend:function extend(e,t,r){return forEach(t,(function assignValue(t,o){e[o]=r&&"function"==typeof t?n(t,r):t})),e},trim:function trim(e){return e.replace(/^\s*/,"").replace(/\s*$/,"")},stripBOM:function stripBOM(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}}},function(e,t){e.exports=require("url")},function(e,t,r){"use strict";var n=r(2);function encode(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function buildURL(e,t,r){if(!t)return e;var o;if(r)o=r(t);else if(n.isURLSearchParams(t))o=t.toString();else{var s=[];n.forEach(t,(function serialize(e,t){null!=e&&(n.isArray(e)?t+="[]":e=[e],n.forEach(e,(function parseValue(e){n.isDate(e)?e=e.toISOString():n.isObject(e)&&(e=JSON.stringify(e)),s.push(encode(t)+"="+encode(e))})))})),o=s.join("&")}if(o){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+o}return e}},function(e,t,r){"use strict";var n=r(10);e.exports=function createError(e,t,r,o,s){var a=new Error(e);return n(a,t,r,o,s)}},function(e,t,r){"use strict";e.exports=function bind(e,t){return function wrap(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}}},function(e,t,r){"use strict";e.exports=function isCancel(e){return!(!e||!e.__CANCEL__)}},function(e,t,r){"use strict";var n=r(2),o=r(29),s={"Content-Type":"application/x-www-form-urlencoded"};function setContentTypeIfUnset(e,t){!n.isUndefined(e)&&n.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var a={adapter:function getDefaultAdapter(){var e;return"undefined"!=typeof XMLHttpRequest?e=r(30):"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(e=r(36)),e}(),transformRequest:[function transformRequest(e,t){return o(t,"Accept"),o(t,"Content-Type"),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(setContentTypeIfUnset(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):n.isObject(e)?(setContentTypeIfUnset(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function transformResponse(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};n.forEach(["delete","get","head"],(function forEachMethodNoData(e){a.headers[e]={}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){a.headers[e]=n.merge(s)})),e.exports=a},function(e,t,r){"use strict";var n=r(5);e.exports=function settle(e,t,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?t(n("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}},function(e,t,r){"use strict";e.exports=function enhanceError(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,r){"use strict";var n=r(32),o=r(33);e.exports=function buildFullPath(e,t){return e&&!n(t)?o(e,t):t}},function(e,t){e.exports=require("http")},function(e,t){e.exports=require("https")},function(e,t,r){var n=r(3),o=n.URL,s=r(12),a=r(13),i=r(37).Writable,c=r(38),l=r(39),u=Object.create(null);["abort","aborted","connect","error","socket","timeout"].forEach((function(e){u[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var p=createErrorType("ERR_FR_REDIRECTION_FAILURE",""),d=createErrorType("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),f=createErrorType("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),h=createErrorType("ERR_STREAM_WRITE_AFTER_END","write after end");function RedirectableRequest(e,t){i.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function startTimer(e,t){clearTimeout(e._timeout),e._timeout=setTimeout((function(){e.emit("timeout")}),t)}function clearTimer(){clearTimeout(this._timeout)}function wrap(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(s){var a=s+":",i=r[a]=e[s],u=t[s]=Object.create(i);u.request=function(e,s,i){if("string"==typeof e){var u=e;try{e=urlToOptions(new o(u))}catch(t){e=n.parse(u)}}else o&&e instanceof o?e=urlToOptions(e):(i=s,s=e,e={protocol:a});return"function"==typeof s&&(i=s,s=null),(s=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,s)).nativeProtocols=r,c.equal(s.protocol,a,"protocol mismatch"),l("options",s),new RedirectableRequest(s,i)},u.get=function(e,t,r){var n=u.request(e,t,r);return n.end(),n}})),t}function noop(){}function urlToOptions(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function removeMatchingHeaders(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return r}function createErrorType(e,t){function CustomError(e){Error.captureStackTrace(this,this.constructor),this.message=e||t}return CustomError.prototype=new Error,CustomError.prototype.constructor=CustomError,CustomError.prototype.name="Error ["+e+"]",CustomError.prototype.code=e,CustomError}RedirectableRequest.prototype=Object.create(i.prototype),RedirectableRequest.prototype.write=function(e,t,r){if(this._ending)throw new h;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new f),this.abort()):r&&r()},RedirectableRequest.prototype.end=function(e,t,r){if("function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},RedirectableRequest.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},RedirectableRequest.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},RedirectableRequest.prototype.setTimeout=function(e,t){if(t&&this.once("timeout",t),this.socket)startTimer(this,e);else{var r=this;this._currentRequest.once("socket",(function(){startTimer(r,e)}))}return this.once("response",clearTimer),this.once("error",clearTimer),this},["abort","flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){RedirectableRequest.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(RedirectableRequest.prototype,e,{get:function(){return this._currentRequest[e]}})})),RedirectableRequest.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},RedirectableRequest.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var o=this._currentRequest=t.request(this._options,this._onNativeResponse);for(var s in this._currentUrl=n.format(this._options),o._redirectable=this,u)s&&o.on(s,u[s]);if(this._isRedirect){var a=0,i=this,c=this._requestBodyBuffers;!function writeNext(e){if(o===i._currentRequest)if(e)i.emit("error",e);else if(a<c.length){var t=c[a++];o.finished||o.write(t.data,t.encoding,writeNext)}else i._ended&&o.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},RedirectableRequest.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(r&&!1!==this._options.followRedirects&&t>=300&&t<400){if(this._currentRequest.removeAllListeners(),this._currentRequest.on("error",noop),this._currentRequest.abort(),e.destroy(),++this._redirectCount>this._options.maxRedirects)return void this.emit("error",new d);((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],removeMatchingHeaders(/^content-/i,this._options.headers));var o=removeMatchingHeaders(/^host$/i,this._options.headers)||n.parse(this._currentUrl).hostname,s=n.resolve(this._currentUrl,r);l("redirecting to",s),this._isRedirect=!0;var a=n.parse(s);if(Object.assign(this._options,a),a.hostname!==o&&removeMatchingHeaders(/^authorization$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){try{this._options.beforeRedirect.call(null,this._options)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){var i=new p("Redirected request failed: "+e.message);i.cause=e,this.emit("error",i)}}else e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[]},e.exports=wrap({http:s,https:a}),e.exports.wrap=wrap},function(e,t,r){e.exports=function setup(e){function selectColor(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return createDebug.colors[Math.abs(t)%createDebug.colors.length]}function createDebug(e){let t;function debug(...e){if(!debug.enabled)return;const r=debug,n=Number(new Date),o=n-(t||n);r.diff=o,r.prev=t,r.curr=n,t=n,e[0]=createDebug.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,n)=>{if("%%"===t)return t;s++;const o=createDebug.formatters[n];if("function"==typeof o){const n=e[s];t=o.call(r,n),e.splice(s,1),s--}return t}),createDebug.formatArgs.call(r,e);(r.log||createDebug.log).apply(r,e)}return debug.namespace=e,debug.enabled=createDebug.enabled(e),debug.useColors=createDebug.useColors(),debug.color=selectColor(e),debug.destroy=destroy,debug.extend=extend,"function"==typeof createDebug.init&&createDebug.init(debug),createDebug.instances.push(debug),debug}function destroy(){const e=createDebug.instances.indexOf(this);return-1!==e&&(createDebug.instances.splice(e,1),!0)}function extend(e,t){const r=createDebug(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){if(e instanceof Error)return e.stack||e.message;return e},createDebug.disable=function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map(e=>"-"+e)].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){let t;createDebug.save(e),createDebug.names=[],createDebug.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?createDebug.skips.push(new RegExp("^"+e.substr(1)+"$")):createDebug.names.push(new RegExp("^"+e+"$")));for(t=0;t<createDebug.instances.length;t++){const e=createDebug.instances[t];e.enabled=createDebug.enabled(e.namespace)}},createDebug.enabled=function enabled(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=createDebug.skips.length;t<r;t++)if(createDebug.skips[t].test(e))return!1;for(t=0,r=createDebug.names.length;t<r;t++)if(createDebug.names[t].test(e))return!0;return!1},createDebug.humanize=r(42),Object.keys(e).forEach(t=>{createDebug[t]=e[t]}),createDebug.instances=[],createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=selectColor,createDebug.enable(createDebug.load()),createDebug}},function(e,t){e.exports=require("tty")},function(e,t,r){"use strict";var n=r(2);e.exports=function mergeConfig(e,t){t=t||{};var r={},o=["url","method","data"],s=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],i=["validateStatus"];function getMergedValue(e,t){return n.isPlainObject(e)&&n.isPlainObject(t)?n.merge(e,t):n.isPlainObject(t)?n.merge({},t):n.isArray(t)?t.slice():t}function mergeDeepProperties(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=getMergedValue(void 0,e[o])):r[o]=getMergedValue(e[o],t[o])}n.forEach(o,(function valueFromConfig2(e){n.isUndefined(t[e])||(r[e]=getMergedValue(void 0,t[e]))})),n.forEach(s,mergeDeepProperties),n.forEach(a,(function defaultToConfig2(o){n.isUndefined(t[o])?n.isUndefined(e[o])||(r[o]=getMergedValue(void 0,e[o])):r[o]=getMergedValue(void 0,t[o])})),n.forEach(i,(function merge(n){n in t?r[n]=getMergedValue(e[n],t[n]):n in e&&(r[n]=getMergedValue(void 0,e[n]))}));var c=o.concat(s).concat(a).concat(i),l=Object.keys(e).concat(Object.keys(t)).filter((function filterAxiosKeys(e){return-1===c.indexOf(e)}));return n.forEach(l,mergeDeepProperties),r}},function(e,t,r){"use strict";function Cancel(e){this.message=e}Cancel.prototype.toString=function toString(){return"Cancel"+(this.message?": "+this.message:"")},Cancel.prototype.__CANCEL__=!0,e.exports=Cancel},function(e,t,r){e.exports=r(20)},function(e,t,r){"use strict";r.r(t);var n=r(0),o=r(1),s=r.n(o),a=r(3);const{template:i}=r(21),c=r(22),l=r(23).default,{download:u}=r(53);var p=r(54).execSync,d=r(55);global.userDataPath=n.app.getPath("userData");global.reenableApp=!1;global.stagingBuild=!1;global.steamBuild=!0;const f=s.a.join(process.resourcesPath+"/src/static","img","icon","AppIcon.icns");let h=null;l.get("https://static-api.nkstatic.com/appdocs/18/appdocs/game_data").then(e=>{let t=Object.assign({},e.data),r={disableApp:t.disableApp,disableShop:t.disableShop};delete t.disableApp,delete t.disableShop,global.appSettings=r;for(const e in t){let r=t[e];r.thumbURL.startsWith("https://")?t[e].resolvedThumb=r.thumbURL:t[e].resolvedThumb=s.a.join("darwin"===process.platform?"file://":"",process.resourcesPath+"/src/static",r.thumbURL),r.playable||delete t[e]}global.gameData=t,global.dataLoaded=!0,h=t,m&&m.webContents.send("game-data-loaded",!0)}).catch(e=>{global.gameData=null});let m,g="";switch(process.platform){case"win32":g="pepflashplayer.dll";break;case"darwin":g="PepperFlashPlayer.plugin";break;case"linux":g="libpepflashplayer.so"}var b=r(56);let w=s.a.join(n.app.getPath("userData"),"flash","system",g);if(c.existsSync(w))b.addSource(w);else{let e=null;try{e=n.app.getPath("pepperFlashSystemPlugin")}catch(t){console.log("System Flash path not found"),e=null,global.flashRequired=!0}if(null!==e){let t=s.a.join(n.app.getPath("userData"),"flash","system");c.existsSync(t)||c.mkdirSync(t,{recursive:!0}),"win32"===process.platform?c.existsSync(w)?(c.statSync(e).ctimeMs>c.statSync(w).ctimeMs&&c.copyFileSync(e,w),global.flashRequired=!1):(c.copyFileSync(e,w),global.flashRequired=!1):c.existsSync(e)?(p(`cp -R "${e}" "${w}"`),global.flashRequired=!1):global.flashRequired=!0,b.addSource(w)}}b.load();let y="EnableInsecureByteArrayShareable = 1\nEventJitterMicroseconds = 0\nTimerJitterMicroseconds = 0\nInsecureJitterDisabledDomain = *.ninjakiwi.com\nAutoUpdateDisable=1\nEOLUninstallDisable=1\nAVHardwareDisable=1\nEnableAllowList=1\nAllowListRootMovieOnly=1\nAllowListURLPattern=https://assets.ninjakiwi.com/Games/gameswfs/\nAllowListURLPattern=https://assets.nkstatic.com/Games/gameswfs/monkeycity/\nAllowListURLPattern=https://games.nkstatic.com/Games/gameswfs/\nAllowListURLPattern=https://ninjakiwifiles.com/Games/gameswfs/\nAllowListURLPattern=http://ninjakiwifiles.com/Games/gameswfs/\nAllowListURLPattern=https://assets.nkstatic.com/Games/gameswfs/sas4/\nAllowListURLPattern=https://games.nkstatic.com/Games/gameswfs/\nAllowListURLPattern=https://assets.nkstatic.com/Games/gameswfs/\nAllowListURLPattern=https://games.nkstatic.com/Games/gameswfs/mochi_migration/\nAllowListURLPattern=https://ninjakiwifiles.com/Games/gameswfs/mochi_migration/\nAllowListURLPattern=http://sas4-web-editor.ninjakiwi.com:8400/Sas4EditorServer/Sas4EditorServer-debug/\n";c.existsSync(s.a.join(n.app.getPath("userData"),"/Pepper Data/","/Shockwave Flash/","/System/"))?c.writeFileSync(s.a.join(n.app.getPath("userData"),"/Pepper Data/","/Shockwave Flash/","/System/","mms.cfg"),y):c.mkdir(s.a.join(n.app.getPath("userData"),"/Pepper Data/","/Shockwave Flash/","/System/"),{recursive:!0},e=>{e?console.log(e):c.writeFileSync(s.a.join(n.app.getPath("userData"),"/Pepper Data/","/Shockwave Flash/","/System/","mms.cfg"),y)}),n.app.commandLine.appendSwitch("in-process-gpu"),n.app.commandLine.appendSwitch("disable-direct-composition"),n.app.commandLine.appendSwitch("disable-transparency"),n.app.allowRendererProcessReuse=!1,n.app.on("ready",async()=>{n.session.defaultSession.webRequest.onBeforeRequest({urls:["*://*.cpmstar.com/*","*://*.survey-smiles.com/*"]},(e,t)=>{t({cancel:!0})}),m=new n.BrowserWindow({title:"Ninja Kiwi Archive",width:800,height:600,minWidth:600,minHeight:600,frame:!1,backgroundColor:"#1d1d1d",icon:f,webPreferences:{nodeIntegration:!0,webSecurity:!0,plugins:!0,webviewTag:!0,devTools:!1}}),m.loadURL(Object(a.format)({pathname:s.a.join(__dirname,"index.html"),protocol:"file",slashes:!0})),m.webContents.openDevTools(),n.Menu.setApplicationMenu(n.Menu.buildFromTemplate(i)),m.on("close",e=>{n.BrowserWindow.getAllWindows().length>1&&(e.preventDefault(),m.focus(),m.webContents.send("close-app"))}),m.webContents.on("new-window",(e,t,r,n,o)=>{openLoginWindow(e,t,r,n,o,m)})}),n.app.on("window-all-closed",()=>{n.app.quit()}),n.ipcMain.on("display-app-menu",(e,t)=>{const r=n.Menu.buildFromTemplate(i);m&&r.popup({window:t.window,x:t.x,y:t.y})});let C=null;function openGameWindow(e){if(function isWindowOpen(e,t=!1){/**for(const r of n.BrowserWindow.getAllWindows())if(r.accessibleTitle===e)return t&&r.focus(),!0;*/return!1}("flash:"+e.game,!0))return;let t=new n.BrowserWindow({width:e.swfSize.width,height:e.swfSize.height+("darwin"===process.platform?20:30),minWidth:e.swfSize.width,minHeight:e.swfSize.height+("darwin"===process.platform?20:30),frame:!1,title:e.gameTitle,icon:f,backgroundColor:"#1d1d1d",resizable:e.resizable,webPreferences:{nodeIntegration:!0,webSecurity:!0,plugins:!0,webviewTag:!0,accessibleTitle:"flash:"+e.game,nativeWindowOpen:!0,devTools:!1}});t.accessibleTitle="flash:"+e.game,t.loadURL(Object(a.format)({pathname:s.a.join(__dirname,"index.html"),protocol:"file",slashes:!0})),t.once("ready-to-show",()=>{t.show()}),t.once("closed",()=>{m&&m.webContents.send("clear-presence")}),t.on("focus",()=>{m&&m.webContents.send("update-presence",t.getTitle())});let r={metricname:"flash:production:"+e.game,count:1};l({method:"post",url:"https://analytics.ninjakiwi.com/link/mobile/librato",responseType:"json",data:r}).then(e=>{}).catch(e=>{}),t.webContents.on("new-window",(e,r,n,o,s)=>{openLoginWindow(e,r,n,o,s,t)}),t.webContents.on("did-attach-webview",(e,r)=>{r.on("new-window",(e,r,n,o,s)=>{openLoginWindow(e,r,n,o,s,t)})})}n.ipcMain.on("settings",(e,t)=>{C?C.show():(C=new n.BrowserWindow({width:310,height:400,parent:m,resizable:!1,maximizable:!1,minimizable:!1,frame:!1,title:"Settings",icon:f,backgroundColor:"#1D1D1D",webPreferences:{nodeIntegration:!0,webSecurity:!0,plugins:!0,webviewTag:!0,accessibleTitle:"settings:Settings",nativeWindowOpen:!0,devTools:!1}}),C.accessibleTitle="settings:Settings",C.loadURL(Object(a.format)({pathname:s.a.join(__dirname,"index.html"),protocol:"file",slashes:!0})),C.once("ready-to-show",()=>{C&&C.show()}),C.on("close",e=>{e.preventDefault(),C.hide()}))}),n.ipcMain.on("openGame",(e,t)=>{openGameWindow(t)});let v=null;function openLoginWindow(e,t,r,o,s,a){var i,c;e.preventDefault&&e.preventDefault();let l=new URL(t);if("about:blank"!==t)if(a.id!==m.id&&(v=a.id),l.pathname.startsWith("/login")||l.pathname.startsWith("/logout")||l.pathname.startsWith("/logged_in")||l.pathname.startsWith("/register"))m&&(m.webContents.send("login-flow",t),m.focus());else{if(null!==h){if("/Games/Arcade/Bloons-Super-Monkey-2.html"===l.pathname)return void openGameWindow(h.bsm2);if("/Games/Action/SAS-Zombie-Assault-3.html"===l.pathname)return void openGameWindow(h.sas3);if("/bloonstd.html"===l.pathname)return void openGameWindow(h.bloonstd);if("/Games/Arcade/Powerpool-Frenzy.html"===l.pathname)return void openGameWindow(h.powerpoolfrenzy);if("/Games/Arcade/Boombot-2.html"===l.pathname)return void openGameWindow(h.boombot2);if("/Games/Action/SAS-Zombie-Assault-2.html"===l.pathname)return void openGameWindow(h.sas2);if("/Games/Bloons-Games/Bloons-Junior.html"===l.pathname)return void openGameWindow(h.bloonsjunior);if("/Games/Tower-Defense/Bloons-Tower-Defense-4.html"===l.pathname)return void openGameWindow(h.bloonstd4);if("/Games/Arcade/Powerpool-2.html"===l.pathname)return void openGameWindow(h.powerpool2);if(("http://www.ninjakiwi.com/"===t||"https://www.ninjakiwi.com/"===t)&&"bloonspop3"===a.accessibleTitle.split(":")[1])return void openGameWindow(h.bloons);if("/Games/Tower-Defense/Play/Bloons-Tower-Defense-5.html"===l.pathname)return void openGameWindow(h.bloonstd5);if("/sas4wsas3w"===l.pathname)return void openGameWindow(h.sas4);if("/Games/Bloons-Games/Bloons2.html"===l.pathname)return void openGameWindow(h.bloons2);if("/hotcorn.html"===l.pathname)return void openGameWindow(h.hotcorn);if("/anotherboxhotcorn.html"===l.pathname)return void openGameWindow(h.hotcornbox)}l.pathname.startsWith("/getcoins")?m&&!(null===(c=null===(i=global.appSettings)||void 0===i?void 0:i.disableShop)||void 0===c?void 0:c.disableShop)?(m.webContents.send("get-coins"),m.focus()):a.webContents.send("link-blocked"):"https://www.ninjakiwi.com/getmonkeymoney"===t||"http://www.boombotworld.com/"===t||t.includes("bloonsworld.com")||"http://www.meeblingsworld.com/"===t||"http://www.myninjakiwi.com/"===t||"http://www.kaiparasoft.co.nz/myninjakiwi"===t||"http://www.ninjakiwi.com/hotcorn.html"===t||"http://www.ninjakiwi.com/anotherboxhotcorn.html"===t||"https://www.ninjakiwi.com/Games/Tower-Defense/Bloons-Tower-Defense-4-Expansion.html"===t||"https://www.ninjakiwi.com/Games/Level-Editors/Bloons-Tower-Defense-4.html"===t||"https://ninjakiwi.com/Games/Action/Play/SAS-Zombie-Assault-3.html"===t&&"flash:sas3"===a.accessibleTitle||t.includes("newgam.es")||"https://ninjakiwi.com/Games/Mobile/Bloons-TD-Battles-Mobile.html"===t||"https://api.ninjakiwi.com/utility/redirect/bsm2_xpromo_from_webclient"===t||"https://ninjakiwi.com/Games/Mobile/Bloons-Monkey-City-Mobile.html"===t?a&&a.webContents.send("link-blocked"):("https://btd6.com/"===t&&(t="https://store.steampowered.com/app/960090/Bloons_TD_6/"),n.shell.openExternal(t))}}n.ipcMain.on("login-flow-end",(e,t)=>{let r=t.loggedIn,o=t.endURL;if(o.includes("logged_in")||o.includes("logout")||r){m&&m.webContents.send("logged-in");for(const e of n.BrowserWindow.getAllWindows())"flash:monkeycity"===e.accessibleTitle&&o.includes("logout")&&e.reload();if(null!==v){let e=n.BrowserWindow.fromId(v);e&&e.focus(),v=null}}});const _=r(57);n.ipcMain.on("user-data-sent",(async function(e,t){let r={obj:{mynk_id:t.id,mynk_user:t.username,mynk_token:t.token}};const o=new _.SOL.LSO(r);o.filename="mynk_data",o.version=3;let a=s.a.join(n.app.getPath("userData"),"Pepper Data","Shockwave Flash","WritableRoot","#SharedObjects"),i=(await c.promises.readdir(a,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name);if(!i){let randomChar=()=>"ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(Math.random()*"ABCDEFGHIJKLMNOPQRSTUVWXYZ".length));function randomInt(e=1,t=9){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}i=[`X${randomChar()}${randomChar()}${randomInt()}${randomChar()}${randomInt()}${randomChar()}${randomChar()}`]}if(i){let e=[];i.forEach(t=>{c.mkdirSync(s.a.join(a,t,"ninjakiwi.com"),{recursive:!0}),c.mkdirSync(s.a.join(a,t,"assets.nkstatic.com"),{recursive:!0}),e.push(c.promises.writeFile(s.a.join(a,t,"ninjakiwi.com","mynk_data.sol"),o.write())),e.push(c.promises.writeFile(s.a.join(a,t,"assets.nkstatic.com","mynk_data.sol"),o.write())),e.push(c.promises.writeFile(s.a.join(a,t,"mynk_data.sol"),o.write()))}),Promise.all(e).then(()=>{m&&m.webContents.send("logged-in")}).catch(e=>{console.error(e)})}})),n.ipcMain.on("reset-data",(function(e,t){m&&m.webContents.send("logged-in",t)})),n.ipcMain.on("exit-fullscreen",(e,t)=>{let r=function getGameWindow(e){for(const t of n.BrowserWindow.getAllWindows())if(t.accessibleTitle==="flash:"+e)return t;return!1}(t);r&&r.isFullScreen()&&r.setFullScreen(!1)});let x=!1;n.ipcMain.on("xsolla-success",(function(e,t){"success"===t&&(x=!0,global.xsollaSuccess=!0),m&&"closed"===t&&x&&(m.webContents.send("render-xsolla-success"),x=!1)})),n.ipcMain.on("xsolla-reset",(function(e){x=!1,global.xsollaSuccess=!1}));let R={win32URL:"",win32Hash:"",darwinURL:"",darwinHash:"",forceManualFlash:""};function installFlash(e){if(m.webContents.send("flash-update","Installing Flash Player..."),"win32"===process.platform)d.exec(`"${e}" -install`,(function(e,t,r){switch(e){case 0:m.webContents.send("flash-update","Flash Player Installed"),n.app.relaunch(),n.app.exit();break;case 1003:m.webContents.send("flash-update","Error: Invalid argument passed to installer<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1011:m.webContents.send("flash-update","Error: Install already in progress<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1012:m.webContents.send("flash-update","Error: Does not have admin permissions<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1013:m.webContents.send("flash-update","Error: Trying to install older revision<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1022:m.webContents.send("flash-update","Error: Does not have admin permissions<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1024:m.webContents.send("flash-update","Error: Unable to write files to directory<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1025:m.webContents.send("flash-update","Error: Existing player in use<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1032:m.webContents.send("flash-update","Error: ActiveX registration failed<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;case 1041:m.webContents.send("flash-update","Error: An application that uses Flash Player is open. Quit application and try again<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>");break;default:m.webContents.send("flash-update","Error: There was an unexpected error while installing flash<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>")}}));else{const t=r(58);(async()=>{let r=s.a.join(n.app.getPath("userData"),"flash","installer","macos");await t(e,r),d.exec(`"${r}/Install Adobe Pepper Flash Player.app/Contents/MacOS/Adobe Flash Player Install Manager" -install`,(function(e,t,r){0===e?(m.webContents.send("flash-update","Flash Player Installed"),n.app.relaunch(),n.app.exit()):m.webContents.send("flash-update","Error:<br>"+r+"<br><a class='text-danger' href='https://get.adobe.com/flashplayer/' target='_blank'>Manual Installation</a>")}))})()}}n.ipcMain.on("get-flash-sku",e=>{l.get("https://static-api.nkstatic.com/appdocs/18/appdocs/flash_links",{timeout:2e3}).then(e=>{R.win32URL=e.data.win32,R.win32Hash=e.data.win32Hash,R.darwinURL=e.data.darwin,R.darwinHash=e.data.darwinHash,R.forceManualFlash=e.data.forceManualFlash,m.webContents.send("flash-sku",R)}).catch(e=>{m.webContents.send("flash-update","Error: Failed to get Flash Player SKU, please contact support.<br><a class='text-danger' href='https://support.ninjakiwi.com' target='_blank'>Ninja Kiwi Support</a>")})}),n.ipcMain.on("download-flash",(e,t)=>{let r=null==t?void 0:t.path,o=null==t?void 0:t.url;if(r)installFlash(r);else{m.webContents.send("flash-update","Downloading Flash Player...");let e="https://fpdownload.adobe.com/get/flashplayer/pdc/32.0.0.371/install_flash_player_ppapi.exe",t="https://fpdownload.adobe.com/get/flashplayer/pdc/32.0.0.371/install_flash_player_osx_ppapi.dmg";if(o)"win32"===process.platform?e=o:t=o;else{let r="";(R.win32URL||R.darwinURL)&&(e=R.win32URL[0],t=R.darwinURL[0],r="win32"===process.platform?R.win32Hash:R.darwinHash)}let r=s.a.join(n.app.getPath("userData"),"flash","installer");c.existsSync(r)||c.mkdirSync(r,{recursive:!0});const a={directory:r};u(m,"win32"===process.platform?e:t,a).then(e=>{installFlash(e.getSavePath())})}})},function(e,t,r){const{app:n,shell:o,BrowserWindow:s}=r(0),a=[{label:"Settings",click:()=>{s.getFocusedWindow().webContents.send("settings")}},{label:"Ninja Kiwi Website",click:()=>{o.openExternal("https://ninjakiwi.com")}},{type:"separator"},{label:"Quit",click:()=>{n.quit()}}];if("darwin"==process.platform){var i=n.name;a.unshift({label:i,submenu:[{label:"Settings",click:()=>{s.getFocusedWindow().webContents.send("settings")}},{label:"Ninja Kiwi Website",click:()=>{o.openExternal("https://ninjakiwi.com")}},{type:"separator"},{label:"Quit",accelerator:"Command+Q",click(){n.quit()}}]},{label:"Edit",submenu:[{label:"Undo",accelerator:"CmdOrCtrl+Z",selector:"undo:"},{label:"Redo",accelerator:"Shift+CmdOrCtrl+Z",selector:"redo:"},{type:"separator"},{label:"Cut",accelerator:"CmdOrCtrl+X",selector:"cut:"},{label:"Copy",accelerator:"CmdOrCtrl+C",selector:"copy:"},{label:"Paste",accelerator:"CmdOrCtrl+V",selector:"paste:"},{label:"Select All",accelerator:"CmdOrCtrl+A",selector:"selectAll:"}]})}e.exports.template=a},function(e,t){e.exports=require("fs")},function(e,t,r){e.exports=r(24)},function(e,t,r){"use strict";var n=r(2),o=r(6),s=r(25),a=r(17);function createInstance(e){var t=new s(e),r=o(s.prototype.request,t);return n.extend(r,s.prototype,t),n.extend(r,t),r}var i=createInstance(r(8));i.Axios=s,i.create=function create(e){return createInstance(a(i.defaults,e))},i.Cancel=r(18),i.CancelToken=r(50),i.isCancel=r(7),i.all=function all(e){return Promise.all(e)},i.spread=r(51),i.isAxiosError=r(52),e.exports=i,e.exports.default=i},function(e,t,r){"use strict";var n=r(2),o=r(4),s=r(26),a=r(27),i=r(17);function Axios(e){this.defaults=e,this.interceptors={request:new s,response:new s}}Axios.prototype.request=function request(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=i(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=[a,void 0],r=Promise.resolve(e);for(this.interceptors.request.forEach((function unshiftRequestInterceptors(e){t.unshift(e.fulfilled,e.rejected)})),this.interceptors.response.forEach((function pushResponseInterceptors(e){t.push(e.fulfilled,e.rejected)}));t.length;)r=r.then(t.shift(),t.shift());return r},Axios.prototype.getUri=function getUri(e){return e=i(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},n.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(i(r||{},{method:e,url:t,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function forEachMethodWithData(e){Axios.prototype[e]=function(t,r,n){return this.request(i(n||{},{method:e,url:t,data:r}))}})),e.exports=Axios},function(e,t,r){"use strict";var n=r(2);function InterceptorManager(){this.handlers=[]}InterceptorManager.prototype.use=function use(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},InterceptorManager.prototype.eject=function eject(e){this.handlers[e]&&(this.handlers[e]=null)},InterceptorManager.prototype.forEach=function forEach(e){n.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))},e.exports=InterceptorManager},function(e,t,r){"use strict";var n=r(2),o=r(28),s=r(7),a=r(8);function throwIfCancellationRequested(e){e.cancelToken&&e.cancelToken.throwIfRequested()}e.exports=function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=e.headers||{},e.data=o(e.data,e.headers,e.transformRequest),e.headers=n.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function cleanHeaderConfig(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=o(t.data,t.headers,e.transformResponse),t}),(function onAdapterRejection(t){return s(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=o(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,r){"use strict";var n=r(2);e.exports=function transformData(e,t,r){return n.forEach(r,(function transform(r){e=r(e,t)})),e}},function(e,t,r){"use strict";var n=r(2);e.exports=function normalizeHeaderName(e,t){n.forEach(e,(function processHeader(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))}},function(e,t,r){"use strict";var n=r(2),o=r(9),s=r(31),a=r(4),i=r(11),c=r(34),l=r(35),u=r(5);e.exports=function xhrAdapter(e){return new Promise((function dispatchXhrRequest(t,r){var p=e.data,d=e.headers;n.isFormData(p)&&delete d["Content-Type"];var f=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";d.Authorization="Basic "+btoa(h+":"+m)}var g=i(e.baseURL,e.url);if(f.open(e.method.toUpperCase(),a(g,e.params,e.paramsSerializer),!0),f.timeout=e.timeout,f.onreadystatechange=function handleLoad(){if(f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in f?c(f.getAllResponseHeaders()):null,s={data:e.responseType&&"text"!==e.responseType?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:e,request:f};o(t,r,s),f=null}},f.onabort=function handleAbort(){f&&(r(u("Request aborted",e,"ECONNABORTED",f)),f=null)},f.onerror=function handleError(){r(u("Network Error",e,null,f)),f=null},f.ontimeout=function handleTimeout(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(u(t,e,"ECONNABORTED",f)),f=null},n.isStandardBrowserEnv()){var b=(e.withCredentials||l(g))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;b&&(d[e.xsrfHeaderName]=b)}if("setRequestHeader"in f&&n.forEach(d,(function setRequestHeader(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete d[t]:f.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),e.responseType)try{f.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&f.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){f&&(f.abort(),r(e),f=null)})),p||(p=null),f.send(p)}))}},function(e,t,r){"use strict";var n=r(2);e.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){return{write:function write(e,t,r,o,s,a){var i=[];i.push(e+"="+encodeURIComponent(t)),n.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),n.isString(o)&&i.push("path="+o),n.isString(s)&&i.push("domain="+s),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read:function read(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function remove(e){this.write(e,"",Date.now()-864e5)}}}():{write:function write(){},read:function read(){return null},remove:function remove(){}}},function(e,t,r){"use strict";e.exports=function isAbsoluteURL(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,r){"use strict";e.exports=function combineURLs(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,r){"use strict";var n=r(2),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function parseHeaders(e){var t,r,s,a={};return e?(n.forEach(e.split("\n"),(function parser(e){if(s=e.indexOf(":"),t=n.trim(e.substr(0,s)).toLowerCase(),r=n.trim(e.substr(s+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([r]):a[t]?a[t]+", "+r:r}})),a):a}},function(e,t,r){"use strict";var n=r(2);e.exports=n.isStandardBrowserEnv()?function standardBrowserEnv(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function resolveURL(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=resolveURL(window.location.href),function isURLSameOrigin(t){var r=n.isString(t)?resolveURL(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function isURLSameOrigin(){return!0}},function(e,t,r){"use strict";var n=r(2),o=r(9),s=r(11),a=r(4),i=r(12),c=r(13),l=r(14).http,u=r(14).https,p=r(3),d=r(48),f=r(49),h=r(5),m=r(10),g=/https:?/;e.exports=function httpAdapter(e){return new Promise((function dispatchHttpRequest(t,r){var b=function resolve(e){t(e)},w=function reject(e){r(e)},y=e.data,C=e.headers;if(C["User-Agent"]||C["user-agent"]||(C["User-Agent"]="axios/"+f.version),y&&!n.isStream(y)){if(Buffer.isBuffer(y));else if(n.isArrayBuffer(y))y=Buffer.from(new Uint8Array(y));else{if(!n.isString(y))return w(h("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));y=Buffer.from(y,"utf-8")}C["Content-Length"]=y.length}var v=void 0;e.auth&&(v=(e.auth.username||"")+":"+(e.auth.password||""));var _=s(e.baseURL,e.url),x=p.parse(_),R=x.protocol||"http:";if(!v&&x.auth){var k=x.auth.split(":");v=(k[0]||"")+":"+(k[1]||"")}v&&delete C.Authorization;var E=g.test(R),S=E?e.httpsAgent:e.httpAgent,A={path:a(x.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:C,agent:S,agents:{http:e.httpAgent,https:e.httpsAgent},auth:v};e.socketPath?A.socketPath=e.socketPath:(A.hostname=x.hostname,A.port=x.port);var O,j=e.proxy;if(!j&&!1!==j){var D=R.slice(0,-1)+"_proxy",F=process.env[D]||process.env[D.toUpperCase()];if(F){var T=p.parse(F),L=process.env.no_proxy||process.env.NO_PROXY,q=!0;if(L)q=!L.split(",").map((function trim(e){return e.trim()})).some((function proxyMatch(e){return!!e&&("*"===e||("."===e[0]&&x.hostname.substr(x.hostname.length-e.length)===e||x.hostname===e))}));if(q&&(j={host:T.hostname,port:T.port,protocol:T.protocol},T.auth)){var M=T.auth.split(":");j.auth={username:M[0],password:M[1]}}}}j&&(A.headers.host=x.hostname+(x.port?":"+x.port:""),function setProxy(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function beforeRedirect(e){e.headers.host=e.host,setProxy(e,t,e.href)}}(A,j,R+"//"+x.hostname+(x.port?":"+x.port:"")+A.path));var P=E&&(!j||g.test(j.protocol));e.transport?O=e.transport:0===e.maxRedirects?O=P?c:i:(e.maxRedirects&&(A.maxRedirects=e.maxRedirects),O=P?u:l),e.maxBodyLength>-1&&(A.maxBodyLength=e.maxBodyLength);var B=O.request(A,(function handleResponse(t){if(!B.aborted){var r=t,s=t.req||B;if(204!==t.statusCode&&"HEAD"!==s.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(d.createUnzip()),delete t.headers["content-encoding"]}var a={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:s};if("stream"===e.responseType)a.data=r,o(b,w,a);else{var i=[];r.on("data",(function handleStreamData(t){i.push(t),e.maxContentLength>-1&&Buffer.concat(i).length>e.maxContentLength&&(r.destroy(),w(h("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,s)))})),r.on("error",(function handleStreamError(t){B.aborted||w(m(t,e,null,s))})),r.on("end",(function handleStreamEnd(){var t=Buffer.concat(i);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=n.stripBOM(t))),a.data=t,o(b,w,a)}))}}}));B.on("error",(function handleRequestError(t){B.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||w(m(t,e,null,B))})),e.timeout&&B.setTimeout(e.timeout,(function handleRequestTimeout(){B.abort(),w(h("timeout of "+e.timeout+"ms exceeded",e,"ECONNABORTED",B))})),e.cancelToken&&e.cancelToken.promise.then((function onCanceled(e){B.aborted||(B.abort(),w(e))})),n.isStream(y)?y.on("error",(function handleStreamError(t){w(m(t,e,null,B))})).pipe(B):B.end(y)}))}},function(e,t){e.exports=require("stream")},function(e,t){e.exports=require("assert")},function(e,t,r){var n;try{n=r(40)("follow-redirects")}catch(e){n=function(){}}e.exports=n},function(e,t,r){"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=r(41):e.exports=r(43)},function(e,t,r){t.log=function log(...e){return"object"==typeof console&&console.log&&console.log(...e)},t.formatArgs=function formatArgs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))}),t.splice(o,0,r)},t.save=function save(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function useColors(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function localstorage(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=r(15)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},function(e,t){var r=1e3,n=6e4,o=60*n,s=24*o;function plural(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return function parse(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var a=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return 6048e5*a;case"days":case"day":case"d":return a*s;case"hours":case"hour":case"hrs":case"hr":case"h":return a*o;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}(e);if("number"===a&&isFinite(e))return t.long?function fmtLong(e){var t=Math.abs(e);if(t>=s)return plural(e,t,s,"day");if(t>=o)return plural(e,t,o,"hour");if(t>=n)return plural(e,t,n,"minute");if(t>=r)return plural(e,t,r,"second");return e+" ms"}(e):function fmtShort(e){var t=Math.abs(e);if(t>=s)return Math.round(e/s)+"d";if(t>=o)return Math.round(e/o)+"h";if(t>=n)return Math.round(e/n)+"m";if(t>=r)return Math.round(e/r)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,r){const n=r(16),o=r(44);t.init=function init(e){e.inspectOpts={};const r=Object.keys(t.inspectOpts);for(let n=0;n<r.length;n++)e.inspectOpts[r[n]]=t.inspectOpts[r[n]]},t.log=function log(...e){return process.stderr.write(o.format(...e)+"\n")},t.formatArgs=function formatArgs(r){const{namespace:n,useColors:o}=this;if(o){const t=this.color,o="[3"+(t<8?t:"8;5;"+t),s=` ${o};1m${n} [0m`;r[0]=s+r[0].split("\n").join("\n"+s),r.push(o+"m+"+e.exports.humanize(this.diff)+"[0m")}else r[0]=function getDate(){if(t.inspectOpts.hideDate)return"";return(new Date).toISOString()+" "}()+n+" "+r[0]},t.save=function save(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function load(){return process.env.DEBUG},t.useColors=function useColors(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):n.isatty(process.stderr.fd)},t.colors=[6,2,3,4,5,1];try{const e=r(45);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{const r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase());let n=process.env[t];return n=!!/^(yes|on|true|enabled)$/i.test(n)||!/^(no|off|false|disabled)$/i.test(n)&&("null"===n?null:Number(n)),e[r]=n,e},{}),e.exports=r(15)(t);const{formatters:s}=e.exports;s.o=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts).replace(/\s*\n\s*/g," ")},s.O=function(e){return this.inspectOpts.colors=this.useColors,o.inspect(e,this.inspectOpts)}},function(e,t){e.exports=require("util")},function(e,t,r){"use strict";const n=r(46),o=r(16),s=r(47),{env:a}=process;let i;function translateLevel(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function supportsColor(e,t){if(0===i)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!t&&void 0===i)return 0;const r=i||0;if("dumb"===a.TERM)return r;if("win32"===process.platform){const e=n.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(e=>e in a)||"codeship"===a.CI_NAME?1:r;if("TEAMCITY_VERSION"in a)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in a)return 1;if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){const e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:r}s("no-color")||s("no-colors")||s("color=false")||s("color=never")?i=0:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(i=1),"FORCE_COLOR"in a&&(i="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),e.exports={supportsColor:function getSupportLevel(e){return translateLevel(supportsColor(e,e&&e.isTTY))},stdout:translateLevel(supportsColor(!0,o.isatty(1))),stderr:translateLevel(supportsColor(!0,o.isatty(2)))}},function(e,t){e.exports=require("os")},function(e,t,r){"use strict";e.exports=(e,t=process.argv)=>{const r=e.startsWith("-")?"":1===e.length?"-":"--",n=t.indexOf(r+e),o=t.indexOf("--");return-1!==n&&(-1===o||n<o)}},function(e,t){e.exports=require("zlib")},function(e){e.exports=JSON.parse('{"_args":[["axios@0.21.1","C:\\\\BuildAgent\\\\work\\\\e68acaa7d4c2a2c6"]],"_development":true,"_from":"axios@0.21.1","_id":"axios@0.21.1","_inBundle":false,"_integrity":"sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==","_location":"/axios","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"axios@0.21.1","name":"axios","escapedName":"axios","rawSpec":"0.21.1","saveSpec":null,"fetchSpec":"0.21.1"},"_requiredBy":["#DEV:/"],"_resolved":"https://registry.npmjs.org/axios/-/axios-0.21.1.tgz","_spec":"0.21.1","_where":"C:\\\\BuildAgent\\\\work\\\\e68acaa7d4c2a2c6","author":{"name":"Matt Zabriskie"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"bugs":{"url":"https://github.com/axios/axios/issues"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}],"dependencies":{"follow-redirects":"^1.10.0"},"description":"Promise based HTTP client for the browser and node.js","devDependencies":{"bundlesize":"^0.17.0","coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.0.2","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^20.1.0","grunt-karma":"^2.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^1.0.18","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^1.3.0","karma-chrome-launcher":"^2.2.0","karma-coverage":"^1.1.1","karma-firefox-launcher":"^1.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-opera-launcher":"^1.0.0","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^1.2.0","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.7","karma-webpack":"^1.7.0","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^5.2.0","sinon":"^4.5.0","typescript":"^2.8.1","url-search-params":"^0.10.0","webpack":"^1.13.1","webpack-dev-server":"^1.14.1"},"homepage":"https://github.com/axios/axios","jsdelivr":"dist/axios.min.js","keywords":["xhr","http","ajax","promise","node"],"license":"MIT","main":"index.js","name":"axios","repository":{"type":"git","url":"git+https://github.com/axios/axios.git"},"scripts":{"build":"NODE_ENV=production grunt build","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","examples":"node ./examples/server.js","fix":"eslint --fix lib/**/*.js","postversion":"git push && git push --tags","preversion":"npm test","start":"node ./sandbox/server.js","test":"grunt test && bundlesize","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"},"typings":"./index.d.ts","unpkg":"dist/axios.min.js","version":"0.21.1"}')},function(e,t,r){"use strict";var n=r(18);function CancelToken(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function promiseExecutor(e){t=e}));var r=this;e((function cancel(e){r.reason||(r.reason=new n(e),t(r.reason))}))}CancelToken.prototype.throwIfRequested=function throwIfRequested(){if(this.reason)throw this.reason},CancelToken.source=function source(){var e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}},e.exports=CancelToken},function(e,t,r){"use strict";e.exports=function spread(e){return function wrap(t){return e.apply(null,t)}}},function(e,t,r){"use strict";e.exports=function isAxiosError(e){return"object"==typeof e&&!0===e.isAxiosError}},function(e,t){e.exports=require("electron-dl")},function(e,t){e.exports=require("child_process")},function(e,t){e.exports=require("shelljs")},function(e,t){e.exports=require("flash-player-loader")},function(e,t){e.exports=require("libamf")},function(e,t){e.exports=require("extract-dmg")}]);
//# sourceMappingURL=main.js.map