"use strict";var i=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var L=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var A=(s,a)=>i(s,"name",{value:a,configurable:true});var m=(s,a)=>{for(var p in a)i(s,p,{get:a[p],enumerable:true})};var R=(s,a,p,I)=>{if(a&&typeof a==="object"||typeof a==="function"){for(let o of L(a))if(!f.call(s,o)&&o!==p)i(s,o,{get:()=>a[o],enumerable:!(I=u(a,o))||I.enumerable})}return s};var h=s=>R(i({},"__esModule",{value:true}),s);var U={};m(U,{API:()=>d,API_VERSION:()=>C,WEBSITE:()=>W,WS_API:()=>O,app:()=>t,ferdiumLocale:()=>T,ferdiumVersion:()=>v,isDevMode:()=>n,protocolClient:()=>B,useLiveAPI:()=>l,userDataCertsPath:()=>S,userDataPath:()=>E,userDataRecipesPath:()=>x});module.exports=h(U);var r=require("node:path");var e=require("./config");var c=require("./electron-util");var g=require("./environment");const{app:t}=c.api;const v=t.getVersion();const T=t.getLocale();if(process.env.FERDIUM_APPDATA_DIR!=null){t.setPath("appData",process.env.FERDIUM_APPDATA_DIR);t.setPath("userData",t.getPath("appData"))}else if(process.env.PORTABLE_EXECUTABLE_DIR!=null){t.setPath("appData",(0,r.join)(process.env.PORTABLE_EXECUTABLE_DIR,`${t.name}AppData`));t.setPath("userData",(0,r.join)(t.getPath("appData"),`${t.name}AppData`))}else if(g.isWindows&&process.env.APPDATA!=null){t.setPath("appData",process.env.APPDATA);t.setPath("userData",(0,r.join)(t.getPath("appData"),t.name))}const n=process.env.ELECTRON_IS_DEV===void 0?!t.isPackaged:Number.parseInt(process.env.ELECTRON_IS_DEV,10)===1;if(n){t.setPath("userData",(0,r.join)(t.getPath("appData"),`${t.name}Dev`))}const E=A((...s)=>{return(0,r.join)(t.getPath("userData"),...[s].flat())},"userDataPath");const x=A((...s)=>{return E("recipes",...[s].flat())},"userDataRecipesPath");const S=A((...s)=>{return E("certs",...[s].flat())},"userDataCertsPath");const V=process.env.USE_LOCAL_API;const l=process.env.USE_LIVE_API;let P;let _;let D;if(!n||n&&l){P=e.LIVE_FERDIUM_API;_=e.LIVE_WS_API;D=e.LIVE_API_FERDIUM_WEBSITE}else if(n&&V){P=e.LOCAL_API;_=e.LOCAL_WS_API;D=e.LOCAL_API_WEBSITE}else{P=e.DEV_FRANZ_API;_=e.DEV_WS_API;D=e.DEV_API_FRANZ_WEBSITE}const d=P;const C="v1";const O=_;const W=D;const B=n?"ferdium-dev":"ferdium";
