"use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var n=(e,r)=>i(e,"name",{value:r,configurable:true});var f=(e,r)=>{for(var o in r)i(e,o,{get:r[o],enumerable:true})};var E=(e,r,o,t)=>{if(r&&typeof r==="object"||typeof r==="function"){for(let a of v(r))if(!w.call(e,a)&&a!==o)i(e,a,{get:()=>r[a],enumerable:!(t=m(r,a))||t.enumerable})}return e};var F=e=>E(i({},"__esModule",{value:true}),e);var k={};f(k,{default:()=>l,importExportURL:()=>S,localServerToken:()=>c,needsToken:()=>d,serverBase:()=>g,serverName:()=>_});module.exports=F(k);var s=require("../config");var p=require("../environment-remote");var u=require("../helpers/url-helpers");function l(e=true){if(!window.ferdium?.stores.settings?.all?.app.server){return s.SERVER_NOT_LOADED}const r=window.ferdium.stores.settings.all.app.server===s.LOCAL_SERVER?`http://${s.LOCAL_HOSTNAME}:${window.ferdium.stores.requests.localServerPort}`:window.ferdium.stores.settings.all.app.server;return(0,u.fixUrl)(e?`${r}/${p.API_VERSION}`:r)}n(l,"apiBase");const d=n(()=>{return window.ferdium.stores.settings.all.app.server===s.LOCAL_SERVER},"needsToken");const c=n(()=>{return d()?window.ferdium.stores.requests.localServerToken:void 0},"localServerToken");const S=n(()=>{const e=l(false);return d()?`${e}/token/${c()}`:e},"importExportURL");const g=n(()=>{const e=window.ferdium.stores.settings.all.app.server;const r="You are using Ferdi without a server";const o="You are using Ferdium without a server";let t;switch(e){case s.LIVE_FRANZ_API:{t=s.DEV_API_FRANZ_WEBSITE;break}case r:{t=s.LIVE_FERDIUM_API;break}case o:{t=s.LIVE_FERDIUM_API;break}default:{t=e}}return(0,u.fixUrl)(t)},"serverBase");const _=n(()=>{const e=window.ferdium.stores.settings.all.app.server;const r="You are using Ferdi without a server";const o="You are using Ferdium without a server";let t;switch(e){case s.LIVE_FRANZ_API:{t="Franz";break}case s.LIVE_FERDIUM_API:{t="Ferdium";break}case r:{t="No";break}case o:{t="No";break}default:{t="Custom"}}return t},"serverName");
