GE Lua Documentation

Press F to search!

getCurrentLevelIdentifier

Definition


-- @/lua/common/utils.lua:1110

function getCurrentLevelIdentifier(raw)
  local dir, filename, ext = path.split(getMissionFilename())
  if dir ~= nil then
    if raw then string.gsub(dir, "/levels/(.*)/", "%1") end
    return string.lower(string.gsub(dir, "/levels/(.*)/", "%1"))
  end
end

Callers

@/lua/ge/extensions/freeroam/facilities.lua
local function getFacility(type, id)
  local levelName = getCurrentLevelIdentifier()
  if not levelName or levelName == '' then log("E","","Tried to get facility without level!") return end
local function getFacilitiesByType(type, levelName)
  levelName = levelName or getCurrentLevelIdentifier()
  if not levelName or levelName == '' then log("E","","Tried to get facility without level!") return end
@/lua/ge/extensions/core/environment.lua
M.getTimeOfDayOptions = function(levelIdentifier)
  levelIdentifier = levelIdentifier or getCurrentLevelIdentifier()
  return core_levels.getTimeOfDayOptions(levelIdentifier)
@/lua/ge/extensions/core/audioRibbon.lua
local function onEditorBeforeSaveLevel()
  local levelName = getCurrentLevelIdentifier()
  if levelName and ribbons then
  end
  local levelName = getCurrentLevelIdentifier()
  if levelName then
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/raceHighscoresLap.lua
        record,
        getCurrentLevelIdentifier(),
        self.mgr.activity.missionTypeData.trackName,
      local scores = core_highscores.getScenarioHighscores(
        getCurrentLevelIdentifier(),
        self.mgr.activity.missionTypeData.trackName,
@/lua/ge/extensions/gameplay/speedTrapLeaderboards.lua
local function addRecord(speedTrapData, playerSpeed, overSpeed, veh)
  local currentLevel = getCurrentLevelIdentifier()
  if not leaderboards[currentLevel] then
@/lua/ge/extensions/util/terrainGenerator.lua
  tb:registerObject(self.terrainName)
  tb:setTerrFileLvlFolder('/levels/'..getCurrentLevelIdentifier())
  scenetree.MissionGroup:addObject(tb)
@/lua/ge/extensions/editor/crawlEditor/missionPortTool.lua

  local levelToUse = targetLevel or getCurrentLevelIdentifier()
  if not levelToUse then

  local currentLevel = getCurrentLevelIdentifier()
  if not currentLevel then

      local currentLevel = getCurrentLevelIdentifier()
      if not currentLevel then
@/lua/ge/extensions/editor/roadNetworkExporter.lua
    else
      if im.Button("Export OpenDrive '" .. getCurrentLevelIdentifier() .. "'...") then
        exportedFilename = nil
    else
      if im.Button("Export OpenStreetMap '" .. getCurrentLevelIdentifier() .. "'...") then
        osmExportedFilename = nil
    else
      if im.Button("Export SUMO '" .. getCurrentLevelIdentifier() .. "'...") then
        sumoExportedFilename = nil
@/lua/ge/extensions/editor/resourceChecker.lua
local function statsTab()
  local getlevel = getCurrentLevelIdentifier()
  if not getlevel then
  local convertdata
  local getlevel = getCurrentLevelIdentifier()
  if not getlevel then
local function resTab()
  local getlevel = getCurrentLevelIdentifier()
  if not getlevel then
@/lua/ge/extensions/gameplay/rally/recceApp.lua
  if recceSettings then
    recceSettings:setLastMissionId(getCurrentLevelIdentifier(), mid)
  end
  if recceSettings then
    recceSettings:setLastLoadState(getCurrentLevelIdentifier(), state)
  end
  log('I', logTag, 'refreshing recce app missions')
  local level = getCurrentLevelIdentifier()
@/lua/ge/extensions/core/hotlapping.lua
local function load(originalFilename)
  local filePath = rootDir..getCurrentLevelIdentifier()..'/'..originalFilename..'.race.json'
  local success = false
  local now = string.format("%.4d-%.2d-%.2d_%.2d-%.2d-%.2d", date.year, date.month, date.day, date.hour, date.min, date.sec)
  filePath = filePath or rootDir..getCurrentLevelIdentifier()..'/'..now..'.race.json'
  jsonWriteFile(filePath, pathData:onSerialize(), true)
local function rename(oldName, newName)
  local pre = rootDir..getCurrentLevelIdentifier() ..'/'
  if not FS:fileExists(pre..oldName..'.race.json') then
  local tracks = {}
  local files = FS:findFiles(rootDir..getCurrentLevelIdentifier()..'/', '*.race.json', -1, true, false)
  local oldFiles = FS:findFiles(oldRootDir, '*.json', -1, true, false)
@/lua/ge/extensions/freeroam/bigMapMode.lua
local function includeClustersInBbox(bbox)
  for i, poi in ipairs(gameplay_rawPois.getRawPoiListByLevel(getCurrentLevelIdentifier())) do
    if poi.markerInfo.bigmapMarker then

  if bigMap or (core_camera.getActiveCamName() == "bigMap" and not commands.isFreeCamera()) or not getCurrentLevelIdentifier() then return end
  options = options or {}
  -- if none has been found, use the bigmapMarkers instead
  for i, poi in ipairs(gameplay_rawPois.getRawPoiListByLevel(getCurrentLevelIdentifier())) do
    if poi.id ==  poiId and poi.markerInfo.bigmapMarker then

  for _, poi in ipairs(gameplay_rawPois.getRawPoiListByLevel(getCurrentLevelIdentifier())) do
    if poiId == poi.id then
@/lua/ge/simTimeAuthority.lua
local function pause(paused, playPauseSound)
  if not getCurrentLevelIdentifier() then return end
  if playPauseSound == nil then playPauseSound = true end
@/lua/ge/extensions/freeroam/facilities/fuelPrice.lua
local function setDisplayPrices()
  local levelName = getCurrentLevelIdentifier()
  if not levelName or levelName == '' then log("E","","Tried to get facility without level!") return false end
  d.cachedPriceData = cachedPriceData
  d.currentLevel = getCurrentLevelIdentifier()
  d.levelUnit = levelUnit
local function onDeserialized(data)
  if data.currentLevel and data.currentLevel == getCurrentLevelIdentifier() and data.cachedPriceData then
    cachedPriceData = data.cachedPriceData
  else
    onClientStartMission(getCurrentLevelIdentifier())
  end
@/lua/ge/extensions/gameplay/drift/saveLoad.lua
    spotsById = {}
    local level = getCurrentLevelIdentifier()
    local levelSpotsDir = "/levels/"..level .. "/driftSpots/"
  for _, spot in pairs(getDriftSpotsById()) do
    if spot.level == getCurrentLevelIdentifier() then
      table.insert(spotsForLevel, spot)
@/lua/ge/extensions/editor/barriersEditor.lua
        im.InputText("File pattern", searchText, 1024)
        local level = getCurrentLevelIdentifier()
        if im.MenuItem1("Find for level " .. level) then
@/lua/ge/extensions/career/modules/delivery/generator.lua
    parcelItemTemplates = {}
    local levelInfo = core_levels.getLevelByName(getCurrentLevelIdentifier())
    local files = FS:findFiles("gameplay/delivery/", '*.deliveryParcels.json', -1, false, true)
@/lua/ge/extensions/editor/missionEditor.lua
    local instance = gameplay_missions_missions.getMissionById(shownMission.id)
    local canTeleport = (getCurrentLevelIdentifier() == shownMission.startTrigger.level) and playerVehicle and shownMission.startTrigger
    if not canTeleport then im.BeginDisabled() end
local filterFunctions = {
  onlyCurrentLevel = function(mission, f) return not f or mission.startTrigger.level == getCurrentLevelIdentifier() end,
  hideProcedural = function(mission, f) return not f or not mission.procedural end,
    local sameTypeLevelCount = 1
    local level = getCurrentLevelIdentifier() or "gridmap"
          type = 'coordinates',
          level = getCurrentLevelIdentifier() or "gridmap",
          pos = (beforeCam):toTable(),
@/lua/ge/extensions/career/modules/fuel.lua
local function sendInitialDataToUI()
  local levelInfoData = core_levels.getLevelByName(getCurrentLevelIdentifier())
  local localUnits = {}
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/raceEndScreen.lua
    scenario.highscores.place = place
    --[[scenario.highscores.singleScores = core_highscores.getScenarioHighscores(getCurrentLevelIdentifier(), self.mgr.activity.missionTypeData.trackName, getConfigKey(false,nil,0,race))
    for _,v in ipairs(scenario.highscores.singleRound) do
@/lua/ge/extensions/editor/createObjectTool.lua
  end
  obj:setTerrFileLvlFolder("/levels/".. (true and getCurrentLevelIdentifier() or "") )
  return true
@/lua/ge/extensions/gameplay/sites/sitesManager.lua
M.onClientStartMission = function()
  currentLevel = getCurrentLevelIdentifier()
end
  sitesByLevel = data.sitesByLevel
  currentLevel = data.currentLevel or getCurrentLevelIdentifier()
  for fp, s in pairs(data.sitesCache) do
  if not sitesByLevel then M.getAllLevelSites() end
  return sitesByLevel[getCurrentLevelIdentifier()] or {}
end
@/lua/ge/extensions/editor/crawlEditor/presets.lua
local function getCurrentLevelCrawlPath()
  local levelName = getCurrentLevelIdentifier()
  if not levelName then
local function getPresetsFile()
  local levelName = getCurrentLevelIdentifier()
  if not levelName then
@/lua/ge/extensions/gameplay/statistic.lua
local function startActivity(levelPath)
  local levelFolder = getCurrentLevelIdentifier()
  -- if not levelPath then
@/lua/ge/extensions/gameplay/rally/tools/loopToolbox.lua
    missionType = "rallyLoop",
    level = getCurrentLevelIdentifier()
  })
@/lua/ge/extensions/gameplay/drag/saveSystem.lua
local function getCurrentLevelDragPath()
  local levelName = getCurrentLevelIdentifier()
  if not levelName then
@/lua/ge/extensions/editor/dragRaceEditor/facilities.lua
    -- Get the current level path and construct full file path
    local levelName = getCurrentLevelIdentifier()
    if levelName then
  -- Get all strips in the current level using the save system
  local levelName = getCurrentLevelIdentifier()
  local allStrips = dragSaveSystem.getAllStrips()
@/lua/ge/extensions/career/career.lua

  if not getCurrentLevelIdentifier() or (getCurrentLevelIdentifier() ~= levelToLoad) then
    spawn.preventPlayerSpawning = true

  if not getCurrentLevelIdentifier() or (getCurrentLevelIdentifier() ~= levelToLoad) then
    spawn.preventPlayerSpawning = true
  deactivateCareer(saveCareer)
  freeroam_freeroam.startFreeroam(path.getPathLevelMain(getCurrentLevelIdentifier()))
end

  data.level = getCurrentLevelIdentifier()
  data.boughtStarterVehicle = boughtStarterVehicle
@/gameplay/missionTypes/rallyLoop/editor.lua
    missionType = missionType,
    level = getCurrentLevelIdentifier()
  })
@/lua/ge/extensions/gameplay/markerInteraction.lua
  -- check if we've switched level
  local level = getCurrentLevelIdentifier()
  if level then
@/lua/ge/extensions/gameplay/drift/freeroam/driftSpots.lua
  if gameplay_drift_general.getGeneralDebug() then profiler:start() end
  if getCurrentLevelIdentifier() ~= nil and getCurrentLevelIdentifier() ~= lastFrameLevel then
    loadAndSanitizeData()
  if gameplay_drift_general.getGeneralDebug() then profiler:start() end
  if getCurrentLevelIdentifier() ~= nil and getCurrentLevelIdentifier() ~= lastFrameLevel then
    loadAndSanitizeData()
  end
  lastFrameLevel = getCurrentLevelIdentifier()
  if not gameplay_drift_drift.getVehPos() then return end
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/raceHighscoresComplete.lua
        record,
        getCurrentLevelIdentifier(),
        "mission-"..self.mgr.activity.missionTypeData.trackName,
      local scores = core_highscores.getScenarioHighscores(
        getCurrentLevelIdentifier(),
        "mission-"..self.mgr.activity.missionTypeData.trackName,
@/lua/ge/extensions/gameplay/garageMode.lua
  if not active then return end
  if getCurrentLevelIdentifier() == levelName then
    -- get the level info
    for _, level in ipairs(core_levels.getList()) do
      if string.lower(level.levelName) == string.lower(getCurrentLevelIdentifier()) then
        levelInfo = level
local function onThumbnailTriggered(active)
  if getCurrentLevelIdentifier() == levelName then
    if active then
@/lua/ge/extensions/util/richPresence.lua
local function onClientPostStartMission(levelPath)
  local currentLevel = getCurrentLevelIdentifier() or ''
  M.state.levelIdentifier = string.lower(currentLevel)
@/lua/ge/extensions/editor/perfProfiler.lua
    end
    local levelName = getCurrentLevelIdentifier()
    if not levelName then
@/lua/ge/extensions/core/recoveryPrompt.lua
local function addTowingButtons()
  if not getCurrentLevelIdentifier() then return end
  local garages = freeroam_facilities.getFacilitiesByType("garage")
local function addTaxiButtons()
  if not getCurrentLevelIdentifier() then return end
  local garages = freeroam_facilities.getFacilitiesByType("garage")
@/lua/ge/extensions/career/modules/inventory.lua
local function getClosestGarage(pos)
  local facilities = freeroam_facilities.getFacilities(getCurrentLevelIdentifier())
  local playerPos = pos or getPlayerVehicle(0):getPosition()
@/lua/ge/extensions/tech/techCore.lua
    resp['scenario_state'] = scenario_scenarios.getScenario().state
    resp['level'] = getCurrentLevelIdentifier()
  elseif  state == 'freeroam' then
@/lua/ge/extensions/editor/dragRaceEditor/strips.lua
    -- Get the current level path and construct full file path
    local levelName = getCurrentLevelIdentifier()
    if levelName then
@/lua/ge/extensions/career/modules/spawnPoints.lua
local function getSpawnPointTranslation(spawnPointName)
  local levelData = core_levels.getLevelByName(getCurrentLevelIdentifier())
  if levelData and levelData.spawnPoints then
  if not career_modules_linearTutorial.getTutorialFlag('spawnPointDiscoveryEnabled') then return end
  if not (getCurrentLevelIdentifier() and career_modules_inventory and career_modules_inventory.getCurrentVehicle() and getPlayerVehicle(0)) then return end
  lastUpdateTimer = lastUpdateTimer + dtReal

  local currentLevel = getCurrentLevelIdentifier()
  if not currentLevel then return end
@/lua/ge/extensions/util/screenshotCreator.lua
local function isInShowroom()
  return getCurrentLevelIdentifier() == "showroom_v2"
end
@/lua/ge/extensions/freeroam/freeroam.lua

  local levelName = getCurrentLevelIdentifier()
  local level = core_levels.getLevelByName(levelName)
      -- Get time of day options for the current level
      local levelName = getCurrentLevelIdentifier()
      local timeOfDayOptions = core_levels.getTimeOfDayOptions(levelName)

   startAssociatedFlowgraph(getCurrentLevelIdentifier())
end

  if getCurrentLevelIdentifier() == nil or forceLoad then
    local level = core_levels.getLevelByName(levelName)
@/lua/ge/extensions/editor/dragRaceEditor/dragSettings.lua
  -- Load settings from level folder
  local levelName = getCurrentLevelIdentifier()
  log('D', 'drag_race_editor', 'Loading settings for level: ' .. tostring(levelName))
@/lua/ge/extensions/ui/uiNavi.lua
  local d = {}
  local levelId = getCurrentLevelIdentifier()
  if levelId then
    }
    local levelData = core_levels.getLevelByName(getCurrentLevelIdentifier())
    if levelData then
@/lua/ge/extensions/career/modules/vehicleShopping.lua
  -- get the dealerships from the level
  local facilities = deepcopy(freeroam_facilities.getFacilities(getCurrentLevelIdentifier()))
  for _, dealership in ipairs(facilities.dealerships) do
@/lua/ge/extensions/freeroam/bigMapPoiProvider.lua
M.clearMissionsFromMinimap = function()
  if getCurrentLevelIdentifier() then
    guihooks.trigger("NavigationStaticMarkers", {key = 'missions', items = {}})
local function generateCacheData()
  local level = getCurrentLevelIdentifier()
  local data = {poiData = {}, levelData = {}, branchIcons = getBranchIcons()}
  local level = getCurrentLevelIdentifier()
  for _, lvl in ipairs(core_levels.getList()) do
    if string.lower(lvl.levelName) == getCurrentLevelIdentifier() then
      data.levelData = lvl
  -- check if we've switched level
  local level = getCurrentLevelIdentifier()
  if level then
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
          ffi.copy(saveSettings.description, string.gsub(json.description or "", "\\n", "\n"))
          saveSettings.saveOnMap[0] = json.level == getCurrentLevelIdentifier()--core_levels.getLevelName(getMissionFilename())
          saveSettings.saveEnvironment[0] = json.environment ~= nil
@/lua/ge/extensions/editor/missionStartPositionEditor.lua
  if not mission then return {} end
  local currentLevel = getCurrentLevelIdentifier()
  local allMissions = gameplay_missions_missions.getFilesData() or {}
  -- Get all missions in the current level
  local currentLevel = getCurrentLevelIdentifier()
  local allMissions = gameplay_missions_missions.getFilesData() or {}
@/lua/ge/extensions/editor/missionEditor/startTrigger.lua

  if getCurrentLevelIdentifier() == self.mission.startTrigger.level then
    local radius = self.mission.startTrigger.radius
function C:getStartTriggerTransform()
  if getCurrentLevelIdentifier() == self.mission.startTrigger.level then
    return transformHelper
@/lua/ge/extensions/editor/terrainEditor.lua
    end
    terrBlock:setTerrFileLvlFolder("/levels/".. (true and getCurrentLevelIdentifier() or "") )
    -- TODO: Update 'terrainBlocks' table that contains all existing TerrainBlock objects
@/lua/ge/extensions/gameplay/crawl/saveSystem.lua
local function getCurrentLevelCrawlPath()
  local levelName = getCurrentLevelIdentifier()
  if not levelName then
@/lua/ge/extensions/editor/assetDeduplicator.lua
    end
    if getCurrentLevelIdentifier() then
      if not cacheData['currentLevel'] or not cacheData['currentLevel'][getCurrentLevelIdentifier()] then
    if getCurrentLevelIdentifier() then
      if not cacheData['currentLevel'] or not cacheData['currentLevel'][getCurrentLevelIdentifier()] then
        cacheData['currentLevel'] = nil
      jobData.cacheFile = cacheFile
      jobData.currentLevelId = getCurrentLevelIdentifier()
      jobData.cacheVersion = cacheVersion
        jobData.cacheData = cacheData
        jobData.currentLevelId = getCurrentLevelIdentifier()
        jobData.modLink = modLink
        popupData.matches = compareFilesJob.matches
        popupData.currentLevelId = getCurrentLevelIdentifier()
        popupData.description = "Found matches by file hash:"
@/lua/ge/extensions/tech/pythonExport.lua
local function getScenarioConfig(buffer, vehicle, vehData)
  local line = string.format("scenario = Scenario('%s', 'we_export')\n", getCurrentLevelIdentifier())
  buffer:put(line)
@/lua/ge/extensions/editor/crawlEditor.lua

  local currentLevel = getCurrentLevelIdentifier()
  if currentLevel then
  local missions = {}
  local currentLevel = getCurrentLevelIdentifier()
  if not currentLevel then

  local currentLevel = getCurrentLevelIdentifier()
  if not currentLevel then

  local currentLevel = getCurrentLevelIdentifier()
  if not currentLevel then

  local currentLevel = getCurrentLevelIdentifier()
  if not currentLevel then
  editor.showWindow(toolWindowName)
  local currentLevel = getCurrentLevelIdentifier()
  if currentLevel then
@/lua/ge/extensions/gameplay/parking.lua
local function getLevelRegion() -- returns the level region
  local fileName = path.getPathLevelInfo(getCurrentLevelIdentifier() or '')
  local info = jsonReadFile(fileName)
@/lua/ge/map.lua
  rules = {rightHandDrive = false, turnOnRed = false} -- default road rules
  local fileName = path.getPathLevelInfo(getCurrentLevelIdentifier() or '')
  local info = jsonReadFile(fileName)
@/lua/ge/extensions/gameplay/playmodeMarkers.lua
  if not playmodeClusters then
    local pois, rawPoiGeneration = gameplay_rawPois.getRawPoiListByLevel(getCurrentLevelIdentifier())
@/lua/ge/extensions/gameplay/missions/missions.lua
local function formatMissionToRawPoi(m, elements, levelIdentifier)
  levelIdentifier = levelIdentifier or getCurrentLevelIdentifier()
  if m.unlocks.startable and m.unlocks.visible then
@/lua/ge/extensions/freeroam/bigMapMarkers.lua
local function getAllClustersBySettings(settingsId)
  local elements, rawPoiGeneration = gameplay_rawPois.getRawPoiListByLevel(getCurrentLevelIdentifier())
  if clusterGeneration < rawPoiGeneration then
@/lua/ge/extensions/editor/driftDataEditor.lua
    -- Load the info.json file
    local infoPath = "levels/"..getCurrentLevelIdentifier().."/driftSpots/"..tempSpot.id:match("([^/]+)$").."/info.json"
    tempSpot.info = jsonReadFile(infoPath) or {
  end
  FS:remove("levels/"..getCurrentLevelIdentifier().."/driftSpots/"..spotId)
end
    }
    local path = "levels/"..getCurrentLevelIdentifier().."/driftSpots/"..name
    jsonWriteFile(path.."/".."spot.driftSpot.json", newSpotData, true)
local function createNewDriftSpot(name)
  local path = "levels/"..getCurrentLevelIdentifier().."/driftSpots/"..name

  local id = getCurrentLevelIdentifier().."/"..name

    if getCurrentLevelIdentifier() ~= nil then
      defaultPointsCopy = gameplay_drift_scoring.getScoreOptions().defaultPoints
@/ui/ui-vue/dist/index.js
    if core_camera then core_camera.requestConfig() end    -- cameraConfig
  `);async function init$3(){for(let key in active=!0,(window.beamng&&!window.beamng.shipping||editor)&&(watchers$1.push(watch(()=>settingsValues.value,updateSettingsList)),watchers$1.push(watch(()=>layout.value,async()=>{await settings$1.waitForData(),updateSettingsList()}))),events$3.on(`SettingsChanged`,()=>settingsTimestamp.value=Date.now()),watchers$1.push(watch(customValues,()=>settingsTimestamp.value=Date.now(),{deep:!0})),events$3.on(`externalUIURL`,data=>customValues.externalUIURL=data||``),events$3.on(`OpenXRStateChanged`,data=>customValues.openXRstate=data),events$3.on(`CameraConfigChanged`,data=>{customValues.cameraConfigList=Array.isArray(data.cameraConfig)?data.cameraConfig:[],customValues.cameraConfigFocused=data.focusedCamName}),updateCustom(),await settings$1.waitForData(),settings$1.values)initialValues[key]=settings$1.values[key];settingsTimestamp.value=Date.now(),setupSearch(layout,settingsValues,settingsOptions,settingsTimestamp,conditions)}let settingsValues=computed(()=>{if(!active||!settings$1.values)return{};let res={...settings$1.values};for(let key in valueFormatters)res[key]=valueFormatters[key](res[key],settings$1.values,customValues);for(let key in valueExtensions)res[key]=valueExtensions[key](settings$1.values,customValues);return res}),settingsOptions=computed(()=>{let res={};if(!active||!settings$1.options||!settings$1.values)return res;for(let key in settings$1.options)key in optionFormatters?res[key]=optionFormatters[key](settings$1.options[key],settings$1.options,settings$1.values):res[key]=guessOptionFormat(settings$1.options[key]);for(let key in optionExtensions)res[key]=optionExtensions[key](settings$1.options,settings$1.values);return res}),editor=null,layout=ref(layout_default);function updateSettingsList(){if(!active)return;settingsList.value=Object.keys(settingsValues.value).reduce((res,name)=>({...res,[name]:{assigned:!1,assignedIn:[],value:settingsValues.value[name],options:settingsOptions.value[name],elementId:name.split(`.`)}}),{});function dive(items$2,cat,catIndex,level$1=0,parentId=``){for(let i=0;i{let values=name in applyValueFormatters?applyValueFormatters[name](value):{[name]:value};for(let key in name.startsWith(`debug_`)&&(customValues.debug[name.substring(6)]=value,name===`debug_visualization`&&(customValues.debug.visualization_prev&&api$1.engineLua(customValues.debug.visualization_prev),customValues.debug.visualization_prev=value,api$1.engineLua(value))),values)key in settings$1.values||delete values[key];Object.keys(values).length>0&&(logger_default.debug(`Applying:`,JSON.stringify(values)),settings$1.apply(values),updateCustom())};function dispose$2(){active=!1,settingsList.value={};for(let unwatch of watchers$1)unwatch();watchers$1.splice(0),settingsTimestamp.value=0,disposeSearch(),null?.dispose()}return provide(`settingsValues`,settingsValues),provide(`settingsOptions`,settingsOptions),provide(`settingsTimestamp`,settingsTimestamp),provide(`settingsList`,settingsList),provide(`conditions`,conditions),provide(`buildItemId`,buildItemId),{init:init$3,dispose:dispose$2,versions:VERSIONS,version:VERSIONS[0],settings:settings$1,settingsList,settingsValues,settingsOptions,settingsTimestamp,applySetting,buildItemId,layout,conditions,editable:!1,editor:null,searchText,searchResults,searchTemplates:{message:(...args)=>searchTemplates.message(layout,...args),headers:(...args)=>searchTemplates.headers(layout,...args),group:(...args)=>searchTemplates.group(layout,...args)}}}var _hoisted_1$19={class:`options-wrapper`,"bng-ui-scope":`options`},_hoisted_2$13={class:`options-heading`},_hoisted_3$12={key:0,class:`options-container`},_hoisted_4$9={class:`background`},_hoisted_5$8={class:`options-content-wrapper`},_hoisted_6$5={class:`options-message`},_hoisted_7$5={class:`message-content`},_hoisted_8$3={key:1,class:`options-categories`},_hoisted_9$2={key:0,class:`categories-divider`},_hoisted_10$1={key:2,class:`options-container`},_hoisted_11$1={class:`options-subcategories`},_hoisted_12$1={class:`background`},_hoisted_13$1={key:0,class:`categories-divider`},_hoisted_14$1={key:1,class:`categories-spacer`},_hoisted_15$1={key:0,class:`categories-spacer`},_hoisted_16$1={key:1,class:`categories-divider`},_hoisted_17$1={class:`options-content-wrapper`},_hoisted_18$1={key:0,class:`options-add-item`},_hoisted_19$1={key:1,class:`options-content`,"bng-ui-scope":`options-content`},_hoisted_20$1={key:2,class:`options-content`,"bng-ui-scope":`options-content`},_hoisted_21$1={class:`background`},_hoisted_22$1=[`innerHTML`],_hoisted_23$1={key:0,class:`options-info-fps`},_sfc_main$23={__name:`OptionsView`,props:{category:String},setup(__props){useUINavScope(`options`);let router$1=useRouter(),route=useRoute(),{api:api$1}=useBridge(),options=useOptions(),loaded=ref(!1),itemsContainer=ref(null),activeScope=ref(``),props=__props;provide(`version`,options.version);let EditUI=ref(null),itemEdit=(...args)=>EditUI.value?.functions.itemEdit?.(...args),categoryEdit=(...args)=>EditUI.value?.functions.categoryEdit?.(...args),catItemsPaste=(...args)=>EditUI.value?.functions.catItemsPaste?.(...args);provide(`EditUI`,EditUI);let editable=ref(!1);provide(`editable`,editable);let categories=computed(()=>options.layout.value.items||[]),categoryIds=computed(()=>categories.value.map(cat=>cat.categoryId)),categoryIndex=ref(-1);provide(`categoryIndex`,categoryIndex);let allCategories=computed(()=>{let cats=[...categories.value].map(cat=>({...cat})),startIndex=0;for(let i=0;istartIndex&&(cats[ri].subcategoryMode=hadSpacer?`none`:ri===i?`last`:ri===startIndex+1?`first`:`middle`)}}else startIndex=i,cat.indexRange=[i,i]}let hidden=[];for(let cat of cats)if(!(!cat.condition_visible||cat.condition_visible in options.conditions&&options.conditions[cat.condition_visible](options.settingsValues.value)))if(cat.subcategory)hidden.push(cat.categoryIndex);else for(let i=cat.indexRange[0];i<=cat.indexRange[1];i++)hidden.push(i);return options.editable?cats.map(cat=>(cat.hiddenByCondition=hidden.includes(cat.categoryIndex),cat.debugSettings=cat.condition_visible===`__notForShipping`,cat)):hidden.length>0?cats.filter(cat=>!hidden.includes(cat.categoryIndex)):cats}),categoriesView=computed(()=>allCategories.value.filter(cat=>!cat.subcategory&&!cat.persistent&&!cat.spacer)),categoryRange=computed(()=>categoriesView.value.find(cat=>categoryIndex.value>=cat.indexRange[0]&&categoryIndex.value<=cat.indexRange[1])?.indexRange||[categoryIndex.value,categoryIndex.value]),subcategoriesView=computed(()=>{let res=categoryIndex.value===-1?[]:allCategories.value.filter(cat=>!cat.persistent&&cat.categoryIndex>=categoryRange.value[0]&&cat.categoryIndex<=categoryRange.value[1]);return res.length>0&&(res[0]={...res[0],label:`ui.options.general`}),res}),persistentView=computed(()=>allCategories.value.filter(cat=>cat.persistent)),itemsNew=ref([]),itemsNewShow=ref(!1),itemsNewView=computed(()=>itemsNewShow.value?itemsNew.value:[]);options.editor&&watch(options.layout,()=>itemsNew.value.splice(0));function renderNewOptions(doRender=!0){if(itemsNewShow.value=doRender,!doRender||itemsNew.value.length>0)return;function dive(parent){if(parent.version!==options.version)for(let i=parent.items.length-1;i>=0;i--){let item=parent.items[i];item.items&&(item.items.length>0&&dive(item),item.items.length>0)||item.version!==options.version&&parent.items.splice(i,1)}}let layout=JSON.parse(JSON.stringify(options.layout.value.items));for(let i=layout.length-1;i>=0;i--){let cat=layout[i];dive(cat),cat.items.length>0&&itemsNew.value.push(options.searchTemplates.group(cat.label,cat.icon,cat.items))}}provide(`renderNewOptions`,renderNewOptions);let itemsView=computed(()=>[...categoryIndex.value>-1&&categoryIndex.value{renderNewOptions(!1),categoryIndex.value>-1&&(special.value=null,searchActive.value=!1,options.searchText.value=``),itemsContainer.value&&itemsContainer.value.scrollTo({top:0,behavior:`instant`})}),watch(special,()=>{special.value&&(categoryIndex.value=-1,searchActive.value=!1,options.searchText.value=``)});let searchActive=ref(!1),searchFocused=ref(!1);watch(searchFocused,focused$1=>{focused$1?(searchActive.value=!0,categoryIndex.value=-1,special.value=null):options.searchText.value.length===0&&(searchActive.value=!1,categoryIndex.value=0)});let elCategories=ref(null),elSearch=ref(null),elSearchBinding=ref(null);watch(()=>elSearch.value?.scopeActivated,active=>{activeScope.value=active?``:`content`});function toSearchAndBack(){elSearch.value&&(elSearch.value.scopeActivated=!elSearch.value.scopeActivated)}function fromContent(){searchActive.value?elSearch.value.scopeActivated=!0:activeScope.value=`subcategories`}function mainCatNav(evt){!elCategories.value||!evt.detail||(options.searchText.value=``,elSearch.value.scopeActivated=!1,searchActive.value=!1,activeScope.value=`subcategories`,evt.detail.name===`tab_l`?elCategories.value.activatePrev():evt.detail.name===`tab_r`&&elCategories.value.activateNext(),evt.stopPropagation())}function catNavigate(cat){cat.reroute?window.bngVue.gotoAngularState(cat.reroute):categoryIndex.value!==cat.categoryIndex&&(categoryIndex.value=cat.categoryIndex)}provide(`goToSetting`,(catIndex,itemId)=>{categoryIndex.value=catIndex,nextTick(()=>{let elm=document.getElementById(itemId);elm?(elm.scrollIntoView({behavior:`smooth`,block:`center`}),elm.classList.add(`options-setting-highlight`),setTimeout(()=>elm?.classList.remove(`options-setting-highlight`),5e3)):logger_default.warn(`Setting item not found: ${itemId}`)})});function onChange(data,value){options.applySetting(data.setting,value);let lua;switch(data.itemType){case`checkbox`:value===!0||value===`enable`?lua=data.lua:(value===!1||value===`disable`)&&(lua=data.luaOff);break;default:lua=data.lua}lua&&runLua(lua,value)}function onClick(data){data.lua&&runLua(data.lua)}function runLua(code,value=void 0){code.toLowerCase().includes(`%value%`)&&value!==void 0&&(code=code.replace(/%value%/gi,api$1.serializeToLua(value))),code.toLowerCase().includes(`%values%`)&&(code=code.replace(/%values%/gi,api$1.serializeToLua(options.settings.values)));let isLua=!code.startsWith(`$`);logger_default.log(`Running ${isLua?`lua`:`script`}: ${code}`),isLua?api$1.engineLua(code):api$1.engineScript(code)}function updateRoute(){if(!loaded.value||route.path!==`/options`&&!route.path.startsWith(`/options/`))return;let newRoute={name:`options`};categoryIndex.value>-1&&categoryIndex.valuecategoryIndex.value,(index,oldIndex)=>{index>-1?(special.value=null,updateRoute(),options.editor?.clearSelection(),showCategoryInfo(index,categories.value[index]?.categoryInfo),showCategoryInfo(oldIndex)):showCategoryInfo(oldIndex)}),watch(()=>special.value,val=>{val&&(categoryIndex.value=-1,updateRoute())});function selectDefaultCategory(){if(categories.value.length===0)return!1;if(props.category){let catIndex=categoryIds.value.indexOf(props.category);catIndex>-1?categoryIndex.value=catIndex:special.value=props.category}else categoryIndex.value=0;return!0}let elInfo=ref(),infos=new Map,infoHidden=ref(!1),infoView=ref([]);function showInfo(id,text=void 0){if(infos.has(id))if(text){if(infos.get(id)===text)return}else infos.delete(id);else if(!text)return;text&&infos.set(id,text),infos.size===0?infoView.value=[]:infoView.value=Array.from(infos.entries()).sort((a$1,b)=>a$1[0]-b[0]).map(tip=>({id:tip[0],text:tip[1]}))}function onResize(){elInfo.value&&(infoHidden.value=window.getComputedStyle(elInfo.value).display===`none`)}let unwatchResize=watch(elInfo,()=>{elInfo.value&&(unwatchResize(),onResize())});provide(`showInfo`,showInfo),provide(`infoHidden`,infoHidden);let fps=ref(`?`),fpsShown=ref(!1),fpsTimer;function showFps(show=!0){if(fpsShown.value=show,fpsTimer)show||(clearInterval(fpsTimer),fps.value=`?`,fpsTimer=null);else if(show){let fpsUpdate=()=>{infoHidden.value||api$1.engineLua(`getConsoleVariable("fps::avg")`,val=>fps.value=val?Number(val).toFixed(1):`?`)};fpsTimer=setInterval(fpsUpdate,500),fpsUpdate()}}let catInfoFuncs={fps:showFps},catInfoStack=new Map;function showCategoryInfo(id,info=void 0){if(!id)return;catInfoStack.has(id)&&!info?catInfoStack.delete(id):info&&catInfoStack.set(id,info);let infos$1=Array.from(catInfoStack.values()).reduce((res,name)=>res.includes(name)?res:[...res,name],[]);for(let[name,func]of Object.entries(catInfoFuncs))func(infos$1.includes(name))}function disposeCategoryInfo(){for(let func of Object.values(catInfoFuncs))func(!1)}function back(){editable.value?editable.value=!1:window.bngVue.gotoAngularState(`menu.mainmenu`)}return onBeforeMount(async()=>{api$1.engineLua(`if getCurrentLevelIdentifier() then simTimeAuthority.pushPauseRequest('options') end`)}),onMounted(()=>{if(options.init().then(()=>{loaded.value=!0,nextTick(()=>activeScope.value=`subcategories`)}),!selectDefaultCategory()){let unwatchCats=watch(categories,()=>selectDefaultCategory()&&unwatchCats())}window.addEventListener(`resize`,onResize)}),onUnmounted(()=>{options.searchText.value=``,window.removeEventListener(`resize`,onResize),disposeCategoryInfo(),options.dispose(),api$1.engineLua(`if getCurrentLevelIdentifier() then simTimeAuthority.popPauseRequest('options') end`)}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$19,[createBaseVNode(`div`,_hoisted_2$13,[createVNode(unref(bngScreenHeading_default),null,{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(`ui.options.options`)),1)]),_:1}),unref(options).editor&&EditUI.value?(openBlock(),createBlock(resolveDynamicComponent(EditUI.value.default),{key:0,options:unref(options),categories:categories.value,"category-index":categoryIndex.value,"onUpdate:categoryIndex":_cache[0]||=$event=>categoryIndex.value=$event,special:special.value,"onUpdate:special":_cache[1]||=$event=>special.value=$event,editable:editable.value,"onUpdate:editable":_cache[2]||=$event=>editable.value=$event},null,40,[`options`,`categories`,`category-index`,`special`,`editable`])):createCommentVNode(``,!0)]),loaded.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_3$12,[createVNode(BlurBackground_default),withDirectives(createBaseVNode(`div`,_hoisted_4$9,null,512),[[unref(BngBlur_default)]]),createBaseVNode(`div`,_hoisted_5$8,[createBaseVNode(`div`,_hoisted_6$5,[createBaseVNode(`div`,_hoisted_7$5,toDisplayString(_ctx.$t(`ui.repository.loading`)),1)])])])),loaded.value?(openBlock(),createElementBlock(`div`,_hoisted_8$3,[createVNode(unref(bngOverflowContainer_default),{ref_key:`elCategories`,ref:elCategories,class:`categories-container`,"initial-index":0,"use-bindings-only":``},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(categoriesView.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.divider?(openBlock(),createElementBlock(`div`,_hoisted_9$2)):(openBlock(),createBlock(CategoryTop_default,{key:1,id:`options-cat-`+cat.categoryIndex,index:cat.categoryIndex,"has-subcategories":cat.hasSubcategories,selected:cat.categoryIndex>=categoryRange.value[0]&&cat.categoryIndex<=categoryRange.value[1],icon:cat.icon,onClick:$event=>catNavigate(cat,!1),"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,editable:editable.value,onEditCmd:categoryEdit},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`index`,`has-subcategories`,`selected`,`icon`,`onClick`,`hidden-by-condition`,`debug-settings`,`editable`]))],64))),128))]),_:1},512),createBaseVNode(`div`,{class:normalizeClass([`options-search-input`,{"search-active":searchActive.value}])},[createVNode(unref(bngBinding_default),{ref_key:`elSearchBinding`,ref:elSearchBinding,class:`search-binding`,"ui-event":`context`,controller:``},null,512),createVNode(unref(bngInputNew_default),{ref_key:`elSearch`,ref:elSearch,class:`search-input`,modelValue:unref(options).searchText.value,"onUpdate:modelValue":_cache[3]||=$event=>unref(options).searchText.value=$event,modelModifiers:{trim:!0},"leading-icon":elSearchBinding.value?.displayed?null:unref(icons).search,"floating-label":_ctx.$tt(`ui.common.search`),"show-external-button":searchActive.value,onFocus:_cache[4]||=$event=>searchFocused.value=!0,onBlur:_cache[5]||=$event=>searchFocused.value=!1},null,8,[`modelValue`,`leading-icon`,`floating-label`,`show-external-button`])],2)])):createCommentVNode(``,!0),loaded.value?(openBlock(),createElementBlock(`div`,_hoisted_10$1,[withDirectives((openBlock(),createElementBlock(`div`,_hoisted_11$1,[createVNode(BlurBackground_default),withDirectives(createBaseVNode(`div`,_hoisted_12$1,null,512),[[unref(BngBlur_default)]]),(openBlock(!0),createElementBlock(Fragment,null,renderList(subcategoriesView.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.divider?(openBlock(),createElementBlock(`div`,_hoisted_13$1)):cat.spacer?(openBlock(),createElementBlock(`div`,_hoisted_14$1)):(openBlock(),createBlock(CategorySide_default,{key:2,id:`options-cat-`+cat.categoryIndex,index:cat.categoryIndex,"has-subcategories":cat.hasSubcategories,selected:cat.categoryIndex===categoryIndex.value,subcategory:cat.subcategoryMode,icon:cat.icon,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,onClick:$event=>catNavigate(cat),onFocus:$event=>catNavigate(cat,!1)},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`index`,`has-subcategories`,`selected`,`subcategory`,`icon`,`hidden-by-condition`,`debug-settings`,`onClick`,`onFocus`]))],64))),128)),subcategoriesView.value.length===0&&allCategories.value[categoryIndex.value]?.persistent?(openBlock(),createBlock(CategorySide_default,{key:0,icon:allCategories.value[categoryIndex.value].icon,selected:``},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(allCategories.value[categoryIndex.value].label)),1)]),_:1},8,[`icon`])):createCommentVNode(``,!0),searchActive.value?(openBlock(),createBlock(CategorySide_default,{key:1,icon:`search`,selected:``},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(`ui.common.search`)),1)]),_:1})):special.value===`categories-edit`?(openBlock(),createBlock(CategorySide_default,{key:2,icon:`listIndented`,selected:``},{default:withCtx(()=>[..._cache[11]||=[createTextVNode(`Edit categories`,-1)]]),_:1})):createCommentVNode(``,!0),persistentView.value.length>0?(openBlock(),createElementBlock(Fragment,{key:3},[_cache[13]||=createBaseVNode(`div`,{class:`categories-spacer`},null,-1),editable.value&&special.value===`categories-edit`?(openBlock(),createElementBlock(Fragment,{key:0},[(openBlock(!0),createElementBlock(Fragment,null,renderList(persistentView.value,cat=>(openBlock(),createBlock(CategorySide_default,{key:`cat-`+cat.categoryIndex,id:`options-cat-`+cat.categoryIndex,"has-subcategories":cat.hasSubcategories,subcategory:cat.subcategoryMode,icon:cat.icon,index:cat.categoryIndex,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,editable:``,onClick:$event=>categoryEdit(`edit`,cat.categoryIndex),onEditCmd:categoryEdit},{default:withCtx(()=>[createTextVNode(toDisplayString(cat.spacer||cat.divider?`---`:_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`has-subcategories`,`subcategory`,`icon`,`index`,`hidden-by-condition`,`debug-settings`,`onClick`]))),128)),createVNode(CategorySide_default,{icon:`plus`,onClick:_cache[6]||=$event=>categoryEdit(`add`,!0),style:normalizeStyle(editable.value?{}:{opacity:0,pointerEvents:`none`})},{default:withCtx(()=>[..._cache[12]||=[createTextVNode(`New category`,-1)]]),_:1},8,[`style`])],64)):(openBlock(!0),createElementBlock(Fragment,{key:1},renderList(persistentView.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.spacer?(openBlock(),createElementBlock(`div`,_hoisted_15$1)):cat.divider?(openBlock(),createElementBlock(`div`,_hoisted_16$1)):(openBlock(),createBlock(CategorySide_default,{key:2,id:`options-cat-`+cat.categoryIndex,"has-subcategories":cat.hasSubcategories,selected:cat.categoryIndex===categoryIndex.value,subcategory:cat.subcategoryMode,icon:cat.icon,index:cat.categoryIndex,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,onClick:$event=>catNavigate(cat)},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`has-subcategories`,`selected`,`subcategory`,`icon`,`index`,`hidden-by-condition`,`debug-settings`,`onClick`]))],64))),128))],64)):createCommentVNode(``,!0)])),[[unref(BngScopedNav_default),{activated:!searchActive.value&&activeScope.value===`subcategories`,bubbleWhitelistEvents:[`context`]}],[unref(BngOnUiNav_default),mainCatNav,`tab_l,tab_r`],[unref(BngOnUiNav_default),back,`back,menu`],[unref(BngOnUiNav_default),()=>activeScope.value=`content`,`ok`,{focusRequired:!0}]]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_17$1,[createVNode(BlurBackground_default,{class:normalizeClass([`background`,{"background-no-info":infoHidden.value}])},null,8,[`class`]),withDirectives(createBaseVNode(`div`,{class:normalizeClass([`background`,{"background-no-info":infoHidden.value}])},null,2),[[unref(BngBlur_default)]]),categoryIndex.value>-1?withDirectives((openBlock(),createElementBlock(`div`,{key:0,ref_key:`itemsContainer`,ref:itemsContainer,class:`options-content`,"bng-ui-scope":`options-content`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(itemsView.value,(item,index)=>(openBlock(),createBlock(Item_default,{key:`item-`+categoryIndex.value*1e5+`-`+index,parent:categories.value[categoryIndex.value],index,level:0,data:item,onClick,onChange,onEditCmd:itemEdit},null,8,[`parent`,`index`,`data`]))),128)),editable.value?(openBlock(),createElementBlock(`div`,_hoisted_18$1,[createVNode(unref(bngButton_default),{accent:unref(ACCENTS).outlined,icon:unref(icons).plus,onClick:_cache[7]||=$event=>unref(options).editor.itemAdd(categories.value[categoryIndex.value])},{default:withCtx(()=>[..._cache[14]||=[createTextVNode(`Add new item`,-1)]]),_:1},8,[`accent`,`icon`]),createVNode(unref(bngButton_default),{accent:unref(ACCENTS).outlined,icon:unref(icons).addListItem,disabled:!unref(options).editor.clipItems.value.length,onClick:_cache[8]||=$event=>catItemsPaste()},{default:withCtx(()=>[createTextVNode(`Paste `+toDisplayString(unref(options).editor.clipTitle.value),1)]),_:1},8,[`accent`,`icon`,`disabled`]),createVNode(unref(bngButton_default),{accent:unref(ACCENTS).outlined,icon:unref(options).editor.selectedItems.value.size>0?unref(icons).checkboxOn:unref(icons).checkboxOff,onClick:_cache[9]||=$event=>unref(options).editor.itemSelectAll(categories.value[categoryIndex.value])},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(options).editor.selectedItems.value.size>0?`Deselect all`:`Select all`),1)]),_:1},8,[`accent`,`icon`])])):createCommentVNode(``,!0)])),[[unref(BngUiNavScroll_default),void 0,void 0,{force:!0}]]):searchActive.value?withDirectives((openBlock(),createElementBlock(`div`,_hoisted_19$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(options).searchResults.value,(item,index)=>(openBlock(),createBlock(Item_default,{key:`search-`+index,index,level:0,data:item,onClick,onChange},null,8,[`index`,`data`]))),128))])),[[unref(BngUiNavScroll_default),void 0,void 0,{force:!0}]]):special.value===`categories-edit`?(openBlock(),createElementBlock(`div`,_hoisted_20$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(allCategories.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.persistent?createCommentVNode(``,!0):(openBlock(),createBlock(CategorySide_default,{key:0,id:`options-cat-`+cat.categoryIndex,"has-subcategories":cat.hasSubcategories,subcategory:cat.subcategoryMode,icon:cat.icon,index:cat.categoryIndex,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,editable:editable.value,onClick:$event=>categoryEdit(`edit`,cat.categoryIndex),onEditCmd:categoryEdit},{default:withCtx(()=>[createTextVNode(toDisplayString(cat.spacer||cat.divider?`---`:_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`has-subcategories`,`subcategory`,`icon`,`index`,`hidden-by-condition`,`debug-settings`,`editable`,`onClick`]))],64))),128)),editable.value?(openBlock(),createBlock(CategorySide_default,{key:0,icon:`plus`,onClick:_cache[10]||=$event=>categoryEdit(`add`),style:normalizeStyle(editable.value?{}:{opacity:0,pointerEvents:`none`})},{default:withCtx(()=>[..._cache[15]||=[createTextVNode(`New category`,-1)]]),_:1},8,[`style`])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),createBaseVNode(`div`,{ref_key:`elInfo`,ref:elInfo,class:normalizeClass([`options-info`,{"info-hidden":!!special.value}])},[createVNode(BlurBackground_default),withDirectives(createBaseVNode(`div`,_hoisted_21$1,null,512),[[unref(BngBlur_default)]]),(openBlock(!0),createElementBlock(Fragment,null,renderList(infoView.value,tip=>(openBlock(),createElementBlock(`span`,{key:tip.id,innerHTML:tip.text},null,8,_hoisted_22$1))),128)),_cache[17]||=createBaseVNode(`div`,{class:`options-spacer`},null,-1),fpsShown.value?(openBlock(),createElementBlock(`div`,_hoisted_23$1,[_cache[16]||=createTextVNode(`FPS: `,-1),createBaseVNode(`span`,null,toDisplayString(fps.value),1)])):createCommentVNode(``,!0)],2)])),[[unref(BngScopedNav_default),{activated:activeScope.value===`content`,bubbleWhitelistEvents:[`context`]}],[unref(BngOnUiNav_default),mainCatNav,`tab_l,tab_r`],[unref(BngOnUiNav_default),fromContent,`back`],[unref(BngOnUiNav_default),back,`menu`]])])):createCommentVNode(``,!0)])),[[unref(BngOnUiNav_default),mainCatNav,`tab_l,tab_r`],[unref(BngOnUiNav_default),back,`back,menu`],[unref(BngOnUiNav_default),toSearchAndBack,`context`],[unref(BngUiNavLabel_default),`ui.common.search`,`context`]])}},OptionsView_default=__plugin_vue_export_helper_default(_sfc_main$23,[[`__scopeId`,`data-v-206a0fb3`]]),routes_default$12=[{path:`/options/:category?`,name:`options`,component:OptionsView_default,props:!0,meta:{infoBar:{visible:!0,showSysInfo:!0},uiApps:{shown:!1}}}],cfg={background:[`var(--bng-black-o8)`,`var(--bng-black-o4)`],info:{icon:`var(--bng-cool-gray-500)`,iconSize:.15,label:`var(--bng-off-white)`,labelSize:.05,line:`var(--bng-cool-gray-700)`,lineSize:.0025,hotkey:`#aaa`,hotkeySize:.04,unfocusedColor:`var(--bng-cool-gray-500)`,focusedColor:`var(--bng-off-white)`},button:{top:.45,height:.175,margin:.004,corners:.03,background:`var(--bng-black)`,highlight:`var(--bng-ter-blue-gray-700)`,border:`var(--bng-cool-gray-700)`,borderHighlight:`var(--bng-cool-gray-500)`,borderSize:.0025,folder:`var(--bng-ter-blue-gray-900)`,folderTop:.45,folderHeight:.015,markerTop:.3,markerHeight:.025,marker:`var(--bng-orange)`,icon:`var(--bng-off-white)`,iconSize:.1,majorBackground:[`var(--bng-black)`,`var(--bng-ter-blue-gray-850)`],majorHighlight:[`var(--bng-ter-blue-gray-600)`,`var(--bng-ter-blue-gray-700)`],pinnedDotInvisible:{fill:`transparent`,stroke:`transparent`,r:4},markDotSolid:{fill:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,stroke:`transparent`,r:4},markDotOutline:{fill:`transparent`,stroke:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,r:3},markStar:{fill:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,stroke:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,"stroke-width":2,r:3,isStar:!0,starPoints:5,innerRadius:1.5,outerRadius:3}},pointer:{color:`var(--bng-orange)`,size:6}},size=500,pointerRadius=125,controlsHotkey=``,getHotkey=action=>{let viewerObj=controls_default().makeViewerObj({action});return viewerObj?icons[viewerObj.icon].glyph+` `+viewerObj.control.split(/[ -]/).map(s=>s.substring(0,1).toUpperCase()+s.substring(1)).join(`+`):``},RadialSVG=class{parent;svg;config;events;itemsCont;info;buttons;pointer;menuIcon=``;constructor(events$3={},config=cfg,element=void 0){this.events=events$3,this.config=config,element&&this.create(element)}create(element){this.parent!==element&&(this.parent=element,this.svg||([this.svg,this.itemsCont,this.info,this.pointer]=createSvg(this.config)),this.parent.appendChild(this.svg))}update(items$2=[]){!this.itemsCont||!this.info||(controlsHotkey=getHotkey(`menu_item_focus_ud`),this.buttons=updateSvg(this.itemsCont,this.info,items$2,this.events,this.config,this.buttons||[],this))}dispose(){this.parent&&(this.parent.removeChild(this.svg),this.parent=null,this.svg=null,this.itemsCont=null,this.info=null,this.buttons=null)}setPointer(x,y){if(!this.pointer)return;let magnitude=Math.sqrt(x*x+y*y);magnitude>.1?(x/=magnitude,y/=magnitude,this.pointer.setAttribute(`cx`,x*pointerRadius+size/2),this.pointer.setAttribute(`cy`,-y*pointerRadius+size/2),this.pointer.setAttribute(`display`,`block`)):this.pointer.setAttribute(`display`,`none`)}setMenuIcon(iconName){if(this.menuIcon=iconName,this.info){let iconGlyph=getIconGlyph(this.menuIcon);this.info.icon.textContent=iconGlyph}}},svgns=`http://www.w3.org/2000/svg`,xhtmlns=`http://www.w3.org/1999/xhtml`,pid=Math.PI*2,getIconGlyph=iconName=>(iconName&&iconName in icons?icons[iconName]:icons.beamNG).glyph,setAttrs=(elm,attrs)=>Object.entries(attrs).forEach(attr=>elm.setAttribute(...attr)),setStyles=(elm,styles)=>Object.entries(styles).forEach(rule=>elm.style.setProperty(...rule)),f2size=f=>f*size,getPoint=(turn,radius,center=[.5,.5])=>[center[0]+radius*Math.cos(turn*pid),center[1]+radius*Math.sin(turn*pid)].map(n=>f2size(n).toFixed(5)),drawLine=to=>` L ${to.join(`,`)} `,drawBezier=(control,to)=>` S ${control.join(`,`)} ${to.join(` `)} `,drawArc=(to,radius,invert=!1)=>` A ${radius} ${radius}, 0, 0, ${invert?`0`:`1`}, ${to.join(` `)} `;function createSimplePath(pos,rad,width$1,height$1){let d=`M ${getPoint(pos,rad).join(`,`)} `;return d+=drawArc(getPoint(pos+width$1,rad),f2size(rad),!1),d+=drawLine(getPoint(pos+width$1,rad-height$1)),d+=drawArc(getPoint(pos,rad-height$1),f2size(rad-height$1),!0),d+=drawLine(getPoint(pos,rad)),d+=`Z`,d}function createPath({pos,rad,width:width$1,height:height$1,corner,padout,padin}){corner>height$1&&(corner=height$1);let corh=corner*rad/Math.PI,corv=corner*rad,d=`M ${getPoint(pos+padout+corh,rad).join(`,`)} `;return d+=drawArc(getPoint(pos+width$1-padout-corh,rad),f2size(rad),!1),d+=drawBezier(getPoint(pos+width$1-padout,rad),getPoint(pos+width$1-padout,rad-corv)),d+=drawLine(getPoint(pos+width$1-padout-padin,rad-height$1+corv)),d+=drawBezier(getPoint(pos+width$1-padout-padin,rad-height$1),getPoint(pos+width$1-padout-corh-padin,rad-height$1)),d+=drawArc(getPoint(pos+padout+corh+padin,rad-height$1),f2size(rad-height$1),!0),d+=drawBezier(getPoint(pos+padout+padin,rad-height$1),getPoint(pos+padout+padin,rad-height$1+corv)),d+=drawLine(getPoint(pos+padout,rad-corv)),d+=drawBezier(getPoint(pos+padout,rad),getPoint(pos+padout+corh,rad)),d+=`Z`,d}function updateSvg(cont,info,items$2,events$3,config=cfg,buttons=[],radialInstance=null){let btns=[...buttons||[]],elmsRem=btns.splice(items$2.length);for(let elm of elmsRem)cont.removeChild(elm.element);if(items$2.length<1)return null;for(let index=btns.length;indexicon,file:icon=>`/ui/modules/apps/RadialMenu/mods_icons/`+icon,symbol:icon=>`#`+({radial_Drift_ESC:`radial_drift_ESC`,radial_Sport_ESC:`radial_sport_ESC`,radial_Regular_ESC:`radial_regular_ESC`,radial_ESC:`radial_regular_ESC`}[icon]||icon)};function createButton(index,info,config,item){let btn={index},majorGradId=uniqueSafeId(),majorHighlightGradId=uniqueSafeId(),control=document.createElementNS(svgns,`g`);btn.element=control;function createGradient(id,colors){let grad=document.createElementNS(svgns,`radialGradient`);return setAttrs(grad,{id,cx:`0.5`,cy:`0.5`,r:`0.5`,fx:`0.5`,fy:`0.5`}),colors.forEach((color,index$1)=>{let stop$1=document.createElementNS(svgns,`stop`);setAttrs(stop$1,{offset:index$1/(colors.length-1),"stop-color":color}),grad.appendChild(stop$1)}),grad}let defs=document.createElementNS(svgns,`defs`);defs.appendChild(createGradient(majorGradId,config.button.majorBackground)),defs.appendChild(createGradient(majorHighlightGradId,config.button.majorHighlight)),control.appendChild(defs);let button=document.createElementNS(svgns,`path`);config.button.border&&config.button.borderSize>0&&setAttrs(button,{stroke:config.button.border,"stroke-width":f2size(config.button.borderSize)}),control.appendChild(button);let folder=document.createElementNS(svgns,`path`);folder.setAttribute(`fill`,config.button.folder),control.appendChild(folder);let marker$1=document.createElementNS(svgns,`path`);marker$1.setAttribute(`fill`,`none`),control.appendChild(marker$1);let pinnedDot=document.createElementNS(svgns,`circle`);setAttrs(pinnedDot,config.button.markDotSolid),pinnedDot.setAttribute(`style`,`display: none`),control.appendChild(pinnedDot);let starPath=document.createElementNS(svgns,`path`),starConfig=config.button.markStar,points=starConfig.starPoints||5,innerRadius=starConfig.innerRadius||1.5,outerRadius=starConfig.outerRadius||3,starPathData=``;for(let i=0;ion?iconRect.removeAttribute(`style`):iconRect.setAttribute(`style`,`display: none`),setGlyph=glyph=>iconText.textContent=glyph||``,setImage=path=>{path?(iconImage.setAttribute(`href`,path),iconImage.removeAttribute(`style`)):(iconImage.removeAttribute(`href`),iconImage.setAttribute(`style`,`display: none`))},setSymbol=id=>{id?(iconMask.setAttribute(`mask-type`,`luminocity`),iconSymbol.setAttribute(`href`,id),iconSymbol.removeAttribute(`style`)):(iconMask.setAttribute(`mask-type`,`alpha`),iconSymbol.removeAttribute(`href`),iconSymbol.setAttribute(`style`,`display: none`))},itype=iconType(item$1.icon);switch(itype){case`glyph`:setGlyph(getIconGlyph(item$1.icon)),setRect(!1),setImage(),setSymbol();break;case`symbol`:setImage(),setSymbol(iconGet[itype](item$1.icon)),setRect(!0),setGlyph();break;default:setImage(iconGet[itype](item$1.icon)),setSymbol(),setRect(!0),setGlyph();break}}let hitzone=document.createElementNS(svgns,`path`);setAttrs(hitzone,{fill:`transparent`,style:`pointer-events: fill`}),control.appendChild(hitzone);function updateHitzone(position,length,config$1){hitzone.setAttribute(`d`,createSimplePath(position-length/2,config$1.button.top,length,config$1.button.height))}function updateEvents$1(events$3,radialInstance){btn._handlers&&(hitzone.removeEventListener(`mouseover`,btn._handlers.focus),hitzone.removeEventListener(`mouseleave`,btn._handlers.blur),hitzone.removeEventListener(`click`,btn._handlers.click),hitzone.removeEventListener(`mousedown`,btn._handlers.down),hitzone.removeEventListener(`mouseup`,btn._handlers.up),hitzone.removeEventListener(`contextmenu`,btn._handlers.contextMenu));let item$1=btn.item,index$1=btn.index;return btn.menuIcon=radialInstance?.menuIcon||``,btn._handlers={focus(){if(item$1.focused&&btn._focused)return;let highlightFill=item$1.majorButton?`url(#${majorHighlightGradId})`:config.button.highlight;button.setAttribute(`fill`,highlightFill),button.setAttribute(`stroke`,config.button.borderHighlight),marker$1.setAttribute(`fill`,config.button.marker);let itype=iconType(item$1.icon);itype===`glyph`?(setStyles(info.icon,{"background-color":`transparent`,"-webkit-mask-image":`none`,color:config.info.focusedColor}),info.icon.textContent=getIconGlyph(item$1.icon)):(info.icon.textContent=``,itype===`symbol`&&info.iconSymbol.setAttribute(`href`,iconGet[itype](item$1.icon)),setStyles(info.icon,{"background-color":config.info.icon,"-webkit-mask-image":itype===`symbol`?`url('#${info.iconMaskId}')`:`url('${iconGet[itype](item$1.icon)}')`})),info.label.textContent=typeof item$1.title==`string`?$translate.contextTranslate({txt:item$1.title,context:item$1.context}):$translate.contextTranslate(item$1.title),info.label.style.color=config.info.focusedColor,info.price.textContent=item$1?.price?.money?.amount===void 0?``:item$1.price.money.amount+` `,info.hotkey.textContent=item$1.hotkey||``,info.cont.removeAttribute(`style`),item$1.focused=!0,btn._focused=!0,typeof events$3.focus==`function`&&events$3.focus(item$1,index$1)},blur(){if(!item$1.focused&&!btn._focused)return;let normalFill=item$1.majorButton?`url(#${majorGradId})`:config.button.background;button.setAttribute(`fill`,normalFill),button.setAttribute(`stroke`,config.button.border),marker$1.setAttribute(`fill`,`none`),setStyles(info.icon,{"background-color":`transparent`,"-webkit-mask-image":`none`,color:config.info.unfocusedColor});let iconGlyph=getIconGlyph(btn.menuIcon);info.icon.textContent=iconGlyph,info.label.textContent=`Select an option`,info.price.textContent=``,info.hotkey.textContent=controlsHotkey,info.label.style.color=config.info.unfocusedColor,item$1.focused=!1,btn._focused=!1,typeof events$3.blur==`function`&&events$3.blur(item$1,index$1)},click(evt){evt&&evt.stopPropagation(),!(!item$1.enabled||!events$3||evt&&!evt.fromController&&evt.type!==`ui_nav`)&&(btn._handlers.isDown=!1,typeof events$3.click==`function`&&events$3.click(item$1,index$1))},down(evt){!item$1.enabled||!events$3||evt.button!==0||(btn._handlers.isDown=!0,typeof events$3.down==`function`&&events$3.down(item$1,index$1))},up(evt){!btn._handlers.isDown||!item$1.enabled||!events$3||evt.button!==0||(btn._handlers.isDown=!1,typeof events$3.up==`function`&&events$3.up(item$1,index$1))},contextMenu(evt){evt&&evt.stopPropagation(),events$3&&typeof events$3.contextAction==`function`&&events$3.contextAction(item$1,index$1)}},hitzone.addEventListener(`mouseover`,btn._handlers.focus),hitzone.addEventListener(`mouseleave`,btn._handlers.blur),hitzone.addEventListener(`click`,btn._handlers.click,!0),hitzone.addEventListener(`mousedown`,btn._handlers.down),hitzone.addEventListener(`mouseup`,btn._handlers.up),hitzone.addEventListener(`contextmenu`,btn._handlers.contextMenu),btn._handlers}function updateEnable(item$1){item$1.enabled?(hitzone.setAttribute(`cursor`,`pointer`),control.removeAttribute(`opacity`)):(hitzone.removeAttribute(`cursor`),control.setAttribute(`opacity`,`0.5`))}return btn.update=(item$1,events$3=void 0,radialInstance=null)=>{btn.item=item$1;let length=Math.min(item$1.size,.5),position=(item$1.position-.5)%1;updateButton(position,length,config,item$1),updateHitzone(position,length,config),updateIcon(position,length,config,item$1),updateEnable(item$1),btn._handlers=updateEvents$1(events$3,radialInstance),Object.assign(btn,btn._handlers),(item$1.focused||btn._focused)&&btn._handlers.focus()},btn}function createSvg(config=cfg){let svg=document.createElementNS(svgns,`svg`);setAttrs(svg,{viewBox:`0 0 ${size} ${size}`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,style:`pointer-events: none`});let gradId=Array.isArray(config.background)?uniqueSafeId():null;if(gradId){let grad=document.createElementNS(svgns,`radialGradient`);grad.setAttribute(`id`,gradId);for(let i=0;i{evt.stopPropagation()},!0),svg.appendChild(bg);let nfo={cont:document.createElementNS(svgns,`foreignObject`),body:document.createElementNS(xhtmlns,`body`),wrap:document.createElementNS(xhtmlns,`div`),icon:document.createElementNS(xhtmlns,`div`),iconSymbol:document.createElementNS(svgns,`use`),iconMaskId:uniqueSafeId(),label:document.createElementNS(xhtmlns,`div`),price:document.createElementNS(xhtmlns,`div`),hotkey:document.createElementNS(xhtmlns,`div`)},foMinSize=200,nfoSize=size>=200?size:200;setAttrs(nfo.cont,{style:`display: none`,width:nfoSize,height:nfoSize}),size<200&&nfo.cont.setAttribute(`transform`,`scale(${size*.005})`),nfo.body.setAttribute(`xmlns`,xhtmlns),setStyles(nfo.body,{width:`100%`,height:`100%`}),setStyles(nfo.wrap,{width:`${nfoSize*.5}px`,height:`${nfoSize*.4}px`,margin:`${nfoSize*.3}px ${nfoSize*.25}px`,display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`space-between`,"font-family":`var(--fnt-defs)`}),setStyles(nfo.icon,{color:config.info.icon,"font-size":`${config.info.iconSize*nfoSize}px`,"font-family":`bngIcons`,width:`${config.info.iconSize*nfoSize}px`,height:`${config.info.iconSize*nfoSize}px`,"-webkit-mask-image":`none`,"-webkit-mask-size":`contain`,"-webkit-mask-position":`50% 50%`,"-webkit-mask-repeat":`no-repeat`,"background-color":`transparent`});let iconSvg=document.createElementNS(svgns,`svg`);setAttrs(iconSvg,{viewBox:`0 0 ${config.info.iconSize*nfoSize} ${config.info.iconSize*nfoSize}`,width:`0`,height:`0`,style:`position: absolute;`});let iconMask=document.createElementNS(svgns,`mask`);setAttrs(iconMask,{id:nfo.iconMaskId,maskUnits:`userSpaceOnUse`,maskContentUnits:`userSpaceOnUse`,"mask-type":`luminocity`}),setAttrs(nfo.iconSymbol,{x:`0`,y:`0`,width:config.info.iconSize*nfoSize,height:config.info.iconSize*nfoSize,fill:`#fff`}),iconMask.appendChild(nfo.iconSymbol),iconSvg.appendChild(iconMask),setStyles(nfo.label,{"min-height":`2em`,width:`100%`,"text-align":`center`,color:config.info.label,"font-size":`${config.info.labelSize*nfoSize}px`,"font-family":`var(--fnt-defs)`}),setStyles(nfo.price,{width:`100%`,"text-align":`center`,color:config.info.label,"font-size":`${config.info.labelSize*.8*nfoSize}px`,"font-family":`bngIcons, var(--fnt-defs)`}),setStyles(nfo.hotkey,{width:`80%`,"text-align":`center`,"padding-top":`1px`,"min-height":`${config.info.hotkeySize*nfoSize+10}px`,"border-top":`${config.info.lineSize*nfoSize}px solid ${config.info.line}`,color:config.info.hotkey,"font-size":`${config.info.hotkeySize*nfoSize}px`,"font-family":`bngIcons, "Noto Sans Mono", var(--fnt-defs)`}),nfo.wrap.appendChild(iconSvg),nfo.wrap.appendChild(nfo.icon),nfo.wrap.appendChild(nfo.label),nfo.wrap.appendChild(nfo.price),nfo.wrap.appendChild(nfo.hotkey),nfo.body.appendChild(nfo.wrap),nfo.cont.appendChild(nfo.body),svg.appendChild(nfo.cont);let cont=document.createElementNS(svgns,`g`);svg.appendChild(cont);let pointer=document.createElementNS(svgns,`circle`);return setAttrs(pointer,{r:config.pointer.size,fill:config.pointer.color,display:`none`}),svg.appendChild(pointer),nfo.icon.textContent=getIconGlyph(svg.menuIcon),nfo.label.textContent=`Select an option`,nfo.price.textContent=``,nfo.label.style.color=config.info.unfocusedColor,controlsHotkey=getHotkey(`menu_item_focus_ud`),nfo.hotkey.textContent=controlsHotkey,nfo.cont.removeAttribute(`style`),[svg,cont,nfo,pointer]}var _hoisted_1$18={class:`radial-infos`},_hoisted_2$12={class:`radial-breadcrumbs`},_hoisted_3$11={key:0,class:`radial-categories`},_hoisted_4$8={class:`radial-plate`},_hoisted_5$7={class:`radial-category-label`},_hoisted_6$4={key:0,class:`radial-quick-tabs`},_hoisted_7$4={key:1,class:`radial-description`},sensivity=.5,_sfc_main$22={__name:`Radial`,setup(__props){useUINavScope(`radialMenu`);let infobar=useInfoBar(),controls$1=controls_default(),events$3=useEvents(),radialData=ref({}),temporaryHidden=ref(!1),breadcrumbs=computed(()=>radialData.value&&radialData.value.breadcrumbs&&Array.isArray(radialData.value.breadcrumbs)?radialData.value.breadcrumbs.map(str=>$translate.instant(str)).join(` / `):``),focusedItem=computed(()=>{let items$2=radialData?.value?.items;return items$2&&Array.isArray(items$2)?items$2.find(item=>item.focused):null}),hasLRShoulderButtons=computed(()=>radialData.value&&radialData.value.hasLRShoulderButtons),radialSvg=new RadialSVG({click:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`click`),Lua_default.core_quickAccess.selectItem(index+1,!0,1)},down:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`click`),Lua_default.core_quickAccess.selectItem(index+1,!0,1)},focus:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`focus`)},contextAction:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`focus`),Lua_default.core_quickAccess.contextAction(index+1,!0,1)}}),radialCont=ref(),requestData=async()=>{radialData.value=await Lua_default.core_quickAccess.getUiData();let items$2=Array.isArray(radialData.value.items)?radialData.value.items:[];for(let item of items$2)item.hotkey=getHotkey$1(item.action);radialSvg.setMenuIcon(radialData.value.menuIcon||`beamNG`),radialSvg.update(items$2)},getHotkey$1=action=>{let viewerObj=controls$1.makeViewerObj({action});return viewerObj?icons[viewerObj.icon].glyph+` `+viewerObj.control.split(/[ -]/).map(s=>s.substring(0,1).toUpperCase()+s.substring(1)).join(``):``},setLevel=level$1=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`focus`),Lua_default.core_quickAccess.setEnabled(!0,level$1,!1)},close=()=>{Lua_default.core_quickAccess.setEnabled(!1,``,!1)},back=()=>{radialData.value.backButtonIndex?Lua_default.core_quickAccess.back():close()},switchCategory=left=>{let indexOffset=left?-1:1;for(let i=0;i{let actions=radialData.value.items;for(let i=0;i{if(radialData.value.categories.length>0){switchCategory(evt.detail.name===`tab_l`);return}LRAction(evt.detail.name)},processMouseClick=evt=>{if(!radialSvg.buttons)return;let elm=radialSvg?.buttons?.find(elm$1=>elm$1._focused)||radialSvg?.buttons?.find(elm$1=>elm$1.item.focused);return evt.detail.name===`context`?elm&&elm.contextMenu(evt):elm&&elm.click(evt),elm},isStickActive=(x,y)=>Math.sqrt(x**2+y**2)>sensivity,pointToItem=(x,y)=>{if(!radialSvg.buttons)return;let len=radialSvg.buttons.length,idx=-1;if(radialSvg.setPointer(x,y),x!==0||y!==0){let cursorPos=.5-Math.atan2(y,x)/Math.PI/2;for(let i=0;i=startPos&&cursorPos=startPos||cursorPos-1&&idx{evt.detail.name===`focus_ud`?stickY=evt.detail.value:stickX=evt.detail.value;let stickActiveBefore=stickActive;stickActive=isStickActive(stickX,stickY),stickActive&&pointToItem(stickX,stickY),!stickActive&&stickActiveBefore&&pointToItem(0,0)},dpadX=0,dpadY=0,processDpadInput=evt=>{switch(evt.detail.name){case`focus_l`:dpadX=-evt.detail.value;break;case`focus_r`:dpadX=evt.detail.value;break;case`focus_u`:dpadY=evt.detail.value;break;case`focus_d`:dpadY=-evt.detail.value;break}dpadX=0+ +dpadX,dpadY=0+ +dpadY,pointToItem(dpadX,dpadY)},openFavoriteSelector=()=>{if(radialData.value.pathBeforeCategory===`favorites`){for(let i=0;i{let isOnComponents=event.target.closest(`.radial-categories, .radial-svg, .radial-tab-left, .radial-tab-right`);event.isTrusted&&event.sourceCapabilities?.firesTouchEvents===!1&&!isOnComponents&&(event.button===0?close():event.button===2&&back())};events$3.on(`radialMenuUpdated`,requestData),events$3.on(`RadialTemporaryHide`,hide$2=>{temporaryHidden.value=hide$2}),onBeforeMount(()=>{infobar.clearHints()}),onMounted(()=>{infobar.visible=!0,radialSvg.create(radialCont.value),requestData()});let headingTitle=computed(()=>radialData.value?.breadcrumbs?.[0]?$translate.instant(radialData.value.breadcrumbs[0]):radialData.value?.items?.length?`Radial Menu`:`No Actions Available`),hasCategories=computed(()=>radialData.value?.categories&&(Array.isArray(radialData.value.categories)?radialData.value.categories.length>0:Object.keys(radialData.value.categories).length>0));return(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,{class:normalizeClass([`radial-menu`,{temporaryHidden:temporaryHidden.value}]),"bng-ui-scope":`radialMenu`,onMousedown:handleMouseDown},[createBaseVNode(`div`,_hoisted_1$18,[createVNode(bngCardHeading_default,{class:`radial-title`},{default:withCtx(()=>[createTextVNode(toDisplayString(headingTitle.value),1)]),_:1}),createBaseVNode(`div`,_hoisted_2$12,toDisplayString(breadcrumbs.value),1),hasCategories.value?(openBlock(),createElementBlock(`div`,_hoisted_3$11,[createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-left`,"ui-event":`tab_l`,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallLeft.glyph}'`}),controller:``,onClick:_cache[0]||=$event=>switchCategory(!0)},null,8,[`style`]),createBaseVNode(`div`,_hoisted_4$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(radialData.value.categories,category=>withDirectives((openBlock(),createBlock(unref(bngImageTile_default),{key:category.id,onClick:$event=>setLevel(category.goto),tabindex:`0`,"bng-nav-item":``,class:normalizeClass([`radial-category`,{selected:category.id===radialData.value.selectedCategory}]),icon:unref(icons)[category.icon||`beamNG`]},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_5$7,toDisplayString(unref($translate).instant(category.title)),1)]),_:2},1032,[`onClick`,`class`,`icon`])),[[unref(BngOnUiNav_default),void 0,`ok`,{asMouse:!0,focusRequired:!0}]])),128)),_cache[4]||=createBaseVNode(`div`,{class:`background-plate`},null,-1)]),createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-right`,"ui-event":`tab_r`,controller:``,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallRight.glyph}'`}),onClick:_cache[1]||=$event=>switchCategory(!1)},null,8,[`style`])])):createCommentVNode(``,!0)]),hasLRShoulderButtons.value?(openBlock(),createElementBlock(`div`,_hoisted_6$4,[createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-left`,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallLeft.glyph}'`}),"ui-event":`tab_l`,controller:``,onClick:_cache[2]||=$event=>LRAction(`tab_l`)},null,8,[`style`]),createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-right`,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallRight.glyph}'`}),"ui-event":`tab_r`,controller:``,onClick:_cache[3]||=$event=>LRAction(`tab_r`)},null,8,[`style`])])):createCommentVNode(``,!0),createBaseVNode(`div`,{ref_key:`radialCont`,ref:radialCont,class:`radial-svg`},null,512),focusedItem.value?.desc?(openBlock(),createElementBlock(`div`,_hoisted_7$4,toDisplayString(unref(content_exports).bbcode.parse(unref($translate).contextTranslate(focusedItem.value.desc,!0))),1)):createCommentVNode(``,!0)],34)),[[unref(BngBlur_default),!temporaryHidden.value],[unref(BngOnUiNav_default),openFavoriteSelector,`context`],[unref(BngOnUiNav_default),back,`menu,back`],[unref(BngOnUiNav_default),processTabInput,`tab_l,tab_r`],[unref(BngOnUiNav_default),processStickInput,`focus_lr,focus_ud`],[unref(BngOnUiNav_default),processDpadInput,`focus_l,focus_r,focus_u,focus_d`,{down:!0}],[unref(BngOnUiNav_default),processDpadInput,`focus_l,focus_r,focus_u,focus_d`,{up:!0}],[unref(BngOnUiNav_default),processMouseClick,`ok,context`],[unref(BngUiNavLabel_default),radialData.value.backButtonIndex?`ui.common.back`:`ui.common.close`,`menu,back`],[unref(BngUiNavLabel_default),`Radial menu navigation`,`focus_lr,focus_ud,focus_l,focus_r,focus_u,focus_d`],[unref(BngUiNavLabel_default),`Select`,`ok`],[unref(BngUiNavLabel_default),`Configure Slot`,`context`],[unref(BngUiNavLabel_default),`Switch Category`,`tab_l,tab_r`]])}},Radial_default=__plugin_vue_export_helper_default(_sfc_main$22,[[`__scopeId`,`data-v-9330a4cb`]]),routes_default$13=[{path:`/radial`,name:`radial`,component:Radial_default,meta:{uiApps:{shown:!1}}}],routes_default$14=[{path:`/recovery`,name:`recovery`,component:Recovery_default,props:!0}],isFuelEnergyType=type=>[`gasoline`,`diesel`].includes(type);const useRefuelStore=defineStore(`refuel`,()=>{let{events:events$3}=useBridge(),minSlider=23,maxSlider=80,minEnergy=0,fuelOptions=[{id:1,value:0,name:`FuelType-1`},{id:2,value:1,name:`FuelType-2`},{id:3,value:2,name:`FuelType-3`}],energyTypes=ref([]),fuelTanks=ref([]),overallPrice=ref(0),flowRate=ref(0),currentEnergyType=ref(null),showFuelTypeSettings=ref(!1),showAmountSettings=ref(!1),energyTypesToLocalUnits=ref({}),gasStationName=ref(``),fuelDiscountData=ref({}),isFuelling=computed(()=>flowRate.value>0),currentFuelData=computed(()=>fuelTanks.value.filter(f=>f.energyType===currentEnergyType.value)[0]),currentFuelType=computed(()=>currentEnergyType.value===``?``:isFuelEnergyType(currentEnergyType.value)?`fuel`:`charge`),currentFuelLevel=computed(()=>currentFuelData.value?currentFuelData.value.currentEnergy/currentFuelData.value.maxEnergy:0),canRefuel=computed(()=>currentFuelData.value?currentFuelData.value.currentEnergycanRefuel.value===!0?isFuelling.value===!0?`on`:`off`:`disabled`),canPay=computed(()=>currentFuelData.value.price>0),canStartFuelling=computed(()=>isFuelling.value===!1&&canRefuel.value===!0),canStopFuelling=computed(()=>isFuelling.value===!0),minEnergyLabel=computed(()=>`0 `+getUnitLabel(currentEnergyType.value)),maxEnergyLabel=computed(()=>currentFuelData.value?(isFuelEnergyType(currentEnergyType.value)?convertToLocalUnit(currentFuelData.value.maxEnergy,currentEnergyType.value).toFixed(2):`100`)+` `+getUnitLabel(currentEnergyType.value):``);function getUnitLabel(energyType){return isFuelEnergyType(energyType)?getLocalUnitLabel(energyType):`%`}function getLocalUnit(energyType){return energyTypesToLocalUnits.value[energyType]?energyTypesToLocalUnits.value[energyType]:`L`}let unitToLabel={gallonUS:`gal`},factorSIToLocalUnit={gallonUS:.26417};function getLocalUnitLabel(energyType){let localUnit=getLocalUnit(energyType);return localUnit&&unitToLabel[localUnit]?unitToLabel[localUnit]:`L`}function convertToLocalUnit(valueSI,energyType){let localUnit=getLocalUnit(energyType);return localUnit?valueSI*(factorSIToLocalUnit[localUnit]||1):valueSI}function convertToPricePerLocalUnit(pricePerSI,energyType){let localUnit=getLocalUnit(energyType);return localUnit?pricePerSI/(factorSIToLocalUnit[localUnit]||1):pricePerSI}function startFuelling(){Lua_default.career_modules_fuel.uiButtonStartFueling(currentEnergyType.value)}function stopFuelling(){Lua_default.career_modules_fuel.uiButtonStopFueling(currentEnergyType.value)}function changeFlowRate(newFlowRate){flowRate.value=newFlowRate,Lua_default.career_modules_fuel.onChangeFlowRate(flowRate.value)}function payPrice(){Lua_default.career_modules_fuel.payPrice()}function requestFuelingData(){Lua_default.career_modules_fuel.requestRefuelingTransactionData(),runInBrowser(()=>getMockedData(`career.initialFuelingData`).then(data=>events$3.emit(`initialFuelingData`,data)))}function cancelTransaction(){console.log(`cancelTransaction`),Lua_default.career_modules_fuel.uiCancelTransaction()}function dispose$2(){events$3.off(`initialFuelingData`),events$3.off(`updateFuelData`)}return events$3.on(`initialFuelingData`,data=>{({fuelData:fuelTanks.value,energyTypes:energyTypes.value}=data),currentEnergyType.value=energyTypes.value[0],energyTypesToLocalUnits.value=data.energyTypesToLocalUnits,factorSIToLocalUnit.value=data.factorSIToLocalUnit,gasStationName.value=data.gasStationName,fuelDiscountData.value=data.fuelDiscountData||{},Lua_default.career_modules_fuel.sendUpdateDataToUI()}),events$3.on(`updateFuelData`,data=>{fuelTanks.value.length!==0&&(fuelTanks.value[0].currentEnergy=data.fuelData[0].currentEnergy,fuelTanks.value[0].fueledEnergy=data.fuelData[0].fueledEnergy,fuelTanks.value[0].price=data.fuelData[0].price,overallPrice.value=data.overallPrice,flowRate.value=data.fuelData[0].fuelingActive===!0?1:0)}),{currentFuelData,currentFuelLevel,currentFuelType,currentEnergyType,nozzleMode,overallPrice,isFuelling,energyTypes,canPay,canStartFuelling,canStopFuelling,fuelDiscountData,showFuelTypeSettings,showAmountSettings,gasStationName,startFuelling,stopFuelling,changeFlowRate,payPrice,requestFuelingData,cancelTransaction,getUnitLabel,convertToPricePerLocalUnit,dispose:dispose$2,minEnergyLabel,maxEnergyLabel,minSlider:23,maxSlider:80,fuelOptions}});var _hoisted_1$17={class:`full`,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,x:`0`,y:`0`,viewBox:`6 0 280 280`,width:`280`,height:`280`},_hoisted_2$11={id:`glow`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`},_hoisted_3$10=[`flood-color`],_hoisted_4$7={class:`gauge-label`},_hoisted_5$6={class:`info`},DASH_ARR_LENGTH=455,GAUGE_TYPES=[`refuel`,`recharge`],GAUGE_DEFAULTS={refuel:{cssColour:`var(--bng-orange-b400)`,gradientColour:`255,102,0`,icon:icons.fuelPumpFilling},recharge:{cssColour:`var(--bng-add-blue-600)`,gradientColour:`95,157,249`,icon:icons.charging}},_sfc_main$21={__name:`FuelGauge`,props:{value:{type:Number,default:0},type:{type:String,default:`refuel`,validator:v=>GAUGE_TYPES.includes(v)||v===``},fuelling:{type:Boolean,default:!1},label:String,maxLabel:String,minLabel:String},setup(__props){window.bngVue.isProd;let props=__props,gaugeLevelStyle=computed(()=>({stroke:GAUGE_DEFAULTS[props.type].cssColour,fill:`none`,strokeDasharray:DASH_ARR_LENGTH,strokeDashoffset:DASH_ARR_LENGTH-props.value*DASH_ARR_LENGTH})),gaugeStyle=computed(()=>({background:`radial-gradient(22% 22% at 50% 53%, rgba(${GAUGE_DEFAULTS[props.type].gradientColour}, 0.76) 0%, rgba(${GAUGE_DEFAULTS[props.type].gradientColour}, 0.18) 64.06%, rgba(${GAUGE_DEFAULTS[props.type].gradientColour}, 0) 100%)`}));return(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass({"gauge-wrapper":!0,[__props.type]:!0})},[createBaseVNode(`div`,{class:normalizeClass({"pulse-container":!0,pulsing:__props.fuelling})},[createBaseVNode(`div`,{class:`pulser`,style:normalizeStyle(gaugeStyle.value)},null,4)],2),(openBlock(),createElementBlock(`svg`,_hoisted_1$17,[createBaseVNode(`defs`,null,[createBaseVNode(`filter`,_hoisted_2$11,[createBaseVNode(`feFlood`,{"flood-color":GAUGE_DEFAULTS[__props.type].cssColour,result:`flood1`},null,8,_hoisted_3$10),_cache[0]||=createStaticVNode(``,4)])]),_cache[1]||=createBaseVNode(`path`,{class:`gauge-back`,d:`M50,210 A110,110 0 1,1 244,210`,style:{fill:`none`}},null,-1),createBaseVNode(`path`,{class:`gauge-level blur`,d:`M50,210 A110,110 0 1,1 244,210`,style:normalizeStyle(gaugeLevelStyle.value)},null,4),createBaseVNode(`path`,{class:`gauge-level`,d:`M50,210 A110,110 0 1,1 244,210`,style:normalizeStyle(gaugeLevelStyle.value)},null,4)])),createVNode(unref(bngIcon_default),{class:`icon refill-icon`,type:GAUGE_DEFAULTS[__props.type].icon,color:`#fff`},null,8,[`type`]),createBaseVNode(`div`,_hoisted_4$7,[createBaseVNode(`span`,null,toDisplayString(__props.minLabel),1),createBaseVNode(`span`,_hoisted_5$6,toDisplayString(__props.label||`\xA0`),1),createBaseVNode(`span`,null,toDisplayString(__props.maxLabel),1)])],2))}},FuelGauge_default=__plugin_vue_export_helper_default(_sfc_main$21,[[`__scopeId`,`data-v-04de51fb`]]),_hoisted_1$16={class:`fuel-type`},_sfc_main$20={__name:`FuelTypeSettings`,props:{fuelOptions:{type:Array,required:!0}},emits:[`previousClick`,`nextClick`,`fuelTypeSelect`],setup(__props,{emit:__emit}){let emit$1=__emit;return(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$16,[createVNode(unref(bngButton_default),{class:`arrow empty`,accent:unref(ACCENTS).text,"data-testid":`previous-btn`,icon:unref(icons).arrowLargeLeft,onClick:_cache[0]||=$event=>emit$1(`previousClick`)},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`tab_l`,deviceMask:`xinput`})]),_:1},8,[`accent`,`icon`]),createVNode(unref(bngPillFilters_default),{options:__props.fuelOptions},null,8,[`options`]),createVNode(unref(bngButton_default),{class:`arrow empty`,accent:unref(ACCENTS).text,"data-testid":`next-btn`,iconRight:unref(icons).arrowLargeRight,onClick:_cache[1]||=$event=>emit$1(`nextClick`)},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`tab_r`,deviceMask:`xinput`})]),_:1},8,[`accent`,`iconRight`])]))}},FuelTypeSettings_default=__plugin_vue_export_helper_default(_sfc_main$20,[[`__scopeId`,`data-v-bf968fb2`]]),nozzleModes={on:{color:`var(--bng-orange-b400)`,buttonEnabled:!0},off:{color:`var(--bng-black-o6)`,buttonEnabled:!0},disabled:{color:`var(--bng-black-o2)`,buttonEnabled:!1}},fuellingModes$1={fuel:{nozzleIconType:icons$1.general.fuel_nozzle},charge:{nozzleIconType:icons$1.general.recharge_connector}},_sfc_main$19={__name:`FuelNozzle`,props:{refuelType:{type:String,required:!0},nozzleMode:{type:String,default:`off`}},emits:[`triggerDown`,`triggerUp`],setup(__props,{emit:__emit}){let{showIfController}=storeToRefs(controls_default()),props=__props,emit$1=__emit,nozzleImageURL=computed(()=>`icons/${typeSettings.value.nozzleIconType}.svg`),typeSettings=computed(()=>fuellingModes$1[props.refuelType]),modeSettings=computed(()=>nozzleModes[props.nozzleMode]),nozzleClass=computed(()=>({nozzle:!0,[props.refuelType]:!0}));return(_ctx,_cache)=>(openBlock(),createBlock(unref(bngImageAsset_default),{mask:``,class:normalizeClass(nozzleClass.value),src:nozzleImageURL.value,"bg-color":modeSettings.value.color},{default:withCtx(()=>[createVNode(unref(bngButton_default),{"bng-no-nav":`true`,class:normalizeClass({empty:!0,gamepad:unref(showIfController)}),disabled:!modeSettings.value.buttonEnabled,onMousedown:_cache[0]||=$event=>emit$1(`triggerDown`),onMouseup:_cache[1]||=$event=>emit$1(`triggerUp`),accent:unref(ACCENTS).text},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{action:`fuelVehicle`,deviceMask:`xinput`,disabled:!modeSettings.value.buttonEnabled,accent:unref(ACCENTS).text},null,8,[`disabled`,`accent`]),unref(showIfController)?createCommentVNode(``,!0):(openBlock(),createBlock(unref(bngIcon_default),{key:0,type:unref(icons).plus,title:`Activate`},null,8,[`type`]))]),_:1},8,[`class`,`disabled`,`accent`])]),_:1},8,[`class`,`src`,`bg-color`]))}},FuelNozzle_default=__plugin_vue_export_helper_default(_sfc_main$19,[[`__scopeId`,`data-v-3a31f67d`]]),_hoisted_1$15={class:`cost`},_hoisted_2$10={class:`price`},_hoisted_3$9={class:`per-unit`},_hoisted_4$6={class:`value`},_hoisted_5$5={class:`unit`},_sfc_main$18={__name:`FuelInfo`,props:{totalCost:{type:Number,required:!0},pricePerUnit:{type:Number,required:!0},unitLabel:{type:String,required:!0},fuelDiscountData:{type:Object,required:!1}},setup(__props){let refuelStore=useRefuelStore(),displayPrice=computed(()=>Math.floor(refuelStore.convertToPricePerLocalUnit(props.pricePerUnit,refuelStore.currentEnergyType)*100)+.9),props=__props;return(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`div`,_hoisted_1$15,[createVNode(unref(bngUnit_default),{money:__props.totalCost},null,8,[`money`]),__props.fuelDiscountData.hasFuelDiscount?(openBlock(),createBlock(insurancePerkIcon_default,{key:0,class:`perk-icon`,perkIconData:__props.fuelDiscountData.perkData},null,8,[`perkIconData`])):createCommentVNode(``,!0)]),createBaseVNode(`div`,_hoisted_2$10,[createBaseVNode(`span`,_hoisted_3$9,[createBaseVNode(`span`,_hoisted_4$6,toDisplayString(displayPrice.value),1),_cache[0]||=createBaseVNode(`span`,{class:`divider`},null,-1),createBaseVNode(`span`,_hoisted_5$5,toDisplayString(unref(refuelStore).getUnitLabel(unref(refuelStore).currentEnergyType)),1)])])],64))}},FuelInfo_default=__plugin_vue_export_helper_default(_sfc_main$18,[[`__scopeId`,`data-v-c4955aba`]]),_hoisted_1$14={class:`amount`},_hoisted_2$9={class:`slider-labels`},_hoisted_3$8={class:`amount-value`},_sfc_main$17={__name:`FuelAmountSettings`,props:{minSlider:{type:Number,default:23},maxSlider:{type:Number,default:80},unitLabel:String},setup(__props){return(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$14,[createVNode(unref(bngButton_default),{class:`top-up`,accent:`text`},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`focus_u`,deviceMask:`xinput`}),_cache[0]||=createTextVNode(`Top-up`,-1)]),_:1}),createBaseVNode(`div`,_hoisted_2$9,[createBaseVNode(`span`,null,toDisplayString(`${__props.minSlider}${__props.unitLabel}`),1),createBaseVNode(`span`,null,toDisplayString(`${__props.maxSlider}${__props.unitLabel}`),1)]),createVNode(unref(bngSlider_default),{min:__props.minSlider,max:__props.maxSlider,onValueChanged:()=>{}},null,8,[`min`,`max`]),createBaseVNode(`div`,_hoisted_3$8,[createVNode(unref(bngButton_default),{accent:unref(ACCENTS).text,class:`empty`},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`focus_l`,deviceMask:`xinput`})]),_:1},8,[`accent`]),createVNode(unref(bngInput_default),{class:`value`,suffix:`L`,"initial-value":`1234567`}),createVNode(unref(bngButton_default),{accent:unref(ACCENTS).text,class:`empty`},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`focus_r`,deviceMask:`xinput`})]),_:1},8,[`accent`])])]))}},FuelAmountSettings_default=__plugin_vue_export_helper_default(_sfc_main$17,[[`__scopeId`,`data-v-9de32e0e`]]),_hoisted_1$13={class:`gauge`},_hoisted_2$8={key:0,class:`settings content`},_hoisted_3$7={class:`status-container`},fuellingModes={fuel:{title:`ui.career.refuelling.modes.fuel.title`,gaugeType:`refuel`,nozzleIconType:icons$1.general.fuel_nozzle,fuellingOngoingLabel:`ui.career.refuelling.modes.fuel.ongoing`,startLabel:`ui.career.refuelling.modes.fuel.start`,unitLabel:`L`},charge:{title:`ui.career.refuelling.modes.charge.title`,gaugeType:`recharge`,nozzleIconType:icons$1.general.recharge_connector,fuellingOngoingLabel:`ui.career.refuelling.modes.charge.ongoing`,startLabel:`ui.career.refuelling.modes.charge.start`,unitLabel:`kWh`}},_sfc_main$16={__name:`RefuelMain`,setup(__props){let{$game}=useLibStore(),refuelStore=useRefuelStore(),mainSettings=computed(()=>fuellingModes[refuelStore.currentFuelType]);onBeforeMount(()=>{refuelStore.requestFuelingData()}),onBeforeUnmount(()=>{refuelStore.cancelTransaction()}),onUnmounted(()=>{refuelStore.$dispose()});let store$1=useTasksStore();provide(`animationSettings`,{animate:!0,animateOnMount:!1,animateOnMountIntervalDelay:.2,animateOnEmptyIntervalDelay:.1,animateOnEmpty:!0,animateNextTask:!0,successCallback:playAudio});function playAudio(){$game.lua.Engine.Audio.playOnce(`AudioGui`,`event:>UI>Career>Checkbox`)}return(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[unref(refuelStore).currentFuelData?(openBlock(),createBlock(unref(layoutSingle_default),{key:0},{default:withCtx(()=>[createVNode(unref(bngCard_default),{class:`refuel-card`},{buttons:withCtx(()=>[unref(refuelStore).canPay?(openBlock(),createBlock(unref(bngButton_default),{key:0,onClick:_cache[2]||=$event=>unref(refuelStore).payPrice()},{default:withCtx(()=>[..._cache[5]||=[createTextVNode(`Pay`,-1)]]),_:1})):createCommentVNode(``,!0),unref(refuelStore).canStartFuelling?(openBlock(),createBlock(unref(bngButton_default),{key:1,onClick:_cache[3]||=$event=>unref(refuelStore).startFuelling()},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(mainSettings.value.startLabel)),1)]),_:1})):unref(refuelStore).canStopFuelling?(openBlock(),createBlock(unref(bngButton_default),{key:2,onClick:_cache[4]||=$event=>unref(refuelStore).stopFuelling()},{default:withCtx(()=>[..._cache[6]||=[createTextVNode(`Stop`,-1)]]),_:1})):createCommentVNode(``,!0)]),default:withCtx(()=>[createVNode(unref(bngCardHeading_default),{type:`ribbon`},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(unref(refuelStore).gasStationName)),1)]),_:1}),createBaseVNode(`div`,_hoisted_1$13,[createVNode(FuelGauge_default,{class:`main-gauge`,fuelling:unref(refuelStore).isFuelling,type:mainSettings.value.gaugeType,value:unref(refuelStore).currentFuelLevel,label:unref(refuelStore).isFuelling?_ctx.$t(mainSettings.value.fuellingOngoingLabel):``,minLabel:unref(refuelStore).minEnergyLabel,maxLabel:unref(refuelStore).maxEnergyLabel},null,8,[`fuelling`,`type`,`value`,`label`,`minLabel`,`maxLabel`])]),createVNode(FuelNozzle_default,{"refuel-type":unref(refuelStore).currentFuelType,"nozzle-mode":unref(refuelStore).nozzleMode,onTriggerDown:_cache[0]||=$event=>unref(refuelStore).changeFlowRate(1),onTriggerUp:_cache[1]||=$event=>unref(refuelStore).changeFlowRate(0)},null,8,[`refuel-type`,`nozzle-mode`]),createVNode(FuelInfo_default,{"total-cost":unref(refuelStore).overallPrice,"price-per-unit":unref(refuelStore).currentFuelData.pricePerUnit,"unit-label":mainSettings.value.unitLabel,"fuel-discount-data":unref(refuelStore).fuelDiscountData},null,8,[`total-cost`,`price-per-unit`,`unit-label`,`fuel-discount-data`]),unref(refuelStore).showFuelTypeSettings||unref(refuelStore).showAmountSettings?(openBlock(),createElementBlock(`div`,_hoisted_2$8,[unref(refuelStore).showFuelTypeSettings?(openBlock(),createBlock(FuelTypeSettings_default,{key:0,"fuel-options":unref(refuelStore).fuelOptions},null,8,[`fuel-options`])):createCommentVNode(``,!0),unref(refuelStore).showAmountSettings?(openBlock(),createBlock(FuelAmountSettings_default,{key:1,"min-slider":unref(refuelStore).minSlider,"max-slider":unref(refuelStore).maxSlider,"unit-label":mainSettings.value.unitLabel},null,8,[`min-slider`,`max-slider`,`unit-label`])):createCommentVNode(``,!0)])):createCommentVNode(``,!0)]),_:1})]),_:1})):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_3$7,[createVNode(unref(careerStatus_default),{class:`profileStatus`}),createVNode(unref(TaskList_default),{class:`tasklist`,header:unref(store$1).header,tasks:unref(store$1).tasks},null,8,[`header`,`tasks`])])],64))}},RefuelMain_default=__plugin_vue_export_helper_default(_sfc_main$16,[[`__scopeId`,`data-v-d87fd4e5`]]),routes_default$15=[{path:`/refueling`,name:`refueling`,component:RefuelMain_default,meta:{uiApps:{shown:!1}}}],_hoisted_1$12=[`innerHTML`],_sfc_main$15={__name:`ReleaseInfo`,setup(__props){useUINavScope(`releaseInfo`);let settings$1=useSettings(),parseDescription=descKey=>parse$1($translate.instant(descKey)),descriptionHtml=computed(()=>parseDescription(`ui.releaseInfo.description`)),onFinish=async()=>{backToMenu()},backToMenu=()=>window.bngVue.gotoAngularState(`menu.mainmenu`);return onMounted(async()=>{await settings$1.waitForData()}),(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(WizardView_default),{title:`ui.releaseInfo.title`,preheadings:[`v.${unref(sysInfo_default).versionSimple}`],style:{"--wizard-height":`45rem`},"bng-ui-scope":`releaseInfo`,onWizardFinish:onFinish},{default:withCtx(()=>[createVNode(unref(WizardStep_default),{id:`releaseInfo`,title:`ui.releaseInfo.stepTitle`},{default:withCtx(()=>[createBaseVNode(`div`,{innerHTML:descriptionHtml.value},null,8,_hoisted_1$12)]),_:1})]),_:1},8,[`preheadings`])),[[unref(BngBlur_default)],[unref(BngOnUiNav_default),backToMenu,`menu,back`]])}},ReleaseInfo_default=_sfc_main$15,routes_default$16=[{name:`menu.release-info`,path:`/release-info`,component:ReleaseInfo_default,meta:{infoBar:{visible:!0,showSysInfo:!0},uiApps:{shown:!1}}}],_hoisted_1$11={class:`veh-debug`},_hoisted_2$7={class:`buttons`},_hoisted_3$6={class:`buttons`},_hoisted_4$5={class:`bng-short-select-item`},_hoisted_5$4={class:`label-width`},_hoisted_6$3={key:0},_hoisted_7$3={class:`parts-switch-label`},_hoisted_8$2={class:`control-row`},_hoisted_9$1={class:`control-label`},_hoisted_10={class:`control-row`},_hoisted_11={class:`control-label`},_hoisted_12={key:0},_hoisted_13={class:`control-row`},_hoisted_14={class:`control-label indented`},_hoisted_15={class:`control-group`},_hoisted_16={class:`control-row`},_hoisted_17={class:`control-label indented`},_hoisted_18={class:`control-group`},_hoisted_19={class:`control-row`},_hoisted_20={class:`control-label indented`},_hoisted_21={class:`control-row`},_hoisted_22={class:`control-label indented`},_hoisted_23={class:`control-row`},_hoisted_24={class:`control-label indented`},_hoisted_25={class:`control-group`},_hoisted_26={class:`control-row`},_hoisted_27={class:`control-label indented`},_hoisted_28={class:`control-group`},_hoisted_29={class:`control-row`},_hoisted_30={class:`control-label indented`},_hoisted_31={class:`control-group`},_hoisted_32={class:`control-row`},_hoisted_33={class:`control-label`},_hoisted_34={key:2},_hoisted_35={class:`control-row`},_hoisted_36={class:`control-label indented`},_hoisted_37={class:`control-group`},_hoisted_38={class:`control-row`},_hoisted_39={class:`control-label indented`},_hoisted_40={class:`control-group`},_hoisted_41={class:`control-row`},_hoisted_42={class:`control-label indented`},_hoisted_43={class:`control-row`},_hoisted_44={class:`control-label indented`},_hoisted_45={key:3,class:`control-row`},_hoisted_46={class:`control-label indented`},_hoisted_47={class:`control-group`},_hoisted_48={key:4,class:`control-row`},_hoisted_49={class:`control-label indented`},_hoisted_50={class:`control-row`},_hoisted_51={class:`control-label`},_hoisted_52={key:5},_hoisted_53={class:`control-row`},_hoisted_54={class:`control-label indented`},_hoisted_55={class:`control-group`},_hoisted_56={class:`control-row`},_hoisted_57={class:`control-label indented`},_hoisted_58={class:`control-group`},_hoisted_59={class:`control-row`},_hoisted_60={class:`control-label indented`},_hoisted_61={class:`control-row`},_hoisted_62={class:`control-label indented`},_hoisted_63={class:`control-row`},_hoisted_64={class:`control-label indented`},_hoisted_65={class:`control-group`},_hoisted_66={class:`control-row`},_hoisted_67={class:`control-label indented`},_hoisted_68={class:`control-group`},_hoisted_69={class:`control-row`},_hoisted_70={class:`control-label indented`},_hoisted_71={class:`control-group`},_hoisted_72={class:`control-row`},_hoisted_73={class:`control-label`},_hoisted_74={class:`control-row`},_hoisted_75={class:`control-label indented`},_hoisted_76={class:`control-group`},_hoisted_77={class:`control-row`},_hoisted_78={class:`control-label indented`},_hoisted_79={class:`control-group`},_hoisted_80={class:`control-row`},_hoisted_81={class:`control-label indented`},_hoisted_82={class:`control-row`},_hoisted_83={class:`control-label indented`},_hoisted_84={class:`control-row`},_hoisted_85={class:`control-label indented`},_hoisted_86={class:`control-group`},_hoisted_87={class:`control-row`},_hoisted_88={class:`control-label indented`},_hoisted_89={class:`control-group`},_hoisted_90={class:`control-row`},_hoisted_91={class:`control-label`},_hoisted_92={class:`control-row`},_hoisted_93={class:`control-label indented`},_hoisted_94={class:`control-group`},_hoisted_95={class:`control-row`},_hoisted_96={class:`control-label indented`},_hoisted_97={class:`control-group`},_hoisted_98={class:`control-row`},_hoisted_99={class:`control-label`},_hoisted_100={class:`control-row`},_hoisted_101={class:`control-label`},_hoisted_102={key:10,class:`control-row`},_hoisted_103={class:`control-label indented`},_hoisted_104={class:`control-group`},_hoisted_105={class:`control-row`},_hoisted_106={class:`control-label`},_hoisted_107={key:11,class:`control-row`},_hoisted_108={class:`control-label indented`},_hoisted_109={class:`control-group`},_hoisted_110={class:`control-row`},_hoisted_111={class:`control-label`},_hoisted_112={class:`control-row`},_hoisted_113={class:`control-label`},_hoisted_114={key:12,class:`control-row`},_hoisted_115={class:`control-label indented`},_hoisted_116={class:`control-group`},_hoisted_117={key:13,class:`control-row`},_hoisted_118={class:`control-label`},_hoisted_119={class:`mesh-visibility`},_hoisted_120={class:`control-row`},_hoisted_121={class:`control-label`},_hoisted_122={class:`mesh-buttons`},_hoisted_123={class:`buttons`},_sfc_main$14={__name:`Debug`,setup(__props){useUINavBlocker().blockOnly([`context`]);let{lua,api:api$1}=useBridge(),events$3=useEvents(),state=reactive({}),stateNoReset=reactive({vehicle:{parts:[],partNameToIdx:{},partsSelected:{},partsSelectedIdxs:[]}}),partsState=reactive({partsSorted:[],partsHighlightedIdxs:[]}),partsFiltered=computed(()=>{let res=partsState.partsSorted;return Array.isArray(res)?(partsSelectedSearchTerm.value&&(res=res.filter(part=>part.includes(partsSelectedSearchTerm.value))),res.map(p$1=>{let segments=p$1.split(`/`);return{label:segments[segments.length-1],reversePath:segments.slice(0,-1).reverse().join(`\\`),value:p$1,selected:Array.isArray(partsState.partsHighlightedIdxs)&&partsState.partsHighlightedIdxs.includes(partsState.partsSorted.indexOf(p$1)+1)}})):[]}),shipping=computed(()=>window.beamng&&window.beamng.shipping),geState=reactive({physicsEnabled:!0,debugSpawnEnabled:!1}),partsSelectedSearchTerm=ref(``),disableVehicleButtons=ref(!1),controls$1={vehicle:{buttonGroup_1:[{label:`ui.debug.vehicle.loadDefault`,action:()=>lua.core_vehicles.loadDefault()},{label:`ui.debug.vehicle.spawnNew`,action:()=>lua.core_vehicles.spawnDefault()},{label:`ui.debug.vehicle.removeCurrent`,action:()=>lua.core_vehicles.removeCurrent()},{label:`ui.debug.vehicle.cloneCurrent`,action:()=>lua.core_vehicles.cloneCurrent()},{label:`ui.debug.vehicle.removeAll`,action:()=>lua.core_vehicles.removeAll()},{label:`ui.debug.vehicle.removeOthers`,action:()=>lua.core_vehicles.removeAllExceptCurrent()},{label:`ui.debug.vehicle.resetAll`,action:()=>lua.resetGameplay(-1)},{label:`ui.debug.vehicle.reloadAll`,action:()=>lua.core_vehicle_manager.reloadAllVehicles()}],toggleGroup_1:[{label:`ui.debug.activatePhysics`,key:`physicsEnabled`,onChange:()=>lua.simTimeAuthority.togglePause()},{label:`ui.debug.debugSpawnEnabled`,key:`debugSpawnEnabled`,onChange:()=>lua.core_vehicle_manager.toggleDebug()}]},jbeamvis:{buttonGroup_1:[{label:`ui.debug.vehicle.toggleVis`,action:()=>api$1.activeObjectLua(`bdebug.toggleEnabled()`)},{label:`ui.debug.vehicle.clearSettings`,action:()=>api$1.activeObjectLua(`bdebug.resetModes()`)}],meshVisButtonGroup:[{label:`0%`,action:()=>lua.core_vehicles.setMeshVisibility(0)},{label:`25%`,action:()=>lua.core_vehicles.setMeshVisibility(.25)},{label:`50%`,action:()=>lua.core_vehicles.setMeshVisibility(.5)},{label:`75%`,action:()=>lua.core_vehicles.setMeshVisibility(.75)},{label:`100%`,action:()=>lua.core_vehicles.setMeshVisibility(1)}]},terrain:{buttonGroup_1:[{label:`ui.debug.terrain.groundmodel`,action:()=>api$1.engineLua(`extensions.load("util_groundModelDebug") util_groundModelDebug.openWindow()`)}]}};onMounted(async()=>{geState.physicsEnabled=!await lua.simTimeAuthority.getPause(),geState.debugSpawnEnabled=await lua.core_vehicle_manager.getDebug(),api$1.activeObjectLua(`bdebug.requestState()`),lua.core_gamestate.requestGameState(),lua.extensions.core_vehicle_partmgmt.sendPartsSelectorStateToUI()});let applyState=(notSendBack=!1)=>{notSendBack=!!notSendBack,api$1.activeObjectLua(`bdebug.setState(${api$1.serializeToLua(state)}, ${api$1.serializeToLua(stateNoReset)}, ${notSendBack})`)},partsSelectedChanged=(part,value)=>{Array.isArray(partsState.partsHighlightedIdxs)||(partsState.partsHighlightedIdxs=[]);let idx=partsState.partsSorted.indexOf(part)+1,idxInArray=partsState.partsHighlightedIdxs.indexOf(idx);value&&idxInArray===-1?partsState.partsHighlightedIdxs.push(idx):!value&&idxInArray!==-1&&partsState.partsHighlightedIdxs.splice(idxInArray,1),applyState(!0),lua.extensions.core_vehicle_partmgmt.partsSelectorChanged(partsState)},partsSelectedChecked=()=>partsState.partsHighlightedIdxs.length===partsState.partsSorted.length,partsSelectedIndeterminate=()=>partsState.partsHighlightedIdxs.length!==0&&partsState.partsHighlightedIdxs.length!==partsState.partsSorted.length,partsSelectedClicked=()=>{partsState.partsHighlightedIdxs.length===partsState.partsSorted.length?partsState.partsHighlightedIdxs=[]:partsState.partsHighlightedIdxs=Array.from({length:partsState.partsSorted.length},(_,i)=>i+1),applyState(),lua.extensions.core_vehicle_partmgmt.partsSelectorChanged(partsState)},selectAllParts=computed({get:()=>partsSelectedChecked(),set:()=>partsSelectedClicked()}),beamTextModeItems=computed(()=>state.vehicle?.beamTextModes?state.vehicle.beamTextModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.beamTextMode.${mode.name}`):``})):[]),beamVisModeItems=computed(()=>state.vehicle?.beamVisModes?state.vehicle.beamVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.beamVisMode.${mode.name}`):``})):[]),currentBeamVisMode=computed(()=>state.vehicle?.beamVisModes?state.vehicle.beamVisModes[state.vehicle.beamVisMode-1]:null),nodeTextModeItems=computed(()=>state.vehicle?.nodeTextModes?state.vehicle.nodeTextModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.nodeTextMode.${mode.name}`):``})):[]),currentNodeTextMode=computed(()=>state.vehicle?.nodeTextModes?state.vehicle.nodeTextModes[state.vehicle.nodeTextMode-1]:null),nodeVisModeItems=computed(()=>state.vehicle?.nodeVisModes?state.vehicle.nodeVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.nodeVisMode.${mode.name}`):``})):[]),currentNodeVisMode=computed(()=>state.vehicle?.nodeVisModes?state.vehicle.nodeVisModes[state.vehicle.nodeVisMode-1]:null),torsionBarVisModeItems=computed(()=>state.vehicle?.torsionBarVisModes?state.vehicle.torsionBarVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.torsionBarVisMode.${mode.name}`):``})):[]),currentTorsionBarVisMode=computed(()=>state.vehicle?.torsionBarVisModes?state.vehicle.torsionBarVisModes[state.vehicle.torsionBarVisMode-1]:null),railsSlideNodesModeItems=computed(()=>state.vehicle?.railsSlideNodesVisModes?state.vehicle.railsSlideNodesVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.railsSlideNodesVisMode.${mode.name}`):``})):[]),cogModeItems=computed(()=>state.vehicle?.cogModes?state.vehicle.cogModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.cogMode.${mode.name}`):``})):[]),collisionTriangleModeItems=computed(()=>state.vehicle?.collisionTriangleVisModes?state.vehicle.collisionTriangleVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.collisionTriangleVisMode.${mode.name}`):``})):[]),aeroModeItems=computed(()=>state.vehicle?.aeroModes?state.vehicle.aeroModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.aeroMode.${mode.name}`):``})):[]);return events$3.on(`BdebugUpdate`,(debugState,newStateNoReset)=>{Object.assign(state,debugState),Object.assign(stateNoReset,newStateNoReset)}),events$3.on(`PartsSelectorUpdate`,state$1=>{Object.assign(partsState,state$1)}),events$3.on(`VehicleFocusChanged`,()=>{api$1.activeObjectLua(`bdebug.requestState()`),lua.extensions.core_vehicle_partmgmt.sendPartsSelectorStateToUI()}),events$3.on(`physicsStateChanged`,state$1=>geState.physicsEnabled=!!state$1),events$3.on(`debugSpawnChanged`,state$1=>geState.debugSpawnEnabled=!!state$1),events$3.on(`GameStateUpdate`,gamestate=>disableVehicleButtons.value=gamestate.state.toLowerCase().indexOf(`scenario`)>-1),(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$11,[createBaseVNode(`h3`,null,toDisplayString(_ctx.$tt(`ui.debug.vehicle`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.vehicle.toggleGroup_1,toggle=>(openBlock(),createElementBlock(`div`,{key:toggle.key},[createVNode(unref(bngSwitch_default),{modelValue:geState[toggle.key],"onUpdate:modelValue":$event=>geState[toggle.key]=$event,onValueChanged:$event=>toggle.onChange()},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(toggle.label)),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`onValueChanged`])]))),128)),createBaseVNode(`div`,_hoisted_2$7,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.vehicle.buttonGroup_1,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),disabled:disableVehicleButtons.value,accent:unref(ACCENTS).secondary},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(btn.label)),1)]),_:2},1032,[`onClick`,`disabled`,`accent`]))),128))]),_cache[74]||=createBaseVNode(`hr`,null,null,-1),createBaseVNode(`h4`,null,toDisplayString(_ctx.$tt(`ui.debug.vehicle.jbeamVis`)),1),createBaseVNode(`div`,_hoisted_3$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.jbeamvis.buttonGroup_1,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),accent:unref(ACCENTS).secondary},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(btn.label)),1)]),_:2},1032,[`onClick`,`accent`]))),128))]),createBaseVNode(`div`,_hoisted_4$5,[createBaseVNode(`span`,_hoisted_5$4,toDisplayString(_ctx.$tt(`ui.debug.vehicle.partsSelected`)),1),createVNode(unref(bngDropdownContainer_default),{class:`bng-select-fullwidth dropdown-width`},{default:withCtx(()=>[createVNode(unref(bngList_default),{layout:unref(LIST_LAYOUTS).LIST,"target-width":31},{default:withCtx(()=>[createVNode(unref(bngInput_default),{modelValue:partsSelectedSearchTerm.value,"onUpdate:modelValue":_cache[0]||=$event=>partsSelectedSearchTerm.value=$event,modelModifiers:{trim:!0},"floating-label":_ctx.$t(`ui.debug.vehicle.partsSelectedSearchText`)},null,8,[`modelValue`,`floating-label`]),partsFiltered.value&&partsFiltered.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_6$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(partsFiltered.value,part=>withDirectives((openBlock(),createBlock(unref(bngSwitch_default),{"model-value":part.selected,key:part.value,"label-alignment":unref(LABEL_ALIGNMENTS).START,inline:!1,class:`parts-switch`,onChange:value=>partsSelectedChanged(part.value,value)},{default:withCtx(()=>[createBaseVNode(`span`,_hoisted_7$3,[createBaseVNode(`strong`,null,toDisplayString(part.label),1),createTextVNode(` `+toDisplayString(part.reversePath?`\\`+part.reversePath:``),1)])]),_:2},1032,[`model-value`,`label-alignment`,`onChange`])),[[unref(BngTooltip_default),part.label+` \\ `+part.reversePath,`right`]])),128))])):createCommentVNode(``,!0)]),_:1},8,[`layout`])]),_:1}),createVNode(unref(bngSwitch_default),{modelValue:selectAllParts.value,"onUpdate:modelValue":_cache[1]||=$event=>selectAllParts.value=$event,class:normalizeClass({"switch-indeterminate":partsSelectedIndeterminate(),"switch-width":!0}),onOnClicked:partsSelectedClicked},null,8,[`modelValue`,`class`])]),state.vehicle?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode(`div`,_hoisted_8$2,[createBaseVNode(`span`,_hoisted_9$1,toDisplayString(_ctx.$tt(`ui.debug.vehicle.beamText`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.beamTextMode,"onUpdate:modelValue":_cache[2]||=$event=>state.vehicle.beamTextMode=$event,items:beamTextModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),createBaseVNode(`div`,_hoisted_10,[createBaseVNode(`span`,_hoisted_11,toDisplayString(_ctx.$tt(`ui.debug.vehicle.beamVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.beamVisMode,"onUpdate:modelValue":_cache[3]||=$event=>state.vehicle.beamVisMode=$event,items:beamVisModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),currentBeamVisMode.value&¤tBeamVisMode.value.usesRange?(openBlock(),createElementBlock(`div`,_hoisted_12,[createBaseVNode(`div`,_hoisted_13,[createBaseVNode(`span`,_hoisted_14,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_15,[createVNode(unref(bngSlider_default),{modelValue:currentBeamVisMode.value.rangeMin,"onUpdate:modelValue":_cache[4]||=$event=>currentBeamVisMode.value.rangeMin=$event,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentBeamVisMode.value.rangeMin,"onUpdate:modelValue":_cache[5]||=$event=>currentBeamVisMode.value.rangeMin=$event,type:`number`,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[6]||=$event=>currentBeamVisMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_16,[createBaseVNode(`span`,_hoisted_17,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_18,[createVNode(unref(bngSlider_default),{modelValue:currentBeamVisMode.value.rangeMax,"onUpdate:modelValue":_cache[7]||=$event=>currentBeamVisMode.value.rangeMax=$event,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentBeamVisMode.value.rangeMax,"onUpdate:modelValue":_cache[8]||=$event=>currentBeamVisMode.value.rangeMax=$event,type:`number`,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[9]||=$event=>currentBeamVisMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_19,[createBaseVNode(`span`,_hoisted_20,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[10]||=$event=>currentBeamVisMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_21,[createBaseVNode(`span`,_hoisted_22,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.showInfinity,"onUpdate:modelValue":_cache[11]||=$event=>currentBeamVisMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),state.vehicle.beamVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_23,[createBaseVNode(`span`,_hoisted_24,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showHighlighted`)),1),createBaseVNode(`div`,_hoisted_25,[createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.beamVisShowHighlighted,"onUpdate:modelValue":_cache[12]||=$event=>state.vehicle.beamVisShowHighlighted=$event,disabled:state.vehicle.beamVisMode===3,onValueChanged:applyState},null,8,[`modelValue`,`disabled`])])]),createBaseVNode(`div`,_hoisted_26,[createBaseVNode(`span`,_hoisted_27,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_28,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.beamVisWidthScale,"onUpdate:modelValue":_cache[13]||=$event=>state.vehicle.beamVisWidthScale=$event,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.beamVisWidthScale,"onUpdate:modelValue":_cache[14]||=$event=>state.vehicle.beamVisWidthScale=$event,type:`number`,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_29,[createBaseVNode(`span`,_hoisted_30,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_31,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.beamVisAlpha,"onUpdate:modelValue":_cache[15]||=$event=>state.vehicle.beamVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.beamVisAlpha,"onUpdate:modelValue":_cache[16]||=$event=>state.vehicle.beamVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_32,[createBaseVNode(`span`,_hoisted_33,toDisplayString(_ctx.$tt(`ui.debug.vehicle.nodeText`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.nodeTextMode,"onUpdate:modelValue":_cache[17]||=$event=>state.vehicle.nodeTextMode=$event,items:nodeTextModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),currentNodeTextMode.value&¤tNodeTextMode.value.usesRange?(openBlock(),createElementBlock(`div`,_hoisted_34,[createBaseVNode(`div`,_hoisted_35,[createBaseVNode(`span`,_hoisted_36,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_37,[createVNode(unref(bngSlider_default),{modelValue:currentNodeTextMode.value.rangeMin,"onUpdate:modelValue":_cache[18]||=$event=>currentNodeTextMode.value.rangeMin=$event,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeTextMode.value.rangeMin,"onUpdate:modelValue":_cache[19]||=$event=>currentNodeTextMode.value.rangeMin=$event,type:`number`,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[20]||=$event=>currentNodeTextMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_38,[createBaseVNode(`span`,_hoisted_39,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_40,[createVNode(unref(bngSlider_default),{modelValue:currentNodeTextMode.value.rangeMax,"onUpdate:modelValue":_cache[21]||=$event=>currentNodeTextMode.value.rangeMax=$event,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeTextMode.value.rangeMax,"onUpdate:modelValue":_cache[22]||=$event=>currentNodeTextMode.value.rangeMax=$event,type:`number`,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[23]||=$event=>currentNodeTextMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_41,[createBaseVNode(`span`,_hoisted_42,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[24]||=$event=>currentNodeTextMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_43,[createBaseVNode(`span`,_hoisted_44,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.showInfinity,"onUpdate:modelValue":_cache[25]||=$event=>currentNodeTextMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),state.vehicle.nodeTextMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_45,[createBaseVNode(`span`,_hoisted_46,toDisplayString(_ctx.$tt(`ui.debug.vehicle.maxDist`)),1),createBaseVNode(`div`,_hoisted_47,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.nodeTextMaxDist,"onUpdate:modelValue":_cache[26]||=$event=>state.vehicle.nodeTextMaxDist=$event,min:.1,max:state.vehicle.nodeTextMaxDistCap,step:.1,onValueChanged:applyState},null,8,[`modelValue`,`max`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.nodeTextMaxDist,"onUpdate:modelValue":_cache[27]||=$event=>state.vehicle.nodeTextMaxDist=$event,type:`number`,min:.1,max:state.vehicle.nodeTextMaxDistCap,step:.1,onValueChanged:applyState},null,8,[`modelValue`,`max`])])])),state.vehicle.nodeTextMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_48,[createBaseVNode(`span`,_hoisted_49,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showWheels`)),1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.nodeTextShowWheels,"onUpdate:modelValue":_cache[28]||=$event=>state.vehicle.nodeTextShowWheels=$event,onValueChanged:applyState},null,8,[`modelValue`])])),createBaseVNode(`div`,_hoisted_50,[createBaseVNode(`span`,_hoisted_51,toDisplayString(_ctx.$tt(`ui.debug.vehicle.nodeVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.nodeVisMode,"onUpdate:modelValue":_cache[29]||=$event=>state.vehicle.nodeVisMode=$event,items:nodeVisModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),currentNodeVisMode.value&¤tNodeVisMode.value.usesRange?(openBlock(),createElementBlock(`div`,_hoisted_52,[createBaseVNode(`div`,_hoisted_53,[createBaseVNode(`span`,_hoisted_54,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_55,[createVNode(unref(bngSlider_default),{modelValue:currentNodeVisMode.value.rangeMin,"onUpdate:modelValue":_cache[30]||=$event=>currentNodeVisMode.value.rangeMin=$event,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeVisMode.value.rangeMin,"onUpdate:modelValue":_cache[31]||=$event=>currentNodeVisMode.value.rangeMin=$event,type:`number`,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[32]||=$event=>currentNodeVisMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_56,[createBaseVNode(`span`,_hoisted_57,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_58,[createVNode(unref(bngSlider_default),{modelValue:currentNodeVisMode.value.rangeMax,"onUpdate:modelValue":_cache[33]||=$event=>currentNodeVisMode.value.rangeMax=$event,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeVisMode.value.rangeMax,"onUpdate:modelValue":_cache[34]||=$event=>currentNodeVisMode.value.rangeMax=$event,type:`number`,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[35]||=$event=>currentNodeVisMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_59,[createBaseVNode(`span`,_hoisted_60,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[36]||=$event=>currentNodeVisMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_61,[createBaseVNode(`span`,_hoisted_62,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.showInfinity,"onUpdate:modelValue":_cache[37]||=$event=>currentNodeVisMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),state.vehicle.nodeVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:6},[createBaseVNode(`div`,_hoisted_63,[createBaseVNode(`span`,_hoisted_64,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showHighlighted`)),1),createBaseVNode(`div`,_hoisted_65,[createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.nodeVisShowHighlighted,"onUpdate:modelValue":_cache[38]||=$event=>state.vehicle.nodeVisShowHighlighted=$event,disabled:state.vehicle.nodeVisMode===3,onValueChanged:applyState},null,8,[`modelValue`,`disabled`])])]),createBaseVNode(`div`,_hoisted_66,[createBaseVNode(`span`,_hoisted_67,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_68,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.nodeVisWidthScale,"onUpdate:modelValue":_cache[39]||=$event=>state.vehicle.nodeVisWidthScale=$event,min:.3,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.nodeVisWidthScale,"onUpdate:modelValue":_cache[40]||=$event=>state.vehicle.nodeVisWidthScale=$event,type:`number`,min:.3,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_69,[createBaseVNode(`span`,_hoisted_70,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_71,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.nodeVisAlpha,"onUpdate:modelValue":_cache[41]||=$event=>state.vehicle.nodeVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.nodeVisAlpha,"onUpdate:modelValue":_cache[42]||=$event=>state.vehicle.nodeVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_72,[createBaseVNode(`span`,_hoisted_73,toDisplayString(_ctx.$tt(`ui.debug.vehicle.torsionBarVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.torsionBarVisMode,"onUpdate:modelValue":_cache[43]||=$event=>state.vehicle.torsionBarVisMode=$event,items:torsionBarVisModeItems.value,onValueChanged:_cache[44]||=value=>{console.log(`change triggered`,value),applyState()},class:`control-input`},null,8,[`modelValue`,`items`])]),currentTorsionBarVisMode.value?.usesRange?(openBlock(),createElementBlock(Fragment,{key:7},[createBaseVNode(`div`,_hoisted_74,[createBaseVNode(`span`,_hoisted_75,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_76,[createVNode(unref(bngSlider_default),{modelValue:currentTorsionBarVisMode.value.rangeMin,"onUpdate:modelValue":_cache[45]||=$event=>currentTorsionBarVisMode.value.rangeMin=$event,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentTorsionBarVisMode.value.rangeMin,"onUpdate:modelValue":_cache[46]||=$event=>currentTorsionBarVisMode.value.rangeMin=$event,type:`number`,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[47]||=$event=>currentTorsionBarVisMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_77,[createBaseVNode(`span`,_hoisted_78,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_79,[createVNode(unref(bngSlider_default),{modelValue:currentTorsionBarVisMode.value.rangeMax,"onUpdate:modelValue":_cache[48]||=$event=>currentTorsionBarVisMode.value.rangeMax=$event,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentTorsionBarVisMode.value.rangeMax,"onUpdate:modelValue":_cache[49]||=$event=>currentTorsionBarVisMode.value.rangeMax=$event,type:`number`,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[50]||=$event=>currentTorsionBarVisMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_80,[createBaseVNode(`span`,_hoisted_81,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[51]||=$event=>currentTorsionBarVisMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_82,[createBaseVNode(`span`,_hoisted_83,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.showInfinity,"onUpdate:modelValue":_cache[52]||=$event=>currentTorsionBarVisMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])],64)):createCommentVNode(``,!0),state.vehicle.torsionBarVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:8},[createBaseVNode(`div`,_hoisted_84,[createBaseVNode(`span`,_hoisted_85,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_86,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.torsionBarVisWidthScale,"onUpdate:modelValue":_cache[53]||=$event=>state.vehicle.torsionBarVisWidthScale=$event,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.torsionBarVisWidthScale,"onUpdate:modelValue":_cache[54]||=$event=>state.vehicle.torsionBarVisWidthScale=$event,type:`number`,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_87,[createBaseVNode(`span`,_hoisted_88,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_89,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.torsionBarVisAlpha,"onUpdate:modelValue":_cache[55]||=$event=>state.vehicle.torsionBarVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.torsionBarVisAlpha,"onUpdate:modelValue":_cache[56]||=$event=>state.vehicle.torsionBarVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_90,[createBaseVNode(`span`,_hoisted_91,toDisplayString(_ctx.$tt(`ui.debug.vehicle.railsSlideNodesVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.railsSlideNodesVisMode,"onUpdate:modelValue":_cache[57]||=$event=>state.vehicle.railsSlideNodesVisMode=$event,items:railsSlideNodesModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),state.vehicle.railsSlideNodesVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:9},[createBaseVNode(`div`,_hoisted_92,[createBaseVNode(`span`,_hoisted_93,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_94,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.railsSlideNodesVisWidthScale,"onUpdate:modelValue":_cache[58]||=$event=>state.vehicle.railsSlideNodesVisWidthScale=$event,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.railsSlideNodesVisWidthScale,"onUpdate:modelValue":_cache[59]||=$event=>state.vehicle.railsSlideNodesVisWidthScale=$event,type:`number`,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_95,[createBaseVNode(`span`,_hoisted_96,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_97,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.railsSlideNodesVisAlpha,"onUpdate:modelValue":_cache[60]||=$event=>state.vehicle.railsSlideNodesVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.railsSlideNodesVisAlpha,"onUpdate:modelValue":_cache[61]||=$event=>state.vehicle.railsSlideNodesVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_98,[createBaseVNode(`span`,_hoisted_99,toDisplayString(_ctx.$tt(`ui.debug.vehicle.centerOfGravity`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.cogMode,"onUpdate:modelValue":_cache[62]||=$event=>state.vehicle.cogMode=$event,items:cogModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),createBaseVNode(`div`,_hoisted_100,[createBaseVNode(`span`,_hoisted_101,toDisplayString(_ctx.$tt(`ui.debug.vehicle.collisionTriangle`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.collisionTriangleVisMode,"onUpdate:modelValue":_cache[63]||=$event=>state.vehicle.collisionTriangleVisMode=$event,items:collisionTriangleModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),state.vehicle.collisionTriangleVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_102,[createBaseVNode(`span`,_hoisted_103,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_104,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.collisionTriangleVisAlpha,"onUpdate:modelValue":_cache[64]||=$event=>state.vehicle.collisionTriangleVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.collisionTriangleVisAlpha,"onUpdate:modelValue":_cache[65]||=$event=>state.vehicle.collisionTriangleVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])),createBaseVNode(`div`,_hoisted_105,[createBaseVNode(`span`,_hoisted_106,toDisplayString(_ctx.$tt(`ui.debug.vehicle.aerodynamics`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.aeroMode,"onUpdate:modelValue":_cache[66]||=$event=>state.vehicle.aeroMode=$event,items:aeroModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),state.vehicle.aeroMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_107,[createBaseVNode(`span`,_hoisted_108,toDisplayString(_ctx.$tt(`ui.debug.vehicle.aerodynamicsScale`)),1),createBaseVNode(`div`,_hoisted_109,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.aerodynamicsScale,"onUpdate:modelValue":_cache[67]||=$event=>state.vehicle.aerodynamicsScale=$event,min:0,max:.2,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.aerodynamicsScale,"onUpdate:modelValue":_cache[68]||=$event=>state.vehicle.aerodynamicsScale=$event,type:`number`,min:0,max:.2,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])),createBaseVNode(`div`,_hoisted_110,[createBaseVNode(`span`,_hoisted_111,toDisplayString(_ctx.$tt(`ui.debug.vehicle.tireContactPoint`)),1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.tireContactPoint,"onUpdate:modelValue":_cache[69]||=$event=>state.vehicle.tireContactPoint=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_112,[createBaseVNode(`span`,_hoisted_113,toDisplayString(_ctx.$tt(`ui.debug.vehicle.steeringGeometry`)),1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.steeringGeometry,"onUpdate:modelValue":_cache[70]||=$event=>state.vehicle.steeringGeometry=$event,onValueChanged:applyState},null,8,[`modelValue`])]),state.vehicle.steeringGeometry?(openBlock(),createElementBlock(`div`,_hoisted_114,[createBaseVNode(`span`,_hoisted_115,toDisplayString(_ctx.$tt(`ui.debug.vehicle.steeringGeometryLineLength`)),1),createBaseVNode(`div`,_hoisted_116,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.steeringGeometryLineLength,"onUpdate:modelValue":_cache[71]||=$event=>state.vehicle.steeringGeometryLineLength=$event,min:0,max:50,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.steeringGeometryLineLength,"onUpdate:modelValue":_cache[72]||=$event=>state.vehicle.steeringGeometryLineLength=$event,type:`number`,min:0,max:50,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),shipping.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_117,[createBaseVNode(`span`,_hoisted_118,toDisplayString(_ctx.$tt(`ui.debug.vehicle.wheelThermals`))+` 🐞`,1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.wheelThermals,"onUpdate:modelValue":_cache[73]||=$event=>state.vehicle.wheelThermals=$event,onValueChanged:applyState},null,8,[`modelValue`])]))],64)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_119,[createBaseVNode(`div`,_hoisted_120,[createBaseVNode(`span`,_hoisted_121,toDisplayString(_ctx.$tt(`ui.debug.vehicle.meshVisibility`)),1),createBaseVNode(`div`,_hoisted_122,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.jbeamvis.meshVisButtonGroup,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),disabled:disableVehicleButtons.value,accent:unref(ACCENTS).outlined,class:`mesh-button`},{default:withCtx(()=>[createTextVNode(toDisplayString(btn.label),1)]),_:2},1032,[`onClick`,`disabled`,`accent`]))),128))])])]),_cache[75]||=createBaseVNode(`hr`,null,null,-1),createBaseVNode(`h4`,null,toDisplayString(_ctx.$tt(`ui.debug.terrain`)),1),createBaseVNode(`div`,_hoisted_123,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.terrain.buttonGroup_1,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),accent:unref(ACCENTS).secondary},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(btn.label)),1)]),_:2},1032,[`onClick`,`accent`]))),128))])]))}},Debug_default=__plugin_vue_export_helper_default(_sfc_main$14,[[`__scopeId`,`data-v-8c471ede`]]),_sfc_main$13={__name:`VehicleConfig`,props:{tab:{type:String,default:`parts`,validator:val=>!val||[`parts`,`tuning`,`color`,`save`,`debug`].includes(val)}},setup(__props){let exit=event=>{event.detail.force||window.bngVue.gotoAngularState(`menu.mainmenu`)};function syncWithStates(tab){window.bngVue&&(tab=[`parts`,`tuning`,`color`,`save`,`debug`][tab.index]||`parts`,window.bngVue.gotoAngularState(`menu.vehicleconfig.${tab}`))}return(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(layoutSingle_default),{class:`vehcfg`,onDeactivate:exit},{default:withCtx(()=>[withDirectives((openBlock(),createBlock(unref(tabs_default),{class:`bng-tabs`,onChange:syncWithStates},{default:withCtx(()=>[withDirectives(createVNode(unref(tabList_default),null,null,512),[[unref(BngBlur_default)]]),withDirectives(createVNode(Parts_default,{"tab-selected":__props.tab===`parts`,"tab-heading":_ctx.$t(`ui.vehicleconfig.parts`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Tuning_default,{"tab-selected":__props.tab===`tuning`,"tab-heading":_ctx.$t(`ui.vehicleconfig.tuning`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Paint_default,{"tab-selected":__props.tab===`color`,"tab-heading":_ctx.$t(`ui.vehicleconfig.color`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Save_default,{"tab-selected":__props.tab===`save`,"tab-heading":_ctx.$t(`ui.vehicleconfig.save`)+` & `+_ctx.$t(`ui.vehicleconfig.load`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Debug_default,{"tab-selected":__props.tab===`debug`,"tab-heading":_ctx.$tt(`ui.debug.vehicle`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]])]),_:1})),[[unref(BngFrustumMover_default),!0,void 0,{left:!0}]])]),_:1})),[[unref(BngScopedNav_default),{activateOnMount:!0,bubbleWhitelistEvents:[`tab_l`,`tab_r`,`menu`]}]])}},VehicleConfig_default=__plugin_vue_export_helper_default(_sfc_main$13,[[`__scopeId`,`data-v-e5f4e51f`]]),_hoisted_1$10={class:`adjustment-container`},_hoisted_2$6={class:`y-controls`},_hoisted_3$5={class:`slider-container`},_hoisted_4$4={class:`value-input`},_hoisted_5$3={class:`x-controls`},_hoisted_6$2={class:`slider-container`},_hoisted_7$2={class:`value-input`},_hoisted_8$1={class:`reset-cont`},MIRROR_RANGE_DEFAULTS={min:-20,max:20,step:.01},_sfc_main$12={__name:`MirrorAdjust`,props:{mirror:Object},setup(__props){let props=__props,uiScopeName=`vehicle-config-mirrors`,uiNavScope$1=useUINavScope(uiScopeName),reactivateUIScope=event=>{(event.type===`deactivate`||event.type===`focusout`)&&uiNavScope$1.set(uiScopeName)},range={x:{min:props.mirror.clampX?props.mirror.clampX[0]:MIRROR_RANGE_DEFAULTS.min,max:props.mirror.clampX?props.mirror.clampX[1]:MIRROR_RANGE_DEFAULTS.max,step:MIRROR_RANGE_DEFAULTS.step},y:{min:props.mirror.clampY?props.mirror.clampY[0]:MIRROR_RANGE_DEFAULTS.min,max:props.mirror.clampY?props.mirror.clampY[1]:MIRROR_RANGE_DEFAULTS.max,step:MIRROR_RANGE_DEFAULTS.step}},[inpX,inpY]=[ref(),ref()],isChanged=computed(()=>inpX.value&&inpX.value.dirty||inpY.value&&inpY.value.dirty),mover={x:0,y:0,drift:.2,tmr:null,tmrInterval:100};function move(evt){let val=evt.detail.value>mover.drift?evt.detail.value-mover.drift:evt.detail.value<-mover.drift?evt.detail.value+mover.drift:0;evt.detail.name===`focus_lr`?mover.x=val:evt.detail.name===`focus_ud`&&(mover.y=val)}let precision=10**(MIRROR_RANGE_DEFAULTS.step+`.`).split(/[.,]/)[1].length,clamp$2=(val,axis=`x`)=>Math.round(Math.max(range[axis].min,Math.min(val,range[axis].max))*precision)/precision;function resetValues(){props.mirror.x=inpX.value.currentCleanValue,props.mirror.y=inpY.value.currentCleanValue,onValueChanged()}function onValueChanged(){Lua_default.extensions.core_vehicle_mirror.setAngleOffset(props.mirror.name,-props.mirror.y,-props.mirror.x,!1,!1)}return onMounted(()=>{getUINavServiceInstance().useCrossfire=!1,Lua_default.extensions.core_vehicle_mirror.focusOnMirror(props.mirror.name),mover.tmr=setInterval(()=>{mover.x===0&&mover.y===0||(props.mirror.x=clamp$2(props.mirror.x+mover.x,`x`),props.mirror.y=clamp$2(props.mirror.y+mover.y,`y`),onValueChanged())},mover.tmrInterval)}),onUnmounted(()=>{getUINavServiceInstance().useCrossfire=!0,clearInterval(mover.tmr)}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$10,[createVNode(unref(bngImageTile_default),{class:`mirror-tile`,icon:unref(icons)[__props.mirror.mirrorIcon],label:__props.mirror.description,ratio:`1:1`},null,8,[`icon`,`label`]),createBaseVNode(`div`,_hoisted_2$6,[createBaseVNode(`div`,_hoisted_3$5,[createVNode(unref(bngSlider_default),mergeProps({"bng-no-nav":`true`,ref_key:`inpY`,ref:inpY,class:`slider-y`},range.y,{uiNavFocus:!1,modelValue:__props.mirror.y,"onUpdate:modelValue":_cache[0]||=$event=>__props.mirror.y=$event,onFocusout:reactivateUIScope,onValueChanged,onDeactivate:reactivateUIScope}),null,16,[`modelValue`])]),createBaseVNode(`div`,_hoisted_4$4,[createVNode(unref(bngBinding_default),{class:`keybinding`,action:`menu_item_focus_ud`,deviceMask:`xinput`,dark:!1}),createVNode(unref(bngInput_default),mergeProps({class:`value`,modelValue:__props.mirror.y,"onUpdate:modelValue":_cache[1]||=$event=>__props.mirror.y=$event,type:`number`},range.y,{prefix:`Y`,suffix:`°`}),null,16,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_5$3,[createBaseVNode(`div`,_hoisted_6$2,[createVNode(unref(bngSlider_default),mergeProps({"bng-no-nav":`true`,ref_key:`inpX`,ref:inpX,class:`slider-x`},range.x,{uiNavFocus:!1,modelValue:__props.mirror.x,"onUpdate:modelValue":_cache[2]||=$event=>__props.mirror.x=$event,onFocusout:reactivateUIScope,onValueChanged,onDeactivate:reactivateUIScope}),null,16,[`modelValue`])]),createBaseVNode(`div`,_hoisted_7$2,[createVNode(unref(bngBinding_default),{class:`keybinding`,action:`menu_item_focus_lr`,deviceMask:`xinput`,dark:!1}),createVNode(unref(bngInput_default),mergeProps({class:`value`,modelValue:__props.mirror.x,"onUpdate:modelValue":_cache[3]||=$event=>__props.mirror.x=$event,type:`number`},range.x,{prefix:`X`,suffix:`°`}),null,16,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_8$1,[createVNode(unref(bngButton_default),{accent:unref(ACCENTS).attention,disabled:!isChanged.value,onClick:_cache[4]||=$event=>resetValues()},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{controller:``,"ui-event":`action_3`}),createTextVNode(` `+toDisplayString(_ctx.$t(`ui.common.reset`)),1)]),_:1},8,[`accent`,`disabled`])])])),[[unref(BngOnUiNav_default),move,`focus_lr,focus_ud`],[unref(BngOnUiNav_default),resetValues,`action_3`]])}},MirrorAdjust_default=__plugin_vue_export_helper_default(_sfc_main$12,[[`__scopeId`,`data-v-14ab0128`]]),_hoisted_1$9={key:0,class:`content buttons-grid`},_sfc_main$11={__name:`Mirrors`,props:{exitRoute:{type:String,default:`menu.vehicleconfig.tuning`}},setup(__props){useUINavScope(`vehicle-config-mirrors`);let comp=ref(null),{lua,events:events$3}=useBridge(),mirrors=ref([]),selectedMirror=ref(null),props=__props;async function exitAdjustmentMode(){selectedMirror.value?(lua.extensions.core_vehicle_mirror.setAngleOffset(selectedMirror.value.name,-selectedMirror.value.y,-selectedMirror.value.x,!1,!0),selectedMirror.value=null,comp.value=null,await lua.extensions.core_vehicle_mirror.focusOnMirror(!1)):bngVue.gotoAngularState(props.exitRoute)}async function getVehicleMirrors(){let data=await lua.extensions.core_vehicle_mirror.getAnglesOffset();for(let key in mirrors.value.splice(0),data){let position=data[key].position,mirrorIcon=data[key].icon,description=data[key].label;if(position||(/_L$|_L_/.test(key)?(position=`left`,mirrorIcon||=`mirrorLeftDefault`):/_R$|_R_/.test(key)?(position=`right`,mirrorIcon||=`mirrorRightDefault`):position=`mid`),!description)description=$translate.instant(`ui.mirrors.position.`+position),key.endsWith(`_spot`)&&(description+=` (${$translate.instant(`ui.mirrors.spot`)})`);else{let tr=$translate.instant(`ui.mirrors.`+description);tr.startsWith(`ui.mirrors.`)||(description=tr)}mirrors.value.push({name:data[key].name,description,position,x:data[key].angleOffset.x,y:data[key].angleOffset.z,clampX:data[key].clampX,clampY:data[key].clampZ,mirrorIcon:mirrorIcon||`mirrorInteriorMiddle`,row:data[key].row||0})}mirrors.value.sort((a$1,b)=>a$1.row-b.row)}return onMounted(async()=>{await getVehicleMirrors(),events$3.on(`VehicleChange`,getVehicleMirrors),lua.extensions.core_input_bindings.setMenuActionEnabled(!0,`menu_item_focus_lr`),lua.extensions.core_input_bindings.setMenuActionEnabled(!0,`menu_item_focus_ud`)}),onUnmounted(()=>{events$3.off(`VehicleChange`,getVehicleMirrors)}),(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(layoutSingle_default),{class:`layout-content-full layout-align-hstart`,"bng-ui-scope":`vehicle-config-mirrors`},{default:withCtx(()=>[withDirectives((openBlock(),createBlock(unref(bngCard_default),{class:`mirrors-card`},{buttons:withCtx(()=>[createVNode(unref(bngButton_default),{onClick:exitAdjustmentMode},{default:withCtx(()=>[selectedMirror.value?(openBlock(),createBlock(unref(bngBinding_default),{key:0,controller:``,"ui-event":`action_2`})):(openBlock(),createBlock(unref(bngBinding_default),{key:1,controller:``,"ui-event":`back`})),createTextVNode(` `+toDisplayString(_ctx.$t(selectedMirror.value?`ui.common.apply`:`ui.common.close`)),1)]),_:1})]),default:withCtx(()=>[createVNode(unref(bngCardHeading_default),null,{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(`ui.mirrors.name`)),1)]),_:1}),selectedMirror.value?(openBlock(),createBlock(MirrorAdjust_default,{key:1,class:`content`,mirror:selectedMirror.value},null,8,[`mirror`])):(openBlock(),createElementBlock(`div`,_hoisted_1$9,[(openBlock(!0),createElementBlock(Fragment,null,renderList(mirrors.value,mirror=>(openBlock(),createBlock(unref(bngImageTile_default),{onClick:$event=>selectedMirror.value=mirror,class:normalizeClass([`mirror-button`,[mirror.position]]),icon:unref(icons)[mirror.mirrorIcon]||unref(icons).placeholder,label:mirror.description,"bng-nav-item":``},null,8,[`onClick`,`class`,`icon`,`label`]))),256))]))]),_:1})),[[unref(BngBlur_default),!0]])]),_:1})),[[unref(BngOnUiNav_default),exitAdjustmentMode,`menu,back`],[unref(BngOnUiNav_default),()=>selectedMirror.value&&exitAdjustmentMode(),`action_2`]])}},Mirrors_default=__plugin_vue_export_helper_default(_sfc_main$11,[[`__scopeId`,`data-v-28f8b633`]]),routes_default$17=[{path:`/vehicle-config`,name:`menu.vehicleconfig`,redirect:`/vehicle-config/parts`,meta:{clickThrough:!0,infoBar:{withAngular:!1,visible:!0,showSysInfo:!1},uiApps:{shown:!0},topBar:{visible:!0}},children:[{path:`parts`,name:`menu.vehicleconfig.parts`,component:VehicleConfig_default,props:{tab:`parts`}},{path:`tuning`,name:`menu.vehicleconfig.tuning`,component:VehicleConfig_default,props:{tab:`tuning`}},{path:`color`,name:`menu.vehicleconfig.color`,component:VehicleConfig_default,props:{tab:`color`},meta:{uiApps:{shown:!1}}},{path:`save`,name:`menu.vehicleconfig.save`,component:VehicleConfig_default,props:{tab:`save`},meta:{uiApps:{shown:!1}}},{path:`debug`,name:`menu.vehicleconfig.debug`,component:VehicleConfig_default,props:{tab:`debug`}}]},{path:`/vehicle-config/tuning/mirrors/:exitRoute?/`,name:`menu.vehicleconfig.tuning.mirrors`,component:Mirrors_default,props:!0},{path:`/vehicle-config/tuning/mirrors-angular`,name:`menu.vehicleconfig.tuning.mirrors.with-angular`,component:Mirrors_default,props:{exitRoute:`menu.vehicleconfigold.tuning`}},{path:`/vehicle-config/tuning/mirrors-garage`,name:`menu.vehicleconfig.tuning.mirrors.in-garage`,component:Mirrors_default,props:{exitRoute:`garagemode.tuning`}}],_hoisted_1$8={key:0,class:`management-details`},_hoisted_2$5={key:0,class:`current-vehicle-info`},_hoisted_3$4={class:`info-row`},_hoisted_4$3={class:`value`},_hoisted_5$2={class:`buttons-section`},_sfc_main$10={__name:`ManagementDetails`,props:{managementDetails:{type:Object,default:null},executeButton:{type:Function,required:!0}},emits:[`button-click`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,handleButtonClick=buttonId=>{props.executeButton(buttonId),emit$1(`button-click`,buttonId)};return(_ctx,_cache)=>__props.managementDetails&&__props.managementDetails.buttonInfo&&__props.managementDetails.buttonInfo.length>0?(openBlock(),createElementBlock(`div`,_hoisted_1$8,[__props.managementDetails.details?(openBlock(),createElementBlock(`div`,_hoisted_2$5,[createBaseVNode(`div`,_hoisted_3$4,[_cache[0]||=createBaseVNode(`span`,{class:`label`},`Current Vehicle:`,-1),createBaseVNode(`span`,_hoisted_4$3,toDisplayString(__props.managementDetails.details.currentVehicleName),1)])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_5$2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(__props.managementDetails.buttonInfo,button=>(openBlock(),createElementBlock(`div`,{key:button.buttonId,class:`button-container`},[createVNode(unref(bngButton_default),{accent:button.accent||`secondary`,label:button.label,icon:button.icon,onClick:$event=>handleButtonClick(button.buttonId)},null,8,[`accent`,`label`,`icon`,`onClick`])]))),128))])])):createCommentVNode(``,!0)}},ManagementDetails_default=__plugin_vue_export_helper_default(_sfc_main$10,[[`__scopeId`,`data-v-b0128491`]]),_sfc_main$9={__name:`VehicleSelector`,setup(__props){return(_ctx,_cache)=>(openBlock(),createBlock(GridSelector_default,{backendName:`vehicleSelector`,routePath:`/vehicle-selector`,defaultPath:{keys:[`allModels`]},defaultDetailsMode:`advanced`,tileImagesTopAligned:``},{"item-details":withCtx(({activeItem,activeItemDetails,executeButton,toggleFavourite,exploreFolder,goToMod})=>[createVNode(VehicleDetails_default,{activeItem,activeItemDetails,executeButton,toggleFavourite,exploreFolder,goToMod,showHeaderTitle:!0},null,8,[`activeItem`,`activeItemDetails`,`executeButton`,`toggleFavourite`,`exploreFolder`,`goToMod`])]),"management-details":withCtx(({managementDetails,executeButton})=>[createVNode(ManagementDetails_default,{managementDetails,executeButton},null,8,[`managementDetails`,`executeButton`])]),_:1}))}},VehicleSelector_default=_sfc_main$9,routes_default$18=[{name:`menu.vehiclesnew`,path:`/vehicle-selector/:pathMatch(.*)*`,component:VehicleSelector_default,props:!0,meta:{clickThrough:!0,infoBar:{visible:!0,showSysInfo:!1},uiApps:{shown:!1},topBar:{visible:!0}}}],router=createRouter({history:createWebHashHistory(),routes:[...Object.values([routes_default,routes_default$1,routes_default$2,routes_default$3,routes_default$4,routes_default$5,routes_default$6,routes_default$7,routes_default$8,routes_default$9,routes_default$10,routes_default$11,routes_default$12,routes_default$13,routes_default$14,routes_default$15,routes_default$16,routes_default$17,routes_default$18]).flatMap(routes=>routes||[]),{path:`/:catchAll(.*)*`,name:`unknown`,component:NotFound_default}]});router.bngUpdateMeta=to=>{to.meta&&(to.meta.uiApps&&handelUIAppsSettings(to.meta.uiApps),handleInfoBarSettings(to.meta.infoBar||{}),handleTopBarSettings(to))},router.afterEach((to,from)=>{reportState(to.path,!0,from.path),window.bridge.api.engineLua(`extensions.hook("onUiChangedState", "${to.name}", "${from.name}")`),router.bngUpdateMeta(to)});var handelUIAppsSettings=settings$1=>{let appsAPI=useUIApps();settings$1.layout&&appsAPI.setLayout(settings$1.layout),`shown`in settings$1&&appsAPI.setVisible(settings$1.shown)},handleInfoBarSettings=settings$1=>{let infoBar=useInfoBar();infoBar.visible=settings$1.visible,infoBar.showSysInfo=settings$1.showSysInfo,infoBar.withAngular=settings$1.withAngular,settings$1.hints&&(infoBar.clearHints(),infoBar.addHints(settings$1.hints))},handleTopBarSettings=to=>{let topBar=useTopBar(),meta=to.meta.topBar||{};meta.visible?meta.visible&&!topBar.visible&&topBar.show():topBar.hide(),topBar.onUIStateChanged(to)},router_default=router,_hoisted_1$7={key:0,id:`vue-debug`},_hoisted_2$4={class:`heading-wrapper`},_hoisted_3$3={class:`label`},_hoisted_4$2={key:0,class:`route-info`},_hoisted_5$1={class:`main`},_hoisted_6$1={class:`controls`},_hoisted_7$1={key:0},_hoisted_8=[`label`],_hoisted_9=[`value`,`selected`],_sfc_main$8={__name:`VueDebug`,setup(__props){let{lua}=useBridge(),EXTRA_ROUTE,routeGroups=router_default.getRoutes().map(r=>r.name).filter(n=>n!==`routelist`).sort((a$1,b)=>a$1.localeCompare(b)).reduce((res,n)=>{if(!n)return res;let g=n.substring(0,1);return res[g]||(res[g]={name:g.toUpperCase(),routes:[]}),res[g].routes.push(n),res},{}),route=useRoute(),hash=ref(location.hash.split(`#`)[1]),path=computed(()=>route.path),routeName=computed(()=>route.name),showDebug=ref(window._VueDebugState),isOpen=ref(window._VueDebugOpen),showComponents=router_default.hasRoute(`components`),bngVue$1=window.bngVue||{};bngVue$1.debug=(state=!0)=>showDebug.value=window._VueDebugState=state,bngVue$1.reset=()=>bngVue$1.gotoGameState(`menu.mainmenu`);function toggleOpen(){isOpen.value=window._VueDebugOpen=!isOpen.value}function selectRoute(e){e.target.value&&bngVue$1.gotoGameState(e.target.value)}function icons$3(){bngVue$1.gotoGameState(`components/IconBrowser`),toggleOpen()}function colours(){bngVue$1.gotoGameState(`components/Colours`),toggleOpen()}function extra(){bngVue$1.gotoGameState(void 0),toggleOpen()}function components(){bngVue$1.showComponents(),toggleOpen()}function menu(){bngVue$1.reset(),toggleOpen()}function mainmenu(){toggleOpen(),lua.returnToMainMenu()}let closeDebug=e=>{e.stopPropagation(),bngVue$1.debug(!1)};return addEventListener(`hashchange`,e=>{hash.value=e.newURL.split(`#`)[1]}),(_ctx,_cache)=>(openBlock(),createBlock(Teleport,{to:`body`},[showDebug.value?(openBlock(),createElementBlock(`div`,_hoisted_1$7,[createBaseVNode(`div`,{class:`handle`,onClick:toggleOpen},[createBaseVNode(`div`,_hoisted_2$4,[createBaseVNode(`span`,_hoisted_3$3,[_cache[1]||=createBaseVNode(`strong`,null,`Vue`,-1),isOpen.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$2,`: `+toDisplayString(path.value)+` [ `+toDisplayString(routeName.value)+` ]`,1))]),createBaseVNode(`a`,{onClick:closeDebug},`x`)])]),withDirectives(createBaseVNode(`div`,_hoisted_5$1,[createBaseVNode(`div`,null,[createTextVNode(` Current hash: `+toDisplayString(hash.value),1),_cache[2]||=createBaseVNode(`br`,null,null,-1),createTextVNode(` Route name: `+toDisplayString(routeName.value),1)]),_cache[4]||=createBaseVNode(`hr`,null,null,-1),createBaseVNode(`div`,_hoisted_6$1,[unref(showComponents)?(openBlock(),createElementBlock(`div`,_hoisted_7$1,[withDirectives((openBlock(),createElementBlock(`a`,{href:`#`,onClick:menu},[..._cache[3]||=[createTextVNode(`Main Menu`,-1)]])),[[unref(BngDoubleClick_default),mainmenu,void 0,{capture:!0}],[unref(BngTooltip_default),`Doubleclick to unload level`]]),unref(void 0)?(openBlock(),createElementBlock(`a`,{key:0,href:`#`,onClick:extra},`⏩`)):createCommentVNode(``,!0),createBaseVNode(`a`,{href:`#`,onClick:_cache[0]||=$event=>_ctx.$simplemenu.value=!_ctx.$simplemenu.value},toDisplayString(_ctx.$simplemenu.value?`✓`:`☐`)+` SimpleMenu`,1),createBaseVNode(`a`,{href:`#`,onClick:components},`Components`),createBaseVNode(`a`,{href:`#`,onClick:icons$3},`Icons`),createBaseVNode(`a`,{href:`#`,onClick:colours},`Colours`)])):createCommentVNode(``,!0),createBaseVNode(`select`,{multiple:``,onClick:selectRoute},[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(routeGroups),group=>(openBlock(),createElementBlock(`optgroup`,{key:group.name,label:group.name},[(openBlock(!0),createElementBlock(Fragment,null,renderList(group.routes,route$1=>(openBlock(),createElementBlock(`option`,{key:route$1,value:route$1,selected:route$1===routeName.value},toDisplayString(route$1),9,_hoisted_9))),128))],8,_hoisted_8))),128))])])],512),[[vShow,isOpen.value]])])):createCommentVNode(``,!0)]))}},VueDebug_default=__plugin_vue_export_helper_default(_sfc_main$8,[[`__scopeId`,`data-v-669cde99`]]),_hoisted_1$6={class:`hint-content`},_hoisted_2$3={key:0,class:`binding-container`},_hoisted_3$2={key:1,class:`text`},_hoisted_4$1={key:1,class:`hint-text`},_sfc_main$7={__name:`Hint`,props:{data:Object},setup(__props){let Controls=controls_default(),props=__props,PROP_DEFAULTS={icon:{color:`white`},binding:{showUnassigned:!0,dark:!1}},hintRef=ref(null),bindingRefs=ref([]),hintContent=computed(()=>{let hints=props.data?[props.data.content].flat():[],res=[],label;for(let hint of hints)typeof hint==`string`?label=hint:(hint.label&&(label=hint.label),res.push({...hint,label:void 0}));return label&&res.push(label),res}),bindingView=computed(()=>{let res=hintContent.value.filter(item=>typeof item!=`string`);for(let item of res)if(item.type===`binding`){if(item.props?.viewerObj){item.viewerObjs=[item.props.viewerObj];continue}let viewerObjs=Controls.makeViewerObj({...PROP_DEFAULTS[item.type],...item.props,actionVariants:!0,useLastDevice:!0});viewerObjs?.variants?item.viewerObjs=viewerObjs.variants:item.viewerObjs=[viewerObjs]}return res}),labelView=computed(()=>hintContent.value.find(item=>typeof item==`string`)||bindingView.value.find(item=>item.label)?.label),bindingDisplayed=computed(()=>!!(bindingRefs.value.some(ref$1=>ref$1.displayed)||bindingView.value.some(item=>item.type===`icon`)||labelView.value));function onClick(evt){if(lastFocused&&document.body.contains(lastFocused)&&!setFocusExternal(lastFocused,!0,!1))try{lastFocused.focus?.()}catch{}props.data.action?.(evt)}let lastFocused;function trackFocus(evt){let target=evt?.detail?.target||evt?.target||document.activeElement;if(!target){lastFocused=null;return}if(target=target.closest(NAVIGABLE_ELEMENTS_SELECTOR),!target){lastFocused=null;return}if(target===lastFocused)return;let button=hintRef.value?.getElement?.();target!==button&&!button.contains(target)&&(lastFocused=target)}return onMounted(()=>window.addEventListener(`uinav-focus`,trackFocus)),onBeforeUnmount(()=>window.removeEventListener(`uinav-focus`,trackFocus)),(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(bngButton_default),{ref_key:`hintRef`,ref:hintRef,class:normalizeClass([`hint`,{"flash-on":__props.data.flash}]),accent:unref(ACCENTS).text,disabled:!__props.data.action,onClick:withModifiers(onClick,[`stop`]),"bng-no-nav":``,tabindex:`-1`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$6,[bindingView.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_2$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(bindingView.value,(item,idx)=>(openBlock(),createElementBlock(`span`,{key:idx,class:`rich`},[item.type===`icon`?(openBlock(),createBlock(unref(bngIcon_default),mergeProps({key:0,class:`icon`},{ref_for:!0},{...PROP_DEFAULTS[item.type],...item.props}),null,16)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(item.viewerObjs,(viewerObj,index)=>(openBlock(),createBlock(unref(bngBinding_default),mergeProps({key:index,ref_for:!0,ref_key:`bindingRefs`,ref:bindingRefs,class:`binding`},{ref_for:!0},{...PROP_DEFAULTS[item.type],...item.props,viewerObj},{"track-ignore":``}),null,16))),128)),item.hold?(openBlock(),createElementBlock(`span`,_hoisted_3$2,toDisplayString(item.hold?`[hold]`:``),1)):createCommentVNode(``,!0)]))),128))])):createCommentVNode(``,!0),labelView.value?(openBlock(),createElementBlock(`span`,_hoisted_4$1,toDisplayString(_ctx.$tt(labelView.value)),1)):createCommentVNode(``,!0)])]),_:1},8,[`class`,`accent`,`disabled`])),[[vShow,bindingDisplayed.value]])}},Hint_default=__plugin_vue_export_helper_default(_sfc_main$7,[[`__scopeId`,`data-v-29a63ba0`]]),_hoisted_1$5={key:0,class:`info-bar-stats`},_hoisted_2$2={key:0},_hoisted_3$1={key:0,class:`divider`},_hoisted_4={key:0},_hoisted_5={class:`sysinfo`},_hoisted_6={class:`sysinfo`},_hoisted_7={key:1,class:`info-bar-buttons`,"bng-no-child-nav":`true`},_sfc_main$6={__name:`InfoBar`,setup(__props){let{visible,showSysInfo,withAngular,hints}=storeToRefs(useInfoBar()),showBuildInfo=ref(!1),toggleBuildInfo=()=>showBuildInfo.value=!showBuildInfo.value,route=useRoute(),solidBar=computed(()=>route.name===`menu.mainmenu`?!sysInfo_default.mainMenuBackgroundRequired.value:withAngular.value);return(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,{class:normalizeClass([`info-bar`,{"info-bar-solid":solidBar.value}]),"bng-no-nav":`true`},[unref(showSysInfo)?(openBlock(),createElementBlock(`div`,_hoisted_1$5,[withDirectives(createVNode(unref(bngIcon_default),{style:{"--bng-icon-size":`1.25em`,padding:`0`},type:unref(sysInfo_default).online?unref(icons).globeSimplified:unref(icons).globeSimpleNotSign},null,8,[`type`]),[[unref(BngTooltip_default),unref(sysInfo_default).online?`Online`:`Offline`,`top`]]),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(sysInfo_default).serviceProviders.value,(info,key)=>(openBlock(),createElementBlock(Fragment,null,[unref(sysInfo_default).serviceProvidersOnline.value[key]?(openBlock(),createElementBlock(`span`,_hoisted_2$2,[createVNode(unref(bngImageAsset_default),{src:`images/mainmenu/${key}icon.png`},null,8,[`src`]),createTextVNode(` `+toDisplayString(info.playerName)+` `,1),info.branch&&info.branch!==`public`?withDirectives((openBlock(),createBlock(unref(bngIcon_default),{key:0,style:{"--bng-icon-size":`1.25em`,padding:`0`},type:unref(icons).branch},null,8,[`type`])),[[unref(BngTooltip_default),`Branch: `+info.branch,`top`]]):createCommentVNode(``,!0),createTextVNode(` `+toDisplayString(info.branch&&info.branch!==`public`?info.branch:``),1)])):createCommentVNode(``,!0)],64))),256)),unref(sysInfo_default).online||unref(sysInfo_default).serviceProvidersOnline.value.any?(openBlock(),createElementBlock(`span`,_hoisted_3$1)):createCommentVNode(``,!0),createBaseVNode(`span`,{onClick:toggleBuildInfo},[showBuildInfo.value?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`span`,_hoisted_5,`Alpha v.`+toDisplayString(unref(sysInfo_default).version),1),createBaseVNode(`span`,_hoisted_6,toDisplayString(unref(sysInfo_default).buildInfo),1)],64)):(openBlock(),createElementBlock(`span`,_hoisted_4,`Alpha v.`+toDisplayString(unref(sysInfo_default).versionSimple),1))])])):createCommentVNode(``,!0),_cache[0]||=createBaseVNode(`div`,{class:`spacer`},null,-1),unref(hints).length?(openBlock(),createElementBlock(`div`,_hoisted_7,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(hints),item=>(openBlock(),createBlock(Hint_default,{key:item.id,data:item},null,8,[`data`]))),128))])):createCommentVNode(``,!0)],2)),[[vShow,unref(visible)],[unref(BngBlur_default),solidBar.value&&!unref(sysInfo_default).mainMenuBackgroundRequired.value]])}},InfoBar_default=__plugin_vue_export_helper_default(_sfc_main$6,[[`__scopeId`,`data-v-cb5f8971`]]),_hoisted_1$4=[`accent`],_sfc_main$5={__name:`TopBarItem`,props:{icon:{type:String,required:!0},active:{type:Boolean,default:void 0},label:String,iconOnly:Boolean,iconPosition:{type:String,default:`left`},accent:{type:String,default:`default`}},setup(__props){let props=__props,item=ref(null);return watch(()=>props.active,value=>{typeof value==`boolean`&&(value?(item.value.setAttribute(`active`,`true`),item.value.removeAttribute(NO_NAV_ATTR)):(item.value.removeAttribute(`active`),item.value.setAttribute(NO_NAV_ATTR,`true`)))}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,{ref_key:`item`,ref:item,class:normalizeClass([`topbar-item`,{"icon-only":__props.iconOnly}]),accent:__props.accent,"bng-nav-item":``,"bng-no-nav":`true`,tabindex:`-1`},[createVNode(unref(bngIcon_default),{class:`topbar-item-icon`,type:__props.icon},null,8,[`type`]),__props.label&&!__props.iconOnly?(openBlock(),createBlock(unref(textScroller_default),{key:0,class:`topbar-item-text`},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(__props.label)),1)]),_:1})):createCommentVNode(``,!0)],10,_hoisted_1$4)),[[unref(BngSoundClass_default),`bng_click_hover_generic`]])}},TopBarItem_default=__plugin_vue_export_helper_default(_sfc_main$5,[[`__scopeId`,`data-v-2c3015cd`]]),_hoisted_1$3={class:`topbar`},_hoisted_2$1={class:`topbar-section topbar-left`},_hoisted_3={class:`topbar-section topbar-center`},_sfc_main$4={__name:`TopBar`,setup(__props,{expose:__expose}){let topBar=useTopBar(),{visible,items:items$2,activeItem,gameState:gameState$1}=storeToRefs(topBar),overflowContainer=ref(null),pauseButtonTarget=ref(null),showTabBindings=ref(!0),showBackBinding=ref(!0),onItemClicked=item=>{activeItem.value!==item.id&&(activeItem.value=item.id,topBar.selectEntry(item.id))},backStack=new Map,customBack=null;function setBack(id,fn){if(!id)throw Error("Usage: TopBar.setBack(id, [fn]), where `id` is your unique id and `fn` is a custom back function that will fire and expected to return `true` or `false` (undefined return means `true`), which will dis-/allow the base back functionality.");typeof fn==`function`?backStack.set(id,fn):backStack.delete(id),customBack=Array.from(backStack.values()).at(-1)||null}let onBack=()=>{let res=customBack?.();res===void 0&&(res=!0),res&&(gameState$1.isInGame?window.bngVue.gotoGameState(`play`):window.globalAngularRootScope?.$broadcast(`MenuToggle`))},onContinue=()=>{window.bngVue.gotoAngularState(`play`)};return watch(()=>activeItem.value,val=>{if(activeItem.value!==null&&items$2.value.length>0){let idx=items$2.value.findIndex(item=>item.id===val);overflowContainer.value.activate(idx)}else overflowContainer.value.deactivate()}),__expose({pauseButtonTarget:computed(()=>visible.value?pauseButtonTarget.value:null),setBack,showTabBindings,showBackBinding}),onMounted(()=>{}),onUnmounted(()=>{}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$3,[createBaseVNode(`div`,_hoisted_2$1,[unref(gameState$1).isInGame?withDirectives((openBlock(),createBlock(unref(bngButton_default),{key:0,"track-ignore":``,accent:`custom`,class:`topbar-button`,"bng-no-nav":`true`,tabindex:`-1`,onClick:onContinue},{default:withCtx(()=>[createVNode(unref(bngIcon_default),{type:unref(icons).play},null,8,[`type`]),createVNode(unref(bngBinding_default),{"ui-event":`menu`,controller:``})]),_:1})),[[unref(BngTooltip_default),`Back to gameplay`,`right`]]):createCommentVNode(``,!0),withDirectives((openBlock(),createBlock(unref(bngButton_default),{"track-ignore":``,accent:`custom`,class:`topbar-button back-button`,"bng-no-nav":`true`,tabindex:`-1`,onClick:onBack},{default:withCtx(()=>[createVNode(unref(bngIcon_default),{type:unref(icons).undo},null,8,[`type`]),withDirectives(createVNode(unref(bngBinding_default),{"ui-event":`back`,controller:``},null,512),[[vShow,showBackBinding.value]])]),_:1})),[[unref(BngTooltip_default),`Back one level`,`right`]])]),createBaseVNode(`div`,_hoisted_3,[withDirectives(createVNode(unref(bngOverflowContainer_default),{ref_key:`overflowContainer`,ref:overflowContainer,class:`topbar-overflow-container`,"use-bindings-only":``,"show-bindings":showTabBindings.value},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(items$2),item=>(openBlock(),createBlock(TopBarItem_default,{key:item.id,icon:item.icon,label:item.label,onClick:$event=>onItemClicked(item)},null,8,[`icon`,`label`,`onClick`]))),128))]),_:1},8,[`show-bindings`]),[[vShow,unref(items$2).length>0]])]),createBaseVNode(`div`,{ref_key:`pauseButtonTarget`,ref:pauseButtonTarget,class:`topbar-section topbar-right`},null,512)])),[[vShow,unref(visible)],[unref(BngBlur_default)]])}},TopBar_default=__plugin_vue_export_helper_default(_sfc_main$4,[[`__scopeId`,`data-v-c4d95c66`]]),_sfc_main$3={__name:`Popup`,props:{type:{type:String,default:`default`,validator:val=>[`default`,`activity`].includes(val)}},setup(__props){let props=__props,popups=computed(()=>popupsView[props.type===`default`?`popups`:`activities`]),popupsWrapper=computed(()=>popupsView[props.type===`default`?`popupsWrapper`:`activitiesWrapper`]),wrapper=ref(),innerWrapper=ref(),shown=reactive({wrapper:!1,popups:!1}),tmr;watch(()=>!!popups.value,cur=>{if(cur===shown.wrapper)return;let body=document.body;cur&&popupsWrapper.value.fade?body.classList.add(`popup-all-hide`):body.classList.remove(`popup-all-hide`),tmr&&clearTimeout(tmr),cur?(shown.wrapper=!0,nextTick(()=>{props.type===`default`&&wrapper.value&&typeof wrapper.value.showModal==`function`&&wrapper.value.showModal(),nextTick(()=>shown.popups=!0)}),popupsWrapper.value.fade&&body.classList.add(`popup-show-hide`)):tmr=setTimeout(()=>{tmr=null,!popups.value&&(body.classList.remove(`popup-show-hide`),shown.popups=!1,shown.wrapper=!1,nextTick(()=>priorityFocus()))},200)});function handleUINavEvents(event){console.log(`POPUP handleUINavEvents stopPropagation`,event),event.stopPropagation()}return(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[shown.wrapper?withDirectives((openBlock(),createBlock(resolveDynamicComponent(__props.type===`default`?`dialog`:`div`),{key:0,ref_key:`wrapper`,ref:wrapper,class:normalizeClass([`popup-wrapper`,`popup-type-${__props.type}`])},{default:withCtx(()=>[createVNode(Transition,{name:`popup-background`},{default:withCtx(()=>[shown.popups?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`popup-background`,...popupsWrapper.value.style.map(name=>`background-style-`+name)])},null,2)):createCommentVNode(``,!0)]),_:1}),createVNode(TransitionGroup,{name:`popup-fade`},{default:withCtx(()=>[shown.popups?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(popups.value,popup=>(openBlock(),createElementBlock(`div`,{key:popup.id,class:normalizeClass([`popup-container`,...popup.position.map(name=>`content-position-`+name),popup.animated?`popup-animated`:`popup-notanimated`,popup.active?`popup-active`:`popup-inactive`])},[(openBlock(),createBlock(resolveDynamicComponent(popup.component.ref),mergeProps({ref_for:!0},popup.props,{popupActive:popup.active,class:[`popup-content`,popup.active?`popup-active`:`popup-inactive`],onReturn:popup.return}),null,16,[`popupActive`,`class`,`onReturn`]))],2))),128)):createCommentVNode(``,!0)]),_:1}),createBaseVNode(`div`,{ref_key:`innerWrapper`,ref:innerWrapper},null,512)]),_:1},8,[`class`])),[[unref(BngBlur_default),popupsWrapper.value.blur],[unref(BngOnUiNav_default),handleUINavEvents,`back,menu`]]):createCommentVNode(``,!0),(openBlock(),createBlock(Teleport,{to:innerWrapper.value,disabled:!innerWrapper.value},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],8,[`to`,`disabled`]))],64))}},Popup_default=__plugin_vue_export_helper_default(_sfc_main$3,[[`__scopeId`,`data-v-c0bb08d7`]]),_hoisted_1$2={class:`popover-container`},_sfc_main$2={__name:`Popover`,setup(__props){return usePopover(),(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$2))}},Popover_default=__plugin_vue_export_helper_default(_sfc_main$2,[[`__scopeId`,`data-v-86205238`]]),_hoisted_1$1={class:`backgrounds-cache`},_hoisted_2=[`src`],DRIVE=8,TECH=1,_sfc_main$1={__name:`MainBackground`,setup(__props,{expose:__expose}){let bgPathResolve=(product,name,blur$1=!1)=>`images/mainmenu/${product?product+`/`:``}${name}${blur$1?`_blur`:``}.jpg`,_backgrounds={drive:Array.from({length:DRIVE},(_,i)=>bgPathResolve(`drive`,i+1)),drive_blur:Array.from({length:DRIVE},(_,i)=>bgPathResolve(`drive`,i+1,!0)),tech:Array.from({length:TECH},(_,i)=>bgPathResolve(`tech`,i+1)),tech_blur:Array.from({length:TECH},(_,i)=>bgPathResolve(`tech`,i+1,!0)),unofficial:[bgPathResolve(null,`unofficial_version`)],unofficial_blur:[bgPathResolve(null,`unofficial_version`,!0)]},backgroundId=ref(`drive`),backgrounds=computed(()=>({normal:_backgrounds[backgroundId.value],blur:_backgrounds[backgroundId.value+`_blur`]})),carousel=ref();return __expose({carousel:computed(()=>carousel.value),backgrounds:computed(()=>backgrounds.value)}),onMounted(async()=>{let isTech=await Lua_default.extensions.tech_license.isValid();backgroundId.value=isTech?`tech`:`drive`,bngApi.engineLua(`sailingTheHighSeas`,ahoy=>{backgroundId.value=ahoy?`unofficial`:isTech?`tech`:`drive`})}),(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(Slideshow_default,{class:`background-image`,ref_key:`carousel`,ref:carousel,images:backgrounds.value.normal,delay:1e4,transition:``,shuffle:``},null,8,[`images`]),(openBlock(!0),createElementBlock(Fragment,null,renderList(backgrounds.value,list=>(openBlock(),createElementBlock(`div`,_hoisted_1$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(list,src=>(openBlock(),createElementBlock(`img`,{src:unref(getAssetURL)(src)},null,8,_hoisted_2))),256))]))),256))],64))}},MainBackground_default=__plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-6c1f834b`]]),_hoisted_1={id:`vue-app-container`},_sfc_main={__name:`App`,setup(__props){let route=useRoute(),settings$1=useSettings(),bngVue$1=window.bngVue||{},apps=ref([]),appContCnt=ref(0),appTargets=computed(()=>apps.value.reduce((res,{teleport})=>({...res,[teleport]:document.getElementById(teleport.substring(1)),cnt:appContCnt.value}),{}));bngVue$1.updateAppContainer=()=>window.requestAnimationFrame(()=>appContCnt.value=++appContCnt.value%1e5);let contClickThrough=ref(!1);bngVue$1.gotoAngularState=(state=`blank`,params=void 0)=>window.angular&&window.angular.element(document.querySelector(`body`)).controller().changeAngularStateFromVue(state,params),bngVue$1.gotoGameState=(state=`ui-test`,{params=!1,tryAngularJS=!0,blankAngularJS=!0,clickThrough=!1,uiAppsShown=!1}={})=>{let a$1=history.state;if(!router_default.hasRoute(state))window.location.hash=`#/`+state,route&&(handleUiAppsMeta(route,uiAppsShown),router_default.bngUpdateMeta(route)),tryAngularJS&&bngVue$1.gotoAngularState(state,params);else{blankAngularJS&&bngVue$1.gotoAngularState(`blank`);let newroute=router_default.resolve({name:state,params});handleUiAppsMeta(newroute,uiAppsShown),newroute.name===route.name&&router_default.bngUpdateMeta(route),window.location.hash=newroute.href,router_default.replace({name:state,params})}history.replaceState(a$1,``,window.location.toString()),contClickThrough.value=clickThrough};function handleUiAppsMeta(route$1,uiAppsShown){route$1.meta?route$1.meta.uiApps||(route$1.meta.uiApps={}):route$1.meta={uiApps:{}},typeof route$1.meta.uiApps.shown!=`boolean`&&(route$1.meta.uiApps.shown=uiAppsShown)}bngVue$1.getCurrentRoute=()=>router_default.currentRoute.value,bngVue$1.spawnApp=(appName,appId,params=null)=>spawnUiApp(appName,appId,params,apps.value),bngVue$1.destroyApp=appName=>destroyUiApp(appName,apps.value),useFocusManager();let topBar=ref();provide(`setBack`,(id,fn)=>topBar.value?.setBack(id,fn)),provide(`showTopbarTabBindings`,val=>topBar.value&&(topBar.value.showTabBindings=val)),provide(`showTopbarBackBinding`,val=>topBar.value&&(topBar.value.showBackBinding=val));let bgRequired=sysInfo_default.mainMenuBackgroundRequired,mainBackground=ref();return provide(`mainBackground`,computed(()=>mainBackground.value?.carousel)),provide(`mainBackgroundBlur`,computed(()=>mainBackground.value?.backgrounds.blur)),watch([()=>settings$1.values.uiLayoutContentAlignment,()=>settings$1.values.uiLayoutContentWidth],([alignment,width$1])=>{let rootStyle=document.documentElement.style;alignment=LAYOUT_ALIGNMENTS[alignment||`center`],width$1=width$1?`${width$1}px`:`100vw`,window.requestAnimationFrame(()=>{rootStyle.setProperty(`--layout-content-alignment`,alignment),rootStyle.setProperty(`--layout-content-width`,width$1)})},{immediate:!0}),(_ctx,_cache)=>{let _component_router_view=resolveComponent(`router-view`);return openBlock(),createElementBlock(Fragment,null,[unref(bgRequired)?(openBlock(),createBlock(MainBackground_default,{key:0,ref_key:`mainBackground`,ref:mainBackground},null,512)):createCommentVNode(``,!0),unref(route).name===`unknown`?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass({"vue-app-main":!0,"click-through":contClickThrough.value||unref(route).meta&&unref(route).meta.clickThrough})},[createVNode(TopBar_default,{ref_key:`topBar`,ref:topBar},null,512),createVNode(_component_router_view),createVNode(InfoBar_default)],2)),createVNode(pauseButton_default,{"teleport-to":topBar.value?.pauseButtonTarget},null,8,[`teleport-to`]),unref(route).name===`unknown`?(openBlock(),createBlock(Popup_default,{key:2,type:`activity`})):createCommentVNode(``,!0),createVNode(Popup_default,null,{default:withCtx(()=>[createVNode(Popover_default)]),_:1}),createVNode(LoadingScreen_default),createVNode(VueDebug_default),createBaseVNode(`div`,_hoisted_1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(apps.value,(app$1,index)=>(openBlock(),createElementBlock(Fragment,{key:app$1.appKey},[appTargets.value[app$1.teleport]?(openBlock(),createBlock(Teleport,{key:0,to:app$1.teleport},[(openBlock(),createBlock(resolveDynamicComponent(app$1.comp),mergeProps({ref_for:!0},app$1.props),null,16))],8,[`to`])):createCommentVNode(``,!0)],64))),128))])],64)}}},App_default=__plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-eef28b65`]]);function customDisposePlugin(context){let store$1=context.store,{$dispose,dispose:dispose$2}=store$1;store$1.$dispose=()=>{$dispose(),dispose$2&&typeof dispose$2==`function`&&dispose$2()}}window.watchdogInit=init,window.Vue=vue_esm_bundler_exports;var deps={Emitter:eventemitter3_default,beamng:window.beamng};window.bngApi&&(deps.overrideAPI=window.bngApi),setBridgeDependencies(deps);var bridge=useBridge();window.bridge=bridge,sysInfo_default.init(),initFocusVisible(),bridge.uiNavService=new UINavService(bridge.events),setUINavServiceInstance(bridge.uiNavService),bridge.uiNavService.initialize();var pinia=createPinia().use(()=>({$game:bridge})).use(customDisposePlugin),app=createApp(App_default).use(router_default).use(pinia).use(registerApps,apps_exports);useGameContextStore(),window.bngVue={start:()=>{window.vueGlobalStore||(window.vueGlobalStore=reactive({}));let globals={$game:bridge,$console:logger_default,$logger:logger_default,$simplemenu:ref(!!window.beamng?.simplemenu),$globalStore:window.vueGlobalStore},{i18n,plugin:translationPlugin$1}=initTranslation();app.use(i18n).use(translationPlugin$1());for(let[key,value]of Object.entries(globals))app.config.globalProperties[key]=value,app.provide(key,value);app.mount(`#vue-app`);let controlsStore=controls_default();window.bngVue.controls={getControllers:()=>controlsStore.controllers,getPlayers:()=>controlsStore.players,getCategories:()=>controlsStore.categories,getCategoriesList:()=>controlsStore.categoriesList,findBindingForAction:controlsStore.findBindingForAction,getActionDetails:controlsStore.getActionDetails,getBindingDetails:controlsStore.getBindingDetails,getAllBindingsForAction:controlsStore.getAllBindingsForAction,addNewBinding:controlsStore.addNewBinding,updateBinding:controlsStore.updateBinding,deleteBinding:controlsStore.deleteBinding,deleteBindings:controlsStore.deleteBindings,deviceIcon:controlsStore.deviceIcon,isFFBBound:controlsStore.isFFBBound,isFFBEnabled:controlsStore.isFFBEnabled,isFFBCapable:controlsStore.isFFBCapable,isGamepadAvailable:controlsStore.isGamepadAvailable,captureBinding:controlsStore.captureBinding,makeViewerObj:controlsStore.makeViewerObj,isControllerAvailable:controlsStore.isControllerAvailable,isControllerUsed:controlsStore.isControllerUsed,showIfController:controlsStore.showIfController,focusIfController:controlsStore.focusIfController,refreshData:()=>bridge.lua.extensions.core_input_bindings.notifyUI(`Vue exposed controls service needs the data`)},window.bngVue.uiNavTracker=useUINavTracker(),window.bngVue.topBar=useTopBar()},startTest:()=>{app.mount(`#vue-app`)},isProd:!0,icons},window.beamng||window.bngVue.start({i18n:window.i18n});
    if core_camera then core_camera.requestConfig() end    -- cameraConfig
  `);async function init$3(){for(let key in active=!0,(window.beamng&&!window.beamng.shipping||editor)&&(watchers$1.push(watch(()=>settingsValues.value,updateSettingsList)),watchers$1.push(watch(()=>layout.value,async()=>{await settings$1.waitForData(),updateSettingsList()}))),events$3.on(`SettingsChanged`,()=>settingsTimestamp.value=Date.now()),watchers$1.push(watch(customValues,()=>settingsTimestamp.value=Date.now(),{deep:!0})),events$3.on(`externalUIURL`,data=>customValues.externalUIURL=data||``),events$3.on(`OpenXRStateChanged`,data=>customValues.openXRstate=data),events$3.on(`CameraConfigChanged`,data=>{customValues.cameraConfigList=Array.isArray(data.cameraConfig)?data.cameraConfig:[],customValues.cameraConfigFocused=data.focusedCamName}),updateCustom(),await settings$1.waitForData(),settings$1.values)initialValues[key]=settings$1.values[key];settingsTimestamp.value=Date.now(),setupSearch(layout,settingsValues,settingsOptions,settingsTimestamp,conditions)}let settingsValues=computed(()=>{if(!active||!settings$1.values)return{};let res={...settings$1.values};for(let key in valueFormatters)res[key]=valueFormatters[key](res[key],settings$1.values,customValues);for(let key in valueExtensions)res[key]=valueExtensions[key](settings$1.values,customValues);return res}),settingsOptions=computed(()=>{let res={};if(!active||!settings$1.options||!settings$1.values)return res;for(let key in settings$1.options)key in optionFormatters?res[key]=optionFormatters[key](settings$1.options[key],settings$1.options,settings$1.values):res[key]=guessOptionFormat(settings$1.options[key]);for(let key in optionExtensions)res[key]=optionExtensions[key](settings$1.options,settings$1.values);return res}),editor=null,layout=ref(layout_default);function updateSettingsList(){if(!active)return;settingsList.value=Object.keys(settingsValues.value).reduce((res,name)=>({...res,[name]:{assigned:!1,assignedIn:[],value:settingsValues.value[name],options:settingsOptions.value[name],elementId:name.split(`.`)}}),{});function dive(items$2,cat,catIndex,level$1=0,parentId=``){for(let i=0;i{let values=name in applyValueFormatters?applyValueFormatters[name](value):{[name]:value};for(let key in name.startsWith(`debug_`)&&(customValues.debug[name.substring(6)]=value,name===`debug_visualization`&&(customValues.debug.visualization_prev&&api$1.engineLua(customValues.debug.visualization_prev),customValues.debug.visualization_prev=value,api$1.engineLua(value))),values)key in settings$1.values||delete values[key];Object.keys(values).length>0&&(logger_default.debug(`Applying:`,JSON.stringify(values)),settings$1.apply(values),updateCustom())};function dispose$2(){active=!1,settingsList.value={};for(let unwatch of watchers$1)unwatch();watchers$1.splice(0),settingsTimestamp.value=0,disposeSearch(),null?.dispose()}return provide(`settingsValues`,settingsValues),provide(`settingsOptions`,settingsOptions),provide(`settingsTimestamp`,settingsTimestamp),provide(`settingsList`,settingsList),provide(`conditions`,conditions),provide(`buildItemId`,buildItemId),{init:init$3,dispose:dispose$2,versions:VERSIONS,version:VERSIONS[0],settings:settings$1,settingsList,settingsValues,settingsOptions,settingsTimestamp,applySetting,buildItemId,layout,conditions,editable:!1,editor:null,searchText,searchResults,searchTemplates:{message:(...args)=>searchTemplates.message(layout,...args),headers:(...args)=>searchTemplates.headers(layout,...args),group:(...args)=>searchTemplates.group(layout,...args)}}}var _hoisted_1$19={class:`options-wrapper`,"bng-ui-scope":`options`},_hoisted_2$13={class:`options-heading`},_hoisted_3$12={key:0,class:`options-container`},_hoisted_4$9={class:`background`},_hoisted_5$8={class:`options-content-wrapper`},_hoisted_6$5={class:`options-message`},_hoisted_7$5={class:`message-content`},_hoisted_8$3={key:1,class:`options-categories`},_hoisted_9$2={key:0,class:`categories-divider`},_hoisted_10$1={key:2,class:`options-container`},_hoisted_11$1={class:`options-subcategories`},_hoisted_12$1={class:`background`},_hoisted_13$1={key:0,class:`categories-divider`},_hoisted_14$1={key:1,class:`categories-spacer`},_hoisted_15$1={key:0,class:`categories-spacer`},_hoisted_16$1={key:1,class:`categories-divider`},_hoisted_17$1={class:`options-content-wrapper`},_hoisted_18$1={key:0,class:`options-add-item`},_hoisted_19$1={key:1,class:`options-content`,"bng-ui-scope":`options-content`},_hoisted_20$1={key:2,class:`options-content`,"bng-ui-scope":`options-content`},_hoisted_21$1={class:`background`},_hoisted_22$1=[`innerHTML`],_hoisted_23$1={key:0,class:`options-info-fps`},_sfc_main$23={__name:`OptionsView`,props:{category:String},setup(__props){useUINavScope(`options`);let router$1=useRouter(),route=useRoute(),{api:api$1}=useBridge(),options=useOptions(),loaded=ref(!1),itemsContainer=ref(null),activeScope=ref(``),props=__props;provide(`version`,options.version);let EditUI=ref(null),itemEdit=(...args)=>EditUI.value?.functions.itemEdit?.(...args),categoryEdit=(...args)=>EditUI.value?.functions.categoryEdit?.(...args),catItemsPaste=(...args)=>EditUI.value?.functions.catItemsPaste?.(...args);provide(`EditUI`,EditUI);let editable=ref(!1);provide(`editable`,editable);let categories=computed(()=>options.layout.value.items||[]),categoryIds=computed(()=>categories.value.map(cat=>cat.categoryId)),categoryIndex=ref(-1);provide(`categoryIndex`,categoryIndex);let allCategories=computed(()=>{let cats=[...categories.value].map(cat=>({...cat})),startIndex=0;for(let i=0;istartIndex&&(cats[ri].subcategoryMode=hadSpacer?`none`:ri===i?`last`:ri===startIndex+1?`first`:`middle`)}}else startIndex=i,cat.indexRange=[i,i]}let hidden=[];for(let cat of cats)if(!(!cat.condition_visible||cat.condition_visible in options.conditions&&options.conditions[cat.condition_visible](options.settingsValues.value)))if(cat.subcategory)hidden.push(cat.categoryIndex);else for(let i=cat.indexRange[0];i<=cat.indexRange[1];i++)hidden.push(i);return options.editable?cats.map(cat=>(cat.hiddenByCondition=hidden.includes(cat.categoryIndex),cat.debugSettings=cat.condition_visible===`__notForShipping`,cat)):hidden.length>0?cats.filter(cat=>!hidden.includes(cat.categoryIndex)):cats}),categoriesView=computed(()=>allCategories.value.filter(cat=>!cat.subcategory&&!cat.persistent&&!cat.spacer)),categoryRange=computed(()=>categoriesView.value.find(cat=>categoryIndex.value>=cat.indexRange[0]&&categoryIndex.value<=cat.indexRange[1])?.indexRange||[categoryIndex.value,categoryIndex.value]),subcategoriesView=computed(()=>{let res=categoryIndex.value===-1?[]:allCategories.value.filter(cat=>!cat.persistent&&cat.categoryIndex>=categoryRange.value[0]&&cat.categoryIndex<=categoryRange.value[1]);return res.length>0&&(res[0]={...res[0],label:`ui.options.general`}),res}),persistentView=computed(()=>allCategories.value.filter(cat=>cat.persistent)),itemsNew=ref([]),itemsNewShow=ref(!1),itemsNewView=computed(()=>itemsNewShow.value?itemsNew.value:[]);options.editor&&watch(options.layout,()=>itemsNew.value.splice(0));function renderNewOptions(doRender=!0){if(itemsNewShow.value=doRender,!doRender||itemsNew.value.length>0)return;function dive(parent){if(parent.version!==options.version)for(let i=parent.items.length-1;i>=0;i--){let item=parent.items[i];item.items&&(item.items.length>0&&dive(item),item.items.length>0)||item.version!==options.version&&parent.items.splice(i,1)}}let layout=JSON.parse(JSON.stringify(options.layout.value.items));for(let i=layout.length-1;i>=0;i--){let cat=layout[i];dive(cat),cat.items.length>0&&itemsNew.value.push(options.searchTemplates.group(cat.label,cat.icon,cat.items))}}provide(`renderNewOptions`,renderNewOptions);let itemsView=computed(()=>[...categoryIndex.value>-1&&categoryIndex.value{renderNewOptions(!1),categoryIndex.value>-1&&(special.value=null,searchActive.value=!1,options.searchText.value=``),itemsContainer.value&&itemsContainer.value.scrollTo({top:0,behavior:`instant`})}),watch(special,()=>{special.value&&(categoryIndex.value=-1,searchActive.value=!1,options.searchText.value=``)});let searchActive=ref(!1),searchFocused=ref(!1);watch(searchFocused,focused$1=>{focused$1?(searchActive.value=!0,categoryIndex.value=-1,special.value=null):options.searchText.value.length===0&&(searchActive.value=!1,categoryIndex.value=0)});let elCategories=ref(null),elSearch=ref(null),elSearchBinding=ref(null);watch(()=>elSearch.value?.scopeActivated,active=>{activeScope.value=active?``:`content`});function toSearchAndBack(){elSearch.value&&(elSearch.value.scopeActivated=!elSearch.value.scopeActivated)}function fromContent(){searchActive.value?elSearch.value.scopeActivated=!0:activeScope.value=`subcategories`}function mainCatNav(evt){!elCategories.value||!evt.detail||(options.searchText.value=``,elSearch.value.scopeActivated=!1,searchActive.value=!1,activeScope.value=`subcategories`,evt.detail.name===`tab_l`?elCategories.value.activatePrev():evt.detail.name===`tab_r`&&elCategories.value.activateNext(),evt.stopPropagation())}function catNavigate(cat){cat.reroute?window.bngVue.gotoAngularState(cat.reroute):categoryIndex.value!==cat.categoryIndex&&(categoryIndex.value=cat.categoryIndex)}provide(`goToSetting`,(catIndex,itemId)=>{categoryIndex.value=catIndex,nextTick(()=>{let elm=document.getElementById(itemId);elm?(elm.scrollIntoView({behavior:`smooth`,block:`center`}),elm.classList.add(`options-setting-highlight`),setTimeout(()=>elm?.classList.remove(`options-setting-highlight`),5e3)):logger_default.warn(`Setting item not found: ${itemId}`)})});function onChange(data,value){options.applySetting(data.setting,value);let lua;switch(data.itemType){case`checkbox`:value===!0||value===`enable`?lua=data.lua:(value===!1||value===`disable`)&&(lua=data.luaOff);break;default:lua=data.lua}lua&&runLua(lua,value)}function onClick(data){data.lua&&runLua(data.lua)}function runLua(code,value=void 0){code.toLowerCase().includes(`%value%`)&&value!==void 0&&(code=code.replace(/%value%/gi,api$1.serializeToLua(value))),code.toLowerCase().includes(`%values%`)&&(code=code.replace(/%values%/gi,api$1.serializeToLua(options.settings.values)));let isLua=!code.startsWith(`$`);logger_default.log(`Running ${isLua?`lua`:`script`}: ${code}`),isLua?api$1.engineLua(code):api$1.engineScript(code)}function updateRoute(){if(!loaded.value||route.path!==`/options`&&!route.path.startsWith(`/options/`))return;let newRoute={name:`options`};categoryIndex.value>-1&&categoryIndex.valuecategoryIndex.value,(index,oldIndex)=>{index>-1?(special.value=null,updateRoute(),options.editor?.clearSelection(),showCategoryInfo(index,categories.value[index]?.categoryInfo),showCategoryInfo(oldIndex)):showCategoryInfo(oldIndex)}),watch(()=>special.value,val=>{val&&(categoryIndex.value=-1,updateRoute())});function selectDefaultCategory(){if(categories.value.length===0)return!1;if(props.category){let catIndex=categoryIds.value.indexOf(props.category);catIndex>-1?categoryIndex.value=catIndex:special.value=props.category}else categoryIndex.value=0;return!0}let elInfo=ref(),infos=new Map,infoHidden=ref(!1),infoView=ref([]);function showInfo(id,text=void 0){if(infos.has(id))if(text){if(infos.get(id)===text)return}else infos.delete(id);else if(!text)return;text&&infos.set(id,text),infos.size===0?infoView.value=[]:infoView.value=Array.from(infos.entries()).sort((a$1,b)=>a$1[0]-b[0]).map(tip=>({id:tip[0],text:tip[1]}))}function onResize(){elInfo.value&&(infoHidden.value=window.getComputedStyle(elInfo.value).display===`none`)}let unwatchResize=watch(elInfo,()=>{elInfo.value&&(unwatchResize(),onResize())});provide(`showInfo`,showInfo),provide(`infoHidden`,infoHidden);let fps=ref(`?`),fpsShown=ref(!1),fpsTimer;function showFps(show=!0){if(fpsShown.value=show,fpsTimer)show||(clearInterval(fpsTimer),fps.value=`?`,fpsTimer=null);else if(show){let fpsUpdate=()=>{infoHidden.value||api$1.engineLua(`getConsoleVariable("fps::avg")`,val=>fps.value=val?Number(val).toFixed(1):`?`)};fpsTimer=setInterval(fpsUpdate,500),fpsUpdate()}}let catInfoFuncs={fps:showFps},catInfoStack=new Map;function showCategoryInfo(id,info=void 0){if(!id)return;catInfoStack.has(id)&&!info?catInfoStack.delete(id):info&&catInfoStack.set(id,info);let infos$1=Array.from(catInfoStack.values()).reduce((res,name)=>res.includes(name)?res:[...res,name],[]);for(let[name,func]of Object.entries(catInfoFuncs))func(infos$1.includes(name))}function disposeCategoryInfo(){for(let func of Object.values(catInfoFuncs))func(!1)}function back(){editable.value?editable.value=!1:window.bngVue.gotoAngularState(`menu.mainmenu`)}return onBeforeMount(async()=>{api$1.engineLua(`if getCurrentLevelIdentifier() then simTimeAuthority.pushPauseRequest('options') end`)}),onMounted(()=>{if(options.init().then(()=>{loaded.value=!0,nextTick(()=>activeScope.value=`subcategories`)}),!selectDefaultCategory()){let unwatchCats=watch(categories,()=>selectDefaultCategory()&&unwatchCats())}window.addEventListener(`resize`,onResize)}),onUnmounted(()=>{options.searchText.value=``,window.removeEventListener(`resize`,onResize),disposeCategoryInfo(),options.dispose(),api$1.engineLua(`if getCurrentLevelIdentifier() then simTimeAuthority.popPauseRequest('options') end`)}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$19,[createBaseVNode(`div`,_hoisted_2$13,[createVNode(unref(bngScreenHeading_default),null,{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(`ui.options.options`)),1)]),_:1}),unref(options).editor&&EditUI.value?(openBlock(),createBlock(resolveDynamicComponent(EditUI.value.default),{key:0,options:unref(options),categories:categories.value,"category-index":categoryIndex.value,"onUpdate:categoryIndex":_cache[0]||=$event=>categoryIndex.value=$event,special:special.value,"onUpdate:special":_cache[1]||=$event=>special.value=$event,editable:editable.value,"onUpdate:editable":_cache[2]||=$event=>editable.value=$event},null,40,[`options`,`categories`,`category-index`,`special`,`editable`])):createCommentVNode(``,!0)]),loaded.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_3$12,[createVNode(BlurBackground_default),withDirectives(createBaseVNode(`div`,_hoisted_4$9,null,512),[[unref(BngBlur_default)]]),createBaseVNode(`div`,_hoisted_5$8,[createBaseVNode(`div`,_hoisted_6$5,[createBaseVNode(`div`,_hoisted_7$5,toDisplayString(_ctx.$t(`ui.repository.loading`)),1)])])])),loaded.value?(openBlock(),createElementBlock(`div`,_hoisted_8$3,[createVNode(unref(bngOverflowContainer_default),{ref_key:`elCategories`,ref:elCategories,class:`categories-container`,"initial-index":0,"use-bindings-only":``},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(categoriesView.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.divider?(openBlock(),createElementBlock(`div`,_hoisted_9$2)):(openBlock(),createBlock(CategoryTop_default,{key:1,id:`options-cat-`+cat.categoryIndex,index:cat.categoryIndex,"has-subcategories":cat.hasSubcategories,selected:cat.categoryIndex>=categoryRange.value[0]&&cat.categoryIndex<=categoryRange.value[1],icon:cat.icon,onClick:$event=>catNavigate(cat,!1),"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,editable:editable.value,onEditCmd:categoryEdit},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`index`,`has-subcategories`,`selected`,`icon`,`onClick`,`hidden-by-condition`,`debug-settings`,`editable`]))],64))),128))]),_:1},512),createBaseVNode(`div`,{class:normalizeClass([`options-search-input`,{"search-active":searchActive.value}])},[createVNode(unref(bngBinding_default),{ref_key:`elSearchBinding`,ref:elSearchBinding,class:`search-binding`,"ui-event":`context`,controller:``},null,512),createVNode(unref(bngInputNew_default),{ref_key:`elSearch`,ref:elSearch,class:`search-input`,modelValue:unref(options).searchText.value,"onUpdate:modelValue":_cache[3]||=$event=>unref(options).searchText.value=$event,modelModifiers:{trim:!0},"leading-icon":elSearchBinding.value?.displayed?null:unref(icons).search,"floating-label":_ctx.$tt(`ui.common.search`),"show-external-button":searchActive.value,onFocus:_cache[4]||=$event=>searchFocused.value=!0,onBlur:_cache[5]||=$event=>searchFocused.value=!1},null,8,[`modelValue`,`leading-icon`,`floating-label`,`show-external-button`])],2)])):createCommentVNode(``,!0),loaded.value?(openBlock(),createElementBlock(`div`,_hoisted_10$1,[withDirectives((openBlock(),createElementBlock(`div`,_hoisted_11$1,[createVNode(BlurBackground_default),withDirectives(createBaseVNode(`div`,_hoisted_12$1,null,512),[[unref(BngBlur_default)]]),(openBlock(!0),createElementBlock(Fragment,null,renderList(subcategoriesView.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.divider?(openBlock(),createElementBlock(`div`,_hoisted_13$1)):cat.spacer?(openBlock(),createElementBlock(`div`,_hoisted_14$1)):(openBlock(),createBlock(CategorySide_default,{key:2,id:`options-cat-`+cat.categoryIndex,index:cat.categoryIndex,"has-subcategories":cat.hasSubcategories,selected:cat.categoryIndex===categoryIndex.value,subcategory:cat.subcategoryMode,icon:cat.icon,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,onClick:$event=>catNavigate(cat),onFocus:$event=>catNavigate(cat,!1)},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`index`,`has-subcategories`,`selected`,`subcategory`,`icon`,`hidden-by-condition`,`debug-settings`,`onClick`,`onFocus`]))],64))),128)),subcategoriesView.value.length===0&&allCategories.value[categoryIndex.value]?.persistent?(openBlock(),createBlock(CategorySide_default,{key:0,icon:allCategories.value[categoryIndex.value].icon,selected:``},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(allCategories.value[categoryIndex.value].label)),1)]),_:1},8,[`icon`])):createCommentVNode(``,!0),searchActive.value?(openBlock(),createBlock(CategorySide_default,{key:1,icon:`search`,selected:``},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(`ui.common.search`)),1)]),_:1})):special.value===`categories-edit`?(openBlock(),createBlock(CategorySide_default,{key:2,icon:`listIndented`,selected:``},{default:withCtx(()=>[..._cache[11]||=[createTextVNode(`Edit categories`,-1)]]),_:1})):createCommentVNode(``,!0),persistentView.value.length>0?(openBlock(),createElementBlock(Fragment,{key:3},[_cache[13]||=createBaseVNode(`div`,{class:`categories-spacer`},null,-1),editable.value&&special.value===`categories-edit`?(openBlock(),createElementBlock(Fragment,{key:0},[(openBlock(!0),createElementBlock(Fragment,null,renderList(persistentView.value,cat=>(openBlock(),createBlock(CategorySide_default,{key:`cat-`+cat.categoryIndex,id:`options-cat-`+cat.categoryIndex,"has-subcategories":cat.hasSubcategories,subcategory:cat.subcategoryMode,icon:cat.icon,index:cat.categoryIndex,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,editable:``,onClick:$event=>categoryEdit(`edit`,cat.categoryIndex),onEditCmd:categoryEdit},{default:withCtx(()=>[createTextVNode(toDisplayString(cat.spacer||cat.divider?`---`:_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`has-subcategories`,`subcategory`,`icon`,`index`,`hidden-by-condition`,`debug-settings`,`onClick`]))),128)),createVNode(CategorySide_default,{icon:`plus`,onClick:_cache[6]||=$event=>categoryEdit(`add`,!0),style:normalizeStyle(editable.value?{}:{opacity:0,pointerEvents:`none`})},{default:withCtx(()=>[..._cache[12]||=[createTextVNode(`New category`,-1)]]),_:1},8,[`style`])],64)):(openBlock(!0),createElementBlock(Fragment,{key:1},renderList(persistentView.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.spacer?(openBlock(),createElementBlock(`div`,_hoisted_15$1)):cat.divider?(openBlock(),createElementBlock(`div`,_hoisted_16$1)):(openBlock(),createBlock(CategorySide_default,{key:2,id:`options-cat-`+cat.categoryIndex,"has-subcategories":cat.hasSubcategories,selected:cat.categoryIndex===categoryIndex.value,subcategory:cat.subcategoryMode,icon:cat.icon,index:cat.categoryIndex,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,onClick:$event=>catNavigate(cat)},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`has-subcategories`,`selected`,`subcategory`,`icon`,`index`,`hidden-by-condition`,`debug-settings`,`onClick`]))],64))),128))],64)):createCommentVNode(``,!0)])),[[unref(BngScopedNav_default),{activated:!searchActive.value&&activeScope.value===`subcategories`,bubbleWhitelistEvents:[`context`]}],[unref(BngOnUiNav_default),mainCatNav,`tab_l,tab_r`],[unref(BngOnUiNav_default),back,`back,menu`],[unref(BngOnUiNav_default),()=>activeScope.value=`content`,`ok`,{focusRequired:!0}]]),withDirectives((openBlock(),createElementBlock(`div`,_hoisted_17$1,[createVNode(BlurBackground_default,{class:normalizeClass([`background`,{"background-no-info":infoHidden.value}])},null,8,[`class`]),withDirectives(createBaseVNode(`div`,{class:normalizeClass([`background`,{"background-no-info":infoHidden.value}])},null,2),[[unref(BngBlur_default)]]),categoryIndex.value>-1?withDirectives((openBlock(),createElementBlock(`div`,{key:0,ref_key:`itemsContainer`,ref:itemsContainer,class:`options-content`,"bng-ui-scope":`options-content`},[(openBlock(!0),createElementBlock(Fragment,null,renderList(itemsView.value,(item,index)=>(openBlock(),createBlock(Item_default,{key:`item-`+categoryIndex.value*1e5+`-`+index,parent:categories.value[categoryIndex.value],index,level:0,data:item,onClick,onChange,onEditCmd:itemEdit},null,8,[`parent`,`index`,`data`]))),128)),editable.value?(openBlock(),createElementBlock(`div`,_hoisted_18$1,[createVNode(unref(bngButton_default),{accent:unref(ACCENTS).outlined,icon:unref(icons).plus,onClick:_cache[7]||=$event=>unref(options).editor.itemAdd(categories.value[categoryIndex.value])},{default:withCtx(()=>[..._cache[14]||=[createTextVNode(`Add new item`,-1)]]),_:1},8,[`accent`,`icon`]),createVNode(unref(bngButton_default),{accent:unref(ACCENTS).outlined,icon:unref(icons).addListItem,disabled:!unref(options).editor.clipItems.value.length,onClick:_cache[8]||=$event=>catItemsPaste()},{default:withCtx(()=>[createTextVNode(`Paste `+toDisplayString(unref(options).editor.clipTitle.value),1)]),_:1},8,[`accent`,`icon`,`disabled`]),createVNode(unref(bngButton_default),{accent:unref(ACCENTS).outlined,icon:unref(options).editor.selectedItems.value.size>0?unref(icons).checkboxOn:unref(icons).checkboxOff,onClick:_cache[9]||=$event=>unref(options).editor.itemSelectAll(categories.value[categoryIndex.value])},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(options).editor.selectedItems.value.size>0?`Deselect all`:`Select all`),1)]),_:1},8,[`accent`,`icon`])])):createCommentVNode(``,!0)])),[[unref(BngUiNavScroll_default),void 0,void 0,{force:!0}]]):searchActive.value?withDirectives((openBlock(),createElementBlock(`div`,_hoisted_19$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(options).searchResults.value,(item,index)=>(openBlock(),createBlock(Item_default,{key:`search-`+index,index,level:0,data:item,onClick,onChange},null,8,[`index`,`data`]))),128))])),[[unref(BngUiNavScroll_default),void 0,void 0,{force:!0}]]):special.value===`categories-edit`?(openBlock(),createElementBlock(`div`,_hoisted_20$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(allCategories.value,cat=>(openBlock(),createElementBlock(Fragment,{key:`cat-`+cat.categoryIndex},[cat.persistent?createCommentVNode(``,!0):(openBlock(),createBlock(CategorySide_default,{key:0,id:`options-cat-`+cat.categoryIndex,"has-subcategories":cat.hasSubcategories,subcategory:cat.subcategoryMode,icon:cat.icon,index:cat.categoryIndex,"hidden-by-condition":cat.hiddenByCondition,"debug-settings":cat.debugSettings,editable:editable.value,onClick:$event=>categoryEdit(`edit`,cat.categoryIndex),onEditCmd:categoryEdit},{default:withCtx(()=>[createTextVNode(toDisplayString(cat.spacer||cat.divider?`---`:_ctx.$tt(cat.label)),1)]),_:2},1032,[`id`,`has-subcategories`,`subcategory`,`icon`,`index`,`hidden-by-condition`,`debug-settings`,`editable`,`onClick`]))],64))),128)),editable.value?(openBlock(),createBlock(CategorySide_default,{key:0,icon:`plus`,onClick:_cache[10]||=$event=>categoryEdit(`add`),style:normalizeStyle(editable.value?{}:{opacity:0,pointerEvents:`none`})},{default:withCtx(()=>[..._cache[15]||=[createTextVNode(`New category`,-1)]]),_:1},8,[`style`])):createCommentVNode(``,!0)])):createCommentVNode(``,!0),createBaseVNode(`div`,{ref_key:`elInfo`,ref:elInfo,class:normalizeClass([`options-info`,{"info-hidden":!!special.value}])},[createVNode(BlurBackground_default),withDirectives(createBaseVNode(`div`,_hoisted_21$1,null,512),[[unref(BngBlur_default)]]),(openBlock(!0),createElementBlock(Fragment,null,renderList(infoView.value,tip=>(openBlock(),createElementBlock(`span`,{key:tip.id,innerHTML:tip.text},null,8,_hoisted_22$1))),128)),_cache[17]||=createBaseVNode(`div`,{class:`options-spacer`},null,-1),fpsShown.value?(openBlock(),createElementBlock(`div`,_hoisted_23$1,[_cache[16]||=createTextVNode(`FPS: `,-1),createBaseVNode(`span`,null,toDisplayString(fps.value),1)])):createCommentVNode(``,!0)],2)])),[[unref(BngScopedNav_default),{activated:activeScope.value===`content`,bubbleWhitelistEvents:[`context`]}],[unref(BngOnUiNav_default),mainCatNav,`tab_l,tab_r`],[unref(BngOnUiNav_default),fromContent,`back`],[unref(BngOnUiNav_default),back,`menu`]])])):createCommentVNode(``,!0)])),[[unref(BngOnUiNav_default),mainCatNav,`tab_l,tab_r`],[unref(BngOnUiNav_default),back,`back,menu`],[unref(BngOnUiNav_default),toSearchAndBack,`context`],[unref(BngUiNavLabel_default),`ui.common.search`,`context`]])}},OptionsView_default=__plugin_vue_export_helper_default(_sfc_main$23,[[`__scopeId`,`data-v-206a0fb3`]]),routes_default$12=[{path:`/options/:category?`,name:`options`,component:OptionsView_default,props:!0,meta:{infoBar:{visible:!0,showSysInfo:!0},uiApps:{shown:!1}}}],cfg={background:[`var(--bng-black-o8)`,`var(--bng-black-o4)`],info:{icon:`var(--bng-cool-gray-500)`,iconSize:.15,label:`var(--bng-off-white)`,labelSize:.05,line:`var(--bng-cool-gray-700)`,lineSize:.0025,hotkey:`#aaa`,hotkeySize:.04,unfocusedColor:`var(--bng-cool-gray-500)`,focusedColor:`var(--bng-off-white)`},button:{top:.45,height:.175,margin:.004,corners:.03,background:`var(--bng-black)`,highlight:`var(--bng-ter-blue-gray-700)`,border:`var(--bng-cool-gray-700)`,borderHighlight:`var(--bng-cool-gray-500)`,borderSize:.0025,folder:`var(--bng-ter-blue-gray-900)`,folderTop:.45,folderHeight:.015,markerTop:.3,markerHeight:.025,marker:`var(--bng-orange)`,icon:`var(--bng-off-white)`,iconSize:.1,majorBackground:[`var(--bng-black)`,`var(--bng-ter-blue-gray-850)`],majorHighlight:[`var(--bng-ter-blue-gray-600)`,`var(--bng-ter-blue-gray-700)`],pinnedDotInvisible:{fill:`transparent`,stroke:`transparent`,r:4},markDotSolid:{fill:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,stroke:`transparent`,r:4},markDotOutline:{fill:`transparent`,stroke:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,r:3},markStar:{fill:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,stroke:`rgba(var(--bng-cool-gray-100-rgb),0.7)`,"stroke-width":2,r:3,isStar:!0,starPoints:5,innerRadius:1.5,outerRadius:3}},pointer:{color:`var(--bng-orange)`,size:6}},size=500,pointerRadius=125,controlsHotkey=``,getHotkey=action=>{let viewerObj=controls_default().makeViewerObj({action});return viewerObj?icons[viewerObj.icon].glyph+` `+viewerObj.control.split(/[ -]/).map(s=>s.substring(0,1).toUpperCase()+s.substring(1)).join(`+`):``},RadialSVG=class{parent;svg;config;events;itemsCont;info;buttons;pointer;menuIcon=``;constructor(events$3={},config=cfg,element=void 0){this.events=events$3,this.config=config,element&&this.create(element)}create(element){this.parent!==element&&(this.parent=element,this.svg||([this.svg,this.itemsCont,this.info,this.pointer]=createSvg(this.config)),this.parent.appendChild(this.svg))}update(items$2=[]){!this.itemsCont||!this.info||(controlsHotkey=getHotkey(`menu_item_focus_ud`),this.buttons=updateSvg(this.itemsCont,this.info,items$2,this.events,this.config,this.buttons||[],this))}dispose(){this.parent&&(this.parent.removeChild(this.svg),this.parent=null,this.svg=null,this.itemsCont=null,this.info=null,this.buttons=null)}setPointer(x,y){if(!this.pointer)return;let magnitude=Math.sqrt(x*x+y*y);magnitude>.1?(x/=magnitude,y/=magnitude,this.pointer.setAttribute(`cx`,x*pointerRadius+size/2),this.pointer.setAttribute(`cy`,-y*pointerRadius+size/2),this.pointer.setAttribute(`display`,`block`)):this.pointer.setAttribute(`display`,`none`)}setMenuIcon(iconName){if(this.menuIcon=iconName,this.info){let iconGlyph=getIconGlyph(this.menuIcon);this.info.icon.textContent=iconGlyph}}},svgns=`http://www.w3.org/2000/svg`,xhtmlns=`http://www.w3.org/1999/xhtml`,pid=Math.PI*2,getIconGlyph=iconName=>(iconName&&iconName in icons?icons[iconName]:icons.beamNG).glyph,setAttrs=(elm,attrs)=>Object.entries(attrs).forEach(attr=>elm.setAttribute(...attr)),setStyles=(elm,styles)=>Object.entries(styles).forEach(rule=>elm.style.setProperty(...rule)),f2size=f=>f*size,getPoint=(turn,radius,center=[.5,.5])=>[center[0]+radius*Math.cos(turn*pid),center[1]+radius*Math.sin(turn*pid)].map(n=>f2size(n).toFixed(5)),drawLine=to=>` L ${to.join(`,`)} `,drawBezier=(control,to)=>` S ${control.join(`,`)} ${to.join(` `)} `,drawArc=(to,radius,invert=!1)=>` A ${radius} ${radius}, 0, 0, ${invert?`0`:`1`}, ${to.join(` `)} `;function createSimplePath(pos,rad,width$1,height$1){let d=`M ${getPoint(pos,rad).join(`,`)} `;return d+=drawArc(getPoint(pos+width$1,rad),f2size(rad),!1),d+=drawLine(getPoint(pos+width$1,rad-height$1)),d+=drawArc(getPoint(pos,rad-height$1),f2size(rad-height$1),!0),d+=drawLine(getPoint(pos,rad)),d+=`Z`,d}function createPath({pos,rad,width:width$1,height:height$1,corner,padout,padin}){corner>height$1&&(corner=height$1);let corh=corner*rad/Math.PI,corv=corner*rad,d=`M ${getPoint(pos+padout+corh,rad).join(`,`)} `;return d+=drawArc(getPoint(pos+width$1-padout-corh,rad),f2size(rad),!1),d+=drawBezier(getPoint(pos+width$1-padout,rad),getPoint(pos+width$1-padout,rad-corv)),d+=drawLine(getPoint(pos+width$1-padout-padin,rad-height$1+corv)),d+=drawBezier(getPoint(pos+width$1-padout-padin,rad-height$1),getPoint(pos+width$1-padout-corh-padin,rad-height$1)),d+=drawArc(getPoint(pos+padout+corh+padin,rad-height$1),f2size(rad-height$1),!0),d+=drawBezier(getPoint(pos+padout+padin,rad-height$1),getPoint(pos+padout+padin,rad-height$1+corv)),d+=drawLine(getPoint(pos+padout,rad-corv)),d+=drawBezier(getPoint(pos+padout,rad),getPoint(pos+padout+corh,rad)),d+=`Z`,d}function updateSvg(cont,info,items$2,events$3,config=cfg,buttons=[],radialInstance=null){let btns=[...buttons||[]],elmsRem=btns.splice(items$2.length);for(let elm of elmsRem)cont.removeChild(elm.element);if(items$2.length<1)return null;for(let index=btns.length;indexicon,file:icon=>`/ui/modules/apps/RadialMenu/mods_icons/`+icon,symbol:icon=>`#`+({radial_Drift_ESC:`radial_drift_ESC`,radial_Sport_ESC:`radial_sport_ESC`,radial_Regular_ESC:`radial_regular_ESC`,radial_ESC:`radial_regular_ESC`}[icon]||icon)};function createButton(index,info,config,item){let btn={index},majorGradId=uniqueSafeId(),majorHighlightGradId=uniqueSafeId(),control=document.createElementNS(svgns,`g`);btn.element=control;function createGradient(id,colors){let grad=document.createElementNS(svgns,`radialGradient`);return setAttrs(grad,{id,cx:`0.5`,cy:`0.5`,r:`0.5`,fx:`0.5`,fy:`0.5`}),colors.forEach((color,index$1)=>{let stop$1=document.createElementNS(svgns,`stop`);setAttrs(stop$1,{offset:index$1/(colors.length-1),"stop-color":color}),grad.appendChild(stop$1)}),grad}let defs=document.createElementNS(svgns,`defs`);defs.appendChild(createGradient(majorGradId,config.button.majorBackground)),defs.appendChild(createGradient(majorHighlightGradId,config.button.majorHighlight)),control.appendChild(defs);let button=document.createElementNS(svgns,`path`);config.button.border&&config.button.borderSize>0&&setAttrs(button,{stroke:config.button.border,"stroke-width":f2size(config.button.borderSize)}),control.appendChild(button);let folder=document.createElementNS(svgns,`path`);folder.setAttribute(`fill`,config.button.folder),control.appendChild(folder);let marker$1=document.createElementNS(svgns,`path`);marker$1.setAttribute(`fill`,`none`),control.appendChild(marker$1);let pinnedDot=document.createElementNS(svgns,`circle`);setAttrs(pinnedDot,config.button.markDotSolid),pinnedDot.setAttribute(`style`,`display: none`),control.appendChild(pinnedDot);let starPath=document.createElementNS(svgns,`path`),starConfig=config.button.markStar,points=starConfig.starPoints||5,innerRadius=starConfig.innerRadius||1.5,outerRadius=starConfig.outerRadius||3,starPathData=``;for(let i=0;ion?iconRect.removeAttribute(`style`):iconRect.setAttribute(`style`,`display: none`),setGlyph=glyph=>iconText.textContent=glyph||``,setImage=path=>{path?(iconImage.setAttribute(`href`,path),iconImage.removeAttribute(`style`)):(iconImage.removeAttribute(`href`),iconImage.setAttribute(`style`,`display: none`))},setSymbol=id=>{id?(iconMask.setAttribute(`mask-type`,`luminocity`),iconSymbol.setAttribute(`href`,id),iconSymbol.removeAttribute(`style`)):(iconMask.setAttribute(`mask-type`,`alpha`),iconSymbol.removeAttribute(`href`),iconSymbol.setAttribute(`style`,`display: none`))},itype=iconType(item$1.icon);switch(itype){case`glyph`:setGlyph(getIconGlyph(item$1.icon)),setRect(!1),setImage(),setSymbol();break;case`symbol`:setImage(),setSymbol(iconGet[itype](item$1.icon)),setRect(!0),setGlyph();break;default:setImage(iconGet[itype](item$1.icon)),setSymbol(),setRect(!0),setGlyph();break}}let hitzone=document.createElementNS(svgns,`path`);setAttrs(hitzone,{fill:`transparent`,style:`pointer-events: fill`}),control.appendChild(hitzone);function updateHitzone(position,length,config$1){hitzone.setAttribute(`d`,createSimplePath(position-length/2,config$1.button.top,length,config$1.button.height))}function updateEvents$1(events$3,radialInstance){btn._handlers&&(hitzone.removeEventListener(`mouseover`,btn._handlers.focus),hitzone.removeEventListener(`mouseleave`,btn._handlers.blur),hitzone.removeEventListener(`click`,btn._handlers.click),hitzone.removeEventListener(`mousedown`,btn._handlers.down),hitzone.removeEventListener(`mouseup`,btn._handlers.up),hitzone.removeEventListener(`contextmenu`,btn._handlers.contextMenu));let item$1=btn.item,index$1=btn.index;return btn.menuIcon=radialInstance?.menuIcon||``,btn._handlers={focus(){if(item$1.focused&&btn._focused)return;let highlightFill=item$1.majorButton?`url(#${majorHighlightGradId})`:config.button.highlight;button.setAttribute(`fill`,highlightFill),button.setAttribute(`stroke`,config.button.borderHighlight),marker$1.setAttribute(`fill`,config.button.marker);let itype=iconType(item$1.icon);itype===`glyph`?(setStyles(info.icon,{"background-color":`transparent`,"-webkit-mask-image":`none`,color:config.info.focusedColor}),info.icon.textContent=getIconGlyph(item$1.icon)):(info.icon.textContent=``,itype===`symbol`&&info.iconSymbol.setAttribute(`href`,iconGet[itype](item$1.icon)),setStyles(info.icon,{"background-color":config.info.icon,"-webkit-mask-image":itype===`symbol`?`url('#${info.iconMaskId}')`:`url('${iconGet[itype](item$1.icon)}')`})),info.label.textContent=typeof item$1.title==`string`?$translate.contextTranslate({txt:item$1.title,context:item$1.context}):$translate.contextTranslate(item$1.title),info.label.style.color=config.info.focusedColor,info.price.textContent=item$1?.price?.money?.amount===void 0?``:item$1.price.money.amount+` `,info.hotkey.textContent=item$1.hotkey||``,info.cont.removeAttribute(`style`),item$1.focused=!0,btn._focused=!0,typeof events$3.focus==`function`&&events$3.focus(item$1,index$1)},blur(){if(!item$1.focused&&!btn._focused)return;let normalFill=item$1.majorButton?`url(#${majorGradId})`:config.button.background;button.setAttribute(`fill`,normalFill),button.setAttribute(`stroke`,config.button.border),marker$1.setAttribute(`fill`,`none`),setStyles(info.icon,{"background-color":`transparent`,"-webkit-mask-image":`none`,color:config.info.unfocusedColor});let iconGlyph=getIconGlyph(btn.menuIcon);info.icon.textContent=iconGlyph,info.label.textContent=`Select an option`,info.price.textContent=``,info.hotkey.textContent=controlsHotkey,info.label.style.color=config.info.unfocusedColor,item$1.focused=!1,btn._focused=!1,typeof events$3.blur==`function`&&events$3.blur(item$1,index$1)},click(evt){evt&&evt.stopPropagation(),!(!item$1.enabled||!events$3||evt&&!evt.fromController&&evt.type!==`ui_nav`)&&(btn._handlers.isDown=!1,typeof events$3.click==`function`&&events$3.click(item$1,index$1))},down(evt){!item$1.enabled||!events$3||evt.button!==0||(btn._handlers.isDown=!0,typeof events$3.down==`function`&&events$3.down(item$1,index$1))},up(evt){!btn._handlers.isDown||!item$1.enabled||!events$3||evt.button!==0||(btn._handlers.isDown=!1,typeof events$3.up==`function`&&events$3.up(item$1,index$1))},contextMenu(evt){evt&&evt.stopPropagation(),events$3&&typeof events$3.contextAction==`function`&&events$3.contextAction(item$1,index$1)}},hitzone.addEventListener(`mouseover`,btn._handlers.focus),hitzone.addEventListener(`mouseleave`,btn._handlers.blur),hitzone.addEventListener(`click`,btn._handlers.click,!0),hitzone.addEventListener(`mousedown`,btn._handlers.down),hitzone.addEventListener(`mouseup`,btn._handlers.up),hitzone.addEventListener(`contextmenu`,btn._handlers.contextMenu),btn._handlers}function updateEnable(item$1){item$1.enabled?(hitzone.setAttribute(`cursor`,`pointer`),control.removeAttribute(`opacity`)):(hitzone.removeAttribute(`cursor`),control.setAttribute(`opacity`,`0.5`))}return btn.update=(item$1,events$3=void 0,radialInstance=null)=>{btn.item=item$1;let length=Math.min(item$1.size,.5),position=(item$1.position-.5)%1;updateButton(position,length,config,item$1),updateHitzone(position,length,config),updateIcon(position,length,config,item$1),updateEnable(item$1),btn._handlers=updateEvents$1(events$3,radialInstance),Object.assign(btn,btn._handlers),(item$1.focused||btn._focused)&&btn._handlers.focus()},btn}function createSvg(config=cfg){let svg=document.createElementNS(svgns,`svg`);setAttrs(svg,{viewBox:`0 0 ${size} ${size}`,width:`100%`,height:`100%`,preserveAspectRatio:`xMidYMid meet`,style:`pointer-events: none`});let gradId=Array.isArray(config.background)?uniqueSafeId():null;if(gradId){let grad=document.createElementNS(svgns,`radialGradient`);grad.setAttribute(`id`,gradId);for(let i=0;i{evt.stopPropagation()},!0),svg.appendChild(bg);let nfo={cont:document.createElementNS(svgns,`foreignObject`),body:document.createElementNS(xhtmlns,`body`),wrap:document.createElementNS(xhtmlns,`div`),icon:document.createElementNS(xhtmlns,`div`),iconSymbol:document.createElementNS(svgns,`use`),iconMaskId:uniqueSafeId(),label:document.createElementNS(xhtmlns,`div`),price:document.createElementNS(xhtmlns,`div`),hotkey:document.createElementNS(xhtmlns,`div`)},foMinSize=200,nfoSize=size>=200?size:200;setAttrs(nfo.cont,{style:`display: none`,width:nfoSize,height:nfoSize}),size<200&&nfo.cont.setAttribute(`transform`,`scale(${size*.005})`),nfo.body.setAttribute(`xmlns`,xhtmlns),setStyles(nfo.body,{width:`100%`,height:`100%`}),setStyles(nfo.wrap,{width:`${nfoSize*.5}px`,height:`${nfoSize*.4}px`,margin:`${nfoSize*.3}px ${nfoSize*.25}px`,display:`flex`,"flex-direction":`column`,"align-items":`center`,"justify-content":`space-between`,"font-family":`var(--fnt-defs)`}),setStyles(nfo.icon,{color:config.info.icon,"font-size":`${config.info.iconSize*nfoSize}px`,"font-family":`bngIcons`,width:`${config.info.iconSize*nfoSize}px`,height:`${config.info.iconSize*nfoSize}px`,"-webkit-mask-image":`none`,"-webkit-mask-size":`contain`,"-webkit-mask-position":`50% 50%`,"-webkit-mask-repeat":`no-repeat`,"background-color":`transparent`});let iconSvg=document.createElementNS(svgns,`svg`);setAttrs(iconSvg,{viewBox:`0 0 ${config.info.iconSize*nfoSize} ${config.info.iconSize*nfoSize}`,width:`0`,height:`0`,style:`position: absolute;`});let iconMask=document.createElementNS(svgns,`mask`);setAttrs(iconMask,{id:nfo.iconMaskId,maskUnits:`userSpaceOnUse`,maskContentUnits:`userSpaceOnUse`,"mask-type":`luminocity`}),setAttrs(nfo.iconSymbol,{x:`0`,y:`0`,width:config.info.iconSize*nfoSize,height:config.info.iconSize*nfoSize,fill:`#fff`}),iconMask.appendChild(nfo.iconSymbol),iconSvg.appendChild(iconMask),setStyles(nfo.label,{"min-height":`2em`,width:`100%`,"text-align":`center`,color:config.info.label,"font-size":`${config.info.labelSize*nfoSize}px`,"font-family":`var(--fnt-defs)`}),setStyles(nfo.price,{width:`100%`,"text-align":`center`,color:config.info.label,"font-size":`${config.info.labelSize*.8*nfoSize}px`,"font-family":`bngIcons, var(--fnt-defs)`}),setStyles(nfo.hotkey,{width:`80%`,"text-align":`center`,"padding-top":`1px`,"min-height":`${config.info.hotkeySize*nfoSize+10}px`,"border-top":`${config.info.lineSize*nfoSize}px solid ${config.info.line}`,color:config.info.hotkey,"font-size":`${config.info.hotkeySize*nfoSize}px`,"font-family":`bngIcons, "Noto Sans Mono", var(--fnt-defs)`}),nfo.wrap.appendChild(iconSvg),nfo.wrap.appendChild(nfo.icon),nfo.wrap.appendChild(nfo.label),nfo.wrap.appendChild(nfo.price),nfo.wrap.appendChild(nfo.hotkey),nfo.body.appendChild(nfo.wrap),nfo.cont.appendChild(nfo.body),svg.appendChild(nfo.cont);let cont=document.createElementNS(svgns,`g`);svg.appendChild(cont);let pointer=document.createElementNS(svgns,`circle`);return setAttrs(pointer,{r:config.pointer.size,fill:config.pointer.color,display:`none`}),svg.appendChild(pointer),nfo.icon.textContent=getIconGlyph(svg.menuIcon),nfo.label.textContent=`Select an option`,nfo.price.textContent=``,nfo.label.style.color=config.info.unfocusedColor,controlsHotkey=getHotkey(`menu_item_focus_ud`),nfo.hotkey.textContent=controlsHotkey,nfo.cont.removeAttribute(`style`),[svg,cont,nfo,pointer]}var _hoisted_1$18={class:`radial-infos`},_hoisted_2$12={class:`radial-breadcrumbs`},_hoisted_3$11={key:0,class:`radial-categories`},_hoisted_4$8={class:`radial-plate`},_hoisted_5$7={class:`radial-category-label`},_hoisted_6$4={key:0,class:`radial-quick-tabs`},_hoisted_7$4={key:1,class:`radial-description`},sensivity=.5,_sfc_main$22={__name:`Radial`,setup(__props){useUINavScope(`radialMenu`);let infobar=useInfoBar(),controls$1=controls_default(),events$3=useEvents(),radialData=ref({}),temporaryHidden=ref(!1),breadcrumbs=computed(()=>radialData.value&&radialData.value.breadcrumbs&&Array.isArray(radialData.value.breadcrumbs)?radialData.value.breadcrumbs.map(str=>$translate.instant(str)).join(` / `):``),focusedItem=computed(()=>{let items$2=radialData?.value?.items;return items$2&&Array.isArray(items$2)?items$2.find(item=>item.focused):null}),hasLRShoulderButtons=computed(()=>radialData.value&&radialData.value.hasLRShoulderButtons),radialSvg=new RadialSVG({click:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`click`),Lua_default.core_quickAccess.selectItem(index+1,!0,1)},down:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`click`),Lua_default.core_quickAccess.selectItem(index+1,!0,1)},focus:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`focus`)},contextAction:(item,index)=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`focus`),Lua_default.core_quickAccess.contextAction(index+1,!0,1)}}),radialCont=ref(),requestData=async()=>{radialData.value=await Lua_default.core_quickAccess.getUiData();let items$2=Array.isArray(radialData.value.items)?radialData.value.items:[];for(let item of items$2)item.hotkey=getHotkey$1(item.action);radialSvg.setMenuIcon(radialData.value.menuIcon||`beamNG`),radialSvg.update(items$2)},getHotkey$1=action=>{let viewerObj=controls$1.makeViewerObj({action});return viewerObj?icons[viewerObj.icon].glyph+` `+viewerObj.control.split(/[ -]/).map(s=>s.substring(0,1).toUpperCase()+s.substring(1)).join(``):``},setLevel=level$1=>{Lua_default.ui_audio.playEventSound(`bng_click_hover_generic`,`focus`),Lua_default.core_quickAccess.setEnabled(!0,level$1,!1)},close=()=>{Lua_default.core_quickAccess.setEnabled(!1,``,!1)},back=()=>{radialData.value.backButtonIndex?Lua_default.core_quickAccess.back():close()},switchCategory=left=>{let indexOffset=left?-1:1;for(let i=0;i{let actions=radialData.value.items;for(let i=0;i{if(radialData.value.categories.length>0){switchCategory(evt.detail.name===`tab_l`);return}LRAction(evt.detail.name)},processMouseClick=evt=>{if(!radialSvg.buttons)return;let elm=radialSvg?.buttons?.find(elm$1=>elm$1._focused)||radialSvg?.buttons?.find(elm$1=>elm$1.item.focused);return evt.detail.name===`context`?elm&&elm.contextMenu(evt):elm&&elm.click(evt),elm},isStickActive=(x,y)=>Math.sqrt(x**2+y**2)>sensivity,pointToItem=(x,y)=>{if(!radialSvg.buttons)return;let len=radialSvg.buttons.length,idx=-1;if(radialSvg.setPointer(x,y),x!==0||y!==0){let cursorPos=.5-Math.atan2(y,x)/Math.PI/2;for(let i=0;i=startPos&&cursorPos=startPos||cursorPos-1&&idx{evt.detail.name===`focus_ud`?stickY=evt.detail.value:stickX=evt.detail.value;let stickActiveBefore=stickActive;stickActive=isStickActive(stickX,stickY),stickActive&&pointToItem(stickX,stickY),!stickActive&&stickActiveBefore&&pointToItem(0,0)},dpadX=0,dpadY=0,processDpadInput=evt=>{switch(evt.detail.name){case`focus_l`:dpadX=-evt.detail.value;break;case`focus_r`:dpadX=evt.detail.value;break;case`focus_u`:dpadY=evt.detail.value;break;case`focus_d`:dpadY=-evt.detail.value;break}dpadX=0+ +dpadX,dpadY=0+ +dpadY,pointToItem(dpadX,dpadY)},openFavoriteSelector=()=>{if(radialData.value.pathBeforeCategory===`favorites`){for(let i=0;i{let isOnComponents=event.target.closest(`.radial-categories, .radial-svg, .radial-tab-left, .radial-tab-right`);event.isTrusted&&event.sourceCapabilities?.firesTouchEvents===!1&&!isOnComponents&&(event.button===0?close():event.button===2&&back())};events$3.on(`radialMenuUpdated`,requestData),events$3.on(`RadialTemporaryHide`,hide$2=>{temporaryHidden.value=hide$2}),onBeforeMount(()=>{infobar.clearHints()}),onMounted(()=>{infobar.visible=!0,radialSvg.create(radialCont.value),requestData()});let headingTitle=computed(()=>radialData.value?.breadcrumbs?.[0]?$translate.instant(radialData.value.breadcrumbs[0]):radialData.value?.items?.length?`Radial Menu`:`No Actions Available`),hasCategories=computed(()=>radialData.value?.categories&&(Array.isArray(radialData.value.categories)?radialData.value.categories.length>0:Object.keys(radialData.value.categories).length>0));return(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,{class:normalizeClass([`radial-menu`,{temporaryHidden:temporaryHidden.value}]),"bng-ui-scope":`radialMenu`,onMousedown:handleMouseDown},[createBaseVNode(`div`,_hoisted_1$18,[createVNode(bngCardHeading_default,{class:`radial-title`},{default:withCtx(()=>[createTextVNode(toDisplayString(headingTitle.value),1)]),_:1}),createBaseVNode(`div`,_hoisted_2$12,toDisplayString(breadcrumbs.value),1),hasCategories.value?(openBlock(),createElementBlock(`div`,_hoisted_3$11,[createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-left`,"ui-event":`tab_l`,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallLeft.glyph}'`}),controller:``,onClick:_cache[0]||=$event=>switchCategory(!0)},null,8,[`style`]),createBaseVNode(`div`,_hoisted_4$8,[(openBlock(!0),createElementBlock(Fragment,null,renderList(radialData.value.categories,category=>withDirectives((openBlock(),createBlock(unref(bngImageTile_default),{key:category.id,onClick:$event=>setLevel(category.goto),tabindex:`0`,"bng-nav-item":``,class:normalizeClass([`radial-category`,{selected:category.id===radialData.value.selectedCategory}]),icon:unref(icons)[category.icon||`beamNG`]},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_5$7,toDisplayString(unref($translate).instant(category.title)),1)]),_:2},1032,[`onClick`,`class`,`icon`])),[[unref(BngOnUiNav_default),void 0,`ok`,{asMouse:!0,focusRequired:!0}]])),128)),_cache[4]||=createBaseVNode(`div`,{class:`background-plate`},null,-1)]),createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-right`,"ui-event":`tab_r`,controller:``,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallRight.glyph}'`}),onClick:_cache[1]||=$event=>switchCategory(!1)},null,8,[`style`])])):createCommentVNode(``,!0)]),hasLRShoulderButtons.value?(openBlock(),createElementBlock(`div`,_hoisted_6$4,[createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-left`,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallLeft.glyph}'`}),"ui-event":`tab_l`,controller:``,onClick:_cache[2]||=$event=>LRAction(`tab_l`)},null,8,[`style`]),createVNode(unref(bngBinding_default),{class:`radial-plate radial-tab-right`,style:normalizeStyle({"--rad-tab-icon":`'${unref(icons).arrowSmallRight.glyph}'`}),"ui-event":`tab_r`,controller:``,onClick:_cache[3]||=$event=>LRAction(`tab_r`)},null,8,[`style`])])):createCommentVNode(``,!0),createBaseVNode(`div`,{ref_key:`radialCont`,ref:radialCont,class:`radial-svg`},null,512),focusedItem.value?.desc?(openBlock(),createElementBlock(`div`,_hoisted_7$4,toDisplayString(unref(content_exports).bbcode.parse(unref($translate).contextTranslate(focusedItem.value.desc,!0))),1)):createCommentVNode(``,!0)],34)),[[unref(BngBlur_default),!temporaryHidden.value],[unref(BngOnUiNav_default),openFavoriteSelector,`context`],[unref(BngOnUiNav_default),back,`menu,back`],[unref(BngOnUiNav_default),processTabInput,`tab_l,tab_r`],[unref(BngOnUiNav_default),processStickInput,`focus_lr,focus_ud`],[unref(BngOnUiNav_default),processDpadInput,`focus_l,focus_r,focus_u,focus_d`,{down:!0}],[unref(BngOnUiNav_default),processDpadInput,`focus_l,focus_r,focus_u,focus_d`,{up:!0}],[unref(BngOnUiNav_default),processMouseClick,`ok,context`],[unref(BngUiNavLabel_default),radialData.value.backButtonIndex?`ui.common.back`:`ui.common.close`,`menu,back`],[unref(BngUiNavLabel_default),`Radial menu navigation`,`focus_lr,focus_ud,focus_l,focus_r,focus_u,focus_d`],[unref(BngUiNavLabel_default),`Select`,`ok`],[unref(BngUiNavLabel_default),`Configure Slot`,`context`],[unref(BngUiNavLabel_default),`Switch Category`,`tab_l,tab_r`]])}},Radial_default=__plugin_vue_export_helper_default(_sfc_main$22,[[`__scopeId`,`data-v-9330a4cb`]]),routes_default$13=[{path:`/radial`,name:`radial`,component:Radial_default,meta:{uiApps:{shown:!1}}}],routes_default$14=[{path:`/recovery`,name:`recovery`,component:Recovery_default,props:!0}],isFuelEnergyType=type=>[`gasoline`,`diesel`].includes(type);const useRefuelStore=defineStore(`refuel`,()=>{let{events:events$3}=useBridge(),minSlider=23,maxSlider=80,minEnergy=0,fuelOptions=[{id:1,value:0,name:`FuelType-1`},{id:2,value:1,name:`FuelType-2`},{id:3,value:2,name:`FuelType-3`}],energyTypes=ref([]),fuelTanks=ref([]),overallPrice=ref(0),flowRate=ref(0),currentEnergyType=ref(null),showFuelTypeSettings=ref(!1),showAmountSettings=ref(!1),energyTypesToLocalUnits=ref({}),gasStationName=ref(``),fuelDiscountData=ref({}),isFuelling=computed(()=>flowRate.value>0),currentFuelData=computed(()=>fuelTanks.value.filter(f=>f.energyType===currentEnergyType.value)[0]),currentFuelType=computed(()=>currentEnergyType.value===``?``:isFuelEnergyType(currentEnergyType.value)?`fuel`:`charge`),currentFuelLevel=computed(()=>currentFuelData.value?currentFuelData.value.currentEnergy/currentFuelData.value.maxEnergy:0),canRefuel=computed(()=>currentFuelData.value?currentFuelData.value.currentEnergycanRefuel.value===!0?isFuelling.value===!0?`on`:`off`:`disabled`),canPay=computed(()=>currentFuelData.value.price>0),canStartFuelling=computed(()=>isFuelling.value===!1&&canRefuel.value===!0),canStopFuelling=computed(()=>isFuelling.value===!0),minEnergyLabel=computed(()=>`0 `+getUnitLabel(currentEnergyType.value)),maxEnergyLabel=computed(()=>currentFuelData.value?(isFuelEnergyType(currentEnergyType.value)?convertToLocalUnit(currentFuelData.value.maxEnergy,currentEnergyType.value).toFixed(2):`100`)+` `+getUnitLabel(currentEnergyType.value):``);function getUnitLabel(energyType){return isFuelEnergyType(energyType)?getLocalUnitLabel(energyType):`%`}function getLocalUnit(energyType){return energyTypesToLocalUnits.value[energyType]?energyTypesToLocalUnits.value[energyType]:`L`}let unitToLabel={gallonUS:`gal`},factorSIToLocalUnit={gallonUS:.26417};function getLocalUnitLabel(energyType){let localUnit=getLocalUnit(energyType);return localUnit&&unitToLabel[localUnit]?unitToLabel[localUnit]:`L`}function convertToLocalUnit(valueSI,energyType){let localUnit=getLocalUnit(energyType);return localUnit?valueSI*(factorSIToLocalUnit[localUnit]||1):valueSI}function convertToPricePerLocalUnit(pricePerSI,energyType){let localUnit=getLocalUnit(energyType);return localUnit?pricePerSI/(factorSIToLocalUnit[localUnit]||1):pricePerSI}function startFuelling(){Lua_default.career_modules_fuel.uiButtonStartFueling(currentEnergyType.value)}function stopFuelling(){Lua_default.career_modules_fuel.uiButtonStopFueling(currentEnergyType.value)}function changeFlowRate(newFlowRate){flowRate.value=newFlowRate,Lua_default.career_modules_fuel.onChangeFlowRate(flowRate.value)}function payPrice(){Lua_default.career_modules_fuel.payPrice()}function requestFuelingData(){Lua_default.career_modules_fuel.requestRefuelingTransactionData(),runInBrowser(()=>getMockedData(`career.initialFuelingData`).then(data=>events$3.emit(`initialFuelingData`,data)))}function cancelTransaction(){console.log(`cancelTransaction`),Lua_default.career_modules_fuel.uiCancelTransaction()}function dispose$2(){events$3.off(`initialFuelingData`),events$3.off(`updateFuelData`)}return events$3.on(`initialFuelingData`,data=>{({fuelData:fuelTanks.value,energyTypes:energyTypes.value}=data),currentEnergyType.value=energyTypes.value[0],energyTypesToLocalUnits.value=data.energyTypesToLocalUnits,factorSIToLocalUnit.value=data.factorSIToLocalUnit,gasStationName.value=data.gasStationName,fuelDiscountData.value=data.fuelDiscountData||{},Lua_default.career_modules_fuel.sendUpdateDataToUI()}),events$3.on(`updateFuelData`,data=>{fuelTanks.value.length!==0&&(fuelTanks.value[0].currentEnergy=data.fuelData[0].currentEnergy,fuelTanks.value[0].fueledEnergy=data.fuelData[0].fueledEnergy,fuelTanks.value[0].price=data.fuelData[0].price,overallPrice.value=data.overallPrice,flowRate.value=data.fuelData[0].fuelingActive===!0?1:0)}),{currentFuelData,currentFuelLevel,currentFuelType,currentEnergyType,nozzleMode,overallPrice,isFuelling,energyTypes,canPay,canStartFuelling,canStopFuelling,fuelDiscountData,showFuelTypeSettings,showAmountSettings,gasStationName,startFuelling,stopFuelling,changeFlowRate,payPrice,requestFuelingData,cancelTransaction,getUnitLabel,convertToPricePerLocalUnit,dispose:dispose$2,minEnergyLabel,maxEnergyLabel,minSlider:23,maxSlider:80,fuelOptions}});var _hoisted_1$17={class:`full`,xmlns:`http://www.w3.org/2000/svg`,"xmlns:xlink":`http://www.w3.org/1999/xlink`,x:`0`,y:`0`,viewBox:`6 0 280 280`,width:`280`,height:`280`},_hoisted_2$11={id:`glow`,x:`-40%`,y:`-40%`,width:`180%`,height:`180%`},_hoisted_3$10=[`flood-color`],_hoisted_4$7={class:`gauge-label`},_hoisted_5$6={class:`info`},DASH_ARR_LENGTH=455,GAUGE_TYPES=[`refuel`,`recharge`],GAUGE_DEFAULTS={refuel:{cssColour:`var(--bng-orange-b400)`,gradientColour:`255,102,0`,icon:icons.fuelPumpFilling},recharge:{cssColour:`var(--bng-add-blue-600)`,gradientColour:`95,157,249`,icon:icons.charging}},_sfc_main$21={__name:`FuelGauge`,props:{value:{type:Number,default:0},type:{type:String,default:`refuel`,validator:v=>GAUGE_TYPES.includes(v)||v===``},fuelling:{type:Boolean,default:!1},label:String,maxLabel:String,minLabel:String},setup(__props){window.bngVue.isProd;let props=__props,gaugeLevelStyle=computed(()=>({stroke:GAUGE_DEFAULTS[props.type].cssColour,fill:`none`,strokeDasharray:DASH_ARR_LENGTH,strokeDashoffset:DASH_ARR_LENGTH-props.value*DASH_ARR_LENGTH})),gaugeStyle=computed(()=>({background:`radial-gradient(22% 22% at 50% 53%, rgba(${GAUGE_DEFAULTS[props.type].gradientColour}, 0.76) 0%, rgba(${GAUGE_DEFAULTS[props.type].gradientColour}, 0.18) 64.06%, rgba(${GAUGE_DEFAULTS[props.type].gradientColour}, 0) 100%)`}));return(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,{class:normalizeClass({"gauge-wrapper":!0,[__props.type]:!0})},[createBaseVNode(`div`,{class:normalizeClass({"pulse-container":!0,pulsing:__props.fuelling})},[createBaseVNode(`div`,{class:`pulser`,style:normalizeStyle(gaugeStyle.value)},null,4)],2),(openBlock(),createElementBlock(`svg`,_hoisted_1$17,[createBaseVNode(`defs`,null,[createBaseVNode(`filter`,_hoisted_2$11,[createBaseVNode(`feFlood`,{"flood-color":GAUGE_DEFAULTS[__props.type].cssColour,result:`flood1`},null,8,_hoisted_3$10),_cache[0]||=createStaticVNode(``,4)])]),_cache[1]||=createBaseVNode(`path`,{class:`gauge-back`,d:`M50,210 A110,110 0 1,1 244,210`,style:{fill:`none`}},null,-1),createBaseVNode(`path`,{class:`gauge-level blur`,d:`M50,210 A110,110 0 1,1 244,210`,style:normalizeStyle(gaugeLevelStyle.value)},null,4),createBaseVNode(`path`,{class:`gauge-level`,d:`M50,210 A110,110 0 1,1 244,210`,style:normalizeStyle(gaugeLevelStyle.value)},null,4)])),createVNode(unref(bngIcon_default),{class:`icon refill-icon`,type:GAUGE_DEFAULTS[__props.type].icon,color:`#fff`},null,8,[`type`]),createBaseVNode(`div`,_hoisted_4$7,[createBaseVNode(`span`,null,toDisplayString(__props.minLabel),1),createBaseVNode(`span`,_hoisted_5$6,toDisplayString(__props.label||`\xA0`),1),createBaseVNode(`span`,null,toDisplayString(__props.maxLabel),1)])],2))}},FuelGauge_default=__plugin_vue_export_helper_default(_sfc_main$21,[[`__scopeId`,`data-v-04de51fb`]]),_hoisted_1$16={class:`fuel-type`},_sfc_main$20={__name:`FuelTypeSettings`,props:{fuelOptions:{type:Array,required:!0}},emits:[`previousClick`,`nextClick`,`fuelTypeSelect`],setup(__props,{emit:__emit}){let emit$1=__emit;return(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$16,[createVNode(unref(bngButton_default),{class:`arrow empty`,accent:unref(ACCENTS).text,"data-testid":`previous-btn`,icon:unref(icons).arrowLargeLeft,onClick:_cache[0]||=$event=>emit$1(`previousClick`)},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`tab_l`,deviceMask:`xinput`})]),_:1},8,[`accent`,`icon`]),createVNode(unref(bngPillFilters_default),{options:__props.fuelOptions},null,8,[`options`]),createVNode(unref(bngButton_default),{class:`arrow empty`,accent:unref(ACCENTS).text,"data-testid":`next-btn`,iconRight:unref(icons).arrowLargeRight,onClick:_cache[1]||=$event=>emit$1(`nextClick`)},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`tab_r`,deviceMask:`xinput`})]),_:1},8,[`accent`,`iconRight`])]))}},FuelTypeSettings_default=__plugin_vue_export_helper_default(_sfc_main$20,[[`__scopeId`,`data-v-bf968fb2`]]),nozzleModes={on:{color:`var(--bng-orange-b400)`,buttonEnabled:!0},off:{color:`var(--bng-black-o6)`,buttonEnabled:!0},disabled:{color:`var(--bng-black-o2)`,buttonEnabled:!1}},fuellingModes$1={fuel:{nozzleIconType:icons$1.general.fuel_nozzle},charge:{nozzleIconType:icons$1.general.recharge_connector}},_sfc_main$19={__name:`FuelNozzle`,props:{refuelType:{type:String,required:!0},nozzleMode:{type:String,default:`off`}},emits:[`triggerDown`,`triggerUp`],setup(__props,{emit:__emit}){let{showIfController}=storeToRefs(controls_default()),props=__props,emit$1=__emit,nozzleImageURL=computed(()=>`icons/${typeSettings.value.nozzleIconType}.svg`),typeSettings=computed(()=>fuellingModes$1[props.refuelType]),modeSettings=computed(()=>nozzleModes[props.nozzleMode]),nozzleClass=computed(()=>({nozzle:!0,[props.refuelType]:!0}));return(_ctx,_cache)=>(openBlock(),createBlock(unref(bngImageAsset_default),{mask:``,class:normalizeClass(nozzleClass.value),src:nozzleImageURL.value,"bg-color":modeSettings.value.color},{default:withCtx(()=>[createVNode(unref(bngButton_default),{"bng-no-nav":`true`,class:normalizeClass({empty:!0,gamepad:unref(showIfController)}),disabled:!modeSettings.value.buttonEnabled,onMousedown:_cache[0]||=$event=>emit$1(`triggerDown`),onMouseup:_cache[1]||=$event=>emit$1(`triggerUp`),accent:unref(ACCENTS).text},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{action:`fuelVehicle`,deviceMask:`xinput`,disabled:!modeSettings.value.buttonEnabled,accent:unref(ACCENTS).text},null,8,[`disabled`,`accent`]),unref(showIfController)?createCommentVNode(``,!0):(openBlock(),createBlock(unref(bngIcon_default),{key:0,type:unref(icons).plus,title:`Activate`},null,8,[`type`]))]),_:1},8,[`class`,`disabled`,`accent`])]),_:1},8,[`class`,`src`,`bg-color`]))}},FuelNozzle_default=__plugin_vue_export_helper_default(_sfc_main$19,[[`__scopeId`,`data-v-3a31f67d`]]),_hoisted_1$15={class:`cost`},_hoisted_2$10={class:`price`},_hoisted_3$9={class:`per-unit`},_hoisted_4$6={class:`value`},_hoisted_5$5={class:`unit`},_sfc_main$18={__name:`FuelInfo`,props:{totalCost:{type:Number,required:!0},pricePerUnit:{type:Number,required:!0},unitLabel:{type:String,required:!0},fuelDiscountData:{type:Object,required:!1}},setup(__props){let refuelStore=useRefuelStore(),displayPrice=computed(()=>Math.floor(refuelStore.convertToPricePerLocalUnit(props.pricePerUnit,refuelStore.currentEnergyType)*100)+.9),props=__props;return(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[createBaseVNode(`div`,_hoisted_1$15,[createVNode(unref(bngUnit_default),{money:__props.totalCost},null,8,[`money`]),__props.fuelDiscountData.hasFuelDiscount?(openBlock(),createBlock(insurancePerkIcon_default,{key:0,class:`perk-icon`,perkIconData:__props.fuelDiscountData.perkData},null,8,[`perkIconData`])):createCommentVNode(``,!0)]),createBaseVNode(`div`,_hoisted_2$10,[createBaseVNode(`span`,_hoisted_3$9,[createBaseVNode(`span`,_hoisted_4$6,toDisplayString(displayPrice.value),1),_cache[0]||=createBaseVNode(`span`,{class:`divider`},null,-1),createBaseVNode(`span`,_hoisted_5$5,toDisplayString(unref(refuelStore).getUnitLabel(unref(refuelStore).currentEnergyType)),1)])])],64))}},FuelInfo_default=__plugin_vue_export_helper_default(_sfc_main$18,[[`__scopeId`,`data-v-c4955aba`]]),_hoisted_1$14={class:`amount`},_hoisted_2$9={class:`slider-labels`},_hoisted_3$8={class:`amount-value`},_sfc_main$17={__name:`FuelAmountSettings`,props:{minSlider:{type:Number,default:23},maxSlider:{type:Number,default:80},unitLabel:String},setup(__props){return(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$14,[createVNode(unref(bngButton_default),{class:`top-up`,accent:`text`},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`focus_u`,deviceMask:`xinput`}),_cache[0]||=createTextVNode(`Top-up`,-1)]),_:1}),createBaseVNode(`div`,_hoisted_2$9,[createBaseVNode(`span`,null,toDisplayString(`${__props.minSlider}${__props.unitLabel}`),1),createBaseVNode(`span`,null,toDisplayString(`${__props.maxSlider}${__props.unitLabel}`),1)]),createVNode(unref(bngSlider_default),{min:__props.minSlider,max:__props.maxSlider,onValueChanged:()=>{}},null,8,[`min`,`max`]),createBaseVNode(`div`,_hoisted_3$8,[createVNode(unref(bngButton_default),{accent:unref(ACCENTS).text,class:`empty`},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`focus_l`,deviceMask:`xinput`})]),_:1},8,[`accent`]),createVNode(unref(bngInput_default),{class:`value`,suffix:`L`,"initial-value":`1234567`}),createVNode(unref(bngButton_default),{accent:unref(ACCENTS).text,class:`empty`},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{class:`controller`,"ui-event":`focus_r`,deviceMask:`xinput`})]),_:1},8,[`accent`])])]))}},FuelAmountSettings_default=__plugin_vue_export_helper_default(_sfc_main$17,[[`__scopeId`,`data-v-9de32e0e`]]),_hoisted_1$13={class:`gauge`},_hoisted_2$8={key:0,class:`settings content`},_hoisted_3$7={class:`status-container`},fuellingModes={fuel:{title:`ui.career.refuelling.modes.fuel.title`,gaugeType:`refuel`,nozzleIconType:icons$1.general.fuel_nozzle,fuellingOngoingLabel:`ui.career.refuelling.modes.fuel.ongoing`,startLabel:`ui.career.refuelling.modes.fuel.start`,unitLabel:`L`},charge:{title:`ui.career.refuelling.modes.charge.title`,gaugeType:`recharge`,nozzleIconType:icons$1.general.recharge_connector,fuellingOngoingLabel:`ui.career.refuelling.modes.charge.ongoing`,startLabel:`ui.career.refuelling.modes.charge.start`,unitLabel:`kWh`}},_sfc_main$16={__name:`RefuelMain`,setup(__props){let{$game}=useLibStore(),refuelStore=useRefuelStore(),mainSettings=computed(()=>fuellingModes[refuelStore.currentFuelType]);onBeforeMount(()=>{refuelStore.requestFuelingData()}),onBeforeUnmount(()=>{refuelStore.cancelTransaction()}),onUnmounted(()=>{refuelStore.$dispose()});let store$1=useTasksStore();provide(`animationSettings`,{animate:!0,animateOnMount:!1,animateOnMountIntervalDelay:.2,animateOnEmptyIntervalDelay:.1,animateOnEmpty:!0,animateNextTask:!0,successCallback:playAudio});function playAudio(){$game.lua.Engine.Audio.playOnce(`AudioGui`,`event:>UI>Career>Checkbox`)}return(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[unref(refuelStore).currentFuelData?(openBlock(),createBlock(unref(layoutSingle_default),{key:0},{default:withCtx(()=>[createVNode(unref(bngCard_default),{class:`refuel-card`},{buttons:withCtx(()=>[unref(refuelStore).canPay?(openBlock(),createBlock(unref(bngButton_default),{key:0,onClick:_cache[2]||=$event=>unref(refuelStore).payPrice()},{default:withCtx(()=>[..._cache[5]||=[createTextVNode(`Pay`,-1)]]),_:1})):createCommentVNode(``,!0),unref(refuelStore).canStartFuelling?(openBlock(),createBlock(unref(bngButton_default),{key:1,onClick:_cache[3]||=$event=>unref(refuelStore).startFuelling()},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(mainSettings.value.startLabel)),1)]),_:1})):unref(refuelStore).canStopFuelling?(openBlock(),createBlock(unref(bngButton_default),{key:2,onClick:_cache[4]||=$event=>unref(refuelStore).stopFuelling()},{default:withCtx(()=>[..._cache[6]||=[createTextVNode(`Stop`,-1)]]),_:1})):createCommentVNode(``,!0)]),default:withCtx(()=>[createVNode(unref(bngCardHeading_default),{type:`ribbon`},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(unref(refuelStore).gasStationName)),1)]),_:1}),createBaseVNode(`div`,_hoisted_1$13,[createVNode(FuelGauge_default,{class:`main-gauge`,fuelling:unref(refuelStore).isFuelling,type:mainSettings.value.gaugeType,value:unref(refuelStore).currentFuelLevel,label:unref(refuelStore).isFuelling?_ctx.$t(mainSettings.value.fuellingOngoingLabel):``,minLabel:unref(refuelStore).minEnergyLabel,maxLabel:unref(refuelStore).maxEnergyLabel},null,8,[`fuelling`,`type`,`value`,`label`,`minLabel`,`maxLabel`])]),createVNode(FuelNozzle_default,{"refuel-type":unref(refuelStore).currentFuelType,"nozzle-mode":unref(refuelStore).nozzleMode,onTriggerDown:_cache[0]||=$event=>unref(refuelStore).changeFlowRate(1),onTriggerUp:_cache[1]||=$event=>unref(refuelStore).changeFlowRate(0)},null,8,[`refuel-type`,`nozzle-mode`]),createVNode(FuelInfo_default,{"total-cost":unref(refuelStore).overallPrice,"price-per-unit":unref(refuelStore).currentFuelData.pricePerUnit,"unit-label":mainSettings.value.unitLabel,"fuel-discount-data":unref(refuelStore).fuelDiscountData},null,8,[`total-cost`,`price-per-unit`,`unit-label`,`fuel-discount-data`]),unref(refuelStore).showFuelTypeSettings||unref(refuelStore).showAmountSettings?(openBlock(),createElementBlock(`div`,_hoisted_2$8,[unref(refuelStore).showFuelTypeSettings?(openBlock(),createBlock(FuelTypeSettings_default,{key:0,"fuel-options":unref(refuelStore).fuelOptions},null,8,[`fuel-options`])):createCommentVNode(``,!0),unref(refuelStore).showAmountSettings?(openBlock(),createBlock(FuelAmountSettings_default,{key:1,"min-slider":unref(refuelStore).minSlider,"max-slider":unref(refuelStore).maxSlider,"unit-label":mainSettings.value.unitLabel},null,8,[`min-slider`,`max-slider`,`unit-label`])):createCommentVNode(``,!0)])):createCommentVNode(``,!0)]),_:1})]),_:1})):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_3$7,[createVNode(unref(careerStatus_default),{class:`profileStatus`}),createVNode(unref(TaskList_default),{class:`tasklist`,header:unref(store$1).header,tasks:unref(store$1).tasks},null,8,[`header`,`tasks`])])],64))}},RefuelMain_default=__plugin_vue_export_helper_default(_sfc_main$16,[[`__scopeId`,`data-v-d87fd4e5`]]),routes_default$15=[{path:`/refueling`,name:`refueling`,component:RefuelMain_default,meta:{uiApps:{shown:!1}}}],_hoisted_1$12=[`innerHTML`],_sfc_main$15={__name:`ReleaseInfo`,setup(__props){useUINavScope(`releaseInfo`);let settings$1=useSettings(),parseDescription=descKey=>parse$1($translate.instant(descKey)),descriptionHtml=computed(()=>parseDescription(`ui.releaseInfo.description`)),onFinish=async()=>{backToMenu()},backToMenu=()=>window.bngVue.gotoAngularState(`menu.mainmenu`);return onMounted(async()=>{await settings$1.waitForData()}),(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(WizardView_default),{title:`ui.releaseInfo.title`,preheadings:[`v.${unref(sysInfo_default).versionSimple}`],style:{"--wizard-height":`45rem`},"bng-ui-scope":`releaseInfo`,onWizardFinish:onFinish},{default:withCtx(()=>[createVNode(unref(WizardStep_default),{id:`releaseInfo`,title:`ui.releaseInfo.stepTitle`},{default:withCtx(()=>[createBaseVNode(`div`,{innerHTML:descriptionHtml.value},null,8,_hoisted_1$12)]),_:1})]),_:1},8,[`preheadings`])),[[unref(BngBlur_default)],[unref(BngOnUiNav_default),backToMenu,`menu,back`]])}},ReleaseInfo_default=_sfc_main$15,routes_default$16=[{name:`menu.release-info`,path:`/release-info`,component:ReleaseInfo_default,meta:{infoBar:{visible:!0,showSysInfo:!0},uiApps:{shown:!1}}}],_hoisted_1$11={class:`veh-debug`},_hoisted_2$7={class:`buttons`},_hoisted_3$6={class:`buttons`},_hoisted_4$5={class:`bng-short-select-item`},_hoisted_5$4={class:`label-width`},_hoisted_6$3={key:0},_hoisted_7$3={class:`parts-switch-label`},_hoisted_8$2={class:`control-row`},_hoisted_9$1={class:`control-label`},_hoisted_10={class:`control-row`},_hoisted_11={class:`control-label`},_hoisted_12={key:0},_hoisted_13={class:`control-row`},_hoisted_14={class:`control-label indented`},_hoisted_15={class:`control-group`},_hoisted_16={class:`control-row`},_hoisted_17={class:`control-label indented`},_hoisted_18={class:`control-group`},_hoisted_19={class:`control-row`},_hoisted_20={class:`control-label indented`},_hoisted_21={class:`control-row`},_hoisted_22={class:`control-label indented`},_hoisted_23={class:`control-row`},_hoisted_24={class:`control-label indented`},_hoisted_25={class:`control-group`},_hoisted_26={class:`control-row`},_hoisted_27={class:`control-label indented`},_hoisted_28={class:`control-group`},_hoisted_29={class:`control-row`},_hoisted_30={class:`control-label indented`},_hoisted_31={class:`control-group`},_hoisted_32={class:`control-row`},_hoisted_33={class:`control-label`},_hoisted_34={key:2},_hoisted_35={class:`control-row`},_hoisted_36={class:`control-label indented`},_hoisted_37={class:`control-group`},_hoisted_38={class:`control-row`},_hoisted_39={class:`control-label indented`},_hoisted_40={class:`control-group`},_hoisted_41={class:`control-row`},_hoisted_42={class:`control-label indented`},_hoisted_43={class:`control-row`},_hoisted_44={class:`control-label indented`},_hoisted_45={key:3,class:`control-row`},_hoisted_46={class:`control-label indented`},_hoisted_47={class:`control-group`},_hoisted_48={key:4,class:`control-row`},_hoisted_49={class:`control-label indented`},_hoisted_50={class:`control-row`},_hoisted_51={class:`control-label`},_hoisted_52={key:5},_hoisted_53={class:`control-row`},_hoisted_54={class:`control-label indented`},_hoisted_55={class:`control-group`},_hoisted_56={class:`control-row`},_hoisted_57={class:`control-label indented`},_hoisted_58={class:`control-group`},_hoisted_59={class:`control-row`},_hoisted_60={class:`control-label indented`},_hoisted_61={class:`control-row`},_hoisted_62={class:`control-label indented`},_hoisted_63={class:`control-row`},_hoisted_64={class:`control-label indented`},_hoisted_65={class:`control-group`},_hoisted_66={class:`control-row`},_hoisted_67={class:`control-label indented`},_hoisted_68={class:`control-group`},_hoisted_69={class:`control-row`},_hoisted_70={class:`control-label indented`},_hoisted_71={class:`control-group`},_hoisted_72={class:`control-row`},_hoisted_73={class:`control-label`},_hoisted_74={class:`control-row`},_hoisted_75={class:`control-label indented`},_hoisted_76={class:`control-group`},_hoisted_77={class:`control-row`},_hoisted_78={class:`control-label indented`},_hoisted_79={class:`control-group`},_hoisted_80={class:`control-row`},_hoisted_81={class:`control-label indented`},_hoisted_82={class:`control-row`},_hoisted_83={class:`control-label indented`},_hoisted_84={class:`control-row`},_hoisted_85={class:`control-label indented`},_hoisted_86={class:`control-group`},_hoisted_87={class:`control-row`},_hoisted_88={class:`control-label indented`},_hoisted_89={class:`control-group`},_hoisted_90={class:`control-row`},_hoisted_91={class:`control-label`},_hoisted_92={class:`control-row`},_hoisted_93={class:`control-label indented`},_hoisted_94={class:`control-group`},_hoisted_95={class:`control-row`},_hoisted_96={class:`control-label indented`},_hoisted_97={class:`control-group`},_hoisted_98={class:`control-row`},_hoisted_99={class:`control-label`},_hoisted_100={class:`control-row`},_hoisted_101={class:`control-label`},_hoisted_102={key:10,class:`control-row`},_hoisted_103={class:`control-label indented`},_hoisted_104={class:`control-group`},_hoisted_105={class:`control-row`},_hoisted_106={class:`control-label`},_hoisted_107={key:11,class:`control-row`},_hoisted_108={class:`control-label indented`},_hoisted_109={class:`control-group`},_hoisted_110={class:`control-row`},_hoisted_111={class:`control-label`},_hoisted_112={class:`control-row`},_hoisted_113={class:`control-label`},_hoisted_114={key:12,class:`control-row`},_hoisted_115={class:`control-label indented`},_hoisted_116={class:`control-group`},_hoisted_117={key:13,class:`control-row`},_hoisted_118={class:`control-label`},_hoisted_119={class:`mesh-visibility`},_hoisted_120={class:`control-row`},_hoisted_121={class:`control-label`},_hoisted_122={class:`mesh-buttons`},_hoisted_123={class:`buttons`},_sfc_main$14={__name:`Debug`,setup(__props){useUINavBlocker().blockOnly([`context`]);let{lua,api:api$1}=useBridge(),events$3=useEvents(),state=reactive({}),stateNoReset=reactive({vehicle:{parts:[],partNameToIdx:{},partsSelected:{},partsSelectedIdxs:[]}}),partsState=reactive({partsSorted:[],partsHighlightedIdxs:[]}),partsFiltered=computed(()=>{let res=partsState.partsSorted;return Array.isArray(res)?(partsSelectedSearchTerm.value&&(res=res.filter(part=>part.includes(partsSelectedSearchTerm.value))),res.map(p$1=>{let segments=p$1.split(`/`);return{label:segments[segments.length-1],reversePath:segments.slice(0,-1).reverse().join(`\\`),value:p$1,selected:Array.isArray(partsState.partsHighlightedIdxs)&&partsState.partsHighlightedIdxs.includes(partsState.partsSorted.indexOf(p$1)+1)}})):[]}),shipping=computed(()=>window.beamng&&window.beamng.shipping),geState=reactive({physicsEnabled:!0,debugSpawnEnabled:!1}),partsSelectedSearchTerm=ref(``),disableVehicleButtons=ref(!1),controls$1={vehicle:{buttonGroup_1:[{label:`ui.debug.vehicle.loadDefault`,action:()=>lua.core_vehicles.loadDefault()},{label:`ui.debug.vehicle.spawnNew`,action:()=>lua.core_vehicles.spawnDefault()},{label:`ui.debug.vehicle.removeCurrent`,action:()=>lua.core_vehicles.removeCurrent()},{label:`ui.debug.vehicle.cloneCurrent`,action:()=>lua.core_vehicles.cloneCurrent()},{label:`ui.debug.vehicle.removeAll`,action:()=>lua.core_vehicles.removeAll()},{label:`ui.debug.vehicle.removeOthers`,action:()=>lua.core_vehicles.removeAllExceptCurrent()},{label:`ui.debug.vehicle.resetAll`,action:()=>lua.resetGameplay(-1)},{label:`ui.debug.vehicle.reloadAll`,action:()=>lua.core_vehicle_manager.reloadAllVehicles()}],toggleGroup_1:[{label:`ui.debug.activatePhysics`,key:`physicsEnabled`,onChange:()=>lua.simTimeAuthority.togglePause()},{label:`ui.debug.debugSpawnEnabled`,key:`debugSpawnEnabled`,onChange:()=>lua.core_vehicle_manager.toggleDebug()}]},jbeamvis:{buttonGroup_1:[{label:`ui.debug.vehicle.toggleVis`,action:()=>api$1.activeObjectLua(`bdebug.toggleEnabled()`)},{label:`ui.debug.vehicle.clearSettings`,action:()=>api$1.activeObjectLua(`bdebug.resetModes()`)}],meshVisButtonGroup:[{label:`0%`,action:()=>lua.core_vehicles.setMeshVisibility(0)},{label:`25%`,action:()=>lua.core_vehicles.setMeshVisibility(.25)},{label:`50%`,action:()=>lua.core_vehicles.setMeshVisibility(.5)},{label:`75%`,action:()=>lua.core_vehicles.setMeshVisibility(.75)},{label:`100%`,action:()=>lua.core_vehicles.setMeshVisibility(1)}]},terrain:{buttonGroup_1:[{label:`ui.debug.terrain.groundmodel`,action:()=>api$1.engineLua(`extensions.load("util_groundModelDebug") util_groundModelDebug.openWindow()`)}]}};onMounted(async()=>{geState.physicsEnabled=!await lua.simTimeAuthority.getPause(),geState.debugSpawnEnabled=await lua.core_vehicle_manager.getDebug(),api$1.activeObjectLua(`bdebug.requestState()`),lua.core_gamestate.requestGameState(),lua.extensions.core_vehicle_partmgmt.sendPartsSelectorStateToUI()});let applyState=(notSendBack=!1)=>{notSendBack=!!notSendBack,api$1.activeObjectLua(`bdebug.setState(${api$1.serializeToLua(state)}, ${api$1.serializeToLua(stateNoReset)}, ${notSendBack})`)},partsSelectedChanged=(part,value)=>{Array.isArray(partsState.partsHighlightedIdxs)||(partsState.partsHighlightedIdxs=[]);let idx=partsState.partsSorted.indexOf(part)+1,idxInArray=partsState.partsHighlightedIdxs.indexOf(idx);value&&idxInArray===-1?partsState.partsHighlightedIdxs.push(idx):!value&&idxInArray!==-1&&partsState.partsHighlightedIdxs.splice(idxInArray,1),applyState(!0),lua.extensions.core_vehicle_partmgmt.partsSelectorChanged(partsState)},partsSelectedChecked=()=>partsState.partsHighlightedIdxs.length===partsState.partsSorted.length,partsSelectedIndeterminate=()=>partsState.partsHighlightedIdxs.length!==0&&partsState.partsHighlightedIdxs.length!==partsState.partsSorted.length,partsSelectedClicked=()=>{partsState.partsHighlightedIdxs.length===partsState.partsSorted.length?partsState.partsHighlightedIdxs=[]:partsState.partsHighlightedIdxs=Array.from({length:partsState.partsSorted.length},(_,i)=>i+1),applyState(),lua.extensions.core_vehicle_partmgmt.partsSelectorChanged(partsState)},selectAllParts=computed({get:()=>partsSelectedChecked(),set:()=>partsSelectedClicked()}),beamTextModeItems=computed(()=>state.vehicle?.beamTextModes?state.vehicle.beamTextModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.beamTextMode.${mode.name}`):``})):[]),beamVisModeItems=computed(()=>state.vehicle?.beamVisModes?state.vehicle.beamVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.beamVisMode.${mode.name}`):``})):[]),currentBeamVisMode=computed(()=>state.vehicle?.beamVisModes?state.vehicle.beamVisModes[state.vehicle.beamVisMode-1]:null),nodeTextModeItems=computed(()=>state.vehicle?.nodeTextModes?state.vehicle.nodeTextModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.nodeTextMode.${mode.name}`):``})):[]),currentNodeTextMode=computed(()=>state.vehicle?.nodeTextModes?state.vehicle.nodeTextModes[state.vehicle.nodeTextMode-1]:null),nodeVisModeItems=computed(()=>state.vehicle?.nodeVisModes?state.vehicle.nodeVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.nodeVisMode.${mode.name}`):``})):[]),currentNodeVisMode=computed(()=>state.vehicle?.nodeVisModes?state.vehicle.nodeVisModes[state.vehicle.nodeVisMode-1]:null),torsionBarVisModeItems=computed(()=>state.vehicle?.torsionBarVisModes?state.vehicle.torsionBarVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.torsionBarVisMode.${mode.name}`):``})):[]),currentTorsionBarVisMode=computed(()=>state.vehicle?.torsionBarVisModes?state.vehicle.torsionBarVisModes[state.vehicle.torsionBarVisMode-1]:null),railsSlideNodesModeItems=computed(()=>state.vehicle?.railsSlideNodesVisModes?state.vehicle.railsSlideNodesVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.railsSlideNodesVisMode.${mode.name}`):``})):[]),cogModeItems=computed(()=>state.vehicle?.cogModes?state.vehicle.cogModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.cogMode.${mode.name}`):``})):[]),collisionTriangleModeItems=computed(()=>state.vehicle?.collisionTriangleVisModes?state.vehicle.collisionTriangleVisModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.collisionTriangleVisMode.${mode.name}`):``})):[]),aeroModeItems=computed(()=>state.vehicle?.aeroModes?state.vehicle.aeroModes.map((mode,index)=>({value:index+1,label:mode.name?$translate.instant(`vehicle.bdebug.aeroMode.${mode.name}`):``})):[]);return events$3.on(`BdebugUpdate`,(debugState,newStateNoReset)=>{Object.assign(state,debugState),Object.assign(stateNoReset,newStateNoReset)}),events$3.on(`PartsSelectorUpdate`,state$1=>{Object.assign(partsState,state$1)}),events$3.on(`VehicleFocusChanged`,()=>{api$1.activeObjectLua(`bdebug.requestState()`),lua.extensions.core_vehicle_partmgmt.sendPartsSelectorStateToUI()}),events$3.on(`physicsStateChanged`,state$1=>geState.physicsEnabled=!!state$1),events$3.on(`debugSpawnChanged`,state$1=>geState.debugSpawnEnabled=!!state$1),events$3.on(`GameStateUpdate`,gamestate=>disableVehicleButtons.value=gamestate.state.toLowerCase().indexOf(`scenario`)>-1),(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$11,[createBaseVNode(`h3`,null,toDisplayString(_ctx.$tt(`ui.debug.vehicle`)),1),(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.vehicle.toggleGroup_1,toggle=>(openBlock(),createElementBlock(`div`,{key:toggle.key},[createVNode(unref(bngSwitch_default),{modelValue:geState[toggle.key],"onUpdate:modelValue":$event=>geState[toggle.key]=$event,onValueChanged:$event=>toggle.onChange()},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(toggle.label)),1)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`onValueChanged`])]))),128)),createBaseVNode(`div`,_hoisted_2$7,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.vehicle.buttonGroup_1,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),disabled:disableVehicleButtons.value,accent:unref(ACCENTS).secondary},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(btn.label)),1)]),_:2},1032,[`onClick`,`disabled`,`accent`]))),128))]),_cache[74]||=createBaseVNode(`hr`,null,null,-1),createBaseVNode(`h4`,null,toDisplayString(_ctx.$tt(`ui.debug.vehicle.jbeamVis`)),1),createBaseVNode(`div`,_hoisted_3$6,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.jbeamvis.buttonGroup_1,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),accent:unref(ACCENTS).secondary},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(btn.label)),1)]),_:2},1032,[`onClick`,`accent`]))),128))]),createBaseVNode(`div`,_hoisted_4$5,[createBaseVNode(`span`,_hoisted_5$4,toDisplayString(_ctx.$tt(`ui.debug.vehicle.partsSelected`)),1),createVNode(unref(bngDropdownContainer_default),{class:`bng-select-fullwidth dropdown-width`},{default:withCtx(()=>[createVNode(unref(bngList_default),{layout:unref(LIST_LAYOUTS).LIST,"target-width":31},{default:withCtx(()=>[createVNode(unref(bngInput_default),{modelValue:partsSelectedSearchTerm.value,"onUpdate:modelValue":_cache[0]||=$event=>partsSelectedSearchTerm.value=$event,modelModifiers:{trim:!0},"floating-label":_ctx.$t(`ui.debug.vehicle.partsSelectedSearchText`)},null,8,[`modelValue`,`floating-label`]),partsFiltered.value&&partsFiltered.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_6$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(partsFiltered.value,part=>withDirectives((openBlock(),createBlock(unref(bngSwitch_default),{"model-value":part.selected,key:part.value,"label-alignment":unref(LABEL_ALIGNMENTS).START,inline:!1,class:`parts-switch`,onChange:value=>partsSelectedChanged(part.value,value)},{default:withCtx(()=>[createBaseVNode(`span`,_hoisted_7$3,[createBaseVNode(`strong`,null,toDisplayString(part.label),1),createTextVNode(` `+toDisplayString(part.reversePath?`\\`+part.reversePath:``),1)])]),_:2},1032,[`model-value`,`label-alignment`,`onChange`])),[[unref(BngTooltip_default),part.label+` \\ `+part.reversePath,`right`]])),128))])):createCommentVNode(``,!0)]),_:1},8,[`layout`])]),_:1}),createVNode(unref(bngSwitch_default),{modelValue:selectAllParts.value,"onUpdate:modelValue":_cache[1]||=$event=>selectAllParts.value=$event,class:normalizeClass({"switch-indeterminate":partsSelectedIndeterminate(),"switch-width":!0}),onOnClicked:partsSelectedClicked},null,8,[`modelValue`,`class`])]),state.vehicle?(openBlock(),createElementBlock(Fragment,{key:0},[createBaseVNode(`div`,_hoisted_8$2,[createBaseVNode(`span`,_hoisted_9$1,toDisplayString(_ctx.$tt(`ui.debug.vehicle.beamText`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.beamTextMode,"onUpdate:modelValue":_cache[2]||=$event=>state.vehicle.beamTextMode=$event,items:beamTextModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),createBaseVNode(`div`,_hoisted_10,[createBaseVNode(`span`,_hoisted_11,toDisplayString(_ctx.$tt(`ui.debug.vehicle.beamVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.beamVisMode,"onUpdate:modelValue":_cache[3]||=$event=>state.vehicle.beamVisMode=$event,items:beamVisModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),currentBeamVisMode.value&¤tBeamVisMode.value.usesRange?(openBlock(),createElementBlock(`div`,_hoisted_12,[createBaseVNode(`div`,_hoisted_13,[createBaseVNode(`span`,_hoisted_14,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_15,[createVNode(unref(bngSlider_default),{modelValue:currentBeamVisMode.value.rangeMin,"onUpdate:modelValue":_cache[4]||=$event=>currentBeamVisMode.value.rangeMin=$event,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentBeamVisMode.value.rangeMin,"onUpdate:modelValue":_cache[5]||=$event=>currentBeamVisMode.value.rangeMin=$event,type:`number`,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[6]||=$event=>currentBeamVisMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_16,[createBaseVNode(`span`,_hoisted_17,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_18,[createVNode(unref(bngSlider_default),{modelValue:currentBeamVisMode.value.rangeMax,"onUpdate:modelValue":_cache[7]||=$event=>currentBeamVisMode.value.rangeMax=$event,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentBeamVisMode.value.rangeMax,"onUpdate:modelValue":_cache[8]||=$event=>currentBeamVisMode.value.rangeMax=$event,type:`number`,min:currentBeamVisMode.value.rangeMinCap,max:currentBeamVisMode.value.rangeMaxCap,step:(currentBeamVisMode.value.rangeMaxCap-currentBeamVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[9]||=$event=>currentBeamVisMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_19,[createBaseVNode(`span`,_hoisted_20,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[10]||=$event=>currentBeamVisMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_21,[createBaseVNode(`span`,_hoisted_22,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentBeamVisMode.value.showInfinity,"onUpdate:modelValue":_cache[11]||=$event=>currentBeamVisMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),state.vehicle.beamVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`div`,_hoisted_23,[createBaseVNode(`span`,_hoisted_24,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showHighlighted`)),1),createBaseVNode(`div`,_hoisted_25,[createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.beamVisShowHighlighted,"onUpdate:modelValue":_cache[12]||=$event=>state.vehicle.beamVisShowHighlighted=$event,disabled:state.vehicle.beamVisMode===3,onValueChanged:applyState},null,8,[`modelValue`,`disabled`])])]),createBaseVNode(`div`,_hoisted_26,[createBaseVNode(`span`,_hoisted_27,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_28,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.beamVisWidthScale,"onUpdate:modelValue":_cache[13]||=$event=>state.vehicle.beamVisWidthScale=$event,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.beamVisWidthScale,"onUpdate:modelValue":_cache[14]||=$event=>state.vehicle.beamVisWidthScale=$event,type:`number`,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_29,[createBaseVNode(`span`,_hoisted_30,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_31,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.beamVisAlpha,"onUpdate:modelValue":_cache[15]||=$event=>state.vehicle.beamVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.beamVisAlpha,"onUpdate:modelValue":_cache[16]||=$event=>state.vehicle.beamVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_32,[createBaseVNode(`span`,_hoisted_33,toDisplayString(_ctx.$tt(`ui.debug.vehicle.nodeText`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.nodeTextMode,"onUpdate:modelValue":_cache[17]||=$event=>state.vehicle.nodeTextMode=$event,items:nodeTextModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),currentNodeTextMode.value&¤tNodeTextMode.value.usesRange?(openBlock(),createElementBlock(`div`,_hoisted_34,[createBaseVNode(`div`,_hoisted_35,[createBaseVNode(`span`,_hoisted_36,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_37,[createVNode(unref(bngSlider_default),{modelValue:currentNodeTextMode.value.rangeMin,"onUpdate:modelValue":_cache[18]||=$event=>currentNodeTextMode.value.rangeMin=$event,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeTextMode.value.rangeMin,"onUpdate:modelValue":_cache[19]||=$event=>currentNodeTextMode.value.rangeMin=$event,type:`number`,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[20]||=$event=>currentNodeTextMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_38,[createBaseVNode(`span`,_hoisted_39,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_40,[createVNode(unref(bngSlider_default),{modelValue:currentNodeTextMode.value.rangeMax,"onUpdate:modelValue":_cache[21]||=$event=>currentNodeTextMode.value.rangeMax=$event,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeTextMode.value.rangeMax,"onUpdate:modelValue":_cache[22]||=$event=>currentNodeTextMode.value.rangeMax=$event,type:`number`,min:currentNodeTextMode.value.rangeMinCap,max:currentNodeTextMode.value.rangeMaxCap,step:(currentNodeTextMode.value.rangeMaxCap-currentNodeTextMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[23]||=$event=>currentNodeTextMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_41,[createBaseVNode(`span`,_hoisted_42,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[24]||=$event=>currentNodeTextMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_43,[createBaseVNode(`span`,_hoisted_44,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeTextMode.value.showInfinity,"onUpdate:modelValue":_cache[25]||=$event=>currentNodeTextMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),state.vehicle.nodeTextMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_45,[createBaseVNode(`span`,_hoisted_46,toDisplayString(_ctx.$tt(`ui.debug.vehicle.maxDist`)),1),createBaseVNode(`div`,_hoisted_47,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.nodeTextMaxDist,"onUpdate:modelValue":_cache[26]||=$event=>state.vehicle.nodeTextMaxDist=$event,min:.1,max:state.vehicle.nodeTextMaxDistCap,step:.1,onValueChanged:applyState},null,8,[`modelValue`,`max`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.nodeTextMaxDist,"onUpdate:modelValue":_cache[27]||=$event=>state.vehicle.nodeTextMaxDist=$event,type:`number`,min:.1,max:state.vehicle.nodeTextMaxDistCap,step:.1,onValueChanged:applyState},null,8,[`modelValue`,`max`])])])),state.vehicle.nodeTextMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_48,[createBaseVNode(`span`,_hoisted_49,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showWheels`)),1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.nodeTextShowWheels,"onUpdate:modelValue":_cache[28]||=$event=>state.vehicle.nodeTextShowWheels=$event,onValueChanged:applyState},null,8,[`modelValue`])])),createBaseVNode(`div`,_hoisted_50,[createBaseVNode(`span`,_hoisted_51,toDisplayString(_ctx.$tt(`ui.debug.vehicle.nodeVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.nodeVisMode,"onUpdate:modelValue":_cache[29]||=$event=>state.vehicle.nodeVisMode=$event,items:nodeVisModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),currentNodeVisMode.value&¤tNodeVisMode.value.usesRange?(openBlock(),createElementBlock(`div`,_hoisted_52,[createBaseVNode(`div`,_hoisted_53,[createBaseVNode(`span`,_hoisted_54,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_55,[createVNode(unref(bngSlider_default),{modelValue:currentNodeVisMode.value.rangeMin,"onUpdate:modelValue":_cache[30]||=$event=>currentNodeVisMode.value.rangeMin=$event,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeVisMode.value.rangeMin,"onUpdate:modelValue":_cache[31]||=$event=>currentNodeVisMode.value.rangeMin=$event,type:`number`,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[32]||=$event=>currentNodeVisMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_56,[createBaseVNode(`span`,_hoisted_57,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_58,[createVNode(unref(bngSlider_default),{modelValue:currentNodeVisMode.value.rangeMax,"onUpdate:modelValue":_cache[33]||=$event=>currentNodeVisMode.value.rangeMax=$event,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentNodeVisMode.value.rangeMax,"onUpdate:modelValue":_cache[34]||=$event=>currentNodeVisMode.value.rangeMax=$event,type:`number`,min:currentNodeVisMode.value.rangeMinCap,max:currentNodeVisMode.value.rangeMaxCap,step:(currentNodeVisMode.value.rangeMaxCap-currentNodeVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[35]||=$event=>currentNodeVisMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_59,[createBaseVNode(`span`,_hoisted_60,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[36]||=$event=>currentNodeVisMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_61,[createBaseVNode(`span`,_hoisted_62,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentNodeVisMode.value.showInfinity,"onUpdate:modelValue":_cache[37]||=$event=>currentNodeVisMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),state.vehicle.nodeVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:6},[createBaseVNode(`div`,_hoisted_63,[createBaseVNode(`span`,_hoisted_64,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showHighlighted`)),1),createBaseVNode(`div`,_hoisted_65,[createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.nodeVisShowHighlighted,"onUpdate:modelValue":_cache[38]||=$event=>state.vehicle.nodeVisShowHighlighted=$event,disabled:state.vehicle.nodeVisMode===3,onValueChanged:applyState},null,8,[`modelValue`,`disabled`])])]),createBaseVNode(`div`,_hoisted_66,[createBaseVNode(`span`,_hoisted_67,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_68,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.nodeVisWidthScale,"onUpdate:modelValue":_cache[39]||=$event=>state.vehicle.nodeVisWidthScale=$event,min:.3,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.nodeVisWidthScale,"onUpdate:modelValue":_cache[40]||=$event=>state.vehicle.nodeVisWidthScale=$event,type:`number`,min:.3,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_69,[createBaseVNode(`span`,_hoisted_70,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_71,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.nodeVisAlpha,"onUpdate:modelValue":_cache[41]||=$event=>state.vehicle.nodeVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.nodeVisAlpha,"onUpdate:modelValue":_cache[42]||=$event=>state.vehicle.nodeVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_72,[createBaseVNode(`span`,_hoisted_73,toDisplayString(_ctx.$tt(`ui.debug.vehicle.torsionBarVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.torsionBarVisMode,"onUpdate:modelValue":_cache[43]||=$event=>state.vehicle.torsionBarVisMode=$event,items:torsionBarVisModeItems.value,onValueChanged:_cache[44]||=value=>{console.log(`change triggered`,value),applyState()},class:`control-input`},null,8,[`modelValue`,`items`])]),currentTorsionBarVisMode.value?.usesRange?(openBlock(),createElementBlock(Fragment,{key:7},[createBaseVNode(`div`,_hoisted_74,[createBaseVNode(`span`,_hoisted_75,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMin`)),1),createBaseVNode(`div`,_hoisted_76,[createVNode(unref(bngSlider_default),{modelValue:currentTorsionBarVisMode.value.rangeMin,"onUpdate:modelValue":_cache[45]||=$event=>currentTorsionBarVisMode.value.rangeMin=$event,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentTorsionBarVisMode.value.rangeMin,"onUpdate:modelValue":_cache[46]||=$event=>currentTorsionBarVisMode.value.rangeMin=$event,type:`number`,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.rangeMinEnabled,"onUpdate:modelValue":_cache[47]||=$event=>currentTorsionBarVisMode.value.rangeMinEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_77,[createBaseVNode(`span`,_hoisted_78,toDisplayString(_ctx.$tt(`ui.debug.vehicle.visRangeMax`)),1),createBaseVNode(`div`,_hoisted_79,[createVNode(unref(bngSlider_default),{modelValue:currentTorsionBarVisMode.value.rangeMax,"onUpdate:modelValue":_cache[48]||=$event=>currentTorsionBarVisMode.value.rangeMax=$event,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/100,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngInput_default),{modelValue:currentTorsionBarVisMode.value.rangeMax,"onUpdate:modelValue":_cache[49]||=$event=>currentTorsionBarVisMode.value.rangeMax=$event,type:`number`,min:currentTorsionBarVisMode.value.rangeMinCap,max:currentTorsionBarVisMode.value.rangeMaxCap,step:(currentTorsionBarVisMode.value.rangeMaxCap-currentTorsionBarVisMode.value.rangeMinCap)/1e3,onValueChanged:applyState},null,8,[`modelValue`,`min`,`max`,`step`]),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.rangeMaxEnabled,"onUpdate:modelValue":_cache[50]||=$event=>currentTorsionBarVisMode.value.rangeMaxEnabled=$event,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_80,[createBaseVNode(`span`,_hoisted_81,toDisplayString(_ctx.$tt(`ui.debug.vehicle.useInclusiveRange`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.usesInclusiveRange,"onUpdate:modelValue":_cache[51]||=$event=>currentTorsionBarVisMode.value.usesInclusiveRange=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_82,[createBaseVNode(`span`,_hoisted_83,toDisplayString(_ctx.$tt(`ui.debug.vehicle.showInf`)),1),createVNode(unref(bngSwitch_default),{modelValue:currentTorsionBarVisMode.value.showInfinity,"onUpdate:modelValue":_cache[52]||=$event=>currentTorsionBarVisMode.value.showInfinity=$event,onValueChanged:applyState},null,8,[`modelValue`])])],64)):createCommentVNode(``,!0),state.vehicle.torsionBarVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:8},[createBaseVNode(`div`,_hoisted_84,[createBaseVNode(`span`,_hoisted_85,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_86,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.torsionBarVisWidthScale,"onUpdate:modelValue":_cache[53]||=$event=>state.vehicle.torsionBarVisWidthScale=$event,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.torsionBarVisWidthScale,"onUpdate:modelValue":_cache[54]||=$event=>state.vehicle.torsionBarVisWidthScale=$event,type:`number`,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_87,[createBaseVNode(`span`,_hoisted_88,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_89,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.torsionBarVisAlpha,"onUpdate:modelValue":_cache[55]||=$event=>state.vehicle.torsionBarVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.torsionBarVisAlpha,"onUpdate:modelValue":_cache[56]||=$event=>state.vehicle.torsionBarVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_90,[createBaseVNode(`span`,_hoisted_91,toDisplayString(_ctx.$tt(`ui.debug.vehicle.railsSlideNodesVis`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.railsSlideNodesVisMode,"onUpdate:modelValue":_cache[57]||=$event=>state.vehicle.railsSlideNodesVisMode=$event,items:railsSlideNodesModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),state.vehicle.railsSlideNodesVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(Fragment,{key:9},[createBaseVNode(`div`,_hoisted_92,[createBaseVNode(`span`,_hoisted_93,toDisplayString(_ctx.$tt(`ui.debug.vehicle.width`)),1),createBaseVNode(`div`,_hoisted_94,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.railsSlideNodesVisWidthScale,"onUpdate:modelValue":_cache[58]||=$event=>state.vehicle.railsSlideNodesVisWidthScale=$event,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.railsSlideNodesVisWidthScale,"onUpdate:modelValue":_cache[59]||=$event=>state.vehicle.railsSlideNodesVisWidthScale=$event,type:`number`,min:.1,max:5,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_95,[createBaseVNode(`span`,_hoisted_96,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_97,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.railsSlideNodesVisAlpha,"onUpdate:modelValue":_cache[60]||=$event=>state.vehicle.railsSlideNodesVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.railsSlideNodesVisAlpha,"onUpdate:modelValue":_cache[61]||=$event=>state.vehicle.railsSlideNodesVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])],64)),createBaseVNode(`div`,_hoisted_98,[createBaseVNode(`span`,_hoisted_99,toDisplayString(_ctx.$tt(`ui.debug.vehicle.centerOfGravity`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.cogMode,"onUpdate:modelValue":_cache[62]||=$event=>state.vehicle.cogMode=$event,items:cogModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),createBaseVNode(`div`,_hoisted_100,[createBaseVNode(`span`,_hoisted_101,toDisplayString(_ctx.$tt(`ui.debug.vehicle.collisionTriangle`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.collisionTriangleVisMode,"onUpdate:modelValue":_cache[63]||=$event=>state.vehicle.collisionTriangleVisMode=$event,items:collisionTriangleModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),state.vehicle.collisionTriangleVisMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_102,[createBaseVNode(`span`,_hoisted_103,toDisplayString(_ctx.$tt(`ui.debug.vehicle.transparency`)),1),createBaseVNode(`div`,_hoisted_104,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.collisionTriangleVisAlpha,"onUpdate:modelValue":_cache[64]||=$event=>state.vehicle.collisionTriangleVisAlpha=$event,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.collisionTriangleVisAlpha,"onUpdate:modelValue":_cache[65]||=$event=>state.vehicle.collisionTriangleVisAlpha=$event,type:`number`,min:0,max:1,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])),createBaseVNode(`div`,_hoisted_105,[createBaseVNode(`span`,_hoisted_106,toDisplayString(_ctx.$tt(`ui.debug.vehicle.aerodynamics`)),1),createVNode(unref(bngDropdown_default),{modelValue:state.vehicle.aeroMode,"onUpdate:modelValue":_cache[66]||=$event=>state.vehicle.aeroMode=$event,items:aeroModeItems.value,onValueChanged:applyState,class:`control-input`},null,8,[`modelValue`,`items`])]),state.vehicle.aeroMode===1?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_107,[createBaseVNode(`span`,_hoisted_108,toDisplayString(_ctx.$tt(`ui.debug.vehicle.aerodynamicsScale`)),1),createBaseVNode(`div`,_hoisted_109,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.aerodynamicsScale,"onUpdate:modelValue":_cache[67]||=$event=>state.vehicle.aerodynamicsScale=$event,min:0,max:.2,step:.01,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.aerodynamicsScale,"onUpdate:modelValue":_cache[68]||=$event=>state.vehicle.aerodynamicsScale=$event,type:`number`,min:0,max:.2,step:.01,onValueChanged:applyState},null,8,[`modelValue`])])])),createBaseVNode(`div`,_hoisted_110,[createBaseVNode(`span`,_hoisted_111,toDisplayString(_ctx.$tt(`ui.debug.vehicle.tireContactPoint`)),1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.tireContactPoint,"onUpdate:modelValue":_cache[69]||=$event=>state.vehicle.tireContactPoint=$event,onValueChanged:applyState},null,8,[`modelValue`])]),createBaseVNode(`div`,_hoisted_112,[createBaseVNode(`span`,_hoisted_113,toDisplayString(_ctx.$tt(`ui.debug.vehicle.steeringGeometry`)),1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.steeringGeometry,"onUpdate:modelValue":_cache[70]||=$event=>state.vehicle.steeringGeometry=$event,onValueChanged:applyState},null,8,[`modelValue`])]),state.vehicle.steeringGeometry?(openBlock(),createElementBlock(`div`,_hoisted_114,[createBaseVNode(`span`,_hoisted_115,toDisplayString(_ctx.$tt(`ui.debug.vehicle.steeringGeometryLineLength`)),1),createBaseVNode(`div`,_hoisted_116,[createVNode(unref(bngSlider_default),{modelValue:state.vehicle.steeringGeometryLineLength,"onUpdate:modelValue":_cache[71]||=$event=>state.vehicle.steeringGeometryLineLength=$event,min:0,max:50,step:.1,onValueChanged:applyState},null,8,[`modelValue`]),createVNode(unref(bngInput_default),{modelValue:state.vehicle.steeringGeometryLineLength,"onUpdate:modelValue":_cache[72]||=$event=>state.vehicle.steeringGeometryLineLength=$event,type:`number`,min:0,max:50,step:.1,onValueChanged:applyState},null,8,[`modelValue`])])])):createCommentVNode(``,!0),shipping.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,_hoisted_117,[createBaseVNode(`span`,_hoisted_118,toDisplayString(_ctx.$tt(`ui.debug.vehicle.wheelThermals`))+` 🐞`,1),createVNode(unref(bngSwitch_default),{modelValue:state.vehicle.wheelThermals,"onUpdate:modelValue":_cache[73]||=$event=>state.vehicle.wheelThermals=$event,onValueChanged:applyState},null,8,[`modelValue`])]))],64)):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_119,[createBaseVNode(`div`,_hoisted_120,[createBaseVNode(`span`,_hoisted_121,toDisplayString(_ctx.$tt(`ui.debug.vehicle.meshVisibility`)),1),createBaseVNode(`div`,_hoisted_122,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.jbeamvis.meshVisButtonGroup,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),disabled:disableVehicleButtons.value,accent:unref(ACCENTS).outlined,class:`mesh-button`},{default:withCtx(()=>[createTextVNode(toDisplayString(btn.label),1)]),_:2},1032,[`onClick`,`disabled`,`accent`]))),128))])])]),_cache[75]||=createBaseVNode(`hr`,null,null,-1),createBaseVNode(`h4`,null,toDisplayString(_ctx.$tt(`ui.debug.terrain`)),1),createBaseVNode(`div`,_hoisted_123,[(openBlock(!0),createElementBlock(Fragment,null,renderList(controls$1.terrain.buttonGroup_1,btn=>(openBlock(),createBlock(unref(bngButton_default),{key:btn.label,onClick:$event=>btn.action(),accent:unref(ACCENTS).secondary},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$tt(btn.label)),1)]),_:2},1032,[`onClick`,`accent`]))),128))])]))}},Debug_default=__plugin_vue_export_helper_default(_sfc_main$14,[[`__scopeId`,`data-v-8c471ede`]]),_sfc_main$13={__name:`VehicleConfig`,props:{tab:{type:String,default:`parts`,validator:val=>!val||[`parts`,`tuning`,`color`,`save`,`debug`].includes(val)}},setup(__props){let exit=event=>{event.detail.force||window.bngVue.gotoAngularState(`menu.mainmenu`)};function syncWithStates(tab){window.bngVue&&(tab=[`parts`,`tuning`,`color`,`save`,`debug`][tab.index]||`parts`,window.bngVue.gotoAngularState(`menu.vehicleconfig.${tab}`))}return(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(layoutSingle_default),{class:`vehcfg`,onDeactivate:exit},{default:withCtx(()=>[withDirectives((openBlock(),createBlock(unref(tabs_default),{class:`bng-tabs`,onChange:syncWithStates},{default:withCtx(()=>[withDirectives(createVNode(unref(tabList_default),null,null,512),[[unref(BngBlur_default)]]),withDirectives(createVNode(Parts_default,{"tab-selected":__props.tab===`parts`,"tab-heading":_ctx.$t(`ui.vehicleconfig.parts`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Tuning_default,{"tab-selected":__props.tab===`tuning`,"tab-heading":_ctx.$t(`ui.vehicleconfig.tuning`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Paint_default,{"tab-selected":__props.tab===`color`,"tab-heading":_ctx.$t(`ui.vehicleconfig.color`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Save_default,{"tab-selected":__props.tab===`save`,"tab-heading":_ctx.$t(`ui.vehicleconfig.save`)+` & `+_ctx.$t(`ui.vehicleconfig.load`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]]),withDirectives(createVNode(Debug_default,{"tab-selected":__props.tab===`debug`,"tab-heading":_ctx.$tt(`ui.debug.vehicle`)},null,8,[`tab-selected`,`tab-heading`]),[[unref(BngBlur_default)]])]),_:1})),[[unref(BngFrustumMover_default),!0,void 0,{left:!0}]])]),_:1})),[[unref(BngScopedNav_default),{activateOnMount:!0,bubbleWhitelistEvents:[`tab_l`,`tab_r`,`menu`]}]])}},VehicleConfig_default=__plugin_vue_export_helper_default(_sfc_main$13,[[`__scopeId`,`data-v-e5f4e51f`]]),_hoisted_1$10={class:`adjustment-container`},_hoisted_2$6={class:`y-controls`},_hoisted_3$5={class:`slider-container`},_hoisted_4$4={class:`value-input`},_hoisted_5$3={class:`x-controls`},_hoisted_6$2={class:`slider-container`},_hoisted_7$2={class:`value-input`},_hoisted_8$1={class:`reset-cont`},MIRROR_RANGE_DEFAULTS={min:-20,max:20,step:.01},_sfc_main$12={__name:`MirrorAdjust`,props:{mirror:Object},setup(__props){let props=__props,uiScopeName=`vehicle-config-mirrors`,uiNavScope$1=useUINavScope(uiScopeName),reactivateUIScope=event=>{(event.type===`deactivate`||event.type===`focusout`)&&uiNavScope$1.set(uiScopeName)},range={x:{min:props.mirror.clampX?props.mirror.clampX[0]:MIRROR_RANGE_DEFAULTS.min,max:props.mirror.clampX?props.mirror.clampX[1]:MIRROR_RANGE_DEFAULTS.max,step:MIRROR_RANGE_DEFAULTS.step},y:{min:props.mirror.clampY?props.mirror.clampY[0]:MIRROR_RANGE_DEFAULTS.min,max:props.mirror.clampY?props.mirror.clampY[1]:MIRROR_RANGE_DEFAULTS.max,step:MIRROR_RANGE_DEFAULTS.step}},[inpX,inpY]=[ref(),ref()],isChanged=computed(()=>inpX.value&&inpX.value.dirty||inpY.value&&inpY.value.dirty),mover={x:0,y:0,drift:.2,tmr:null,tmrInterval:100};function move(evt){let val=evt.detail.value>mover.drift?evt.detail.value-mover.drift:evt.detail.value<-mover.drift?evt.detail.value+mover.drift:0;evt.detail.name===`focus_lr`?mover.x=val:evt.detail.name===`focus_ud`&&(mover.y=val)}let precision=10**(MIRROR_RANGE_DEFAULTS.step+`.`).split(/[.,]/)[1].length,clamp$2=(val,axis=`x`)=>Math.round(Math.max(range[axis].min,Math.min(val,range[axis].max))*precision)/precision;function resetValues(){props.mirror.x=inpX.value.currentCleanValue,props.mirror.y=inpY.value.currentCleanValue,onValueChanged()}function onValueChanged(){Lua_default.extensions.core_vehicle_mirror.setAngleOffset(props.mirror.name,-props.mirror.y,-props.mirror.x,!1,!1)}return onMounted(()=>{getUINavServiceInstance().useCrossfire=!1,Lua_default.extensions.core_vehicle_mirror.focusOnMirror(props.mirror.name),mover.tmr=setInterval(()=>{mover.x===0&&mover.y===0||(props.mirror.x=clamp$2(props.mirror.x+mover.x,`x`),props.mirror.y=clamp$2(props.mirror.y+mover.y,`y`),onValueChanged())},mover.tmrInterval)}),onUnmounted(()=>{getUINavServiceInstance().useCrossfire=!0,clearInterval(mover.tmr)}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$10,[createVNode(unref(bngImageTile_default),{class:`mirror-tile`,icon:unref(icons)[__props.mirror.mirrorIcon],label:__props.mirror.description,ratio:`1:1`},null,8,[`icon`,`label`]),createBaseVNode(`div`,_hoisted_2$6,[createBaseVNode(`div`,_hoisted_3$5,[createVNode(unref(bngSlider_default),mergeProps({"bng-no-nav":`true`,ref_key:`inpY`,ref:inpY,class:`slider-y`},range.y,{uiNavFocus:!1,modelValue:__props.mirror.y,"onUpdate:modelValue":_cache[0]||=$event=>__props.mirror.y=$event,onFocusout:reactivateUIScope,onValueChanged,onDeactivate:reactivateUIScope}),null,16,[`modelValue`])]),createBaseVNode(`div`,_hoisted_4$4,[createVNode(unref(bngBinding_default),{class:`keybinding`,action:`menu_item_focus_ud`,deviceMask:`xinput`,dark:!1}),createVNode(unref(bngInput_default),mergeProps({class:`value`,modelValue:__props.mirror.y,"onUpdate:modelValue":_cache[1]||=$event=>__props.mirror.y=$event,type:`number`},range.y,{prefix:`Y`,suffix:`°`}),null,16,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_5$3,[createBaseVNode(`div`,_hoisted_6$2,[createVNode(unref(bngSlider_default),mergeProps({"bng-no-nav":`true`,ref_key:`inpX`,ref:inpX,class:`slider-x`},range.x,{uiNavFocus:!1,modelValue:__props.mirror.x,"onUpdate:modelValue":_cache[2]||=$event=>__props.mirror.x=$event,onFocusout:reactivateUIScope,onValueChanged,onDeactivate:reactivateUIScope}),null,16,[`modelValue`])]),createBaseVNode(`div`,_hoisted_7$2,[createVNode(unref(bngBinding_default),{class:`keybinding`,action:`menu_item_focus_lr`,deviceMask:`xinput`,dark:!1}),createVNode(unref(bngInput_default),mergeProps({class:`value`,modelValue:__props.mirror.x,"onUpdate:modelValue":_cache[3]||=$event=>__props.mirror.x=$event,type:`number`},range.x,{prefix:`X`,suffix:`°`}),null,16,[`modelValue`])])]),createBaseVNode(`div`,_hoisted_8$1,[createVNode(unref(bngButton_default),{accent:unref(ACCENTS).attention,disabled:!isChanged.value,onClick:_cache[4]||=$event=>resetValues()},{default:withCtx(()=>[createVNode(unref(bngBinding_default),{controller:``,"ui-event":`action_3`}),createTextVNode(` `+toDisplayString(_ctx.$t(`ui.common.reset`)),1)]),_:1},8,[`accent`,`disabled`])])])),[[unref(BngOnUiNav_default),move,`focus_lr,focus_ud`],[unref(BngOnUiNav_default),resetValues,`action_3`]])}},MirrorAdjust_default=__plugin_vue_export_helper_default(_sfc_main$12,[[`__scopeId`,`data-v-14ab0128`]]),_hoisted_1$9={key:0,class:`content buttons-grid`},_sfc_main$11={__name:`Mirrors`,props:{exitRoute:{type:String,default:`menu.vehicleconfig.tuning`}},setup(__props){useUINavScope(`vehicle-config-mirrors`);let comp=ref(null),{lua,events:events$3}=useBridge(),mirrors=ref([]),selectedMirror=ref(null),props=__props;async function exitAdjustmentMode(){selectedMirror.value?(lua.extensions.core_vehicle_mirror.setAngleOffset(selectedMirror.value.name,-selectedMirror.value.y,-selectedMirror.value.x,!1,!0),selectedMirror.value=null,comp.value=null,await lua.extensions.core_vehicle_mirror.focusOnMirror(!1)):bngVue.gotoAngularState(props.exitRoute)}async function getVehicleMirrors(){let data=await lua.extensions.core_vehicle_mirror.getAnglesOffset();for(let key in mirrors.value.splice(0),data){let position=data[key].position,mirrorIcon=data[key].icon,description=data[key].label;if(position||(/_L$|_L_/.test(key)?(position=`left`,mirrorIcon||=`mirrorLeftDefault`):/_R$|_R_/.test(key)?(position=`right`,mirrorIcon||=`mirrorRightDefault`):position=`mid`),!description)description=$translate.instant(`ui.mirrors.position.`+position),key.endsWith(`_spot`)&&(description+=` (${$translate.instant(`ui.mirrors.spot`)})`);else{let tr=$translate.instant(`ui.mirrors.`+description);tr.startsWith(`ui.mirrors.`)||(description=tr)}mirrors.value.push({name:data[key].name,description,position,x:data[key].angleOffset.x,y:data[key].angleOffset.z,clampX:data[key].clampX,clampY:data[key].clampZ,mirrorIcon:mirrorIcon||`mirrorInteriorMiddle`,row:data[key].row||0})}mirrors.value.sort((a$1,b)=>a$1.row-b.row)}return onMounted(async()=>{await getVehicleMirrors(),events$3.on(`VehicleChange`,getVehicleMirrors),lua.extensions.core_input_bindings.setMenuActionEnabled(!0,`menu_item_focus_lr`),lua.extensions.core_input_bindings.setMenuActionEnabled(!0,`menu_item_focus_ud`)}),onUnmounted(()=>{events$3.off(`VehicleChange`,getVehicleMirrors)}),(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(layoutSingle_default),{class:`layout-content-full layout-align-hstart`,"bng-ui-scope":`vehicle-config-mirrors`},{default:withCtx(()=>[withDirectives((openBlock(),createBlock(unref(bngCard_default),{class:`mirrors-card`},{buttons:withCtx(()=>[createVNode(unref(bngButton_default),{onClick:exitAdjustmentMode},{default:withCtx(()=>[selectedMirror.value?(openBlock(),createBlock(unref(bngBinding_default),{key:0,controller:``,"ui-event":`action_2`})):(openBlock(),createBlock(unref(bngBinding_default),{key:1,controller:``,"ui-event":`back`})),createTextVNode(` `+toDisplayString(_ctx.$t(selectedMirror.value?`ui.common.apply`:`ui.common.close`)),1)]),_:1})]),default:withCtx(()=>[createVNode(unref(bngCardHeading_default),null,{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(`ui.mirrors.name`)),1)]),_:1}),selectedMirror.value?(openBlock(),createBlock(MirrorAdjust_default,{key:1,class:`content`,mirror:selectedMirror.value},null,8,[`mirror`])):(openBlock(),createElementBlock(`div`,_hoisted_1$9,[(openBlock(!0),createElementBlock(Fragment,null,renderList(mirrors.value,mirror=>(openBlock(),createBlock(unref(bngImageTile_default),{onClick:$event=>selectedMirror.value=mirror,class:normalizeClass([`mirror-button`,[mirror.position]]),icon:unref(icons)[mirror.mirrorIcon]||unref(icons).placeholder,label:mirror.description,"bng-nav-item":``},null,8,[`onClick`,`class`,`icon`,`label`]))),256))]))]),_:1})),[[unref(BngBlur_default),!0]])]),_:1})),[[unref(BngOnUiNav_default),exitAdjustmentMode,`menu,back`],[unref(BngOnUiNav_default),()=>selectedMirror.value&&exitAdjustmentMode(),`action_2`]])}},Mirrors_default=__plugin_vue_export_helper_default(_sfc_main$11,[[`__scopeId`,`data-v-28f8b633`]]),routes_default$17=[{path:`/vehicle-config`,name:`menu.vehicleconfig`,redirect:`/vehicle-config/parts`,meta:{clickThrough:!0,infoBar:{withAngular:!1,visible:!0,showSysInfo:!1},uiApps:{shown:!0},topBar:{visible:!0}},children:[{path:`parts`,name:`menu.vehicleconfig.parts`,component:VehicleConfig_default,props:{tab:`parts`}},{path:`tuning`,name:`menu.vehicleconfig.tuning`,component:VehicleConfig_default,props:{tab:`tuning`}},{path:`color`,name:`menu.vehicleconfig.color`,component:VehicleConfig_default,props:{tab:`color`},meta:{uiApps:{shown:!1}}},{path:`save`,name:`menu.vehicleconfig.save`,component:VehicleConfig_default,props:{tab:`save`},meta:{uiApps:{shown:!1}}},{path:`debug`,name:`menu.vehicleconfig.debug`,component:VehicleConfig_default,props:{tab:`debug`}}]},{path:`/vehicle-config/tuning/mirrors/:exitRoute?/`,name:`menu.vehicleconfig.tuning.mirrors`,component:Mirrors_default,props:!0},{path:`/vehicle-config/tuning/mirrors-angular`,name:`menu.vehicleconfig.tuning.mirrors.with-angular`,component:Mirrors_default,props:{exitRoute:`menu.vehicleconfigold.tuning`}},{path:`/vehicle-config/tuning/mirrors-garage`,name:`menu.vehicleconfig.tuning.mirrors.in-garage`,component:Mirrors_default,props:{exitRoute:`garagemode.tuning`}}],_hoisted_1$8={key:0,class:`management-details`},_hoisted_2$5={key:0,class:`current-vehicle-info`},_hoisted_3$4={class:`info-row`},_hoisted_4$3={class:`value`},_hoisted_5$2={class:`buttons-section`},_sfc_main$10={__name:`ManagementDetails`,props:{managementDetails:{type:Object,default:null},executeButton:{type:Function,required:!0}},emits:[`button-click`],setup(__props,{emit:__emit}){let props=__props,emit$1=__emit,handleButtonClick=buttonId=>{props.executeButton(buttonId),emit$1(`button-click`,buttonId)};return(_ctx,_cache)=>__props.managementDetails&&__props.managementDetails.buttonInfo&&__props.managementDetails.buttonInfo.length>0?(openBlock(),createElementBlock(`div`,_hoisted_1$8,[__props.managementDetails.details?(openBlock(),createElementBlock(`div`,_hoisted_2$5,[createBaseVNode(`div`,_hoisted_3$4,[_cache[0]||=createBaseVNode(`span`,{class:`label`},`Current Vehicle:`,-1),createBaseVNode(`span`,_hoisted_4$3,toDisplayString(__props.managementDetails.details.currentVehicleName),1)])])):createCommentVNode(``,!0),createBaseVNode(`div`,_hoisted_5$2,[(openBlock(!0),createElementBlock(Fragment,null,renderList(__props.managementDetails.buttonInfo,button=>(openBlock(),createElementBlock(`div`,{key:button.buttonId,class:`button-container`},[createVNode(unref(bngButton_default),{accent:button.accent||`secondary`,label:button.label,icon:button.icon,onClick:$event=>handleButtonClick(button.buttonId)},null,8,[`accent`,`label`,`icon`,`onClick`])]))),128))])])):createCommentVNode(``,!0)}},ManagementDetails_default=__plugin_vue_export_helper_default(_sfc_main$10,[[`__scopeId`,`data-v-b0128491`]]),_sfc_main$9={__name:`VehicleSelector`,setup(__props){return(_ctx,_cache)=>(openBlock(),createBlock(GridSelector_default,{backendName:`vehicleSelector`,routePath:`/vehicle-selector`,defaultPath:{keys:[`allModels`]},defaultDetailsMode:`advanced`,tileImagesTopAligned:``},{"item-details":withCtx(({activeItem,activeItemDetails,executeButton,toggleFavourite,exploreFolder,goToMod})=>[createVNode(VehicleDetails_default,{activeItem,activeItemDetails,executeButton,toggleFavourite,exploreFolder,goToMod,showHeaderTitle:!0},null,8,[`activeItem`,`activeItemDetails`,`executeButton`,`toggleFavourite`,`exploreFolder`,`goToMod`])]),"management-details":withCtx(({managementDetails,executeButton})=>[createVNode(ManagementDetails_default,{managementDetails,executeButton},null,8,[`managementDetails`,`executeButton`])]),_:1}))}},VehicleSelector_default=_sfc_main$9,routes_default$18=[{name:`menu.vehiclesnew`,path:`/vehicle-selector/:pathMatch(.*)*`,component:VehicleSelector_default,props:!0,meta:{clickThrough:!0,infoBar:{visible:!0,showSysInfo:!1},uiApps:{shown:!1},topBar:{visible:!0}}}],router=createRouter({history:createWebHashHistory(),routes:[...Object.values([routes_default,routes_default$1,routes_default$2,routes_default$3,routes_default$4,routes_default$5,routes_default$6,routes_default$7,routes_default$8,routes_default$9,routes_default$10,routes_default$11,routes_default$12,routes_default$13,routes_default$14,routes_default$15,routes_default$16,routes_default$17,routes_default$18]).flatMap(routes=>routes||[]),{path:`/:catchAll(.*)*`,name:`unknown`,component:NotFound_default}]});router.bngUpdateMeta=to=>{to.meta&&(to.meta.uiApps&&handelUIAppsSettings(to.meta.uiApps),handleInfoBarSettings(to.meta.infoBar||{}),handleTopBarSettings(to))},router.afterEach((to,from)=>{reportState(to.path,!0,from.path),window.bridge.api.engineLua(`extensions.hook("onUiChangedState", "${to.name}", "${from.name}")`),router.bngUpdateMeta(to)});var handelUIAppsSettings=settings$1=>{let appsAPI=useUIApps();settings$1.layout&&appsAPI.setLayout(settings$1.layout),`shown`in settings$1&&appsAPI.setVisible(settings$1.shown)},handleInfoBarSettings=settings$1=>{let infoBar=useInfoBar();infoBar.visible=settings$1.visible,infoBar.showSysInfo=settings$1.showSysInfo,infoBar.withAngular=settings$1.withAngular,settings$1.hints&&(infoBar.clearHints(),infoBar.addHints(settings$1.hints))},handleTopBarSettings=to=>{let topBar=useTopBar(),meta=to.meta.topBar||{};meta.visible?meta.visible&&!topBar.visible&&topBar.show():topBar.hide(),topBar.onUIStateChanged(to)},router_default=router,_hoisted_1$7={key:0,id:`vue-debug`},_hoisted_2$4={class:`heading-wrapper`},_hoisted_3$3={class:`label`},_hoisted_4$2={key:0,class:`route-info`},_hoisted_5$1={class:`main`},_hoisted_6$1={class:`controls`},_hoisted_7$1={key:0},_hoisted_8=[`label`],_hoisted_9=[`value`,`selected`],_sfc_main$8={__name:`VueDebug`,setup(__props){let{lua}=useBridge(),EXTRA_ROUTE,routeGroups=router_default.getRoutes().map(r=>r.name).filter(n=>n!==`routelist`).sort((a$1,b)=>a$1.localeCompare(b)).reduce((res,n)=>{if(!n)return res;let g=n.substring(0,1);return res[g]||(res[g]={name:g.toUpperCase(),routes:[]}),res[g].routes.push(n),res},{}),route=useRoute(),hash=ref(location.hash.split(`#`)[1]),path=computed(()=>route.path),routeName=computed(()=>route.name),showDebug=ref(window._VueDebugState),isOpen=ref(window._VueDebugOpen),showComponents=router_default.hasRoute(`components`),bngVue$1=window.bngVue||{};bngVue$1.debug=(state=!0)=>showDebug.value=window._VueDebugState=state,bngVue$1.reset=()=>bngVue$1.gotoGameState(`menu.mainmenu`);function toggleOpen(){isOpen.value=window._VueDebugOpen=!isOpen.value}function selectRoute(e){e.target.value&&bngVue$1.gotoGameState(e.target.value)}function icons$3(){bngVue$1.gotoGameState(`components/IconBrowser`),toggleOpen()}function colours(){bngVue$1.gotoGameState(`components/Colours`),toggleOpen()}function extra(){bngVue$1.gotoGameState(void 0),toggleOpen()}function components(){bngVue$1.showComponents(),toggleOpen()}function menu(){bngVue$1.reset(),toggleOpen()}function mainmenu(){toggleOpen(),lua.returnToMainMenu()}let closeDebug=e=>{e.stopPropagation(),bngVue$1.debug(!1)};return addEventListener(`hashchange`,e=>{hash.value=e.newURL.split(`#`)[1]}),(_ctx,_cache)=>(openBlock(),createBlock(Teleport,{to:`body`},[showDebug.value?(openBlock(),createElementBlock(`div`,_hoisted_1$7,[createBaseVNode(`div`,{class:`handle`,onClick:toggleOpen},[createBaseVNode(`div`,_hoisted_2$4,[createBaseVNode(`span`,_hoisted_3$3,[_cache[1]||=createBaseVNode(`strong`,null,`Vue`,-1),isOpen.value?createCommentVNode(``,!0):(openBlock(),createElementBlock(`span`,_hoisted_4$2,`: `+toDisplayString(path.value)+` [ `+toDisplayString(routeName.value)+` ]`,1))]),createBaseVNode(`a`,{onClick:closeDebug},`x`)])]),withDirectives(createBaseVNode(`div`,_hoisted_5$1,[createBaseVNode(`div`,null,[createTextVNode(` Current hash: `+toDisplayString(hash.value),1),_cache[2]||=createBaseVNode(`br`,null,null,-1),createTextVNode(` Route name: `+toDisplayString(routeName.value),1)]),_cache[4]||=createBaseVNode(`hr`,null,null,-1),createBaseVNode(`div`,_hoisted_6$1,[unref(showComponents)?(openBlock(),createElementBlock(`div`,_hoisted_7$1,[withDirectives((openBlock(),createElementBlock(`a`,{href:`#`,onClick:menu},[..._cache[3]||=[createTextVNode(`Main Menu`,-1)]])),[[unref(BngDoubleClick_default),mainmenu,void 0,{capture:!0}],[unref(BngTooltip_default),`Doubleclick to unload level`]]),unref(void 0)?(openBlock(),createElementBlock(`a`,{key:0,href:`#`,onClick:extra},`⏩`)):createCommentVNode(``,!0),createBaseVNode(`a`,{href:`#`,onClick:_cache[0]||=$event=>_ctx.$simplemenu.value=!_ctx.$simplemenu.value},toDisplayString(_ctx.$simplemenu.value?`✓`:`☐`)+` SimpleMenu`,1),createBaseVNode(`a`,{href:`#`,onClick:components},`Components`),createBaseVNode(`a`,{href:`#`,onClick:icons$3},`Icons`),createBaseVNode(`a`,{href:`#`,onClick:colours},`Colours`)])):createCommentVNode(``,!0),createBaseVNode(`select`,{multiple:``,onClick:selectRoute},[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(routeGroups),group=>(openBlock(),createElementBlock(`optgroup`,{key:group.name,label:group.name},[(openBlock(!0),createElementBlock(Fragment,null,renderList(group.routes,route$1=>(openBlock(),createElementBlock(`option`,{key:route$1,value:route$1,selected:route$1===routeName.value},toDisplayString(route$1),9,_hoisted_9))),128))],8,_hoisted_8))),128))])])],512),[[vShow,isOpen.value]])])):createCommentVNode(``,!0)]))}},VueDebug_default=__plugin_vue_export_helper_default(_sfc_main$8,[[`__scopeId`,`data-v-669cde99`]]),_hoisted_1$6={class:`hint-content`},_hoisted_2$3={key:0,class:`binding-container`},_hoisted_3$2={key:1,class:`text`},_hoisted_4$1={key:1,class:`hint-text`},_sfc_main$7={__name:`Hint`,props:{data:Object},setup(__props){let Controls=controls_default(),props=__props,PROP_DEFAULTS={icon:{color:`white`},binding:{showUnassigned:!0,dark:!1}},hintRef=ref(null),bindingRefs=ref([]),hintContent=computed(()=>{let hints=props.data?[props.data.content].flat():[],res=[],label;for(let hint of hints)typeof hint==`string`?label=hint:(hint.label&&(label=hint.label),res.push({...hint,label:void 0}));return label&&res.push(label),res}),bindingView=computed(()=>{let res=hintContent.value.filter(item=>typeof item!=`string`);for(let item of res)if(item.type===`binding`){if(item.props?.viewerObj){item.viewerObjs=[item.props.viewerObj];continue}let viewerObjs=Controls.makeViewerObj({...PROP_DEFAULTS[item.type],...item.props,actionVariants:!0,useLastDevice:!0});viewerObjs?.variants?item.viewerObjs=viewerObjs.variants:item.viewerObjs=[viewerObjs]}return res}),labelView=computed(()=>hintContent.value.find(item=>typeof item==`string`)||bindingView.value.find(item=>item.label)?.label),bindingDisplayed=computed(()=>!!(bindingRefs.value.some(ref$1=>ref$1.displayed)||bindingView.value.some(item=>item.type===`icon`)||labelView.value));function onClick(evt){if(lastFocused&&document.body.contains(lastFocused)&&!setFocusExternal(lastFocused,!0,!1))try{lastFocused.focus?.()}catch{}props.data.action?.(evt)}let lastFocused;function trackFocus(evt){let target=evt?.detail?.target||evt?.target||document.activeElement;if(!target){lastFocused=null;return}if(target=target.closest(NAVIGABLE_ELEMENTS_SELECTOR),!target){lastFocused=null;return}if(target===lastFocused)return;let button=hintRef.value?.getElement?.();target!==button&&!button.contains(target)&&(lastFocused=target)}return onMounted(()=>window.addEventListener(`uinav-focus`,trackFocus)),onBeforeUnmount(()=>window.removeEventListener(`uinav-focus`,trackFocus)),(_ctx,_cache)=>withDirectives((openBlock(),createBlock(unref(bngButton_default),{ref_key:`hintRef`,ref:hintRef,class:normalizeClass([`hint`,{"flash-on":__props.data.flash}]),accent:unref(ACCENTS).text,disabled:!__props.data.action,onClick:withModifiers(onClick,[`stop`]),"bng-no-nav":``,tabindex:`-1`},{default:withCtx(()=>[createBaseVNode(`div`,_hoisted_1$6,[bindingView.value.length>0?(openBlock(),createElementBlock(`div`,_hoisted_2$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(bindingView.value,(item,idx)=>(openBlock(),createElementBlock(`span`,{key:idx,class:`rich`},[item.type===`icon`?(openBlock(),createBlock(unref(bngIcon_default),mergeProps({key:0,class:`icon`},{ref_for:!0},{...PROP_DEFAULTS[item.type],...item.props}),null,16)):createCommentVNode(``,!0),(openBlock(!0),createElementBlock(Fragment,null,renderList(item.viewerObjs,(viewerObj,index)=>(openBlock(),createBlock(unref(bngBinding_default),mergeProps({key:index,ref_for:!0,ref_key:`bindingRefs`,ref:bindingRefs,class:`binding`},{ref_for:!0},{...PROP_DEFAULTS[item.type],...item.props,viewerObj},{"track-ignore":``}),null,16))),128)),item.hold?(openBlock(),createElementBlock(`span`,_hoisted_3$2,toDisplayString(item.hold?`[hold]`:``),1)):createCommentVNode(``,!0)]))),128))])):createCommentVNode(``,!0),labelView.value?(openBlock(),createElementBlock(`span`,_hoisted_4$1,toDisplayString(_ctx.$tt(labelView.value)),1)):createCommentVNode(``,!0)])]),_:1},8,[`class`,`accent`,`disabled`])),[[vShow,bindingDisplayed.value]])}},Hint_default=__plugin_vue_export_helper_default(_sfc_main$7,[[`__scopeId`,`data-v-29a63ba0`]]),_hoisted_1$5={key:0,class:`info-bar-stats`},_hoisted_2$2={key:0},_hoisted_3$1={key:0,class:`divider`},_hoisted_4={key:0},_hoisted_5={class:`sysinfo`},_hoisted_6={class:`sysinfo`},_hoisted_7={key:1,class:`info-bar-buttons`,"bng-no-child-nav":`true`},_sfc_main$6={__name:`InfoBar`,setup(__props){let{visible,showSysInfo,withAngular,hints}=storeToRefs(useInfoBar()),showBuildInfo=ref(!1),toggleBuildInfo=()=>showBuildInfo.value=!showBuildInfo.value,route=useRoute(),solidBar=computed(()=>route.name===`menu.mainmenu`?!sysInfo_default.mainMenuBackgroundRequired.value:withAngular.value);return(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,{class:normalizeClass([`info-bar`,{"info-bar-solid":solidBar.value}]),"bng-no-nav":`true`},[unref(showSysInfo)?(openBlock(),createElementBlock(`div`,_hoisted_1$5,[withDirectives(createVNode(unref(bngIcon_default),{style:{"--bng-icon-size":`1.25em`,padding:`0`},type:unref(sysInfo_default).online?unref(icons).globeSimplified:unref(icons).globeSimpleNotSign},null,8,[`type`]),[[unref(BngTooltip_default),unref(sysInfo_default).online?`Online`:`Offline`,`top`]]),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(sysInfo_default).serviceProviders.value,(info,key)=>(openBlock(),createElementBlock(Fragment,null,[unref(sysInfo_default).serviceProvidersOnline.value[key]?(openBlock(),createElementBlock(`span`,_hoisted_2$2,[createVNode(unref(bngImageAsset_default),{src:`images/mainmenu/${key}icon.png`},null,8,[`src`]),createTextVNode(` `+toDisplayString(info.playerName)+` `,1),info.branch&&info.branch!==`public`?withDirectives((openBlock(),createBlock(unref(bngIcon_default),{key:0,style:{"--bng-icon-size":`1.25em`,padding:`0`},type:unref(icons).branch},null,8,[`type`])),[[unref(BngTooltip_default),`Branch: `+info.branch,`top`]]):createCommentVNode(``,!0),createTextVNode(` `+toDisplayString(info.branch&&info.branch!==`public`?info.branch:``),1)])):createCommentVNode(``,!0)],64))),256)),unref(sysInfo_default).online||unref(sysInfo_default).serviceProvidersOnline.value.any?(openBlock(),createElementBlock(`span`,_hoisted_3$1)):createCommentVNode(``,!0),createBaseVNode(`span`,{onClick:toggleBuildInfo},[showBuildInfo.value?(openBlock(),createElementBlock(Fragment,{key:1},[createBaseVNode(`span`,_hoisted_5,`Alpha v.`+toDisplayString(unref(sysInfo_default).version),1),createBaseVNode(`span`,_hoisted_6,toDisplayString(unref(sysInfo_default).buildInfo),1)],64)):(openBlock(),createElementBlock(`span`,_hoisted_4,`Alpha v.`+toDisplayString(unref(sysInfo_default).versionSimple),1))])])):createCommentVNode(``,!0),_cache[0]||=createBaseVNode(`div`,{class:`spacer`},null,-1),unref(hints).length?(openBlock(),createElementBlock(`div`,_hoisted_7,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(hints),item=>(openBlock(),createBlock(Hint_default,{key:item.id,data:item},null,8,[`data`]))),128))])):createCommentVNode(``,!0)],2)),[[vShow,unref(visible)],[unref(BngBlur_default),solidBar.value&&!unref(sysInfo_default).mainMenuBackgroundRequired.value]])}},InfoBar_default=__plugin_vue_export_helper_default(_sfc_main$6,[[`__scopeId`,`data-v-cb5f8971`]]),_hoisted_1$4=[`accent`],_sfc_main$5={__name:`TopBarItem`,props:{icon:{type:String,required:!0},active:{type:Boolean,default:void 0},label:String,iconOnly:Boolean,iconPosition:{type:String,default:`left`},accent:{type:String,default:`default`}},setup(__props){let props=__props,item=ref(null);return watch(()=>props.active,value=>{typeof value==`boolean`&&(value?(item.value.setAttribute(`active`,`true`),item.value.removeAttribute(NO_NAV_ATTR)):(item.value.removeAttribute(`active`),item.value.setAttribute(NO_NAV_ATTR,`true`)))}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,{ref_key:`item`,ref:item,class:normalizeClass([`topbar-item`,{"icon-only":__props.iconOnly}]),accent:__props.accent,"bng-nav-item":``,"bng-no-nav":`true`,tabindex:`-1`},[createVNode(unref(bngIcon_default),{class:`topbar-item-icon`,type:__props.icon},null,8,[`type`]),__props.label&&!__props.iconOnly?(openBlock(),createBlock(unref(textScroller_default),{key:0,class:`topbar-item-text`},{default:withCtx(()=>[createTextVNode(toDisplayString(_ctx.$t(__props.label)),1)]),_:1})):createCommentVNode(``,!0)],10,_hoisted_1$4)),[[unref(BngSoundClass_default),`bng_click_hover_generic`]])}},TopBarItem_default=__plugin_vue_export_helper_default(_sfc_main$5,[[`__scopeId`,`data-v-2c3015cd`]]),_hoisted_1$3={class:`topbar`},_hoisted_2$1={class:`topbar-section topbar-left`},_hoisted_3={class:`topbar-section topbar-center`},_sfc_main$4={__name:`TopBar`,setup(__props,{expose:__expose}){let topBar=useTopBar(),{visible,items:items$2,activeItem,gameState:gameState$1}=storeToRefs(topBar),overflowContainer=ref(null),pauseButtonTarget=ref(null),showTabBindings=ref(!0),showBackBinding=ref(!0),onItemClicked=item=>{activeItem.value!==item.id&&(activeItem.value=item.id,topBar.selectEntry(item.id))},backStack=new Map,customBack=null;function setBack(id,fn){if(!id)throw Error("Usage: TopBar.setBack(id, [fn]), where `id` is your unique id and `fn` is a custom back function that will fire and expected to return `true` or `false` (undefined return means `true`), which will dis-/allow the base back functionality.");typeof fn==`function`?backStack.set(id,fn):backStack.delete(id),customBack=Array.from(backStack.values()).at(-1)||null}let onBack=()=>{let res=customBack?.();res===void 0&&(res=!0),res&&(gameState$1.isInGame?window.bngVue.gotoGameState(`play`):window.globalAngularRootScope?.$broadcast(`MenuToggle`))},onContinue=()=>{window.bngVue.gotoAngularState(`play`)};return watch(()=>activeItem.value,val=>{if(activeItem.value!==null&&items$2.value.length>0){let idx=items$2.value.findIndex(item=>item.id===val);overflowContainer.value.activate(idx)}else overflowContainer.value.deactivate()}),__expose({pauseButtonTarget:computed(()=>visible.value?pauseButtonTarget.value:null),setBack,showTabBindings,showBackBinding}),onMounted(()=>{}),onUnmounted(()=>{}),(_ctx,_cache)=>withDirectives((openBlock(),createElementBlock(`div`,_hoisted_1$3,[createBaseVNode(`div`,_hoisted_2$1,[unref(gameState$1).isInGame?withDirectives((openBlock(),createBlock(unref(bngButton_default),{key:0,"track-ignore":``,accent:`custom`,class:`topbar-button`,"bng-no-nav":`true`,tabindex:`-1`,onClick:onContinue},{default:withCtx(()=>[createVNode(unref(bngIcon_default),{type:unref(icons).play},null,8,[`type`]),createVNode(unref(bngBinding_default),{"ui-event":`menu`,controller:``})]),_:1})),[[unref(BngTooltip_default),`Back to gameplay`,`right`]]):createCommentVNode(``,!0),withDirectives((openBlock(),createBlock(unref(bngButton_default),{"track-ignore":``,accent:`custom`,class:`topbar-button back-button`,"bng-no-nav":`true`,tabindex:`-1`,onClick:onBack},{default:withCtx(()=>[createVNode(unref(bngIcon_default),{type:unref(icons).undo},null,8,[`type`]),withDirectives(createVNode(unref(bngBinding_default),{"ui-event":`back`,controller:``},null,512),[[vShow,showBackBinding.value]])]),_:1})),[[unref(BngTooltip_default),`Back one level`,`right`]])]),createBaseVNode(`div`,_hoisted_3,[withDirectives(createVNode(unref(bngOverflowContainer_default),{ref_key:`overflowContainer`,ref:overflowContainer,class:`topbar-overflow-container`,"use-bindings-only":``,"show-bindings":showTabBindings.value},{default:withCtx(()=>[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(items$2),item=>(openBlock(),createBlock(TopBarItem_default,{key:item.id,icon:item.icon,label:item.label,onClick:$event=>onItemClicked(item)},null,8,[`icon`,`label`,`onClick`]))),128))]),_:1},8,[`show-bindings`]),[[vShow,unref(items$2).length>0]])]),createBaseVNode(`div`,{ref_key:`pauseButtonTarget`,ref:pauseButtonTarget,class:`topbar-section topbar-right`},null,512)])),[[vShow,unref(visible)],[unref(BngBlur_default)]])}},TopBar_default=__plugin_vue_export_helper_default(_sfc_main$4,[[`__scopeId`,`data-v-c4d95c66`]]),_sfc_main$3={__name:`Popup`,props:{type:{type:String,default:`default`,validator:val=>[`default`,`activity`].includes(val)}},setup(__props){let props=__props,popups=computed(()=>popupsView[props.type===`default`?`popups`:`activities`]),popupsWrapper=computed(()=>popupsView[props.type===`default`?`popupsWrapper`:`activitiesWrapper`]),wrapper=ref(),innerWrapper=ref(),shown=reactive({wrapper:!1,popups:!1}),tmr;watch(()=>!!popups.value,cur=>{if(cur===shown.wrapper)return;let body=document.body;cur&&popupsWrapper.value.fade?body.classList.add(`popup-all-hide`):body.classList.remove(`popup-all-hide`),tmr&&clearTimeout(tmr),cur?(shown.wrapper=!0,nextTick(()=>{props.type===`default`&&wrapper.value&&typeof wrapper.value.showModal==`function`&&wrapper.value.showModal(),nextTick(()=>shown.popups=!0)}),popupsWrapper.value.fade&&body.classList.add(`popup-show-hide`)):tmr=setTimeout(()=>{tmr=null,!popups.value&&(body.classList.remove(`popup-show-hide`),shown.popups=!1,shown.wrapper=!1,nextTick(()=>priorityFocus()))},200)});function handleUINavEvents(event){console.log(`POPUP handleUINavEvents stopPropagation`,event),event.stopPropagation()}return(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[shown.wrapper?withDirectives((openBlock(),createBlock(resolveDynamicComponent(__props.type===`default`?`dialog`:`div`),{key:0,ref_key:`wrapper`,ref:wrapper,class:normalizeClass([`popup-wrapper`,`popup-type-${__props.type}`])},{default:withCtx(()=>[createVNode(Transition,{name:`popup-background`},{default:withCtx(()=>[shown.popups?(openBlock(),createElementBlock(`div`,{key:0,class:normalizeClass([`popup-background`,...popupsWrapper.value.style.map(name=>`background-style-`+name)])},null,2)):createCommentVNode(``,!0)]),_:1}),createVNode(TransitionGroup,{name:`popup-fade`},{default:withCtx(()=>[shown.popups?(openBlock(!0),createElementBlock(Fragment,{key:0},renderList(popups.value,popup=>(openBlock(),createElementBlock(`div`,{key:popup.id,class:normalizeClass([`popup-container`,...popup.position.map(name=>`content-position-`+name),popup.animated?`popup-animated`:`popup-notanimated`,popup.active?`popup-active`:`popup-inactive`])},[(openBlock(),createBlock(resolveDynamicComponent(popup.component.ref),mergeProps({ref_for:!0},popup.props,{popupActive:popup.active,class:[`popup-content`,popup.active?`popup-active`:`popup-inactive`],onReturn:popup.return}),null,16,[`popupActive`,`class`,`onReturn`]))],2))),128)):createCommentVNode(``,!0)]),_:1}),createBaseVNode(`div`,{ref_key:`innerWrapper`,ref:innerWrapper},null,512)]),_:1},8,[`class`])),[[unref(BngBlur_default),popupsWrapper.value.blur],[unref(BngOnUiNav_default),handleUINavEvents,`back,menu`]]):createCommentVNode(``,!0),(openBlock(),createBlock(Teleport,{to:innerWrapper.value,disabled:!innerWrapper.value},[renderSlot(_ctx.$slots,`default`,{},void 0,!0)],8,[`to`,`disabled`]))],64))}},Popup_default=__plugin_vue_export_helper_default(_sfc_main$3,[[`__scopeId`,`data-v-c0bb08d7`]]),_hoisted_1$2={class:`popover-container`},_sfc_main$2={__name:`Popover`,setup(__props){return usePopover(),(_ctx,_cache)=>(openBlock(),createElementBlock(`div`,_hoisted_1$2))}},Popover_default=__plugin_vue_export_helper_default(_sfc_main$2,[[`__scopeId`,`data-v-86205238`]]),_hoisted_1$1={class:`backgrounds-cache`},_hoisted_2=[`src`],DRIVE=8,TECH=1,_sfc_main$1={__name:`MainBackground`,setup(__props,{expose:__expose}){let bgPathResolve=(product,name,blur$1=!1)=>`images/mainmenu/${product?product+`/`:``}${name}${blur$1?`_blur`:``}.jpg`,_backgrounds={drive:Array.from({length:DRIVE},(_,i)=>bgPathResolve(`drive`,i+1)),drive_blur:Array.from({length:DRIVE},(_,i)=>bgPathResolve(`drive`,i+1,!0)),tech:Array.from({length:TECH},(_,i)=>bgPathResolve(`tech`,i+1)),tech_blur:Array.from({length:TECH},(_,i)=>bgPathResolve(`tech`,i+1,!0)),unofficial:[bgPathResolve(null,`unofficial_version`)],unofficial_blur:[bgPathResolve(null,`unofficial_version`,!0)]},backgroundId=ref(`drive`),backgrounds=computed(()=>({normal:_backgrounds[backgroundId.value],blur:_backgrounds[backgroundId.value+`_blur`]})),carousel=ref();return __expose({carousel:computed(()=>carousel.value),backgrounds:computed(()=>backgrounds.value)}),onMounted(async()=>{let isTech=await Lua_default.extensions.tech_license.isValid();backgroundId.value=isTech?`tech`:`drive`,bngApi.engineLua(`sailingTheHighSeas`,ahoy=>{backgroundId.value=ahoy?`unofficial`:isTech?`tech`:`drive`})}),(_ctx,_cache)=>(openBlock(),createElementBlock(Fragment,null,[createVNode(Slideshow_default,{class:`background-image`,ref_key:`carousel`,ref:carousel,images:backgrounds.value.normal,delay:1e4,transition:``,shuffle:``},null,8,[`images`]),(openBlock(!0),createElementBlock(Fragment,null,renderList(backgrounds.value,list=>(openBlock(),createElementBlock(`div`,_hoisted_1$1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(list,src=>(openBlock(),createElementBlock(`img`,{src:unref(getAssetURL)(src)},null,8,_hoisted_2))),256))]))),256))],64))}},MainBackground_default=__plugin_vue_export_helper_default(_sfc_main$1,[[`__scopeId`,`data-v-6c1f834b`]]),_hoisted_1={id:`vue-app-container`},_sfc_main={__name:`App`,setup(__props){let route=useRoute(),settings$1=useSettings(),bngVue$1=window.bngVue||{},apps=ref([]),appContCnt=ref(0),appTargets=computed(()=>apps.value.reduce((res,{teleport})=>({...res,[teleport]:document.getElementById(teleport.substring(1)),cnt:appContCnt.value}),{}));bngVue$1.updateAppContainer=()=>window.requestAnimationFrame(()=>appContCnt.value=++appContCnt.value%1e5);let contClickThrough=ref(!1);bngVue$1.gotoAngularState=(state=`blank`,params=void 0)=>window.angular&&window.angular.element(document.querySelector(`body`)).controller().changeAngularStateFromVue(state,params),bngVue$1.gotoGameState=(state=`ui-test`,{params=!1,tryAngularJS=!0,blankAngularJS=!0,clickThrough=!1,uiAppsShown=!1}={})=>{let a$1=history.state;if(!router_default.hasRoute(state))window.location.hash=`#/`+state,route&&(handleUiAppsMeta(route,uiAppsShown),router_default.bngUpdateMeta(route)),tryAngularJS&&bngVue$1.gotoAngularState(state,params);else{blankAngularJS&&bngVue$1.gotoAngularState(`blank`);let newroute=router_default.resolve({name:state,params});handleUiAppsMeta(newroute,uiAppsShown),newroute.name===route.name&&router_default.bngUpdateMeta(route),window.location.hash=newroute.href,router_default.replace({name:state,params})}history.replaceState(a$1,``,window.location.toString()),contClickThrough.value=clickThrough};function handleUiAppsMeta(route$1,uiAppsShown){route$1.meta?route$1.meta.uiApps||(route$1.meta.uiApps={}):route$1.meta={uiApps:{}},typeof route$1.meta.uiApps.shown!=`boolean`&&(route$1.meta.uiApps.shown=uiAppsShown)}bngVue$1.getCurrentRoute=()=>router_default.currentRoute.value,bngVue$1.spawnApp=(appName,appId,params=null)=>spawnUiApp(appName,appId,params,apps.value),bngVue$1.destroyApp=appName=>destroyUiApp(appName,apps.value),useFocusManager();let topBar=ref();provide(`setBack`,(id,fn)=>topBar.value?.setBack(id,fn)),provide(`showTopbarTabBindings`,val=>topBar.value&&(topBar.value.showTabBindings=val)),provide(`showTopbarBackBinding`,val=>topBar.value&&(topBar.value.showBackBinding=val));let bgRequired=sysInfo_default.mainMenuBackgroundRequired,mainBackground=ref();return provide(`mainBackground`,computed(()=>mainBackground.value?.carousel)),provide(`mainBackgroundBlur`,computed(()=>mainBackground.value?.backgrounds.blur)),watch([()=>settings$1.values.uiLayoutContentAlignment,()=>settings$1.values.uiLayoutContentWidth],([alignment,width$1])=>{let rootStyle=document.documentElement.style;alignment=LAYOUT_ALIGNMENTS[alignment||`center`],width$1=width$1?`${width$1}px`:`100vw`,window.requestAnimationFrame(()=>{rootStyle.setProperty(`--layout-content-alignment`,alignment),rootStyle.setProperty(`--layout-content-width`,width$1)})},{immediate:!0}),(_ctx,_cache)=>{let _component_router_view=resolveComponent(`router-view`);return openBlock(),createElementBlock(Fragment,null,[unref(bgRequired)?(openBlock(),createBlock(MainBackground_default,{key:0,ref_key:`mainBackground`,ref:mainBackground},null,512)):createCommentVNode(``,!0),unref(route).name===`unknown`?createCommentVNode(``,!0):(openBlock(),createElementBlock(`div`,{key:1,class:normalizeClass({"vue-app-main":!0,"click-through":contClickThrough.value||unref(route).meta&&unref(route).meta.clickThrough})},[createVNode(TopBar_default,{ref_key:`topBar`,ref:topBar},null,512),createVNode(_component_router_view),createVNode(InfoBar_default)],2)),createVNode(pauseButton_default,{"teleport-to":topBar.value?.pauseButtonTarget},null,8,[`teleport-to`]),unref(route).name===`unknown`?(openBlock(),createBlock(Popup_default,{key:2,type:`activity`})):createCommentVNode(``,!0),createVNode(Popup_default,null,{default:withCtx(()=>[createVNode(Popover_default)]),_:1}),createVNode(LoadingScreen_default),createVNode(VueDebug_default),createBaseVNode(`div`,_hoisted_1,[(openBlock(!0),createElementBlock(Fragment,null,renderList(apps.value,(app$1,index)=>(openBlock(),createElementBlock(Fragment,{key:app$1.appKey},[appTargets.value[app$1.teleport]?(openBlock(),createBlock(Teleport,{key:0,to:app$1.teleport},[(openBlock(),createBlock(resolveDynamicComponent(app$1.comp),mergeProps({ref_for:!0},app$1.props),null,16))],8,[`to`])):createCommentVNode(``,!0)],64))),128))])],64)}}},App_default=__plugin_vue_export_helper_default(_sfc_main,[[`__scopeId`,`data-v-eef28b65`]]);function customDisposePlugin(context){let store$1=context.store,{$dispose,dispose:dispose$2}=store$1;store$1.$dispose=()=>{$dispose(),dispose$2&&typeof dispose$2==`function`&&dispose$2()}}window.watchdogInit=init,window.Vue=vue_esm_bundler_exports;var deps={Emitter:eventemitter3_default,beamng:window.beamng};window.bngApi&&(deps.overrideAPI=window.bngApi),setBridgeDependencies(deps);var bridge=useBridge();window.bridge=bridge,sysInfo_default.init(),initFocusVisible(),bridge.uiNavService=new UINavService(bridge.events),setUINavServiceInstance(bridge.uiNavService),bridge.uiNavService.initialize();var pinia=createPinia().use(()=>({$game:bridge})).use(customDisposePlugin),app=createApp(App_default).use(router_default).use(pinia).use(registerApps,apps_exports);useGameContextStore(),window.bngVue={start:()=>{window.vueGlobalStore||(window.vueGlobalStore=reactive({}));let globals={$game:bridge,$console:logger_default,$logger:logger_default,$simplemenu:ref(!!window.beamng?.simplemenu),$globalStore:window.vueGlobalStore},{i18n,plugin:translationPlugin$1}=initTranslation();app.use(i18n).use(translationPlugin$1());for(let[key,value]of Object.entries(globals))app.config.globalProperties[key]=value,app.provide(key,value);app.mount(`#vue-app`);let controlsStore=controls_default();window.bngVue.controls={getControllers:()=>controlsStore.controllers,getPlayers:()=>controlsStore.players,getCategories:()=>controlsStore.categories,getCategoriesList:()=>controlsStore.categoriesList,findBindingForAction:controlsStore.findBindingForAction,getActionDetails:controlsStore.getActionDetails,getBindingDetails:controlsStore.getBindingDetails,getAllBindingsForAction:controlsStore.getAllBindingsForAction,addNewBinding:controlsStore.addNewBinding,updateBinding:controlsStore.updateBinding,deleteBinding:controlsStore.deleteBinding,deleteBindings:controlsStore.deleteBindings,deviceIcon:controlsStore.deviceIcon,isFFBBound:controlsStore.isFFBBound,isFFBEnabled:controlsStore.isFFBEnabled,isFFBCapable:controlsStore.isFFBCapable,isGamepadAvailable:controlsStore.isGamepadAvailable,captureBinding:controlsStore.captureBinding,makeViewerObj:controlsStore.makeViewerObj,isControllerAvailable:controlsStore.isControllerAvailable,isControllerUsed:controlsStore.isControllerUsed,showIfController:controlsStore.showIfController,focusIfController:controlsStore.focusIfController,refreshData:()=>bridge.lua.extensions.core_input_bindings.notifyUI(`Vue exposed controls service needs the data`)},window.bngVue.uiNavTracker=useUINavTracker(),window.bngVue.topBar=useTopBar()},startTest:()=>{app.mount(`#vue-app`)},isProd:!0,icons},window.beamng||window.bngVue.start({i18n:window.i18n});
@/lua/ge/extensions/gameplay/missions/missionScreen.lua
  for _, m in ipairs(gameplay_missions_missions.get()) do
    if m.careerSetup.showInCareer and m.startTrigger.level == getCurrentLevelIdentifier() and m.startTrigger.type == "league" then
      local add = false
@/lua/ge/extensions/freeroam/vueBigMap.lua
  log("I", "", "Generating cache data for bigmap...")
  local level = getCurrentLevelIdentifier()
  for _, lvl in ipairs(core_levels.getList()) do
    if string.lower(lvl.levelName) == getCurrentLevelIdentifier() then
      gameStateInfoCache.levelData = lvl
@/lua/ge/extensions/career/modules/uiUtils.lua
  for _, lvl in ipairs(core_levels.getList()) do
    if string.lower(lvl.levelName) == getCurrentLevelIdentifier() then
      return lvl
@/lua/ge/extensions/gameplay/traffic/trafficUtils.lua
local function getLevelInfos() -- returns the level infos
  local fileName = path.getPathLevelInfo(getCurrentLevelIdentifier() or '')
  local info = jsonReadFile(fileName)
@/lua/ge/extensions/editor/crawlEditor/trails.lua
  local prefabFiles = {}
  local currentLevel = getCurrentLevelIdentifier()
      false,
      "levels/" .. getCurrentLevelIdentifier() .. "/"
    )
      false,
      "levels/" .. getCurrentLevelIdentifier() .. "/"
    )
@/lua/ge/extensions/gameplay/drag/general.lua
    stripName = dragData.stripInfo and dragData.stripInfo.stripName or "Drag Strip",
    levelName = core_levels.getLevelByName(getCurrentLevelIdentifier()).title,
    dateTime = os.date(dragData.stripInfo and dragData.stripInfo.dateFormat or "%a %m/%d/%Y %I:%M:%S %p"),
@/lua/ge/extensions/editor/trafficManager.lua

    if data.level ~= getCurrentLevelIdentifier() then -- checks if the level from the data matches the current level
      editor.showNotification("Warning, level mismatch from data ("..tostring(data.level)..").", nil, nil, 10)
      editor.showNotification("Warning, level mismatch from data ("..tostring(data.level)..").", nil, nil, 10)
      log("W", logTag, "Wrong level! Expected: "..tostring(data.level)..", Actual: "..tostring(getCurrentLevelIdentifier()))
    else
  saveData.description = session.description
  saveData.level = getCurrentLevelIdentifier()
  saveData.version = version
@/lua/ge/extensions/ui/apps/minimap/additionalInfo.lua
    for _, lvl in ipairs(core_levels.getList()) do
      if string.lower(lvl.levelName) == getCurrentLevelIdentifier() then
        locationName = translateLanguage(lvl.title, lvl.title, true)