{"version":3,"sources":["jsdelivr-header.js","/npm/fivem-launcher@1.0.0/main.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,MAAM,IAAC,IAAG,cAAE,cAAa,QAAE,SAAW,QAAQ,YACxC,MAAQ,QAAQ,cAEtB,QAAQ,IAAK,QAAQ,IAAI,UACzB,IAAI,OAAiD,SAAvC,QAAQ,IAAI,UAAY,IAAI,OAE1C,IAAI,GAAG,SAAS,UACf,MAAM,EAAS,IAAI,cAAc,CAChC,KAAM,aACN,MAAO,IACP,OAAQ,IAER,MAAO,uBACP,QAAQ,EACR,iBAAiB,EACjB,OAAO,EACP,eAAgB,CACf,iBAAiB,EAGjB,aAAa,KAIf,EAAO,YAAY,GAAG,WAAW,KAC7B,IAAI,WACJ,IAAI,MAAM,IAGd,QAAQ,GAAG,aAAa,KACvB,QAAQ,IAAI,WACZ,IAAI,MAAM,IAGX,QAAQ,GAAG,eAAe,MAAO,EAAO,KACpC,IACC,EAAM,kBAAoB,MAAM,EAAK,CACpC,OAAQ,MACR,KAAM,OACN,QAAS,CACR,eAAgB,kCAChB,OAAU,yHACV,kBAAmB,iBACnB,kBAAmB,sCACnB,gBAAiB,WACjB,WAAc,aACd,KAAQ,sBACR,OAAU,WACV,4BAA6B,IAC7B,aAAc,yHAEb,MAAK,GAAO,EAAI,QACpB,CACA,MAAO,GACN,QAAQ,MAAM,GACd,EAAM,YAAc,CAAC,CACtB,KAGJ,IACC,EAAO,SAAS,GAAG,6BAA6B,MAAM,QAAQ,MAC/D,CACA,MAAM,GACL,QAAQ,IAAI,0BAA2B,EACxC,CACA,EAAO,QAAQ,MACZ,QACF,EAAO,YAAY,eAEpB,EAAO,YAAY,KAAK,aAAa,QAEnC,IAGH,IAAI,GAAG,qBAAqB,WACH,WAArB,QAAQ,UACV,IAAI,MACN","file":"/npm/fivem-launcher@1.0.0/main.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/fivem-launcher@1.0.0/main.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const {app, BrowserWindow, ipcMain} = require('electron');\nconst fetch = require('node-fetch');\n\nconsole.log( process.env.NODE_ENV );\nlet is_dev = (process.env.NODE_ENV || '').trim() === 'dev';\n\napp.on('ready', async () => {\n\tconst window = new BrowserWindow({\n\t\ticon: './icon.png',\n\t\twidth: 600,\n\t\theight: 500,\n\t\t// useContentSize: true,\n\t\ttitle: 'ERP - FiveM Launcher',\n\t\tcenter: true,\n\t\tautoHideMenuBar: true,\n\t\tkiosk: false,\n\t\twebPreferences: {\n\t\t\tnodeIntegration: true,\n\t\t\t// contextIsolation: true,\n\t\t\t// sandbox: true,\n\t\t\twebSecurity: true//true\n\t\t},\n\t});\n\t\n\twindow.webContents.on('crashed', () => {\n\t    app.relaunch();\n\t    app.quit();\n\t});\n\n\tipcMain.on('close-app', () => {\n\t\tconsole.log('Closing');\n\t\tapp.quit();\n\t});\n\t\n\tipcMain.on('get-request', async (event, arg) => {\n\t    try {\t\t\n\t\t    event.returnValue = await fetch(arg, {\n\t\t\t    method: \"GET\",\n\t\t\t    mode: 'cors',//'cors' : 'same-origin',\n\t\t\t    headers: {\n\t\t\t\t    \"Content-Type\": \"application/json; charset=utf-8\",\n\t\t\t\t    'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3',\n\t\t\t\t    'Accept-Encoding': ' gzip, deflate',\n\t\t\t\t    'Accept-Language': 'pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7',\n\t\t\t\t    'Cache-Control': 'no-cache',\n\t\t\t\t    'Connection': 'keep-alive',\n\t\t\t\t    'Host': '51.38.140.161:30120',\n\t\t\t\t    'Pragma': 'no-cache',\n\t\t\t\t    'Upgrade-Insecure-Requests': '1',\n\t\t\t\t    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36'\n\t\t\t    },\n\t\t    }).then(res => res.json());\n\t    }\n\t    catch (e) {\n\t\t    console.error(e);\n\t\t    event.returnValue = {};\n\t    }\n\t});\n\n\ttry {\n\t\twindow.loadFile(`${__dirname}/dist/index.html`).catch(console.error);\n\t}\n\tcatch(e) {\n\t\tconsole.log('Template loading error:', e);\n\t}\n\twindow.setMenu(null);\n\tif(is_dev)\n\t\twindow.webContents.openDevTools();\n\n\twindow.webContents.once('dom-ready', () => {\n\t\t//renderer is loaded\n\t});\n});\n\napp.on('window-all-closed', function() {//way to close electron on IOS\n\tif(process.platform !== 'darwin')\n\t\tapp.quit()\n});"]}