From 4bda410dd6af6caa2dc643706998062e2884ea6e Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Thu, 29 Feb 2024 20:07:34 +0100 Subject: [PATCH] chore: update ox_inventory version 2.38.1 --- .../resources/[ox]/ox_inventory/LICENSE | 5 +- .../resources/[ox]/ox_inventory/README.md | 48 +- .../resources/[ox]/ox_inventory/client.lua | 531 +++--- .../[ox]/ox_inventory/data/animations.lua | 8 +- .../[ox]/ox_inventory/data/crafting.lua | 34 + .../[ox]/ox_inventory/data/evidence.lua | 10 +- .../[ox]/ox_inventory/data/items.lua | 135 +- .../[ox]/ox_inventory/data/vehicles.lua | 85 +- .../[ox]/ox_inventory/data/weapons.lua | 1454 +++++++++-------- .../[ox]/ox_inventory/fxmanifest.lua | 81 +- .../resources/[ox]/ox_inventory/init.lua | 272 ++- .../[ox]/ox_inventory/locales/ar.json | 2 +- .../[ox]/ox_inventory/locales/cs.json | 6 +- .../[ox]/ox_inventory/locales/da.json | 2 +- .../[ox]/ox_inventory/locales/de.json | 11 +- .../[ox]/ox_inventory/locales/el.json | 2 +- .../[ox]/ox_inventory/locales/en.json | 8 +- .../[ox]/ox_inventory/locales/es.json | 5 +- .../[ox]/ox_inventory/locales/et.json | 2 +- .../[ox]/ox_inventory/locales/fi.json | 5 +- .../[ox]/ox_inventory/locales/fr.json | 5 +- .../[ox]/ox_inventory/locales/hr.json | 2 +- .../[ox]/ox_inventory/locales/hu.json | 9 +- .../[ox]/ox_inventory/locales/id.json | 4 +- .../[ox]/ox_inventory/locales/it.json | 4 +- .../[ox]/ox_inventory/locales/lt.json | 3 + .../[ox]/ox_inventory/locales/nl.json | 3 + .../[ox]/ox_inventory/locales/no.json | 5 +- .../[ox]/ox_inventory/locales/pl.json | 3 + .../[ox]/ox_inventory/locales/sr.json | 3 + .../[ox]/ox_inventory/locales/tr.json | 22 +- .../[ox]/ox_inventory/locales/zh-cn.json | 74 +- .../[ox]/ox_inventory/locales/zh-tw.json | 6 +- .../ox_inventory/modules/bridge/client.lua | 45 +- .../modules/bridge/esx/client.lua | 36 +- .../modules/bridge/esx/server.lua | 31 +- .../ox_inventory/modules/bridge/nd/client.lua | 64 +- .../ox_inventory/modules/bridge/nd/server.lua | 161 +- .../ox_inventory/modules/bridge/ox/client.lua | 10 +- .../ox_inventory/modules/bridge/ox/server.lua | 31 +- .../ox_inventory/modules/bridge/qb/client.lua | 70 +- .../ox_inventory/modules/bridge/qb/server.lua | 46 +- .../ox_inventory/modules/bridge/server.lua | 38 +- .../ox_inventory/modules/crafting/client.lua | 101 ++ .../ox_inventory/modules/crafting/server.lua | 230 +++ .../ox_inventory/modules/hooks/server.lua | 86 +- .../ox_inventory/modules/interface/client.lua | 12 +- .../ox_inventory/modules/inventory/client.lua | 192 ++- .../ox_inventory/modules/inventory/server.lua | 927 ++++++----- .../ox_inventory/modules/items/client.lua | 34 +- .../ox_inventory/modules/items/containers.lua | 20 +- .../ox_inventory/modules/items/server.lua | 70 +- .../ox_inventory/modules/items/shared.lua | 64 +- .../ox_inventory/modules/mysql/server.lua | 319 ++-- .../ox_inventory/modules/pefcl/server.lua | 31 +- .../ox_inventory/modules/shops/client.lua | 95 +- .../ox_inventory/modules/shops/server.lua | 62 +- .../ox_inventory/modules/utils/client.lua | 126 +- .../ox_inventory/modules/utils/server.lua | 57 +- .../ox_inventory/modules/weapon/client.lua | 84 +- .../resources/[ox]/ox_inventory/server.lua | 75 +- .../[ox]/ox_inventory/setup/convert.lua | 9 +- .../[ox]/ox_inventory/web/build/LICENSE | 18 + .../web/build/assets/index-95f8e076.css | 427 ----- .../web/build/assets/index-9aba2ab3.css | 1 + .../web/build/assets/index-9fceb909.js | 894 ---------- .../web/build/assets/index-e31759b5.js | 40 + .../[ox]/ox_inventory/web/build/index.html | 33 +- 68 files changed, 3463 insertions(+), 3925 deletions(-) create mode 100644 server-data/resources/[ox]/ox_inventory/data/crafting.lua create mode 100644 server-data/resources/[ox]/ox_inventory/modules/crafting/client.lua create mode 100644 server-data/resources/[ox]/ox_inventory/modules/crafting/server.lua create mode 100644 server-data/resources/[ox]/ox_inventory/web/build/LICENSE delete mode 100644 server-data/resources/[ox]/ox_inventory/web/build/assets/index-95f8e076.css create mode 100644 server-data/resources/[ox]/ox_inventory/web/build/assets/index-9aba2ab3.css delete mode 100644 server-data/resources/[ox]/ox_inventory/web/build/assets/index-9fceb909.js create mode 100644 server-data/resources/[ox]/ox_inventory/web/build/assets/index-e31759b5.js diff --git a/server-data/resources/[ox]/ox_inventory/LICENSE b/server-data/resources/[ox]/ox_inventory/LICENSE index effa1075a..dc617bf2d 100644 --- a/server-data/resources/[ox]/ox_inventory/LICENSE +++ b/server-data/resources/[ox]/ox_inventory/LICENSE @@ -632,7 +632,10 @@ state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Ox Inventory - Copyright (C) 2021 Linden , Dunak , Luke + Copyright © 2023 Overextended (https://github.com/overextended) + Linden (https://github.com/thelindat) + Luke (https://github.com/LukeWasTakenn) + Dunak (https://github.com/dunak-debug) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/server-data/resources/[ox]/ox_inventory/README.md b/server-data/resources/[ox]/ox_inventory/README.md index 173245383..5232f70e9 100644 --- a/server-data/resources/[ox]/ox_inventory/README.md +++ b/server-data/resources/[ox]/ox_inventory/README.md @@ -1,30 +1,33 @@ -
-

Read the documentation for setup, installation, and integration

+
+

Documentation

-# Framework +## Config -The inventory was designed with the intention to move towards a more generic / standalone structure so it can be integrated into any framework without too much hassle. I will be writing a guide for manually setting up support _sometime soon™_. In the mean-time, it will work without any alterations if using the latest updates to **[ESX Legacy](https://github.com/esx-framework/esx-legacy)**. +Resource configuration is handled using convars. Refer to the documentation for more information. -Experimental support for [qb-core](https://github.com/qbcore-framework/qb-core) has been added, but requires a recent installation. Do not expect 100% compatibility or support. +## Framework -# Config +The inventory was designed with limited reliability on frameworks, preferring frameworks _designed to use ox_inventory_. A framework is still necessary for handling certain features such as -Refer to the [documentation](https://overextended.github.io/docs/ox_inventory/) setting your config. -When set, you can add the following to your 'server.cfg' +- Loading player inventories. +- Owned vehicles. +- Licenses. +- Group/job systems. -``` -exec @ox_inventory/config.cfg -ensure ox_inventory -``` +Compatibility for frameworks is handled in the "bridge" module, and by default includes -# Logging +- [ox_core](https://github.com/overextended/ox_core) +- [es_extended](https://github.com/esx-framework/esx_core) +- [qbx-core](https://github.com/Qbox-project/qbx_core) or [qb-core](https://github.com/qbcore-framework/qb-core) +- [nd_core](https://github.com/ND-Framework/ND_Core) -The included logging module utilises datadog to store logging data, which can be expanded for improved analytics and metrics. Register an account at [datadoghq](https://www.datadoghq.com/). -The _free plan_ is enough for most user's purposes and provides far more utility than the typical weird discord logs utilised in other resources. +Do not expect 100% compatibility or support for third party frameworks. -Once you have registered, generate an API key and add `set datadog:key 'apikey'` to your server config. +## Features -# Features +## Logging + +Logging is built-in using ox_lib's [logger](https://overextended.dev/ox_lib/Modules/Logger/Server#liblogger) module, using Datadog or Grafana Loki. Discord is not and will not be supported. ### Shops @@ -57,11 +60,18 @@ Once you have registered, generate an API key and add `set datadog:key 'apikey'`

Discord Server


- +

Legal Notices

License

Ox Inventory -Copyright © 2022 [Linden](https://github.com/thelindat), [Dunak](https://github.com/dunak-debug), [Luke](https://github.com/LukeWasTakenn) + +Copyright © 2023 Overextended (https://github.com/overextended) + +Linden (https://github.com/thelindat) + +Luke (https://github.com/LukeWasTakenn) + +Dunak (https://github.com/dunak-debug) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/server-data/resources/[ox]/ox_inventory/client.lua b/server-data/resources/[ox]/ox_inventory/client.lua index 30f122a99..a1f161212 100644 --- a/server-data/resources/[ox]/ox_inventory/client.lua +++ b/server-data/resources/[ox]/ox_inventory/client.lua @@ -41,16 +41,28 @@ end) plyState:set('invBusy', true, false) plyState:set('invHotkeys', false, false) +plyState:set('canUseWeapons', false, false) local function canOpenInventory() - return PlayerData.loaded - and not invBusy - and not PlayerData.dead - and invOpen ~= nil - and (not currentWeapon or currentWeapon.timer == 0) - and not IsPedCuffed(playerPed) - and not IsPauseMenuActive() - and not IsPedFatallyInjured(playerPed) + if not PlayerData.loaded then + return shared.info('cannot open inventory', '(is not loaded)') + end + + if IsPauseMenuActive() then return end + + if invBusy or invOpen == nil or (currentWeapon and currentWeapon.timer ~= 0) then + return shared.info('cannot open inventory', '(is busy)') + end + + if PlayerData.dead or IsPedFatallyInjured(playerPed) then + return shared.info('cannot open inventory', '(fatal injury)') + end + + if PlayerData.cuffed or IsPedCuffed(playerPed) then + return shared.info('cannot open inventory', '(cuffed)') + end + + return true end ---@param ped number @@ -97,6 +109,10 @@ local function closeTrunk() end end +local CraftingBenches = require 'modules.crafting.client' +local Vehicles = lib.load('data.vehicles') +local Inventory = require 'modules.inventory.client' + ---@param inv string? ---@param data any? ---@return boolean? @@ -125,12 +141,14 @@ function client.openInventory(inv, data) end end elseif IsNuiFocused() then - -- If triggering event from another nui such as qtarget, may need to wait for focus to end + -- If triggering from another nui, may need to wait for focus to end. Wait(100) - if IsNuiFocused() then - warn('other scripts have nui focus and may cause issues (e.g. disable focus, prevent input, overlap inventory window)') - end + -- People still complain about this being an "error" and ask "how fix" despite being a warning + -- for people with above room-temperature iqs to look into resource conflicts on their own. + -- if IsNuiFocused() then + -- warn('other scripts have nui focus and may cause issues (e.g. disable focus, prevent input, overlap inventory window)') + -- end end if inv == 'dumpster' and cache.vehicle then @@ -140,7 +158,7 @@ function client.openInventory(inv, data) if canOpenInventory() then local left, right - if inv == 'player' then + if inv == 'player' and data ~= cache.serverId then local targetId, targetPed if not data then @@ -168,22 +186,50 @@ function client.openInventory(inv, data) end left, right = lib.callback.await('ox_inventory:openShop', 200, data) + elseif inv == 'crafting' then + if cache.vehicle then + return lib.notify({ id = 'cannot_perform', type = 'error', description = locale('cannot_perform') }) + end - elseif invOpen ~= nil then - if inv == 'policeevidence' then - local input = lib.inputDialog(locale('police_evidence'), {locale('locker_number')}) --[[@as any]] + left = lib.callback.await('ox_inventory:openCraftingBench', 200, data.id, data.index) - if input then - input = tonumber(input[1]) - else - return lib.notify({ description = locale('locker_no_value'), type = 'error' }) - end + if left then + right = CraftingBenches[data.id] + + if not right?.items then return end + + local coords, distance - if type(input) ~= 'number' then - return lib.notify({ description = locale('locker_must_number'), type = 'error' }) + if not right.zones and not right.points then + coords = GetEntityCoords(cache.ped) + distance = 2 else - data = input + coords = shared.target and right.zones and right.zones[data.index].coords or right.points and right.points[data.index] + distance = coords and shared.target and right.zones[data.index].distance or 2 end + + right = { + type = 'crafting', + id = data.id, + label = right.label or locale('crafting_bench'), + index = data.index, + slots = right.slots, + items = right.items, + coords = coords, + distance = distance + } + end + elseif invOpen ~= nil then + if inv == 'policeevidence' then + if not data then + local input = lib.inputDialog(locale('police_evidence'), { + { label = locale('locker_number'), type = 'number', required = true, icon = 'calculator' } + }) --[[@as number[]? ]] + + if not input then return end + + data = input[1] + end end left, right = lib.callback.await('ox_inventory:openInventory', false, inv, data) @@ -223,6 +269,29 @@ function client.openInventory(inv, data) currentInventory.coords = GetEntityCoords(playerPed) end + if inv == 'trunk' then + SetTimeout(200, function() + ---@todo animation for vans? + Utils.PlayAnim(0, 'anim@heists@prison_heiststation@cop_reactions', 'cop_b_idle', 3.0, 3.0, -1, 49, 0.0, 0, 0, 0) + + local entity = data.entity or NetworkGetEntityFromNetworkId(data.netid) + currentInventory.entity = entity + currentInventory.door = data.door + + if not currentInventory.door then + local vehicleHash = GetEntityModel(entity) + local vehicleClass = GetVehicleClass(entity) + currentInventory.door = vehicleClass == 12 and { 2, 3 } or Vehicles.Storage[vehicleHash] and 4 or 5 + end + + while currentInventory?.entity == entity and invOpen and DoesEntityExist(entity) and Inventory.CanAccessTrunk(entity) do + Wait(100) + end + + if invOpen then client.closeInventory() end + end) + end + -- Stash exists (useful for custom stashes) return true else @@ -231,7 +300,7 @@ function client.openInventory(inv, data) if invOpen == false then lib.notify({ id = 'inventory_right_access', type = 'error', description = locale('inventory_right_access') }) end if invOpen then client.closeInventory() end end - elseif invBusy then lib.notify({ id = 'inventory_player_access', type = 'error', description = locale('inventory_player_access') }) end + else lib.notify({ id = 'inventory_player_access', type = 'error', description = locale('inventory_player_access') }) end end RegisterNetEvent('ox_inventory:openInventory', client.openInventory) @@ -263,17 +332,18 @@ RegisterNetEvent('ox_inventory:forceOpenInventory', function(left, right) }) end) -local Animations = data 'animations' +local Animations = lib.load('data.animations') local Items = require 'modules.items.client' +local usingItem = false +---@param data { name: string, label: string, count: number, slot: number, metadata: table, weight: number } lib.callback.register('ox_inventory:usingItem', function(data) local item = Items[data.name] - if item and invBusy then + if item and usingItem then if not item.client then return true end ---@cast item +OxClientProps item = item.client - plyState.invBusy = true if type(item.anim) == 'string' then item.anim = Animations.anim[item.anim] @@ -331,7 +401,8 @@ end) local function canUseItem(isAmmo) local ped = cache.ped - return (not isAmmo or currentWeapon) + return not usingItem + and (not isAmmo or currentWeapon) and PlayerData.loaded and not PlayerData.dead and not invBusy @@ -341,36 +412,40 @@ local function canUseItem(isAmmo) end ---@param data table ----@param cb function? +---@param cb fun(response: SlotWithItem | false)? local function useItem(data, cb) - if invOpen and data.close then client.closeInventory() end local slotData, result = PlayerData.inventory[data.slot] - if canUseItem(data.ammo and true) then - if currentWeapon and currentWeapon?.timer > 100 then return end + if not slotData or not canUseItem(data.ammo and true) then return end - plyState.invBusy = true - result = lib.callback.await('ox_inventory:useItem', 200, data.name, data.slot, slotData.metadata) + if currentWeapon?.timer and currentWeapon.timer > 100 then return end - if not result then - Wait(500) - plyState.invBusy = false - return - end - end + if invOpen and data.close then client.closeInventory() end + + usingItem = true + ---@type boolean? + result = lib.callback.await('ox_inventory:useItem', 200, data.name, data.slot, slotData.metadata) - if cb then + if result and cb then local success, response = pcall(cb, result and slotData) if not success and response then - print(('^1An error occurred while calling item "%s" callback!\n^1SCRIPT ERROR: %s^0'):format(slotData.name, response)) + warn(('^1An error occurred while calling item "%s" callback!\n^1SCRIPT ERROR: %s^0'):format(slotData.name, response)) end end + if result then + TriggerEvent('ox_inventory:usedItem', slotData.name, slotData.slot, next(slotData.metadata) and slotData.metadata) + end + Wait(500) - plyState.invBusy = false + usingItem = false end +AddEventHandler('ox_inventory:usedItem', function(name, slot, metadata) + TriggerServerEvent('ox_inventory:usedItemInternal', slot) +end) + AddEventHandler('ox_inventory:item', useItem) exports('useItem', useItem) @@ -420,7 +495,7 @@ local function useSlot(slot) if data.effect then data:effect({name = item.name, slot = item.slot, metadata = item.metadata}) elseif data.weapon then - if EnableWeaponWheel then return end + if EnableWeaponWheel or not plyState.canUseWeapons then return end if IsCinematicCamRendering() then SetCinematicModeActive(false) end @@ -431,11 +506,21 @@ local function useSlot(slot) if weaponSlot == data.slot then return end end + GiveWeaponToPed(playerPed, data.hash, 0, false, true) + SetCurrentPedWeapon(playerPed, data.hash, false) + + if data.hash ~= GetSelectedPedWeapon(playerPed) then + return lib.notify({ type = 'error', description = locale('cannot_use', data.label) }) + end + + RemoveWeaponFromPed(cache.ped, data.hash) + useItem(data, function(result) if result then - currentWeapon = Weapon.Equip(item, data) + local sleep + currentWeapon, sleep = Weapon.Equip(item, data) - if client.weaponanims then Wait(500) end + if sleep then Wait(sleep) end end end) elseif currentWeapon then @@ -526,6 +611,9 @@ local function useSlot(slot) end) elseif data.component then local components = data.client.component + + if not components then return end + local componentType = data.type local weaponComponents = PlayerData.inventory[currentWeapon.slot].metadata.components @@ -549,6 +637,7 @@ local function useSlot(slot) if success then GiveWeaponComponentToPed(playerPed, currentWeapon.hash, component) + TriggerEvent('ox_inventory:updateWeaponComponent', 'added', component, data.name) end end end) @@ -589,8 +678,6 @@ exports('openNearbyInventory', openNearbyInventory) local currentInstance local playerCoords -local table = lib.table -local Inventory = require 'modules.inventory.client' local Shops = require 'modules.shops.client' ---@todo remove or replace when the bridge module gets restructured @@ -618,15 +705,13 @@ local invHotkeys = false local function registerCommands() RegisterCommand('steal', openNearbyInventory, false) - local Vehicles = data 'vehicles' - local function openGlovebox(vehicle) if not IsPedInAnyVehicle(playerPed, false) or not NetworkGetEntityIsNetworked(vehicle) then return end local vehicleHash = GetEntityModel(vehicle) local vehicleClass = GetVehicleClass(vehicle) local checkVehicle = Vehicles.Storage[vehicleHash] - + -- No storage or no glovebox if (checkVehicle == 0 or checkVehicle == 2) or (not Vehicles.glovebox[vehicleClass] and not Vehicles.glovebox.models[vehicleHash]) then return end @@ -637,7 +722,7 @@ local function registerCommands() end end - lib.addKeybind({ + local primary = lib.addKeybind({ name = 'inv', description = locale('open_player_inventory'), defaultKey = client.keys[1], @@ -668,16 +753,16 @@ local function registerCommands() name = 'inv2', description = locale('open_secondary_inventory'), defaultKey = client.keys[2], - onPressed = function() + onPressed = function(self) + if primary:getCurrentKey() == self:getCurrentKey() then + return warn(("secondary inventory keybind '%s' disabled (keybind cannot match primary inventory keybind)"):format(self:getCurrentKey())) + end + if invOpen then return client.closeInventory() end - if invBusy then - return lib.notify({ id = 'inventory_player_access', type = 'error', description = locale('inventory_player_access') }) - end - - if not canOpenInventory() then + if invBusy or not canOpenInventory() then return lib.notify({ id = 'inventory_player_access', type = 'error', description = locale('inventory_player_access') }) end @@ -703,84 +788,7 @@ local function registerCommands() if entityType ~= 2 then return end - local position = GetEntityCoords(entity) - - if #(playerCoords - position) > 7 or GetVehiclePedIsEntering(playerPed) ~= 0 or not NetworkGetEntityIsNetworked(entity) then return end - - local vehicleHash = GetEntityModel(entity) - local vehicleClass = GetVehicleClass(entity) - local checkVehicle = Vehicles.Storage[vehicleHash] - - local netId = VehToNet(entity) - local isTrailer = lib.callback.await('ox_inventory:isVehicleATrailer', false, netId) - - -- No storage or no glovebox - if (checkVehicle == 0 or checkVehicle == 1) or (not Vehicles.trunk[vehicleClass] and not Vehicles.trunk.models[vehicleHash]) then return end - - if GetVehicleDoorLockStatus(entity) > 1 then - return lib.notify({ id = 'vehicle_locked', type = 'error', description = locale('vehicle_locked') }) - end - - local door, vehBone - - if checkVehicle == nil then -- No data, normal trunk - if isTrailer then - door, vehBone = 5, GetEntityBoneIndexByName(entity, 'wheel_rr') - else - door, vehBone = 5, GetEntityBoneIndexByName(entity, 'boot') - end - elseif checkVehicle == 3 then -- Trunk in hood - door, vehBone = 4, GetEntityBoneIndexByName(entity, 'bonnet') - else -- No storage or no trunk - return - end - - if vehBone == -1 then - if vehicleClass == 12 then - door = { 2, 3 } - end - - vehBone = GetEntityBoneIndexByName(entity, Vehicles.trunk.boneIndex[vehicleHash] or 'platelight') - end - - position = GetWorldPositionOfEntityBone(entity, vehBone) - - if #(playerCoords - position) < 3 and door then - local plate = GetVehicleNumberPlateText(entity) - local invId = 'trunk'..plate - - TaskTurnPedToFaceCoord(playerPed, position.x, position.y, position.z, 0) - - if not client.openInventory('trunk', { id = invId, netid = NetworkGetNetworkIdFromEntity(entity) }) then return end - - if type(door) == 'table' then - for i = 1, #door do - SetVehicleDoorOpen(entity, door[i], false, false) - end - else - SetVehicleDoorOpen(entity, door, false, false) - end - - Wait(200) - ---@todo animation for vans? - Utils.PlayAnim(0, 'anim@heists@prison_heiststation@cop_reactions', 'cop_b_idle', 3.0, 3.0, -1, 49, 0.0, 0, 0, 0) - currentInventory.entity = entity - currentInventory.door = door - - repeat - Wait(50) - - position = GetWorldPositionOfEntityBone(entity, vehBone) - - if #(GetEntityCoords(playerPed) - position) >= 3 or not DoesEntityExist(entity) then - break - end - - TaskTurnPedToFaceCoord(playerPed, position.x, position.y, position.z, 0) - until currentInventory?.entity ~= entity or not invOpen - - if invOpen then client.closeInventory() end - end + Inventory.OpenTrunk(entity) end }) @@ -861,9 +869,10 @@ RegisterNetEvent('ox_inventory:closeInventory', client.closeInventory) exports('closeInventory', client.closeInventory) ---@param data updateSlot[] ----@param weight number | table +---@param weight number local function updateInventory(data, weight) local changes = {} + ---@type table local itemCount = {} for i = 1, #data do @@ -873,14 +882,18 @@ local function updateInventory(data, weight) v.inventory = 'player' local item = v.item - if currentWeapon?.slot == item?.slot and item.metadata then - currentWeapon.metadata = item.metadata - TriggerEvent('ox_inventory:currentWeapon', currentWeapon) + if currentWeapon?.slot == item?.slot then + if item.metadata then + currentWeapon.metadata = item.metadata + TriggerEvent('ox_inventory:currentWeapon', currentWeapon) + else + currentWeapon = Weapon.Disarm(currentWeapon, true) + end end local curItem = PlayerData.inventory[item.slot] - if curItem?.name then + if curItem and curItem.name then itemCount[curItem.name] = (itemCount[curItem.name] or 0) - curItem.count end @@ -895,40 +908,35 @@ local function updateInventory(data, weight) end SendNUIMessage({ action = 'refreshSlots', data = { items = data, itemCount = itemCount} }) - client.setPlayerData('weight', type(weight) == 'number' and weight or weight.left) - for item, count in pairs(itemCount) do - local data = Items[item] + if weight ~= PlayerData.weight then client.setPlayerData('weight', weight) end - if count < 0 then - if currentWeapon and not currentWeapon.throwable and currentWeapon.slot == data.slot then - currentWeapon = Weapon.Disarm(currentWeapon) - end + for itemName, count in pairs(itemCount) do + local item = Items(itemName) - data.count += count + if item then + item.count += count - if shared.framework == 'esx' then - TriggerEvent('esx:removeInventoryItem', data.name, data.count) - else - TriggerEvent('ox_inventory:itemCount', data.name, data.count) - end + TriggerEvent('ox_inventory:itemCount', item.name, item.count) - if data.client?.remove then - data.client.remove(data.count) - end - elseif count > 0 then - data.count += count + if count < 0 then + if shared.framework == 'esx' then + TriggerEvent('esx:removeInventoryItem', item.name, item.count) + end - if shared.framework == 'esx' then - TriggerEvent('esx:addInventoryItem', data.name, data.count) - else - TriggerEvent('ox_inventory:itemCount', data.name, data.count) - end + if item.client?.remove then + item.client.remove(item.count) + end + elseif count > 0 then + if shared.framework == 'esx' then + TriggerEvent('esx:addInventoryItem', item.name, item.count) + end - if data.client?.add then - data.client.add(data.count) - end - end + if item.client?.add then + item.client.add(item.count) + end + end + end end client.setPlayerData('inventory', PlayerData.inventory) @@ -953,7 +961,7 @@ RegisterNetEvent('ox_inventory:inventoryReturned', function(data) items[num] = { item = slotData, inventory = cache.serverId } end - updateInventory(items, { left = data[3] }) + updateInventory(items, data[3]) end) RegisterNetEvent('ox_inventory:inventoryConfiscated', function(message) @@ -970,7 +978,7 @@ RegisterNetEvent('ox_inventory:inventoryConfiscated', function(message) items[num] = { item = { slot = slot }, inventory = cache.serverId } end - updateInventory(items, { left = 0 }) + updateInventory(items, 0) end) @@ -1065,8 +1073,6 @@ RegisterNetEvent('ox_inventory:removeDrop', function(dropId) end end) -local uiLoaded = false - ---@type function? local function setStateBagHandler(stateId) AddStateBagChangeHandler('invOpen', stateId, function(_, _, value) @@ -1077,6 +1083,12 @@ local function setStateBagHandler(stateId) invBusy = value end) + AddStateBagChangeHandler('canUseWeapons', stateId, function(_, _, value) + if not value and currentWeapon then + currentWeapon = Weapon.Disarm(currentWeapon) + end + end) + AddStateBagChangeHandler('instance', stateId, function(_, _, value) currentInstance = value @@ -1122,8 +1134,8 @@ lib.onCache('seat', function(seat) Utils.WeaponWheel(false) end) -lib.onCache('vehicle', function(vehicle) - if invOpen and currentInventory.entity == cache.vehicle then +lib.onCache('vehicle', function() + if invOpen and (not currentInventory.entity or currentInventory.entity == cache.vehicle) then return client.closeInventory() end end) @@ -1131,9 +1143,13 @@ end) RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inventory, weight, player) if source == '' then return end + ---@class PlayerData + ---@field inventory table + ---@field weight number PlayerData = player PlayerData.id = cache.playerId PlayerData.source = cache.serverId + PlayerData.maxWeight = shared.playerweight setmetatable(PlayerData, { __index = function(self, key) @@ -1244,7 +1260,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven end end - for id, data in pairs(data('licenses')) do + for id, data in pairs(lib.load('data.licenses')) do lib.points.new({ coords = data.coords, distance = 16, @@ -1257,7 +1273,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven }) end - while not uiLoaded do Wait(50) end + while not client.uiLoaded do Wait(50) end SendNUIMessage({ action = 'init', @@ -1387,7 +1403,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven DisableControlAction(0, 36, true) end - if invBusy == true or IsPedCuffed(playerPed) then + if usingItem or invBusy == true or IsPedCuffed(playerPed) then DisablePlayerFiring(playerId, true) end @@ -1492,6 +1508,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven plyState:set('invBusy', false, false) plyState:set('invOpen', false, false) plyState:set('invHotkeys', true, false) + plyState:set('canUseWeapons', true, false) collectgarbage('collect') end) @@ -1501,27 +1518,35 @@ AddEventHandler('onResourceStop', function(resourceName) end end) -RegisterNetEvent('ox_inventory:viewInventory', function(data) - if data and invOpen == false then - data.type = 'admin' - plyState.invOpen = true - currentInventory = data - currentInventory.ignoreSecurityChecks = true - - SendNUIMessage({ - action = 'setupInventory', - data = { - rightInventory = currentInventory, - } - }) - SetNuiFocus(true, true) +RegisterNetEvent('ox_inventory:viewInventory', function(left, right) + if source == '' then return end - if client.screenblur then TriggerScreenblurFadeIn(0) end - end + plyState.invOpen = true + + SetInterval(client.interval, 100) + SetNuiFocus(true, true) + SetNuiFocusKeepInput(true) + closeTrunk() + + if client.screenblur then TriggerScreenblurFadeIn(0) end + + currentInventory = right or defaultInventory + currentInventory.ignoreSecurityChecks = true + currentInventory.type = 'inspect' + left.items = PlayerData.inventory + left.groups = PlayerData.groups + + SendNUIMessage({ + action = 'setupInventory', + data = { + leftInventory = left, + rightInventory = currentInventory + } + }) end) RegisterNUICallback('uiLoaded', function(_, cb) - uiLoaded = true + client.uiLoaded = true cb(1) end) @@ -1542,6 +1567,8 @@ RegisterNUICallback('removeComponent', function(data, cb) local itemSlot = PlayerData.inventory[currentWeapon.slot] + if not itemSlot then return end + for _, component in pairs(Items[data.component].client.component) do if HasPedGotWeaponComponent(playerPed, currentWeapon.hash, component) then for k, v in pairs(itemSlot.metadata.components) do @@ -1550,6 +1577,7 @@ RegisterNUICallback('removeComponent', function(data, cb) if success then RemoveWeaponComponentFromPed(playerPed, currentWeapon.hash, component) + TriggerEvent('ox_inventory:updateWeaponComponent', 'removed', component, data.component) end break @@ -1577,66 +1605,94 @@ RegisterNUICallback('useItem', function(slot, cb) cb(1) end) +local function giveItemToTarget(serverId, slotId, count) + if type(slotId) ~= 'number' then return TypeError('slotId', 'number', type(slotId)) end + if count and type(count) ~= 'number' then return TypeError('count', 'number', type(count)) end + + if slotId == currentWeapon?.slot then + currentWeapon = Weapon.Disarm(currentWeapon) + end + + Utils.PlayAnim(0, 'mp_common', 'givetake1_a', 1.0, 1.0, 2000, 50, 0.0, 0, 0, 0) + TriggerServerEvent('ox_inventory:giveItem', slotId, serverId, count or 0) +end + +exports('giveItemToTarget', giveItemToTarget) + +local function isGiveTargetValid(ped, coords) + if cache.vehicle and GetVehiclePedIsIn(ped, false) == cache.vehicle then + return true + end + + local entity = Utils.Raycast(1|2|4|8|16, coords + vec3(0, 0, 0.5), 0.2) + + return entity == ped and IsEntityVisible(ped) +end + RegisterNUICallback('giveItem', function(data, cb) cb(1) - local target if client.giveplayerlist then - local nearbyPlayers, n = lib.getNearbyPlayers(GetEntityCoords(playerPed), 2.0), 0 + local nearbyPlayers = lib.getNearbyPlayers(GetEntityCoords(playerPed), 3.0) + local nearbyCount = #nearbyPlayers + + if nearbyCount == 0 then return end - if #nearbyPlayers == 0 then return end + if nearbyCount == 1 then + local option = nearbyPlayers[1] + + if not isGiveTargetValid(option.ped, option.coords) then return end + + return giveItemToTarget(GetPlayerServerId(option.id), data.slot, data.count) + end + + local giveList, n = {}, 0 for i = 1, #nearbyPlayers do local option = nearbyPlayers[i] - local ped = GetPlayerPed(option.id) - if ped > 0 and IsEntityVisible(ped) then + if isGiveTargetValid(option.ped, option.coords) then local playerName = GetPlayerName(option.id) option.id = GetPlayerServerId(option.id) + ---@diagnostic disable-next-line: inject-field option.label = ('[%s] %s'):format(option.id, playerName) n += 1 - nearbyPlayers[n] = option + giveList[n] = option end end - local p = promise.new() + if n == 0 then return end lib.registerMenu({ id = 'ox_inventory:givePlayerList', title = 'Give item', - options = nearbyPlayers, - onClose = function() p:resolve() end, - }, function(selected) p:resolve(selected and nearbyPlayers[selected].id) end) + options = giveList, + }, function(selected) + giveItemToTarget(giveList[selected].id, data.slot, data.count) + end) - lib.showMenu('ox_inventory:givePlayerList') + return lib.showMenu('ox_inventory:givePlayerList') + end - target = Citizen.Await(p) - elseif cache.vehicle then + if cache.vehicle then local seats = GetVehicleMaxNumberOfPassengers(cache.vehicle) - 1 if seats >= 0 then local passenger = GetPedInVehicleSeat(cache.vehicle, cache.seat - 2 * (cache.seat % 2) + 1) if passenger ~= 0 and IsEntityVisible(passenger) then - target = GetPlayerServerId(NetworkGetPlayerIndexFromPed(passenger)) + return giveItemToTarget(GetPlayerServerId(NetworkGetPlayerIndexFromPed(passenger)), data.slot, data.count) end end - else - local entity = Utils.Raycast(12) - if entity and IsPedAPlayer(entity) and IsEntityVisible(entity) and #(GetEntityCoords(playerPed, true) - GetEntityCoords(entity, true)) < 2.0 then - target = GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity)) - Utils.PlayAnim(0, 'mp_common', 'givetake1_a', 1.0, 1.0, 2000, 50, 0.0, 0, 0, 0) - end + return end - if target then - if data.slot == currentWeapon?.slot then - currentWeapon = Weapon.Disarm(currentWeapon) - end + local entity = Utils.Raycast(1|2|4|8|16, GetOffsetFromEntityInWorldCoords(cache.ped, 0.0, 3.0, 0.5), 0.2) - TriggerServerEvent('ox_inventory:giveItem', data.slot, target, data.count) - end + if entity and IsPedAPlayer(entity) and IsEntityVisible(entity) and #(GetEntityCoords(playerPed, true) - GetEntityCoords(entity, true)) < 3.0 then + return giveItemToTarget(GetPlayerServerId(NetworkGetPlayerIndexFromPed(entity)), data.slot, data.count) + end end) RegisterNUICallback('useButton', function(data, cb) @@ -1649,8 +1705,32 @@ RegisterNUICallback('exit', function(_, cb) cb(1) end) +lib.callback.register('ox_inventory:startCrafting', function(id, recipe) + recipe = CraftingBenches[id].items[recipe] + + return lib.progressCircle({ + label = locale('crafting_item', recipe.metadata?.label or Items[recipe.name].label), + duration = recipe.duration or 3000, + canCancel = true, + disable = { + move = true, + combat = true, + }, + anim = { + dict = 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', + clip = 'machinic_loop_mechandplayer', + } + }) +end) + +local swapActive = false + ---Synchronise and validate all item movement between the NUI and server. RegisterNUICallback('swapItems', function(data, cb) + if swapActive or not invOpen or invBusy or usingItem then return cb(false) end + + swapActive = true + if data.toType == 'newdrop' then if cache.vehicle or IsPedFalling(playerPed) then return cb(false) end @@ -1688,15 +1768,16 @@ RegisterNUICallback('swapItems', function(data, cb) end local success, response, weaponSlot = lib.callback.await('ox_inventory:swapItems', false, data) + swapActive = false cb(success or false) if success then - if response then - if weaponSlot and currentWeapon then - currentWeapon.slot = weaponSlot - end + if weaponSlot and currentWeapon then + currentWeapon.slot = weaponSlot + end + if response then updateInventory(response.items, response.weight) end elseif response then diff --git a/server-data/resources/[ox]/ox_inventory/data/animations.lua b/server-data/resources/[ox]/ox_inventory/data/animations.lua index 172d9781a..acc24b743 100644 --- a/server-data/resources/[ox]/ox_inventory/data/animations.lua +++ b/server-data/resources/[ox]/ox_inventory/data/animations.lua @@ -1,8 +1,8 @@ return { anim = { - ["eating"] = { dict = "mp_player_inteat@burger", clip = "mp_player_int_eat_burger_fp" }, + ['eating'] = { dict = 'mp_player_inteat@burger', clip = 'mp_player_int_eat_burger_fp' }, }, prop = { - ["burger"] = { model = `prop_cs_burger_01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) }, - }, -} + ['burger'] = { model = `prop_cs_burger_01`, pos = vec3(0.02, 0.02, -0.02), rot = vec3(0.0, 0.0, 0.0) }, + } +} \ No newline at end of file diff --git a/server-data/resources/[ox]/ox_inventory/data/crafting.lua b/server-data/resources/[ox]/ox_inventory/data/crafting.lua new file mode 100644 index 000000000..0044e6548 --- /dev/null +++ b/server-data/resources/[ox]/ox_inventory/data/crafting.lua @@ -0,0 +1,34 @@ +return { + { + items = { + { + name = 'lockpick', + ingredients = { + scrapmetal = 5, + WEAPON_HAMMER = 0.05 + }, + duration = 5000, + count = 2, + }, + }, + points = { + vec3(-1147.083008, -2002.662109, 13.180260), + vec3(-345.374969, -130.687088, 39.009613) + }, + zones = { + { + coords = vec3(-1146.2, -2002.05, 13.2), + size = vec3(3.8, 1.05, 0.15), + distance = 1.5, + rotation = 315.0, + }, + { + coords = vec3(-346.1, -130.45, 39.0), + size = vec3(3.8, 1.05, 0.15), + distance = 1.5, + rotation = 70.0, + }, + }, + blip = { id = 566, colour = 31, scale = 0.8 }, + }, +} diff --git a/server-data/resources/[ox]/ox_inventory/data/evidence.lua b/server-data/resources/[ox]/ox_inventory/data/evidence.lua index 53d337a27..a0e84da9c 100644 --- a/server-data/resources/[ox]/ox_inventory/data/evidence.lua +++ b/server-data/resources/[ox]/ox_inventory/data/evidence.lua @@ -2,13 +2,13 @@ return { { coords = vec3(458.97, -982.79, 30.68), target = { -- qtarget support - name = "mrpd_evidence", -- name of zone must be uniuqe + name = 'mrpd_evidence', -- name of zone must be uniuqe loc = vec3(459.07, -984.07, 30.69), length = 1.4, width = 3.2, heading = 0, minZ = 29.09, - maxZ = 31.89, - }, - }, -} + maxZ = 31.89 + } + } +} \ No newline at end of file diff --git a/server-data/resources/[ox]/ox_inventory/data/items.lua b/server-data/resources/[ox]/ox_inventory/data/items.lua index b2d17f2f6..9ec1f429d 100644 --- a/server-data/resources/[ox]/ox_inventory/data/items.lua +++ b/server-data/resources/[ox]/ox_inventory/data/items.lua @@ -584,4 +584,137 @@ return { stack = true, close = true, }, -} + + ["alive_chicken"] = { + label = "Living chicken", + weight = 1, + stack = true, + close = true, + }, + + ["blowpipe"] = { + label = "Blowtorch", + weight = 2, + stack = true, + close = true, + }, + + ["carokit"] = { + label = "Body Kit", + weight = 3, + stack = true, + close = true, + }, + + ["carotool"] = { + label = "Tools", + weight = 2, + stack = true, + close = true, + }, + + ["clothe"] = { + label = "Cloth", + weight = 1, + stack = true, + close = true, + }, + + ["cutted_wood"] = { + label = "Cut wood", + weight = 1, + stack = true, + close = true, + }, + + ["essence"] = { + label = "Gas", + weight = 1, + stack = true, + close = true, + }, + + ["fabric"] = { + label = "Fabric", + weight = 1, + stack = true, + close = true, + }, + + ["fish"] = { + label = "Fish", + weight = 1, + stack = true, + close = true, + }, + + ["fixtool"] = { + label = "Repair Tools", + weight = 2, + stack = true, + close = true, + }, + + ["gazbottle"] = { + label = "Gas Bottle", + weight = 2, + stack = true, + close = true, + }, + + ["packaged_chicken"] = { + label = "Chicken fillet", + weight = 1, + stack = true, + close = true, + }, + + ["packaged_plank"] = { + label = "Packaged wood", + weight = 1, + stack = true, + close = true, + }, + + ["petrol"] = { + label = "Oil", + weight = 1, + stack = true, + close = true, + }, + + ["petrol_raffin"] = { + label = "Processed oil", + weight = 1, + stack = true, + close = true, + }, + + ["slaughtered_chicken"] = { + label = "Slaughtered chicken", + weight = 1, + stack = true, + close = true, + }, + + ["stone"] = { + label = "Stone", + weight = 1, + stack = true, + close = true, + }, + + ["washed_stone"] = { + label = "Washed stone", + weight = 1, + stack = true, + close = true, + }, + + ["wool"] = { + label = "Wool", + weight = 1, + stack = true, + close = true, + }, +} \ No newline at end of file diff --git a/server-data/resources/[ox]/ox_inventory/data/vehicles.lua b/server-data/resources/[ox]/ox_inventory/data/vehicles.lua index 1441687a3..991beaf4c 100644 --- a/server-data/resources/[ox]/ox_inventory/data/vehicles.lua +++ b/server-data/resources/[ox]/ox_inventory/data/vehicles.lua @@ -37,57 +37,54 @@ return { -- slots, maxWeight; default weight is 8000 per slot glovebox = { - [0] = { 11, 88000 }, -- Compact - [1] = { 11, 88000 }, -- Sedan - [2] = { 11, 88000 }, -- SUV - [3] = { 11, 88000 }, -- Coupe - [4] = { 11, 88000 }, -- Muscle - [5] = { 11, 88000 }, -- Sports Classic - [6] = { 11, 88000 }, -- Sports - [7] = { 11, 88000 }, -- Super - [8] = { 5, 40000 }, -- Motorcycle - [9] = { 11, 88000 }, -- Offroad - [10] = { 11, 88000 }, -- Industrial - [11] = { 11, 88000 }, -- Utility - [12] = { 11, 88000 }, -- Van - [14] = { 31, 248000 }, -- Boat - [15] = { 31, 248000 }, -- Helicopter - [16] = { 51, 408000 }, -- Plane - [17] = { 11, 88000 }, -- Service - [18] = { 11, 88000 }, -- Emergency - [19] = { 11, 88000 }, -- Military - [20] = { 11, 88000 }, -- Commercial (trucks) + [0] = {11, 88000}, -- Compact + [1] = {11, 88000}, -- Sedan + [2] = {11, 88000}, -- SUV + [3] = {11, 88000}, -- Coupe + [4] = {11, 88000}, -- Muscle + [5] = {11, 88000}, -- Sports Classic + [6] = {11, 88000}, -- Sports + [7] = {11, 88000}, -- Super + [8] = {5, 40000}, -- Motorcycle + [9] = {11, 88000}, -- Offroad + [10] = {11, 88000}, -- Industrial + [11] = {11, 88000}, -- Utility + [12] = {11, 88000}, -- Van + [14] = {31, 248000}, -- Boat + [15] = {31, 248000}, -- Helicopter + [16] = {51, 408000}, -- Plane + [17] = {11, 88000}, -- Service + [18] = {11, 88000}, -- Emergency + [19] = {11, 88000}, -- Military + [20] = {11, 88000}, -- Commercial (trucks) models = { - [`xa21`] = { 11, 88000 }, - }, + [`xa21`] = {11, 88000} + } }, trunk = { - [0] = { 21, 168000 }, -- Compact - [1] = { 41, 328000 }, -- Sedan - [2] = { 51, 408000 }, -- SUV - [3] = { 31, 248000 }, -- Coupe - [4] = { 41, 328000 }, -- Muscle - [5] = { 31, 248000 }, -- Sports Classic - [6] = { 31, 248000 }, -- Sports - [7] = { 21, 168000 }, -- Super - [8] = { 5, 40000 }, -- Motorcycle - [9] = { 51, 408000 }, -- Offroad - [10] = { 51, 408000 }, -- Industrial - [11] = { 41, 328000 }, -- Utility - [12] = { 61, 488000 }, -- Van + [0] = {21, 168000}, -- Compact + [1] = {41, 328000}, -- Sedan + [2] = {51, 408000}, -- SUV + [3] = {31, 248000}, -- Coupe + [4] = {41, 328000}, -- Muscle + [5] = {31, 248000}, -- Sports Classic + [6] = {31, 248000}, -- Sports + [7] = {21, 168000}, -- Super + [8] = {5, 40000}, -- Motorcycle + [9] = {51, 408000}, -- Offroad + [10] = {51, 408000}, -- Industrial + [11] = {41, 328000}, -- Utility + [12] = {61, 488000}, -- Van -- [14] -- Boat -- [15] -- Helicopter -- [16] -- Plane - [17] = { 41, 328000 }, -- Service - [18] = { 41, 328000 }, -- Emergency - [19] = { 41, 328000 }, -- Military - [20] = { 61, 488000 }, -- Commercial + [17] = {41, 328000}, -- Service + [18] = {41, 328000}, -- Emergency + [19] = {41, 328000}, -- Military + [20] = {61, 488000}, -- Commercial models = { - [`xa21`] = { 11, 10000 }, - }, - boneIndex = { - [`pounder`] = "wheel_rr", + [`xa21`] = {11, 10000} }, - }, + } } diff --git a/server-data/resources/[ox]/ox_inventory/data/weapons.lua b/server-data/resources/[ox]/ox_inventory/data/weapons.lua index 975217049..6b88573e2 100644 --- a/server-data/resources/[ox]/ox_inventory/data/weapons.lua +++ b/server-data/resources/[ox]/ox_inventory/data/weapons.lua @@ -1,713 +1,712 @@ return { Weapons = { - ["WEAPON_ADVANCEDRIFLE"] = { - label = "Advanced Rifle", + ['WEAPON_TECPISTOL'] = { + label = 'Tactical SMG', + weight = 1500, + durability = 0.075, + ammoname = 'ammo-9', + }, + ['WEAPON_ADVANCEDRIFLE'] = { + label = 'Advanced Rifle', weight = 3100, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle', }, - ["WEAPON_APPISTOL"] = { - label = "AP Pistol", + ['WEAPON_APPISTOL'] = { + label = 'AP Pistol', weight = 1400, durability = 0.1, - ammoname = "ammo-9", + ammoname = 'ammo-9', }, - ["WEAPON_ASSAULTRIFLE"] = { - label = "Assault Rifle", + ['WEAPON_ASSAULTRIFLE'] = { + label = 'Assault Rifle', weight = 4500, durability = 0.03, - ammoname = "ammo-rifle2", + ammoname = 'ammo-rifle2', }, - ["WEAPON_ASSAULTRIFLE_MK2"] = { - label = "Assault Rifle MK2", + ['WEAPON_ASSAULTRIFLE_MK2'] = { + label = 'Assault Rifle MK2', weight = 2950, durability = 0.03, - ammoname = "ammo-rifle2", + ammoname = 'ammo-rifle2', }, - ["WEAPON_ASSAULTSHOTGUN"] = { - label = "Assault Shotgun", + ['WEAPON_ASSAULTSHOTGUN'] = { + label = 'Assault Shotgun', weight = 5200, durability = 0.05, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_ASSAULTSMG"] = { - label = "Assault SMG", + ['WEAPON_ASSAULTSMG'] = { + label = 'Assault SMG', weight = 2900, durability = 0.05, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_BALL"] = { - label = "Ball", + ['WEAPON_BALL'] = { + label = 'Ball', weight = 149, throwable = true, }, - ["WEAPON_BAT"] = { - label = "Bat", + ['WEAPON_BAT'] = { + label = 'Bat', weight = 1134, durability = 0.1, }, - ["WEAPON_BATTLEAXE"] = { - label = "Battle Axe", + ['WEAPON_BATTLEAXE'] = { + label = 'Battle Axe', weight = 6500, durability = 0.1, }, - ["WEAPON_BOTTLE"] = { - label = "Bottle", + ['WEAPON_BOTTLE'] = { + label = 'Bottle', weight = 350, durability = 0.1, }, - ["WEAPON_BULLPUPRIFLE"] = { - label = "Bullpup Rifle", + ['WEAPON_BULLPUPRIFLE'] = { + label = 'Bullpup Rifle', weight = 2900, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_BULLPUPRIFLE_MK2"] = { - label = "Bullpup Rifle MK2", + ['WEAPON_BULLPUPRIFLE_MK2'] = { + label = 'Bullpup Rifle MK2', weight = 2900, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_BULLPUPSHOTGUN"] = { - label = "Bullpup Shotgun", + ['WEAPON_BULLPUPSHOTGUN'] = { + label = 'Bullpup Shotgun', weight = 3100, durability = 0.2, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_BZGAS"] = { - label = "BZ Gas", + ['WEAPON_BZGAS'] = { + label = 'BZ Gas', weight = 600, throwable = true, }, - ["WEAPON_CARBINERIFLE"] = { - label = "Carbine Rifle", + ['WEAPON_CARBINERIFLE'] = { + label = 'Carbine Rifle', weight = 3100, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_CARBINERIFLE_MK2"] = { - label = "Carbine Rifle MK2", + ['WEAPON_CARBINERIFLE_MK2'] = { + label = 'Carbine Rifle MK2', weight = 3000, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_CERAMICPISTOL"] = { - label = "Ceramic Pistol", + ['WEAPON_CERAMICPISTOL'] = { + label = 'Ceramic Pistol', weight = 800, durability = 0.2, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_PISTOLXM3"] = { - label = "WM 29 Pistol", + ['WEAPON_PISTOLXM3'] = { + label = 'WM 29 Pistol', weight = 969, durability = 0.2, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_COMBATMG"] = { - label = "Combat MG", + ['WEAPON_COMBATMG'] = { + label = 'Combat MG', weight = 7500, durability = 0.02, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_COMBATMG_MK2"] = { - label = "Combat MG MK2", + ['WEAPON_COMBATMG_MK2'] = { + label = 'Combat MG MK2', weight = 8000, durability = 0.02, - ammoname = "ammo-rifle2", + ammoname = 'ammo-rifle2' }, - ["WEAPON_COMBATPDW"] = { - label = "Combat PDW", + ['WEAPON_COMBATPDW'] = { + label = 'Combat PDW', weight = 2300, durability = 0.1, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_COMBATPISTOL"] = { - label = "Combat Pistol", + ['WEAPON_COMBATPISTOL'] = { + label = 'Combat Pistol', weight = 785, durability = 0.2, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_COMBATSHOTGUN"] = { - label = "Combat Shotgun", + ['WEAPON_COMBATSHOTGUN'] = { + label = 'Combat Shotgun', weight = 4400, durability = 0.2, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_COMPACTLAUNCHER"] = { - label = "Compact Grenade Launcher", + ['WEAPON_COMPACTLAUNCHER'] = { + label = 'Compact Grenade Launcher', weight = 2500, durability = 0.05, - ammoname = "ammo-grenade", + ammoname = 'ammo-grenade' }, - ["WEAPON_COMPACTRIFLE"] = { - label = "Compact Rifle", + ['WEAPON_COMPACTRIFLE'] = { + label = 'Compact Rifle', weight = 3600, durability = 0.05, - ammoname = "ammo-rifle2", + ammoname = 'ammo-rifle2' }, - ["WEAPON_CROWBAR"] = { - label = "Crowbar", + ['WEAPON_CROWBAR'] = { + label = 'Crowbar', weight = 2500, durability = 0.1, }, - ["WEAPON_DAGGER"] = { - label = "Dagger", + ['WEAPON_DAGGER'] = { + label = 'Dagger', weight = 800, durability = 0.1, }, - ["WEAPON_DBSHOTGUN"] = { - label = "Double Barrel Shotgun", + ['WEAPON_DBSHOTGUN'] = { + label = 'Double Barrel Shotgun', weight = 3175, durability = 0.4, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_DOUBLEACTION"] = { - label = "Double Action Revolver", + ['WEAPON_DOUBLEACTION'] = { + label = 'Double Action Revolver', weight = 940, durability = 0.2, - ammoname = "ammo-38", + ammoname = 'ammo-38' }, - ["WEAPON_EMPLAUNCHER"] = { - label = "Compact EMP Launcher", + ['WEAPON_EMPLAUNCHER'] = { + label = 'Compact EMP Launcher', weight = 2750, durability = 0.2, - ammoname = "ammo-emp", + ammoname = 'ammo-emp' }, - ["WEAPON_FIREEXTINGUISHER"] = { - label = "Fire Extinguisher", + ['WEAPON_FIREEXTINGUISHER'] = { + label = 'Fire Extinguisher', weight = 8616, }, - ["WEAPON_FIREWORK"] = { - label = "Firework Launcher", + ['WEAPON_FIREWORK'] = { + label = 'Firework Launcher', weight = 1000, durability = 0.5, - ammoname = "ammo-firework", + ammoname = 'ammo-firework' }, - ["WEAPON_FLARE"] = { - label = "Flare", + ['WEAPON_FLARE'] = { + label = 'Flare', weight = 250, throwable = true, }, - ["WEAPON_FLAREGUN"] = { - label = "Flare Gun", + ['WEAPON_FLAREGUN'] = { + label = 'Flare Gun', weight = 1000, durability = 0.5, - ammoname = "ammo-flare", + ammoname = 'ammo-flare' }, - ["WEAPON_FLASHLIGHT"] = { - label = "Flashlight", + ['WEAPON_FLASHLIGHT'] = { + label = 'Flashlight', weight = 125, durability = 0.1, }, - ["WEAPON_GOLFCLUB"] = { - label = "Golf Club", + ['WEAPON_GOLFCLUB'] = { + label = 'Golf Club', weight = 330, durability = 0.1, }, - ["WEAPON_GRENADE"] = { - label = "Grenade", + ['WEAPON_GRENADE'] = { + label = 'Grenade', weight = 400, throwable = true, }, - ["WEAPON_GRENADELAUNCHER"] = { - label = "Grenade Launcher", + ['WEAPON_GRENADELAUNCHER'] = { + label = 'Grenade Launcher', weight = 6500, durability = 0.05, - ammoname = "ammo-grenade", + ammoname = 'ammo-grenade' }, - ["WEAPON_GUSENBERG"] = { - label = "Gusenberg", + ['WEAPON_GUSENBERG'] = { + label = 'Gusenberg', weight = 4900, durability = 0.04, - ammoname = "ammo-45", + ammoname = 'ammo-45' }, - ["WEAPON_HAMMER"] = { - label = "Hammer", + ['WEAPON_HAMMER'] = { + label = 'Hammer', weight = 1200, durability = 0.1, }, - ["WEAPON_HATCHET"] = { - label = "Hatchet", + ['WEAPON_HATCHET'] = { + label = 'Hatchet', weight = 1000, durability = 0.1, }, - ["WEAPON_HEAVYRIFLE"] = { - label = "Heavy Rifle", + ['WEAPON_HEAVYRIFLE'] = { + label = 'Heavy Rifle', weight = 3300, durability = 0.2, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_HAZARDCAN"] = { - label = "Hazard Can", + ['WEAPON_HAZARDCAN'] = { + label = 'Hazard Can', weight = 12000, }, - ["WEAPON_METALDETECTOR"] = { - label = "Metal Detector", + ['WEAPON_METALDETECTOR'] = { + label = 'Metal Detector', weight = 1200, }, - ["WEAPON_HOMINGLAUNCHER"] = { - label = "Homing Launcher", + ['WEAPON_HOMINGLAUNCHER'] = { + label = 'Homing Launcher', weight = 10000, durability = 0.6, - ammoname = "ammo-rocket", + ammoname = 'ammo-rocket' }, - ["WEAPON_FERTILIZERCAN"] = { - label = "Fertilizer Can", + ['WEAPON_FERTILIZERCAN'] = { + label = 'Fertilizer Can', weight = 12000, }, - ["WEAPON_HEAVYPISTOL"] = { - label = "Heavy Pistol", + ['WEAPON_HEAVYPISTOL'] = { + label = 'Heavy Pistol', weight = 1100, durability = 0.2, - ammoname = "ammo-45", + ammoname = 'ammo-45' }, - ["WEAPON_HEAVYSHOTGUN"] = { - label = "Heavy Shotgun", + ['WEAPON_HEAVYSHOTGUN'] = { + label = 'Heavy Shotgun', weight = 3600, durability = 0.1, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_HEAVYSNIPER"] = { - label = "Heavy Sniper", + ['WEAPON_HEAVYSNIPER'] = { + label = 'Heavy Sniper', weight = 12700, durability = 0.5, - ammoname = "ammo-heavysniper", + ammoname = 'ammo-heavysniper' }, - ["WEAPON_HEAVYSNIPER_MK2"] = { - label = "Heavy Sniper MK2", + ['WEAPON_HEAVYSNIPER_MK2'] = { + label = 'Heavy Sniper MK2', weight = 14000, durability = 0.5, - ammoname = "ammo-heavysniper", + ammoname = 'ammo-heavysniper' }, - ["WEAPON_KNIFE"] = { - label = "Knife", + ['WEAPON_KNIFE'] = { + label = 'Knife', weight = 300, durability = 0.1, }, - ["WEAPON_KNUCKLE"] = { - label = "Knuckle Dusters", + ['WEAPON_KNUCKLE'] = { + label = 'Knuckle Dusters', weight = 300, durability = 0.1, }, - ["WEAPON_MACHETE"] = { - label = "Machete", + ['WEAPON_MACHETE'] = { + label = 'Machete', weight = 1000, durability = 0.1, }, - ["WEAPON_MACHINEPISTOL"] = { - label = "Machine Pistol", + ['WEAPON_MACHINEPISTOL'] = { + label = 'Machine Pistol', weight = 1400, durability = 0.05, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_MARKSMANPISTOL"] = { - label = "Marksman Pistol", + ['WEAPON_MARKSMANPISTOL'] = { + label = 'Marksman Pistol', weight = 1588, durability = 0.5, - ammoname = "ammo-22", + ammoname = 'ammo-22' }, - ["WEAPON_MARKSMANRIFLE"] = { - label = "Marksman Rifle", + ['WEAPON_MARKSMANRIFLE'] = { + label = 'Marksman Rifle', weight = 7500, durability = 0.4, - ammoname = "ammo-sniper", + ammoname = 'ammo-sniper' }, - ["WEAPON_MARKSMANRIFLE_MK2"] = { - label = "Marksman Rifle MK2", + ['WEAPON_MARKSMANRIFLE_MK2'] = { + label = 'Marksman Rifle MK2', weight = 4000, durability = 0.4, - ammoname = "ammo-sniper", + ammoname = 'ammo-sniper' }, - ["WEAPON_MG"] = { - label = "Machine Gun", + ['WEAPON_MG'] = { + label = 'Machine Gun', weight = 9000, durability = 0.02, - ammoname = "ammo-rifle2", + ammoname = 'ammo-rifle2' }, - ["WEAPON_MINIGUN"] = { - label = "Minigun", + ['WEAPON_MINIGUN'] = { + label = 'Minigun', weight = 38500, durability = 0.1, - ammoname = "ammo-rifle2", + ammoname = 'ammo-rifle2' }, - ["WEAPON_MICROSMG"] = { - label = "Micro SMG", + ['WEAPON_MICROSMG'] = { + label = 'Micro SMG', weight = 3000, durability = 0.1, - ammoname = "ammo-45", + ammoname = 'ammo-45' }, - ["WEAPON_MILITARYRIFLE"] = { - label = "Military Rifle", + ['WEAPON_MILITARYRIFLE'] = { + label = 'Military Rifle', weight = 3600, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_MINISMG"] = { - label = "Mini SMG", + ['WEAPON_MINISMG'] = { + label = 'Mini SMG', weight = 1270, durability = 0.05, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_MOLOTOV"] = { - label = "Molotov", + ['WEAPON_MOLOTOV'] = { + label = 'Molotov', weight = 1800, throwable = true, }, - ["WEAPON_MUSKET"] = { - label = "Musket", + ['WEAPON_MUSKET'] = { + label = 'Musket', weight = 4500, durability = 0.5, - ammoname = "ammo-musket", + ammoname = 'ammo-musket' }, - ["WEAPON_NAVYREVOLVER"] = { - label = "Navy Revolver", + ['WEAPON_NAVYREVOLVER'] = { + label = 'Navy Revolver', weight = 4000, durability = 0.2, - ammoname = "ammo-44", + ammoname = 'ammo-44' }, - ["WEAPON_NIGHTSTICK"] = { - label = "Nightstick", + ['WEAPON_NIGHTSTICK'] = { + label = 'Nightstick', weight = 1000, durability = 0.1, }, - ["WEAPON_PETROLCAN"] = { - label = "Gas Can", + ['WEAPON_PETROLCAN'] = { + label = 'Gas Can', weight = 12000, }, - ["WEAPON_GADGETPISTOL"] = { - label = "Perico Pistol", + ['WEAPON_GADGETPISTOL'] = { + label = 'Perico Pistol', weight = 1750, durability = 0.1, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_PIPEBOMB"] = { - label = "Pipe Bomb", + ['WEAPON_PIPEBOMB'] = { + label = 'Pipe Bomb', weight = 1800, throwable = true, }, - ["WEAPON_PISTOL"] = { - label = "Pistol", + ['WEAPON_PISTOL'] = { + label = 'Pistol', weight = 1130, durability = 0.1, - ammoname = "ammo-9", + ammoname = 'ammo-9', }, - ["WEAPON_PISTOL50"] = { - label = "Pistol .50", + ['WEAPON_PISTOL50'] = { + label = 'Pistol .50', weight = 2000, durability = 0.1, - ammoname = "ammo-50", + ammoname = 'ammo-50' }, - ["WEAPON_PISTOL_MK2"] = { - label = "Pistol MK2", + ['WEAPON_PISTOL_MK2'] = { + label = 'Pistol MK2', weight = 1000, durability = 0.5, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_POOLCUE"] = { - label = "Pool Cue", + ['WEAPON_POOLCUE'] = { + label = 'Pool Cue', weight = 146, durability = 0.1, }, - ["WEAPON_CANDYCANE"] = { - label = "Candy Cane", + ['WEAPON_CANDYCANE'] = { + label = 'Candy Cane', weight = 85, durability = 0.1, }, - ["WEAPON_PROXMINE"] = { - label = "Proximity Mine", + ['WEAPON_PROXMINE'] = { + label = 'Proximity Mine', weight = 2500, throwable = true, }, - ["WEAPON_PUMPSHOTGUN"] = { - label = "Pump Shotgun", + ['WEAPON_PUMPSHOTGUN'] = { + label = 'Pump Shotgun', weight = 3400, durability = 0.1, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_PUMPSHOTGUN_MK2"] = { - label = "Pump Shotgun MK2", + ['WEAPON_PUMPSHOTGUN_MK2'] = { + label = 'Pump Shotgun MK2', weight = 3200, durability = 0.1, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_RAILGUN"] = { - label = "Railgun", + ['WEAPON_RAILGUN'] = { + label = 'Railgun', weight = 3570, durability = 0.5, - ammoname = "ammo-railgun", + ammoname = 'ammo-railgun' }, - ["WEAPON_RAILGUNXM3"] = { - label = "Railgun XM3", + ['WEAPON_RAILGUNXM3'] = { + label = 'Railgun XM3', weight = 3570, durability = 0.5, - ammoname = "ammo-railgun", + ammoname = 'ammo-railgun' }, - ["WEAPON_RAYCARBINE"] = { - label = "Unholy Hellbringer", + ['WEAPON_RAYCARBINE'] = { + label = 'Unholy Hellbringer', weight = 3620, durability = 0.2, - ammoname = "ammo-laser", + ammoname = 'ammo-laser' }, - ["WEAPON_RAYPISTOL"] = { - label = "Up-n-Atomizer", + ['WEAPON_RAYPISTOL'] = { + label = 'Up-n-Atomizer', weight = 1540, - durability = 0.5, + durability = 0.5 }, - ["WEAPON_REVOLVER"] = { - label = "Revolver", + ['WEAPON_REVOLVER'] = { + label = 'Revolver', weight = 2260, durability = 0.1, - ammoname = "ammo-44", + ammoname = 'ammo-44' }, - ["WEAPON_REVOLVER_MK2"] = { - label = "Revolver MK2", + ['WEAPON_REVOLVER_MK2'] = { + label = 'Revolver MK2', weight = 2600, durability = 0.1, - ammoname = "ammo-44", + ammoname = 'ammo-44' }, - ["WEAPON_RPG"] = { - label = "RPG", + ['WEAPON_RPG'] = { + label = 'RPG', weight = 5000, durability = 0.3, - ammoname = "ammo-rocket", + ammoname = 'ammo-rocket' }, - ["WEAPON_SAWNOFFSHOTGUN"] = { - label = "Sawn Off Shotgun", + ['WEAPON_SAWNOFFSHOTGUN'] = { + label = 'Sawn Off Shotgun', weight = 2380, durability = 0.1, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_SMG"] = { - label = "SMG", + ['WEAPON_SMG'] = { + label = 'SMG', weight = 3084, durability = 0.8, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_SMG_MK2"] = { - label = "SMG Mk2", + ['WEAPON_SMG_MK2'] = { + label = 'SMG Mk2', weight = 2700, durability = 0.05, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_SMOKEGRENADE"] = { - label = "Smoke Grenade", + ['WEAPON_SMOKEGRENADE'] = { + label = 'Smoke Grenade', weight = 600, throwable = true, }, - ["WEAPON_SNIPERRIFLE"] = { - label = "Sniper Rifle", + ['WEAPON_SNIPERRIFLE'] = { + label = 'Sniper Rifle', weight = 5000, durability = 0.5, - ammoname = "ammo-sniper", + ammoname = 'ammo-sniper' }, - ["WEAPON_SNOWBALL"] = { - label = "Snow Ball", + ['WEAPON_SNOWBALL'] = { + label = 'Snow Ball', weight = 5, throwable = true, }, - ["WEAPON_SNSPISTOL"] = { - label = "SNS Pistol", + ['WEAPON_SNSPISTOL'] = { + label = 'SNS Pistol', weight = 465, durability = 0.1, - ammoname = "ammo-45", + ammoname = 'ammo-45' }, - ["WEAPON_SNSPISTOL_MK2"] = { - label = "SNS Pistol MK2", + ['WEAPON_SNSPISTOL_MK2'] = { + label = 'SNS Pistol MK2', weight = 465, durability = 0.1, - ammoname = "ammo-45", + ammoname = 'ammo-45' }, - ["WEAPON_SPECIALCARBINE"] = { - label = "Special Carbine", + ['WEAPON_SPECIALCARBINE'] = { + label = 'Special Carbine', weight = 3000, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_SPECIALCARBINE_MK2"] = { - label = "Special Carbine MK2", + ['WEAPON_SPECIALCARBINE_MK2'] = { + label = 'Special Carbine MK2', weight = 3370, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_STICKYBOMB"] = { - label = "Sticky Bomb", + ['WEAPON_STICKYBOMB'] = { + label = 'Sticky Bomb', weight = 1000, throwable = true, }, - ["WEAPON_STONE_HATCHET"] = { - label = "Stone Hatchet", + ['WEAPON_STONE_HATCHET'] = { + label = 'Stone Hatchet', weight = 800, durability = 0.1, }, - ["WEAPON_STUNGUN"] = { - label = "Tazer", + ['WEAPON_STUNGUN'] = { + label = 'Tazer', weight = 227, durability = 0.1, }, - ["WEAPON_AUTOSHOTGUN"] = { - label = "Sweeper Shotgun", + ['WEAPON_AUTOSHOTGUN'] = { + label = 'Sweeper Shotgun', weight = 4400, durability = 0.05, - ammoname = "ammo-shotgun", + ammoname = 'ammo-shotgun' }, - ["WEAPON_SWITCHBLADE"] = { - label = "Switchblade", + ['WEAPON_SWITCHBLADE'] = { + label = 'Switchblade', weight = 300, durability = 0.1, - anim = { - "anim@melee@switchblade@holster", - "unholster", - 200, - "anim@melee@switchblade@holster", - "holster", - 600, - }, - }, - - ["WEAPON_VINTAGEPISTOL"] = { - label = "Vintage Pistol", + anim = { 'anim@melee@switchblade@holster', 'unholster', 200, 'anim@melee@switchblade@holster', 'holster', 600 }, + }, + + ['WEAPON_VINTAGEPISTOL'] = { + label = 'Vintage Pistol', weight = 700, durability = 0.1, - ammoname = "ammo-9", + ammoname = 'ammo-9' }, - ["WEAPON_RAYMINIGUN"] = { - label = "Widowmaker", + ['WEAPON_RAYMINIGUN'] = { + label = 'Widowmaker', weight = 7000, durability = 0.1, - ammoname = "ammo-laser", + ammoname = 'ammo-laser' }, - ["WEAPON_WRENCH"] = { - label = "Wrench", + ['WEAPON_WRENCH'] = { + label = 'Wrench', weight = 2500, durability = 0.1, }, - ["WEAPON_PRECISIONRIFLE"] = { - label = "Precision Rifle", + ['WEAPON_PRECISIONRIFLE'] = { + label = 'Precision Rifle', weight = 4800, durability = 0.4, - ammoname = "ammo-sniper", + ammoname = 'ammo-sniper' }, - ["WEAPON_TACTICALRIFLE"] = { - label = "Tactical Rifle", + ['WEAPON_TACTICALRIFLE'] = { + label = 'Tactical Rifle', weight = 3400, durability = 0.03, - ammoname = "ammo-rifle", + ammoname = 'ammo-rifle' }, - ["WEAPON_TEARGAS"] = { - label = "Tear Gas", + ['WEAPON_TEARGAS'] = { + label = 'Tear Gas', weight = 600, throwable = true, }, }, Components = { - ["at_flashlight"] = { - label = "Tactical Flashlight", + ['at_flashlight'] = { + label = 'Tactical Flashlight', weight = 120, - type = "flashlight", + type = 'flashlight', client = { component = { `COMPONENT_AT_AR_FLSH`, @@ -716,56 +715,56 @@ return { `COMPONENT_AT_PI_FLSH_02`, `COMPONENT_AT_PI_FLSH_03`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_suppressor_light"] = { - label = "Suppressor", + ['at_suppressor_light'] = { + label = 'Suppressor', weight = 280, - type = "muzzle", + type = 'muzzle', client = { component = { `COMPONENT_AT_PI_SUPP`, `COMPONENT_AT_PI_SUPP_02`, `COMPONENT_CERAMICPISTOL_SUPP`, - `COMPONENT_PISTOLXM3_SUPP`, + `COMPONENT_PISTOLXM3_SUPP` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_suppressor_heavy"] = { - label = "Tactical Suppressor", + ['at_suppressor_heavy'] = { + label = 'Tactical Suppressor', weight = 280, - type = "muzzle", + type = 'muzzle', client = { component = { `COMPONENT_AT_AR_SUPP`, `COMPONENT_AT_AR_SUPP_02`, `COMPONENT_AT_SR_SUPP`, - `COMPONENT_AT_SR_SUPP_03`, + `COMPONENT_AT_SR_SUPP_03` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_grip"] = { - label = "Grip", - type = "grip", + ['at_grip'] = { + label = 'Grip', + type = 'grip', weight = 280, client = { component = { `COMPONENT_AT_AR_AFGRIP`, - `COMPONENT_AT_AR_AFGRIP_02`, + `COMPONENT_AT_AR_AFGRIP_02` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_barrel"] = { - label = "Heavy Barrel", - type = "barrel", + ['at_barrel'] = { + label = 'Heavy Barrel', + type = 'barrel', weight = 280, client = { component = { @@ -778,13 +777,13 @@ return { `COMPONENT_AT_SC_BARREL_02`, `COMPONENT_AT_SR_BARREL_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_extended_pistol"] = { - label = "Extended Pistol Clip", - type = "magazine", + ['at_clip_extended_pistol'] = { + label = 'Extended Pistol Clip', + type = 'magazine', weight = 280, client = { component = { @@ -798,14 +797,15 @@ return { `COMPONENT_SNSPISTOL_CLIP_02`, `COMPONENT_SNSPISTOL_MK2_CLIP_02`, `COMPONENT_VINTAGEPISTOL_CLIP_02`, + `COMPONENT_TECPISTOL_CLIP_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_extended_smg"] = { - label = "Extended SMG Clip", - type = "magazine", + ['at_clip_extended_smg'] = { + label = 'Extended SMG Clip', + type = 'magazine', weight = 280, client = { component = { @@ -817,26 +817,26 @@ return { `COMPONENT_SMG_CLIP_02`, `COMPONENT_SMG_MK2_CLIP_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_extended_shotgun"] = { - label = "Extended Shotgun Clip", - type = "magazine", + ['at_clip_extended_shotgun'] = { + label = 'Extended Shotgun Clip', + type = 'magazine', weight = 280, client = { component = { `COMPONENT_ASSAULTSHOTGUN_CLIP_02`, `COMPONENT_HEAVYSHOTGUN_CLIP_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_extended_rifle"] = { - label = "Extended Rifle Clip", - type = "magazine", + ['at_clip_extended_rifle'] = { + label = 'Extended Rifle Clip', + type = 'magazine', weight = 280, client = { component = { @@ -854,13 +854,13 @@ return { `COMPONENT_SPECIALCARBINE_MK2_CLIP_02`, `COMPONENT_TACTICALRIFLE_CLIP_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_extended_mg"] = { - label = "Extended MG Clip", - type = "magazine", + ['at_clip_extended_mg'] = { + label = 'Extended MG Clip', + type = 'magazine', weight = 280, client = { component = { @@ -869,13 +869,13 @@ return { `COMPONENT_COMBATMG_CLIP_02`, `COMPONENT_COMBATMG_MK2_CLIP_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_extended_sniper"] = { - label = "Extended Sniper Clip", - type = "magazine", + ['at_clip_extended_sniper'] = { + label = 'Extended Sniper Clip', + type = 'magazine', weight = 280, client = { component = { @@ -883,13 +883,13 @@ return { `COMPONENT_MARKSMANRIFLE_CLIP_02`, `COMPONENT_MARKSMANRIFLE_MK2_CLIP_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_drum_smg"] = { - label = "SMG Drum", - type = "magazine", + ['at_clip_drum_smg'] = { + label = 'SMG Drum', + type = 'magazine', weight = 280, client = { component = { @@ -897,25 +897,25 @@ return { `COMPONENT_MACHINEPISTOL_CLIP_03`, `COMPONENT_SMG_CLIP_03`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_drum_shotgun"] = { - label = "Shotgun Drum", - type = "magazine", + ['at_clip_drum_shotgun'] = { + label = 'Shotgun Drum', + type = 'magazine', weight = 280, client = { component = { - `COMPONENT_HEAVYSHOTGUN_CLIP_03`, + `COMPONENT_HEAVYSHOTGUN_CLIP_03` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_clip_drum_rifle"] = { - label = "Rifle Drum", - type = "magazine", + ['at_clip_drum_rifle'] = { + label = 'Rifle Drum', + type = 'magazine', weight = 280, client = { component = { @@ -924,27 +924,27 @@ return { `COMPONENT_CARBINERIFLE_CLIP_03`, `COMPONENT_SPECIALCARBINE_CLIP_03`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_compensator"] = { - label = "Compensator", - type = "muzzle", + ['at_compensator'] = { + label = 'Compensator', + type = 'muzzle', weight = 280, client = { component = { `COMPONENT_AT_PI_COMP`, `COMPONENT_AT_PI_COMP_02`, - `COMPONENT_AT_PI_COMP_03`, + `COMPONENT_AT_PI_COMP_03` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_macro"] = { - label = "Macro Scope", - type = "sight", + ['at_scope_macro'] = { + label = 'Macro Scope', + type = 'sight', weight = 280, client = { component = { @@ -952,214 +952,214 @@ return { `COMPONENT_AT_SCOPE_MACRO_02`, `COMPONENT_AT_SCOPE_MACRO_MK2`, `COMPONENT_AT_SCOPE_MACRO_02_MK2`, - `COMPONENT_AT_SCOPE_MACRO_02_SMG_MK2`, + `COMPONENT_AT_SCOPE_MACRO_02_SMG_MK2` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_small"] = { - label = "Small Scope", - type = "sight", + ['at_scope_small'] = { + label = 'Small Scope', + type = 'sight', weight = 280, client = { component = { `COMPONENT_AT_SCOPE_SMALL`, `COMPONENT_AT_SCOPE_SMALL_02`, `COMPONENT_AT_SCOPE_SMALL_MK2`, - `COMPONENT_AT_SCOPE_SMALL_SMG_MK2`, + `COMPONENT_AT_SCOPE_SMALL_SMG_MK2` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_medium"] = { - label = "Medium Scope", - type = "sight", + ['at_scope_medium'] = { + label = 'Medium Scope', + type = 'sight', weight = 280, client = { component = { `COMPONENT_AT_SCOPE_MEDIUM`, - `COMPONENT_AT_SCOPE_MEDIUM_MK2`, + `COMPONENT_AT_SCOPE_MEDIUM_MK2` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_large"] = { - label = "Large Scope", - type = "sight", + ['at_scope_large'] = { + label = 'Large Scope', + type = 'sight', weight = 280, client = { component = { - `COMPONENT_AT_SCOPE_LARGE_MK2`, + `COMPONENT_AT_SCOPE_LARGE_MK2` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_advanced"] = { - label = "Advanced Scope", - type = "sight", + ['at_scope_advanced'] = { + label = 'Advanced Scope', + type = 'sight', weight = 280, client = { component = { - `COMPONENT_AT_SCOPE_MAX`, + `COMPONENT_AT_SCOPE_MAX` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_nv"] = { - label = "NV Scope", - type = "sight", + ['at_scope_nv'] = { + label = 'NV Scope', + type = 'sight', weight = 420, client = { component = { - `COMPONENT_AT_SCOPE_NV`, + `COMPONENT_AT_SCOPE_NV` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_thermal"] = { - label = "Thermal Scope", - type = "sight", + ['at_scope_thermal'] = { + label = 'Thermal Scope', + type = 'sight', weight = 420, client = { component = { - `COMPONENT_AT_SCOPE_THERMAL`, + `COMPONENT_AT_SCOPE_THERMAL` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_scope_holo"] = { - label = "Holographic Sight", - type = "sight", + ['at_scope_holo'] = { + label = 'Holographic Sight', + type = 'sight', weight = 280, client = { component = { `COMPONENT_AT_PI_RAIL`, `COMPONENT_AT_PI_RAIL_02`, `COMPONENT_AT_SIGHTS`, - `COMPONENT_AT_SIGHTS_SMG`, + `COMPONENT_AT_SIGHTS_SMG` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_flat"] = { - label = "Flat Muzzle", - type = "muzzle", + ['at_muzzle_flat'] = { + label = 'Flat Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_01`, + `COMPONENT_AT_MUZZLE_01` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_tactical"] = { - label = "Tactical Muzzle", - type = "muzzle", + ['at_muzzle_tactical'] = { + label = 'Tactical Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_02`, + `COMPONENT_AT_MUZZLE_02` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_fat"] = { - label = "Fat Muzzle", - type = "muzzle", + ['at_muzzle_fat'] = { + label = 'Fat Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_03`, + `COMPONENT_AT_MUZZLE_03` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_precision"] = { - label = "Precision Muzzle", - type = "muzzle", + ['at_muzzle_precision'] = { + label = 'Precision Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_04`, + `COMPONENT_AT_MUZZLE_04` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_heavy"] = { - label = "Heavy Muzzle", - type = "muzzle", + ['at_muzzle_heavy'] = { + label = 'Heavy Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_05`, + `COMPONENT_AT_MUZZLE_05` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_slanted"] = { - label = "Slanted Muzzle", - type = "muzzle", + ['at_muzzle_slanted'] = { + label = 'Slanted Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_06`, + `COMPONENT_AT_MUZZLE_06` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_split"] = { - label = "Split Muzzle", - type = "muzzle", + ['at_muzzle_split'] = { + label = 'Split Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_07`, + `COMPONENT_AT_MUZZLE_07` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_squared"] = { - label = "Squared Muzzle", - type = "muzzle", + ['at_muzzle_squared'] = { + label = 'Squared Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_08`, + `COMPONENT_AT_MUZZLE_08` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_muzzle_bell"] = { - label = "Bell Muzzle", - type = "muzzle", + ['at_muzzle_bell'] = { + label = 'Bell Muzzle', + type = 'muzzle', weight = 80, client = { component = { - `COMPONENT_AT_MUZZLE_09`, + `COMPONENT_AT_MUZZLE_09` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_luxe"] = { - label = "Luxury Weapon Kit", - type = "skin", + ['at_skin_luxe'] = { + label = 'Luxury Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1172,29 +1172,29 @@ return { `COMPONENT_MICROSMG_VARMOD_LUXE`, `COMPONENT_PISTOL_VARMOD_LUXE`, `COMPONENT_PUMPSHOTGUN_VARMOD_LOWRIDER`, - `COMPONENT_SMG_VARMOD_LUXE`, + `COMPONENT_SMG_VARMOD_LUXE` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_wood"] = { - label = "Wood Weapon Kit", - type = "skin", + ['at_skin_wood'] = { + label = 'Wood Weapon Kit', + type = 'skin', weight = 50, client = { component = { `COMPONENT_HEAVYPISTOL_VARMOD_LUXE`, `COMPONENT_SNIPERRIFLE_VARMOD_LUXE`, - `COMPONENT_SNSPISTOL_VARMOD_LOWRIDER`, + `COMPONENT_SNSPISTOL_VARMOD_LOWRIDER` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_metal"] = { - label = "Metal Weapon Kit", - type = "skin", + ['at_skin_metal'] = { + label = 'Metal Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1202,186 +1202,306 @@ return { `COMPONENT_APPISTOL_VARMOD_LUXE`, `COMPONENT_BULLPUPRIFLE_VARMOD_LOW`, `COMPONENT_SAWNOFFSHOTGUN_VARMOD_LUXE`, - `COMPONENT_SPECIALCARBINE_VARMOD_LOWRIDER`, + `COMPONENT_SPECIALCARBINE_VARMOD_LOWRIDER` + }, + usetime = 2500 + } + }, + + ['at_skin_pearl'] = { + label = 'Pearl Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_PISTOL50_VARMOD_LUXE` + }, + usetime = 2500 + } + }, + + ['at_skin_ballas'] = { + label = 'Ballas Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_BALLAS` + }, + usetime = 2500 + } + }, + + ['at_skin_diamond'] = { + label = 'Diamond Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_DIAMOND` + }, + usetime = 2500 + } + }, + + ['at_skin_dollar'] = { + label = 'Dollar Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_DOLLAR` + }, + usetime = 2500 + } + }, + + ['at_skin_hate'] = { + label = 'Hate Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_HATE` + }, + usetime = 2500 + } + }, + + ['at_skin_king'] = { + label = 'King Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_KING` + }, + usetime = 2500 + } + }, + + ['at_skin_love'] = { + label = 'Love Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_LOVE` + }, + usetime = 2500 + } + }, + + ['at_skin_pimp'] = { + label = 'Pimp Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_PIMP` + }, + usetime = 2500 + } + }, + + ['at_skin_player'] = { + label = 'Player Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_PLAYER` + }, + usetime = 2500 + } + }, + + ['at_skin_vagos'] = { + label = 'Vagos Weapon Kit', + type = 'skin', + weight = 50, + client = { + component = { + `COMPONENT_KNUCKLE_VARMOD_VAGOS` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_pearl"] = { - label = "Pearl Weapon Kit", - type = "skin", + ['at_skin_blagueurs'] = { + label = 'Blagueurs Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_PISTOL50_VARMOD_LUXE`, + `COMPONENT_BAT_VARMOD_XM3` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_ballas"] = { - label = "Ballas Weapon Kit", - type = "skin", + ['at_skin_splatter'] = { + label = 'Splatter Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_BALLAS`, + `COMPONENT_BAT_VARMOD_XM3_01` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_diamond"] = { - label = "Diamond Weapon Kit", - type = "skin", + ['at_skin_bulletholes'] = { + label = 'Bullet Holes Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_DIAMOND`, + `COMPONENT_BAT_VARMOD_XM3_02` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_dollar"] = { - label = "Dollar Weapon Kit", - type = "skin", + ['at_skin_burgershot'] = { + label = 'Burger Shot Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_DOLLAR`, + `COMPONENT_BAT_VARMOD_XM3_03` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_hate"] = { - label = "Hate Weapon Kit", - type = "skin", + ['at_skin_cluckinbell'] = { + label = 'Cluckin Bell Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_HATE`, + `COMPONENT_BAT_VARMOD_XM3_04` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_king"] = { - label = "King Weapon Kit", - type = "skin", + ['at_skin_fatalincursion'] = { + label = 'Fatal Incursion Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_KING`, + `COMPONENT_BAT_VARMOD_XM3_05` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_love"] = { - label = "Love Weapon Kit", - type = "skin", + ['at_skin_luchalibre'] = { + label = 'Lucha Libre Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_LOVE`, + `COMPONENT_BAT_VARMOD_XM3_06` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_pimp"] = { - label = "Pimp Weapon Kit", - type = "skin", + ['at_skin_trippy'] = { + label = 'Trippy Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_PIMP`, + `COMPONENT_BAT_VARMOD_XM3_07` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_player"] = { - label = "Player Weapon Kit", - type = "skin", + ['at_skin_tiedye'] = { + label = 'Tie-Dye Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_PLAYER`, + `COMPONENT_BAT_VARMOD_XM3_08` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_vagos"] = { - label = "Vagos Weapon Kit", - type = "skin", + ['at_skin_wall'] = { + label = 'Wall Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_KNUCKLE_VARMOD_VAGOS`, + `COMPONENT_BAT_VARMOD_XM3_09` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_vip"] = { - label = "VIP Weapon Kit", - type = "skin", + ['at_skin_vip'] = { + label = 'VIP Weapon Kit', + type = 'skin', weight = 50, client = { component = { `COMPONENT_REVOLVER_VARMOD_BOSS`, - `COMPONENT_SWITCHBLADE_VARMOD_VAR1`, + `COMPONENT_SWITCHBLADE_VARMOD_VAR1` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_bodyguard"] = { - label = "Bodyguard Weapon Kit", - type = "skin", + ['at_skin_bodyguard'] = { + label = 'Bodyguard Weapon Kit', + type = 'skin', weight = 50, client = { component = { `COMPONENT_REVOLVER_VARMOD_GOON`, - `COMPONENT_SWITCHBLADE_VARMOD_VAR2`, + `COMPONENT_SWITCHBLADE_VARMOD_VAR2` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_festive"] = { - label = "Festive Weapon Kit", - type = "skin", + ['at_skin_festive'] = { + label = 'Festive Weapon Kit', + type = 'skin', weight = 50, client = { component = { - `COMPONENT_RAYPISTOL_VARMOD_XMAS18`, + `COMPONENT_RAYPISTOL_VARMOD_XMAS18` }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_security"] = { - label = "Security Weapon Kit", - type = "skin", + ['at_skin_security'] = { + label = 'Security Weapon Kit', + type = 'skin', weight = 50, client = { component = { `COMPONENT_APPISTOL_VARMOD_SECURITY`, `COMPONENT_MICROSMG_VARMOD_SECURITY`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_camo"] = { - label = "Camo Weapon Kit", - type = "skin", + ['at_skin_camo'] = { + label = 'Camo Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1398,13 +1518,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO`, `COMPONENT_SPECIALCARBINE_MK2_CAMO`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_brushstroke"] = { - label = "Brushstroke Weapon Kit", - type = "skin", + ['at_skin_brushstroke'] = { + label = 'Brushstroke Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1421,13 +1541,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_02`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_02`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_woodland"] = { - label = "Woodland Weapon Kit", - type = "skin", + ['at_skin_woodland'] = { + label = 'Woodland Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1444,13 +1564,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_03`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_03`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_skull"] = { - label = "Skull Weapon Kit", - type = "skin", + ['at_skin_skull'] = { + label = 'Skull Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1467,13 +1587,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_04`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_04`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_sessanta"] = { - label = "Sessanta Weapon Kit", - type = "skin", + ['at_skin_sessanta'] = { + label = 'Sessanta Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1490,13 +1610,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_05`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_05`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_perseus"] = { - label = "Perseus Weapon Kit", - type = "skin", + ['at_skin_perseus'] = { + label = 'Perseus Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1513,13 +1633,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_06`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_06`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_leopard"] = { - label = "Leopard Weapon Kit", - type = "skin", + ['at_skin_leopard'] = { + label = 'Leopard Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1536,13 +1656,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_07`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_07`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_zebra"] = { - label = "Zebra Weapon Kit", - type = "skin", + ['at_skin_zebra'] = { + label = 'Zebra Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1559,13 +1679,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_08`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_08`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_geometric"] = { - label = "Geometric Weapon Kit", - type = "skin", + ['at_skin_geometric'] = { + label = 'Geometric Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1582,13 +1702,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_09`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_09`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_boom"] = { - label = "Boom Weapon Kit", - type = "skin", + ['at_skin_boom'] = { + label = 'Boom Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1605,13 +1725,13 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_10`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_10`, }, - usetime = 2500, - }, + usetime = 2500 + } }, - ["at_skin_patriotic"] = { - label = "Patriotic Weapon Kit", - type = "skin", + ['at_skin_patriotic'] = { + label = 'Patriotic Weapon Kit', + type = 'skin', weight = 50, client = { component = { @@ -1628,105 +1748,105 @@ return { `COMPONENT_SNSPISTOL_MK2_CAMO_IND_01`, `COMPONENT_SPECIALCARBINE_MK2_CAMO_IND_01`, }, - usetime = 2500, - }, + usetime = 2500 + } }, }, Ammo = { - ["ammo-22"] = { - label = ".22 Long Rifle", + ['ammo-22'] = { + label = '.22 Long Rifle', weight = 3, }, - ["ammo-38"] = { - label = ".38 LC", + ['ammo-38'] = { + label = '.38 LC', weight = 15, }, - ["ammo-44"] = { - label = ".44 Magnum", + ['ammo-44'] = { + label = '.44 Magnum', weight = 16, }, - ["ammo-45"] = { - label = ".45 ACP", + ['ammo-45'] = { + label = '.45 ACP', weight = 15, }, - ["ammo-50"] = { - label = ".50 AE", + ['ammo-50'] = { + label = '.50 AE', weight = 45, }, - ["ammo-9"] = { - label = "9mm", + ['ammo-9'] = { + label = '9mm', weight = 7, }, - ["ammo-firework"] = { - label = "Firework", + ['ammo-firework'] = { + label = 'Firework', weight = 200, }, - ["ammo-flare"] = { - label = "Flare round", + ['ammo-flare'] = { + label = 'Flare round', weight = 38, }, - ["ammo-grenade"] = { - label = "40mm Explosive", + ['ammo-grenade'] = { + label = '40mm Explosive', weight = 400, }, - ["ammo-heavysniper"] = { - label = ".50 BMG", + ['ammo-heavysniper'] = { + label = '.50 BMG', weight = 51, }, - ["ammo-laser"] = { - label = "Laser charge", + ['ammo-laser'] = { + label = 'Laser charge', weight = 1, }, - ["ammo-musket"] = { - label = ".50 Ball", + ['ammo-musket'] = { + label = '.50 Ball', weight = 38, }, - ["ammo-railgun"] = { - label = "Railgun charge", + ['ammo-railgun'] = { + label = 'Railgun charge', weight = 150, }, - ["ammo-rifle"] = { - label = "5.56x45", + ['ammo-rifle'] = { + label = '5.56x45', weight = 4, }, - ["ammo-rifle2"] = { - label = "7.62x39", + ['ammo-rifle2'] = { + label = '7.62x39', weight = 8, }, - ["ammo-rocket"] = { - label = "Rocket", + ['ammo-rocket'] = { + label = 'Rocket', weight = 500, }, - ["ammo-shotgun"] = { - label = "12 Gauge", + ['ammo-shotgun'] = { + label = '12 Gauge', weight = 38, }, - ["ammo-sniper"] = { - label = "7.62x51", + ['ammo-sniper'] = { + label = '7.62x51', weight = 9, }, - ["ammo-emp"] = { - label = "EMP round", + ['ammo-emp'] = { + label = 'EMP round', weight = 400, }, - }, + } } diff --git a/server-data/resources/[ox]/ox_inventory/fxmanifest.lua b/server-data/resources/[ox]/ox_inventory/fxmanifest.lua index 888990281..ed529244f 100644 --- a/server-data/resources/[ox]/ox_inventory/fxmanifest.lua +++ b/server-data/resources/[ox]/ox_inventory/fxmanifest.lua @@ -1,48 +1,47 @@ ---[[ FX Information ]] --- -fx_version("cerulean") -use_experimental_fxv2_oal("yes") -lua54("yes") -game("gta5") +fx_version 'cerulean' +use_experimental_fxv2_oal 'yes' +lua54 'yes' +game 'gta5' +name 'ox_inventory' +author 'Overextended' +version '2.38.1' +repository 'https://github.com/overextended/ox_inventory' +description 'Slot-based inventory with item metadata support' ---[[ Resource Information ]] --- -name("ox_inventory") -author("Overextended") -version("2.30.0") -repository("https://github.com/overextended/ox_inventory") -description("Slot-based inventory with item metadata support") +dependencies { + '/server:6116', + '/onesync', + 'oxmysql', + 'ox_lib', +} ---[[ Manifest ]] --- -dependencies({ - "/server:6116", - "/onesync", - "oxmysql", - "ox_lib", -}) +shared_script '@ox_lib/init.lua' -shared_script("@ox_lib/init.lua") +ox_libs { + 'locale', + 'table', + 'math', +} -server_scripts({ - "@oxmysql/lib/MySQL.lua", - "init.lua", -}) +server_scripts { + '@oxmysql/lib/MySQL.lua', + 'init.lua' +} -client_script("init.lua") +client_script 'init.lua' -ui_page("web/build/index.html") +ui_page 'web/build/index.html' -files({ - "client.lua", - "server.lua", - "locales/*.json", - "web/build/index.html", - "web/build/assets/*.js", - "web/build/assets/*.css", - "web/images/*.png", - "modules/**/shared.lua", - "modules/**/client.lua", - "modules/bridge/**/client.lua", - "data/*.lua", -}) +files { + 'client.lua', + 'server.lua', + 'locales/*.json', + 'web/build/index.html', + 'web/build/assets/*.js', + 'web/build/assets/*.css', + 'web/images/*.png', + 'modules/**/shared.lua', + 'modules/**/client.lua', + 'modules/bridge/**/client.lua', + 'data/*.lua', +} diff --git a/server-data/resources/[ox]/ox_inventory/init.lua b/server-data/resources/[ox]/ox_inventory/init.lua index beacf0557..6e4f2b039 100644 --- a/server-data/resources/[ox]/ox_inventory/init.lua +++ b/server-data/resources/[ox]/ox_inventory/init.lua @@ -1,41 +1,49 @@ -lib.locale() +local function addDeferral(err) + err = err:gsub("%^%d", "") --- Don't be an idiot and change these convar getters (yes, people do that). --- https://overextended.github.io/docs/ox_inventory/Getting%20Started/config + AddEventHandler('playerConnecting', function(_, _, deferrals) + deferrals.defer() + deferrals.done(err) + end) +end + +-- Do not modify this file at all. This isn't a "config" file. You want to change +-- resource settings? Use convars like you were told in the documentation. +-- You did read the docs, right? Probably not, if you're here. +-- https://overextended.dev/ox_inventory#config shared = { - resource = GetCurrentResourceName(), - framework = GetConvar("inventory:framework", "esx"), - playerslots = GetConvarInt("inventory:slots", 50), - playerweight = GetConvarInt("inventory:weight", 30000), - target = GetConvarInt("inventory:target", 0) == 1, - police = json.decode(GetConvar("inventory:police", '["police", "sheriff"]')), + resource = GetCurrentResourceName(), + framework = GetConvar('inventory:framework', 'esx'), + playerslots = GetConvarInt('inventory:slots', 50), + playerweight = GetConvarInt('inventory:weight', 30000), + target = GetConvarInt('inventory:target', 0) == 1, + police = json.decode(GetConvar('inventory:police', '["police", "sheriff"]')), } do - if type(shared.police) == "string" then - shared.police = { shared.police } - end + if type(shared.police) == 'string' then + shared.police = { shared.police } + end - local police = table.create(0, shared.police and #shared.police or 0) + local police = table.create(0, shared.police and #shared.police or 0) - for i = 1, #shared.police do - police[shared.police[i]] = 0 - end + for i = 1, #shared.police do + police[shared.police[i]] = 0 + end - shared.police = police + shared.police = police end if IsDuplicityVersion() then - server = { - loglevel = GetConvarInt("inventory:loglevel", 1), - randomprices = GetConvarInt("inventory:randomprices", 0) == 1, - randomloot = GetConvarInt("inventory:randomloot", 1) == 1, - evidencegrade = GetConvarInt("inventory:evidencegrade", 2), - trimplate = GetConvarInt("inventory:trimplate", 1) == 1, - vehicleloot = json.decode(GetConvar( - "inventory:vehicleloot", - [[ + server = { + bulkstashsave = GetConvarInt('inventory:bulkstashsave', 1) == 1, + loglevel = GetConvarInt('inventory:loglevel', 1), + randomprices = GetConvarInt('inventory:randomprices', 0) == 1, + randomloot = GetConvarInt('inventory:randomloot', 1) == 1, + evidencegrade = GetConvarInt('inventory:evidencegrade', 2), + trimplate = GetConvarInt('inventory:trimplate', 1) == 1, + vehicleloot = json.decode(GetConvar('inventory:vehicleloot', [[ [ ["cola", 1, 1], ["water", 1, 1], @@ -45,60 +53,61 @@ if IsDuplicityVersion() then ["money", 200, 400, 5], ["bandage", 1, 1] ] - ]] - )), - dumpsterloot = json.decode(GetConvar( - "inventory:dumpsterloot", - [[ + ]])), + dumpsterloot = json.decode(GetConvar('inventory:dumpsterloot', [[ [ ["mustard", 1, 1], ["garbage", 1, 3], ["money", 1, 10], ["burger", 1, 1] ] - ]] - )), - } + ]])), + } + + local accounts = json.decode(GetConvar('inventory:accounts', '["money"]')) + server.accounts = table.create(0, #accounts) + + for i = 1, #accounts do + server.accounts[accounts[i]] = 0 + end else - PlayerData = {} - client = { - autoreload = GetConvarInt("inventory:autoreload", 0) == 1, - screenblur = GetConvarInt("inventory:screenblur", 1) == 1, - keys = json.decode(GetConvar("inventory:keys", "")) or { "F2", "K", "TAB" }, - enablekeys = json.decode(GetConvar("inventory:enablekeys", "[249]")), - aimedfiring = GetConvarInt("inventory:aimedfiring", 0) == 1, - giveplayerlist = GetConvarInt("inventory:giveplayerlist", 0) == 1, - weaponanims = GetConvarInt("inventory:weaponanims", 1) == 1, - itemnotify = GetConvarInt("inventory:itemnotify", 1) == 1, - imagepath = GetConvar("inventory:imagepath", "nui://ox_inventory/web/images"), - dropprops = GetConvarInt("inventory:dropprops", 0) == 1, - dropmodel = joaat(GetConvar("inventory:dropmodel", "prop_med_bag_01b")), - weaponmismatch = GetConvarInt("inventory:weaponmismatch", 1) == 1, - ignoreweapons = json.decode(GetConvar("inventory:ignoreweapons", "[]")), - suppresspickups = GetConvarInt("inventory:suppresspickups", 1) == 1, - } - - local ignoreweapons = table.create(0, (client.ignoreweapons and #client.ignoreweapons or 0) + 3) - - for i = 1, #client.ignoreweapons do - local weapon = client.ignoreweapons[i] - ignoreweapons[tonumber(weapon) or joaat(weapon)] = true - end - - ignoreweapons[`WEAPON_UNARMED`] = true - ignoreweapons[`WEAPON_HANDCUFFS`] = true - ignoreweapons[`WEAPON_GARBAGEBAG`] = true - - client.ignoreweapons = ignoreweapons + PlayerData = {} + client = { + autoreload = GetConvarInt('inventory:autoreload', 0) == 1, + screenblur = GetConvarInt('inventory:screenblur', 1) == 1, + keys = json.decode(GetConvar('inventory:keys', '')) or { 'F2', 'K', 'TAB' }, + enablekeys = json.decode(GetConvar('inventory:enablekeys', '[249]')), + aimedfiring = GetConvarInt('inventory:aimedfiring', 0) == 1, + giveplayerlist = GetConvarInt('inventory:giveplayerlist', 0) == 1, + weaponanims = GetConvarInt('inventory:weaponanims', 1) == 1, + itemnotify = GetConvarInt('inventory:itemnotify', 1) == 1, + imagepath = GetConvar('inventory:imagepath', 'nui://ox_inventory/web/images'), + dropprops = GetConvarInt('inventory:dropprops', 0) == 1, + dropmodel = joaat(GetConvar('inventory:dropmodel', 'prop_med_bag_01b')), + weaponmismatch = GetConvarInt('inventory:weaponmismatch', 1) == 1, + ignoreweapons = json.decode(GetConvar('inventory:ignoreweapons', '[]')), + suppresspickups = GetConvarInt('inventory:suppresspickups', 1) == 1, + } + + local ignoreweapons = table.create(0, (client.ignoreweapons and #client.ignoreweapons or 0) + 3) + + for i = 1, #client.ignoreweapons do + local weapon = client.ignoreweapons[i] + ignoreweapons[tonumber(weapon) or joaat(weapon)] = true + end + + ignoreweapons[`WEAPON_UNARMED`] = true + ignoreweapons[`WEAPON_HANDCUFFS`] = true + ignoreweapons[`WEAPON_GARBAGEBAG`] = true + ignoreweapons[`OBJECT`] = true + ignoreweapons[`WEAPON_HOSE`] = true + + client.ignoreweapons = ignoreweapons end -function shared.print(...) - print(string.strjoin(" ", ...)) -end +function shared.print(...) print(string.strjoin(' ', ...)) end -function shared.info(...) - shared.print("^2[info]^7", ...) -end +function shared.info(...) shared.print('^2[info]^7', ...) end ---Throws a formatted type error. ---```lua @@ -108,104 +117,79 @@ end ---@param expected string ---@param received string function TypeError(variable, expected, received) - error(("expected %s to have type '%s' (received %s)"):format(variable, expected, received)) + error(("expected %s to have type '%s' (received %s)"):format(variable, expected, received)) end -- People like ignoring errors for some reason local function spamError(err) - lib = nil - shared.ready = false - CreateThread(function() - while true do - Wait(2000) - CreateThread(function() - error(err, 0) - end) - end - end) - error(err, 0) + shared.ready = false + + CreateThread(function() + while true do + Wait(10000) + CreateThread(function() + error(err, 0) + end) + end + end) + + addDeferral(err) + error(err, 0) end -CreateThread(function() - if shared.framework == "ox" then - local file = ("imports/%s.lua"):format(lib.context) - local import = LoadResourceFile("ox_core", file) - local func, err = load(import, ("@@ox_core/%s"):format(file)) +---@param name string +---@return table +---@deprecated +function data(name) + if shared.server and shared.ready == nil then return {} end + local file = ('data/%s.lua'):format(name) + local datafile = LoadResourceFile(shared.resource, file) + local path = ('@@%s/%s'):format(shared.resource, file) - if not func or err then - shared.ready = false - return spamError(err) - end + if not datafile then + warn(('no datafile found at path %s'):format(path:gsub('@@', ''))) + return {} + end - func() + local func, err = load(datafile, path) - Ox = Ox or {} - end -end) + if not func or err then + shared.ready = false + ---@diagnostic disable-next-line: return-type-mismatch + return spamError(err) + end ----@param name string ----@return table -function data(name) - if shared.server and shared.ready == nil then - return {} - end - local file = ("data/%s.lua"):format(name) - local datafile = LoadResourceFile(shared.resource, file) - local path = ("@@%s/%s"):format(shared.resource, file) - - if not datafile then - warn(("no datafile found at path %s"):format(path:gsub("@@", ""))) - return {} - end - - local func, err = load(datafile, path) - - if not func or err then - shared.ready = false - ---@diagnostic disable-next-line: return-type-mismatch - return spamError(err) - end - - return func() + return func() end if not lib then - return spamError("ox_inventory requires the ox_lib resource, refer to the documentation.") + return spamError('ox_inventory requires the ox_lib resource, refer to the documentation.') end -local success, msg = lib.checkDependency("oxmysql", "2.4.0") +local success, msg = lib.checkDependency('oxmysql', '2.7.3') -if not success then - return spamError(msg) +if success then + success, msg = lib.checkDependency('ox_lib', '3.13.0') end -success, msg = lib.checkDependency("ox_lib", "3.2.0") - if not success then - spamError(msg) + return spamError(msg) end -if not LoadResourceFile(shared.resource, "web/build/index.html") then - return spamError( - "UI has not been built, refer to the documentation or download a release build.\n ^3https://overextended.github.io/docs/ox_inventory/^0" - ) +if not LoadResourceFile(shared.resource, 'web/build/index.html') then + return spamError( + 'UI has not been built, refer to the documentation or download a release build.\n ^3https://overextended.dev/ox_inventory^0') end -if shared.target then - local ox_target = GetResourceState("ox_target"):find("start") - local qtarget = GetResourceState("qtarget"):find("start") - - if not ox_target and not qtarget then - shared.target = false - warn("targeting resource is not loaded - it should start before ox_inventory") - else - shared.target = ox_target and "ox_target" or "qtarget" - end +-- No we're not going to support qtarget any longer. +if shared.target and GetResourceState('ox_target') ~= 'started' then + shared.target = false + warn('ox_target is not loaded - it should start before ox_inventory') end -if lib.context == "server" then - shared.ready = false - return require("server") +if lib.context == 'server' then + shared.ready = false + return require 'server' end -require("client") +require 'client' diff --git a/server-data/resources/[ox]/ox_inventory/locales/ar.json b/server-data/resources/[ox]/ox_inventory/locales/ar.json index bcada80f6..ce916ec9c 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/ar.json +++ b/server-data/resources/[ox]/ox_inventory/locales/ar.json @@ -82,4 +82,4 @@ "cannot_give": "غير قادر على الاعطاء", "evidence_cannot_take": "ليس درجة عالية بما فيه الكفاية لاتخاذ من الأدلة", "dumpster": "القمامة" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/cs.json b/server-data/resources/[ox]/ox_inventory/locales/cs.json index 5b1835667..55eb79280 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/cs.json +++ b/server-data/resources/[ox]/ox_inventory/locales/cs.json @@ -81,5 +81,7 @@ "no_durability": "Předmět je rozbitý", "cannot_give": "Této osobě nemůžete dát %s %s", "evidence_cannot_take": "Nejste dostatečně kvalifikovaný pro přístup", - "dumpster": "Popelnice" -} \ No newline at end of file + "dumpster": "Popelnice", + "crafting_item": "Vyrábíš %s", + "crafting_bench": "Pracovní stůl" +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/da.json b/server-data/resources/[ox]/ox_inventory/locales/da.json index a007aed51..a2406a594 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/da.json +++ b/server-data/resources/[ox]/ox_inventory/locales/da.json @@ -82,4 +82,4 @@ "cannot_give": "Kan ikke give %s %s til person", "evidence_cannot_take": "Ikke høj nok rangering til at tage bevismateriale", "dumpster": "Skraldespand" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/de.json b/server-data/resources/[ox]/ox_inventory/locales/de.json index 537971373..a5654fe17 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/de.json +++ b/server-data/resources/[ox]/ox_inventory/locales/de.json @@ -17,6 +17,8 @@ "ui_ctrl_shift_lmb": "Bewege einen halben Stapel in ein anderes Inventar", "ui_alt_lmb": "Benutze einen Gegenstand", "ui_ctrl_c": "Wenn du über eine Waffe gehst, kopierst du die Seriennummer", + "ui_remove_ammo": "Entferne Munition", + "ammo_type": "Munitionstyp", "$": "$", "male": "Männlich", "female": "Weiblich", @@ -46,6 +48,7 @@ "buy_amount": "Trage die Anzahl ein die du kaufen möchtest", "component_has": "Diese Waffe hat bereits ein/e %s", "component_invalid": "Diese Waffe ist nicht kompatibel mit einem %s", + "component_slot_occupied" : "Der %s Slot dieser Waffe ist bereits belegt", "cannot_perform": "Du kannst diese Aktion nicht ausführen", "cannot_carry": "Du kannst nicht so viel tragen", "cannot_carry_other": "Das Inventar hat nicht genügend Platz", @@ -82,5 +85,9 @@ "cannot_give": "%s %s kann nicht übergeben werden", "evidence_cannot_take": "Dein Rang ist hierfür zu niedrig", "dumpster": "Mülleimer", - "not_enough_durability": "Haltbarkeit von %s reicht nicht mehr aus" -} \ No newline at end of file + "crafting_item": "%s herstellen", + "crafting_bench": "Werkbank", + "open_crafting_bench": "Werkbank öffnen", + "not_enough_durability": "Haltbarkeit von %s reicht nicht mehr aus", + "storage": "Kofferraum" +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/el.json b/server-data/resources/[ox]/ox_inventory/locales/el.json index 74aeea444..5c49c518e 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/el.json +++ b/server-data/resources/[ox]/ox_inventory/locales/el.json @@ -82,4 +82,4 @@ "cannot_give": "Δεν μπορείς να δώσεις %s %s στον στόχο σου", "evidence_cannot_take": "Όχι αρκετά υψηλός βαθμός για να πάρετε αντικέιμενα από τα στοιχεία", "dumpster": "Κάδος Σκουπιδιών" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/en.json b/server-data/resources/[ox]/ox_inventory/locales/en.json index 897712de8..1e9c0e8a5 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/en.json +++ b/server-data/resources/[ox]/ox_inventory/locales/en.json @@ -85,5 +85,9 @@ "cannot_give": "Unable to give %s %s to the target", "evidence_cannot_take": "You are not authorised to withdraw evidence", "dumpster": "Dumpster", - "not_enough_durability": "%s does not have enough durability" -} \ No newline at end of file + "crafting_item": "Crafting %s", + "crafting_bench": "Crafting Bench", + "open_crafting_bench": "Open Crafting Bench", + "not_enough_durability": "%s does not have enough durability", + "storage": "Storage" +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/es.json b/server-data/resources/[ox]/ox_inventory/locales/es.json index 36e715ea0..bfd34e9c4 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/es.json +++ b/server-data/resources/[ox]/ox_inventory/locales/es.json @@ -84,5 +84,8 @@ "cannot_give": "No se puede dar %s %s al objetivo", "evidence_cannot_take": "No estás autorizado a retirar pruebas", "dumpster": "Contenedor de basura", + "crafting_item": "Creando %s", + "crafting_bench": "Banco de trabajo", + "open_crafting_bench": "Abrir banco de trabajo", "not_enough_durability": "%s no tiene suficiente durabilidad" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/et.json b/server-data/resources/[ox]/ox_inventory/locales/et.json index 6924092d3..d4e904581 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/et.json +++ b/server-data/resources/[ox]/ox_inventory/locales/et.json @@ -82,4 +82,4 @@ "cannot_give": "%s %s ei saa sihtmärgile anda", "evidence_cannot_take": "Pole piisavalt kõrge auaste, et tõendite põhjal võtta", "dumpster": "Prügikast" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/fi.json b/server-data/resources/[ox]/ox_inventory/locales/fi.json index a53bc85fd..2b197a199 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/fi.json +++ b/server-data/resources/[ox]/ox_inventory/locales/fi.json @@ -85,5 +85,8 @@ "cannot_give": "Ei voida antaa %s %s kohteelle", "evidence_cannot_take": "Et ole tarpeeksi korkea-arvoinen, että voisit ottaa tavaraa todistusaineista", "dumpster": "Roskis", + "crafting_item": "Valmistetaan %s", + "crafting_bench": "Työkalupenkki", + "open_crafting_bench": "Avaa työkalupenkki", "not_enough_durability": "%s on liian huonossa kunnossa" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/fr.json b/server-data/resources/[ox]/ox_inventory/locales/fr.json index f6be8d81d..7469d2f6b 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/fr.json +++ b/server-data/resources/[ox]/ox_inventory/locales/fr.json @@ -85,5 +85,8 @@ "cannot_give": "Impossible de donner %s %s à cet inventaire", "evidence_cannot_take": "Votre grade ne vous permet pas de récupérer des preuves", "dumpster": "Poubelle", + "crafting_item": "Fabrication %s", + "crafting_bench": "Table de fabrication", + "open_crafting_bench": "Ouvrir la table de fabrication", "not_enough_durability": "%s n'a pas assez de durabilité" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/hr.json b/server-data/resources/[ox]/ox_inventory/locales/hr.json index 822e6bfe6..65110e34e 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/hr.json +++ b/server-data/resources/[ox]/ox_inventory/locales/hr.json @@ -82,4 +82,4 @@ "cannot_give": "Nije moguće dati %s %s cilju", "evidence_cannot_take": "Nisi autoriziran za ovo", "dumpster": "Kontejner" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/hu.json b/server-data/resources/[ox]/ox_inventory/locales/hu.json index ca6bc0454..97ae60a61 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/hu.json +++ b/server-data/resources/[ox]/ox_inventory/locales/hu.json @@ -17,6 +17,8 @@ "ui_ctrl_shift_lmb": "Fél mennyiség áthelyezése másik inventory-ba", "ui_alt_lmb": "Tárgy gyorshasználat", "ui_ctrl_c": "Kurzor alatt lévő fegyver sorozatszámának másolása", + "ui_remove_ammo": "Lőszer eltávolítása", + "ammo_type": "Lőszer típusa", "$": "$", "male": "Férfi", "female": "Nő", @@ -31,7 +33,7 @@ "inventory_right_access": "Ezt az inventory-t nem tudod megnyitni.", "inventory_lost_access": "Már nem férsz hozzá ehhez az inventoryhoz", "wrong_ammo": "Nem töltheted be %s-t ezzel %s lőszer", - "weapon_license": "Fegyver Engedély", + "license": "%s Engedély", "already_have": "Neked már van fegyver engedélyed!", "have_purchased": "Vettél egy fegyver engedélyt", "can_not_afford": "Nem engedheted meg magadnak a fegyver engedélyt", @@ -46,6 +48,7 @@ "buy_amount": "Meg kell adnod a mennyiséget a vásárláshoz", "component_has": "Ennek a fegyvernek már van: %s", "component_invalid": "Ez a fegyver nem kompatibilis ezzel: %s", + "component_slot_occupied": "Ennek a fegyvernek a %s helye már foglalt", "cannot_perform": "Ezt a műveletet nem hajthatod végre", "cannot_carry": "Ennyit nem cipelhetsz", "cannot_carry_other": "A cél inventory nem tud ennyit tárolni", @@ -82,5 +85,7 @@ "cannot_give": "%s %s nem adható meg a célnak", "evidence_cannot_take": "Nem elég magas a rangod a bizonyítékok kezeléséhez", "dumpster": "Szemetes", + "crafting_item": "%s barkácsolása ", + "crafting_bench": "Barkácsasztal", "not_enough_durability": "%s elhasználodott!" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/id.json b/server-data/resources/[ox]/ox_inventory/locales/id.json index 27171a6dd..9ac4f3a03 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/id.json +++ b/server-data/resources/[ox]/ox_inventory/locales/id.json @@ -82,5 +82,7 @@ "cannot_give": "Tidak dapat memberikan %s %s ke target", "evidence_cannot_take": "Anda tidak berwenang untuk mengambil barang bukti", "dumpster": "Tempat Sampah", + "crafting_item": "Membuat %s", + "crafting_bench": "Bangku Kerajinan", "not_enough_durability": "%s tidak memiliki daya tahan yang cukup" -} \ No newline at end of file +} diff --git a/server-data/resources/[ox]/ox_inventory/locales/it.json b/server-data/resources/[ox]/ox_inventory/locales/it.json index a42ef5a5d..6897ee2dd 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/it.json +++ b/server-data/resources/[ox]/ox_inventory/locales/it.json @@ -43,7 +43,7 @@ "vehicle_locked": "Il veicolo è chiuso", "nobody_nearby": "Nessuno nelle vicinanze", "give_amount": "Devi inserire la quantità da dare", - "buy_amount": "Devi inserire la quantità da acquistare", + "buy_amount": "Devi inserire la quantitò da acquistare", "component_has": "Quest'arma ha già %s", "component_invalid": "Quest'arma non può montare %s", "cannot_perform": "Non puoi eseguire questa azione", @@ -82,5 +82,7 @@ "cannot_give": "Impossibile dare %s %s al giocatore selezionato", "evidence_cannot_take": "Il tuo grado non può prendere oggetti dal deposito", "dumpster": "Cassonetto", + "crafting_item": "Craftando %s", + "crafting_bench": "Banco da lavoro", "not_enough_durability": "%s non ha abbastanza durabilità" } diff --git a/server-data/resources/[ox]/ox_inventory/locales/lt.json b/server-data/resources/[ox]/ox_inventory/locales/lt.json index b86a97e04..8f59475fc 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/lt.json +++ b/server-data/resources/[ox]/ox_inventory/locales/lt.json @@ -84,5 +84,8 @@ "cannot_give": "Nepavyko paduoti %s %s", "evidence_cannot_take": "Tau neleidžiama paimti įkalčių", "dumpster": "Konteineris", +"crafting_item": "Gaminti %s", +"crafting_bench": "Gamybos Stalas", +"open_crafting_bench": "Atidaryti Gamybos Stalą", "not_enough_durability": "%s nėra pakankamai patvarus" } diff --git a/server-data/resources/[ox]/ox_inventory/locales/nl.json b/server-data/resources/[ox]/ox_inventory/locales/nl.json index 03e8ca5db..e6fb57bc5 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/nl.json +++ b/server-data/resources/[ox]/ox_inventory/locales/nl.json @@ -82,5 +82,8 @@ "cannot_give": "Niet in staat om %s %s te geven aan het doel", "evidence_cannot_take": "Je rang is niet hoog genoeg om van de bewijskluis te pakken", "dumpster": "Afvalcontainer", + "crafting_item": "%s aan het maken", + "crafting_bench": "Werkbank", + "open_crafting_bench": "Open Werkbank", "not_enough_durability": "%s heeft niet genoeg levensduur." } diff --git a/server-data/resources/[ox]/ox_inventory/locales/no.json b/server-data/resources/[ox]/ox_inventory/locales/no.json index ff793987c..0e6ff1f07 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/no.json +++ b/server-data/resources/[ox]/ox_inventory/locales/no.json @@ -85,6 +85,9 @@ "cannot_give": "Kan ikke gi %s %s til målet", "evidence_cannot_take": "Du er ikke autorisert til å trekke ut bevis", "dumpster": "Søppelkasse", + "crafting_item": "Lager %s", + "crafting_bench": "Lagebenk", + "open_crafting_bench": "Åpne lagebenk", "not_enough_durability": "%s har ikke nok holdbarhet" -} + } \ No newline at end of file diff --git a/server-data/resources/[ox]/ox_inventory/locales/pl.json b/server-data/resources/[ox]/ox_inventory/locales/pl.json index 3922e352b..04d35d05d 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/pl.json +++ b/server-data/resources/[ox]/ox_inventory/locales/pl.json @@ -85,5 +85,8 @@ "cannot_give": "Nie można przekazać %s %s", "evidence_cannot_take": "Nie posiadasz autoryzacji do zabrania dowodu", "dumpster": "Śmietnik", + "crafting_item": "Wytwórz %s", + "crafting_bench": "Stół do wytwarzania", + "open_crafting_bench": "Otwórz stół do wytwarzania", "not_enough_durability": "%s nie posiada wystarczjąco wytrzymałości" } diff --git a/server-data/resources/[ox]/ox_inventory/locales/sr.json b/server-data/resources/[ox]/ox_inventory/locales/sr.json index 31c383d71..cca9e20b2 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/sr.json +++ b/server-data/resources/[ox]/ox_inventory/locales/sr.json @@ -86,5 +86,8 @@ "cannot_give": "Nemoguce dati %s %s osobi", "evidence_cannot_take": "Niste autorizovani da uzmete dokaz", "dumpster": "Kontejner", + "crafting_item": "Kraftovanje %s", + "crafting_bench": "Sto za Kraftovanje", + "open_crafting_bench": "Otvori sto za kraftovanje", "not_enough_durability": "%s nema dovoljno izdrzljivosti" } diff --git a/server-data/resources/[ox]/ox_inventory/locales/tr.json b/server-data/resources/[ox]/ox_inventory/locales/tr.json index 43f12a286..480ab86e7 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/tr.json +++ b/server-data/resources/[ox]/ox_inventory/locales/tr.json @@ -13,16 +13,18 @@ "ui_usefulcontrols": "Kontroller", "ui_rmb": "Item Bilgi Menüsünü Aç", "ui_ctrl_lmb": "Itemleri, diğer envantere hızlı aktar", - "ui_shift_drag": "Miktarı ikiye böl", + "ui_shift_drag": "Eşya miktarını ikiye böl", "ui_ctrl_shift_lmb": "Eşyanın yarısını diğer envantere aktar", "ui_alt_lmb": "Hızlı item kullan", "ui_ctrl_c": "Bir silahın üzerine imleci getirdiğinde seri numarasını kopyala", + "ui_remove_ammo": "Mermiyi kaldır", + "ammo_type": "Mermi Tipi", "$": "$", "male": "Erkek", "female": "Kadın", "used": "Kullanıldı", - "ui_removed": "Kaldırılan", - "ui_added": "Eklenen", + "ui_removed": "Silindi", + "ui_added": "Eklendi", "ui_holstered": "Kılıfta", "ui_equipped": "Kuşanıldı", "using": "%s Kullanıyorsun", @@ -31,12 +33,12 @@ "inventory_right_access": "Bu envanteri açamazsınız", "inventory_lost_access": "Bu envanter artık erişilemez durumda", "wrong_ammo": "%s silahına %s mermisi dolduramazsınız", - "weapon_license": "Silah lisansı", + "license": "%s Lisansı", "already_have": "Zaten bir silah lisansına sahipsiniz", "have_purchased": "Bir silah lisansı satın aldınız", - "can_not_afford": "Silah lisansı alamazsınız", - "purchase_license": "Lisansı satın al", - "interact_prompt": "Interact with [%s]", + "can_not_afford": "%s satın alamazsınız.", + "purchase_license": "%s lisansı satın al", + "interact_prompt": "[%s] ile etkileşime geç", "weapon_unregistered": "%s kimseye kayıtlı değil", "weapon_registered": "%s (%s), %s kişisine kayıtlı", "weapon_broken": "Silah kırık", @@ -46,7 +48,8 @@ "buy_amount": "Satın alabilmek için bir miktar girmelisiniz", "component_has": "Bu silah zaten %s uzantısına sahip", "component_invalid": "%s uzantısı bu silah için uygun değil", - "cannot_perform": "Bu eylemi gerçekleştiremezsiniz", + "component_slot_occupied": "Bu silahın %s yuvası zaten dolu", + "cannot_perform": "Bu işlemi gerçekleştiremezsiniz.", "cannot_carry": "Daha çoğunu taşıyamazsınız", "cannot_carry_other": "Diğer envanter daha çoğunu taşıyamaz", "cannot_carry_limit": "Daha fazla %s %s taşıyamazsınız", @@ -82,5 +85,8 @@ "cannot_give": "Hedefe %s %s verilmedi", "evidence_cannot_take": "Kanıtlara erişebilmek için yeterli rütbede değilsiniz", "dumpster": "Çöplük", + "crafting_item": "Üretiliyor %s", + "crafting_bench": "Üretim Tezgahı", + "open_crafting_bench": "Üretim Tezgahını Aç", "not_enough_durability": "%s Yeterli dayanıklılığa sahip değil" } diff --git a/server-data/resources/[ox]/ox_inventory/locales/zh-cn.json b/server-data/resources/[ox]/ox_inventory/locales/zh-cn.json index 8d5b27784..f1c88c0a2 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/zh-cn.json +++ b/server-data/resources/[ox]/ox_inventory/locales/zh-cn.json @@ -12,9 +12,9 @@ "ui_tint": "色调", "ui_usefulcontrols": "实用控件", "ui_rmb": "打开物品菜单", - "ui_ctrl_lmb": "快速将一堆物品移动到另一个库存中", + "ui_ctrl_lmb": "快速将一堆物品移动到另一个物品栏中", "ui_shift_drag": "将项目数量分成两份", - "ui_ctrl_shift_lmb": "快速将一半物品移动到另一个库存中", + "ui_ctrl_shift_lmb": "快速将一半物品移动到另一个物品栏中", "ui_alt_lmb": "快速使用物品", "ui_ctrl_c": "当悬停在武器上时,复制其序列号", "ui_remove_ammo": "移除弹药", @@ -28,15 +28,15 @@ "ui_holstered": "已收回", "ui_equipped": "已装备", "using": "使用 %s", - "inventory_setup": "库存已准备好使用", - "inventory_player_access": "你现在无法打开库存", - "inventory_right_access": "你无法打开此库存", - "inventory_lost_access": "无法再访问此库存", - "wrong_ammo": "你不能用 %s 弹药加载 %s", + "inventory_setup": "物品栏已就绪", + "inventory_player_access": "您现在无法打开物品栏", + "inventory_right_access": "您无法打开此物品栏", + "inventory_lost_access": "无法再访问此物品栏", + "wrong_ammo": "您不能用 %s 弹药加载 %s", "license": "%s 许可证", - "already_have": "你已经拥有 %s 许可证", - "have_purchased": "你已购买 %s 许可证", - "can_not_afford": "你买不起 %s 许可证", + "already_have": "您已经拥有 %s 许可证", + "have_purchased": "您已购买 %s 许可证", + "can_not_afford": "您买不起 %s 许可证", "purchase_license": "购买 %s 许可证", "interact_prompt": "[%s] 进行交互", "weapon_unregistered": "%s 未向任何人注册", @@ -44,46 +44,50 @@ "weapon_broken": "这武器坏了", "vehicle_locked": "车辆已锁定", "nobody_nearby": "附近没有人", - "give_amount": "你必须输入金额", - "buy_amount": "你必须输入购买金额", + "give_amount": "您必须输入金额", + "buy_amount": "您必须输入购买金额", "component_has": "这把武器已经有了 %s", "component_invalid": "此武器不兼容 %s", "component_slot_occupied": "该武器的 %s 插槽已被占用", - "cannot_perform": "你无法执行此操作", - "cannot_carry": "你不能带那么多", - "cannot_carry_other": "目标库存不能容纳那么多", - "cannot_carry_limit": "你不能携带超过 %s %s", + "cannot_perform": "您无法执行此操作", + "cannot_carry": "您不能带那么多", + "cannot_carry_other": "目标物品栏不能容纳这些物品", + "cannot_carry_limit": "您不能携带超过 %s %s", "cannot_carry_limit_other": "目标不能携带超过 %s %s", - "items_confiscated": "你的物品已被没收", - "items_returned": "你的物品已被退回", - "item_unauthorised": "你无权购买此商品", - "item_unlicensed": "你无权购买此商品", - "item_not_enough": "你没有足够的 %s", - "cannot_afford": "你买不起 (丢失 %s)", - "stash_lowgrade": "你无权携带此物品", + "items_confiscated": "您的物品已被没收", + "items_returned": "您的物品已被退回", + "item_unauthorised": "您无权购买此商品", + "item_unlicensed": "您无权购买此商品", + "item_not_enough": "您没有足够的 %s", + "cannot_afford": "您买不起 (需要 %s)", + "stash_lowgrade": "您无权携带此物品", "cannot_use": "无法使用 %s", "shop_nostock": "商品缺货", "identification": "性别: %s \n出生日期: %s", "search_dumpster": "搜索垃圾箱", "open_label": "打开 %s", "purchased_for": "已购买 %s %s %s%s", - "unable_stack_items": "你无法堆叠这些物品", - "police_evidence": "警方证据", - "open_police_evidence": "打开警方证据", + "unable_stack_items": "您无法堆叠这些物品", + "police_evidence": "警方物证仓库", + "open_police_evidence": "打开警方物证仓库", "open_stash": "打开藏匿处", "locker_number": "储物柜号码", "locker_no_value": "必须包含打开储物柜的号码", - "locker_must_number": "储物柜必须是数字", - "weapon_hand_required": "你手上必须有武器", + "locker_must_number": "储物柜号码必须是数字", + "weapon_hand_required": "您手上必须有武器", "weapon_hand_wrong": "拿错了武器", - "open_player_inventory": "打开玩家库存~", - "open_secondary_inventory": "打开二级库存~", - "disable_hotbar": "显示库存快捷栏~", + "open_player_inventory": "打开玩家物品栏~", + "open_secondary_inventory": "打开二级物品栏~", + "disable_hotbar": "显示物品栏快捷栏~", "reload_weapon": "重装武器~", - "use_hotbar": "使用快捷栏项目 %s~", + "use_hotbar": "使用快捷栏 %s~", "no_durability": "%s 耐久已耗尽", "cannot_give": "无法将 %s %s 交给目标", - "evidence_cannot_take": "你无权撤回证据", + "evidence_cannot_take": "您无权撤回证据", "dumpster": "垃圾箱", - "not_enough_durability": "%s 没有足够的耐久度" -} + "crafting_item": "制作 %s", + "crafting_bench": "工作台", + "open_crafting_bench": "打开工作台", + "not_enough_durability": "%s 没有足够的耐久度", + "storage": "储物柜" +} \ No newline at end of file diff --git a/server-data/resources/[ox]/ox_inventory/locales/zh-tw.json b/server-data/resources/[ox]/ox_inventory/locales/zh-tw.json index cd6668ee1..bbe58060f 100644 --- a/server-data/resources/[ox]/ox_inventory/locales/zh-tw.json +++ b/server-data/resources/[ox]/ox_inventory/locales/zh-tw.json @@ -85,5 +85,9 @@ "cannot_give": "無法將 %s %s 給予目標 ", "evidence_cannot_take": "階級不夠,無法拿取證物", "dumpster": "垃圾桶", - "not_enough_durability": "%s 沒有足夠的耐久度" + "crafting_item": "製作 %s", + "crafting_bench": "工作台", + "open_crafting_bench": "打開工作台", + "not_enough_durability": "%s 沒有足夠的耐久度", + "storage": "儲櫃" } diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/client.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/client.lua index 449f6524a..2d4d044ac 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/client.lua @@ -1,6 +1,4 @@ -if not lib then - return -end +if not lib then return end ---@diagnostic disable-next-line: duplicate-set-field function client.setPlayerData(key, value) @@ -9,11 +7,9 @@ function client.setPlayerData(key, value) end function client.hasGroup(group) - if not PlayerData.loaded then - return - end + if not PlayerData.loaded then return end - if type(group) == "table" then + if type(group) == 'table' then for name, rank in pairs(group) do local groupRank = PlayerData.groups[name] if groupRank and groupRank >= (rank or 0) then @@ -28,14 +24,12 @@ function client.hasGroup(group) end end -local Shops = require("modules.shops.client") -local Utils = require("modules.utils.client") -local Weapon = require("modules.weapon.client") +local Shops = require 'modules.shops.client' +local Utils = require 'modules.utils.client' +local Weapon = require 'modules.weapon.client' function client.onLogout() - if not PlayerData.loaded then - return - end + if not PlayerData.loaded then return end if client.parachute then Utils.DeleteEntity(client.parachute) @@ -55,24 +49,19 @@ function client.onLogout() client.closeInventory() Shops.wipeShops() - ClearInterval(client.interval) - ClearInterval(client.tick) - Weapon.Disarm() -end -local scriptPath = ("modules/bridge/%s/client.lua"):format(shared.framework) -local resourceFile = LoadResourceFile(cache.resource, scriptPath) + if client.interval then + ClearInterval(client.interval) + ClearInterval(client.tick) + end -if not resourceFile then - lib = nil - return error(("Unable to find framework bridge for '%s'"):format(shared.framework)) + Weapon.Disarm() end -local func, err = load(resourceFile, ("@@%s/%s"):format(cache.resource, scriptPath)) +local success, result = pcall(lib.load, ('modules.bridge.%s.client'):format(shared.framework)) -if not func or err then - lib = nil - return error(err) +if not success then + lib.print.error(result) + lib = nil + return end - -func(client.onLogout) diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/client.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/client.lua index 55639b0e1..3417d343f 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/client.lua @@ -1,12 +1,10 @@ -local onLogout = ... - local ESX = setmetatable({}, { __index = function(self, index) local obj = exports.es_extended:getSharedObject() self.SetPlayerData = obj.SetPlayerData self.PlayerLoaded = obj.PlayerLoaded return self[index] - end, + end }) ---@diagnostic disable-next-line: duplicate-set-field @@ -18,23 +16,17 @@ end ---@diagnostic disable-next-line: duplicate-set-field function client.setPlayerStatus(values) for name, value in pairs(values) do - if value > 0 then - TriggerEvent("esx_status:add", name, value) - else - TriggerEvent("esx_status:remove", name, -value) - end + if value > 0 then TriggerEvent('esx_status:add', name, value) else TriggerEvent('esx_status:remove', name, -value) end end end -RegisterNetEvent("esx:onPlayerLogout", onLogout) +RegisterNetEvent('esx:onPlayerLogout', client.onLogout) -AddEventHandler("esx:setPlayerData", function(key, value) - if not PlayerData.loaded or GetInvokingResource() ~= "es_extended" then - return - end +AddEventHandler('esx:setPlayerData', function(key, value) + if not PlayerData.loaded or GetInvokingResource() ~= 'es_extended' then return end - if key == "job" then - key = "groups" + if key == 'job' then + key = 'groups' value = { [value.name] = value.grade } end @@ -42,20 +34,18 @@ AddEventHandler("esx:setPlayerData", function(key, value) OnPlayerData(key, value) end) -local Weapon = require("modules.weapon.client") +local Weapon = require 'modules.weapon.client' -RegisterNetEvent("esx_policejob:handcuff", function() +RegisterNetEvent('esx_policejob:handcuff', function() PlayerData.cuffed = not PlayerData.cuffed - LocalPlayer.state:set("invBusy", PlayerData.cuffed, false) + LocalPlayer.state:set('invBusy', PlayerData.cuffed, false) - if not PlayerData.cuffed then - return - end + if not PlayerData.cuffed then return end Weapon.Disarm() end) -RegisterNetEvent("esx_policejob:unrestrain", function() +RegisterNetEvent('esx_policejob:unrestrain', function() PlayerData.cuffed = false - LocalPlayer.state:set("invBusy", PlayerData.cuffed, false) + LocalPlayer.state:set('invBusy', PlayerData.cuffed, false) end) diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/server.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/server.lua index ba127ebfa..16fc142bb 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/esx/server.lua @@ -1,12 +1,7 @@ -local playerDropped = ... -local Inventory, Items +local Inventory = require 'modules.inventory.server' +local Items = require 'modules.items.server' -CreateThread(function() - Inventory = require 'modules.inventory.server' - Items = require 'modules.items.server' -end) - -AddEventHandler('esx:playerDropped', playerDropped) +AddEventHandler('esx:playerDropped', server.playerDropped) AddEventHandler('esx:setJob', function(source, job, lastJob) local inventory = Inventory(source) @@ -32,11 +27,7 @@ SetTimeout(500, function() end end) --- Accounts that need to be synced with physical items -server.accounts = { - money = 0, - black_money = 0, -} +server.accounts.black_money = 0 ---@diagnostic disable-next-line: duplicate-set-field function server.setPlayerData(player) @@ -55,16 +46,12 @@ end ---@diagnostic disable-next-line: duplicate-set-field function server.syncInventory(inv) - local money = table.clone(server.accounts) - - for _, v in pairs(inv.items) do - if money[v.name] then - money[v.name] += v.count - end - end + local accounts = Inventory.GetAccountItemCounts(inv) - local player = server.GetPlayerFromId(inv.id) - player.syncInventory(inv.weight, inv.maxWeight, inv.items, money) + if accounts then + local player = server.GetPlayerFromId(inv.id) + player.syncInventory(inv.weight, inv.maxWeight, inv.items, accounts) + end end ---@diagnostic disable-next-line: duplicate-set-field diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/client.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/client.lua index a889d2945..f97ca7a2a 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/client.lua @@ -1,42 +1,48 @@ +if not lib.checkDependency('ND_Core', '2.0.0', true) then return end + +NDCore = {} + +lib.load('@ND_Core.init') + +RegisterNetEvent("ND:characterUnloaded", client.onLogout) + local function reorderGroups(groups) - groups = groups or {} - for group, info in pairs(groups) do - groups[group] = info.rank - end - return groups + groups = groups or {} + for group, info in pairs(groups) do + groups[group] = info.rank + end + return groups end SetTimeout(500, function() - NDCore = exports["ND_Core"]:GetCoreObject() - - local character = NDCore.Functions.GetSelectedCharacter() - if character then - local groups = reorderGroups(character.data.groups) - OnPlayerData("groups", groups) - end + local player = NDCore.getPlayer() + if not player then return end + local groups = reorderGroups(player.groups) + OnPlayerData("groups", groups) end) -RegisterNetEvent("ND:setCharacter", function(character) - local groups = reorderGroups(character.data.groups) - OnPlayerData("groups", groups) +RegisterNetEvent("ND:characterLoaded", function(character) + local groups = reorderGroups(character.groups) + OnPlayerData("groups", groups) end) -RegisterNetEvent("ND:jobChanged", function(job, lastJob) - local character = NDCore.Functions.GetSelectedCharacter() - local groups = reorderGroups(character.data.groups) - groups[lastJob.name] = nil - groups[job.name] = job.rank - - OnPlayerData("groups", groups) +RegisterNetEvent("ND:updateCharacter", function(character) + PlayerData.dead = character.metadata.dead + OnPlayerData("dead", PlayerData.dead) end) ---@diagnostic disable-next-line: duplicate-set-field function client.setPlayerStatus(values) - for name, value in pairs(values) do - if value == 0 then - exports["ND_Status"]:setStatus(name, value) - else - exports["ND_Status"]:changeStatus(name, value) - end - end + if GetResourceState("ND_Status") ~= "started" then return end + + local status = exports["ND_Status"] + + for name, value in pairs(values) do + + if value > 100 or value < -100 then + value = value * 0.0001 + end + + status:changeStatus(name, value) + end end diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/server.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/server.lua index 0a76de132..ddbf8a871 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/nd/server.lua @@ -1,118 +1,87 @@ -local playerDropped = ... -local Inventory -local NDCore +if not lib.checkDependency('ND_Core', '2.0.0', true) then return end -CreateThread(function() - Inventory = require("modules.inventory.server") -end) +local Inventory = require 'modules.inventory.server' +NDCore = {} -AddEventHandler("ND:characterUnloaded", playerDropped) +lib.load('@ND_Core.init') -RegisterNetEvent("ND:jobChanged", function(source, job, lastJob) - local inventory = Inventory(source) - if not inventory then - return - end - inventory.player.groups[lastJob.name] = nil - inventory.player.groups[job.name] = job.rank -end) +AddEventHandler("ND:characterUnloaded", server.playerDropped) local function reorderGroups(groups) - groups = groups or {} - for group, info in pairs(groups) do - groups[group] = info.rank - end - return groups + groups = groups or {} + for group, info in pairs(groups) do + groups[group] = info.rank + end + return groups +end + +local function setCharacterInventory(character) + character.identifier = character.id + character.name = ("%s %s"):format(character.firstname, character.lastname) + character.dateofbirth = character.dob + character.sex = character.gender + character.groups = reorderGroups(character.groups) + server.setPlayerInventory(character, character.inventory) + Inventory.SetItem(character.source, "money", character.cash) end SetTimeout(500, function() - NDCore = exports["ND_Core"]:GetCoreObject() - server.GetPlayerFromId = NDCore.Functions.GetPlayer - for _, character in pairs(NDCore.Functions.GetPlayers()) do - character.identifier = character.id - character.name = ("%s %s"):format(character.firstName, character.lastName) - character.dateofbirth = character.dob - character.sex = character.gender - character.groups = reorderGroups(character.data.groups) - server.setPlayerInventory(character, character.inventory) - Inventory.SetItem(character.source, "money", character.cash) - end + server.GetPlayerFromId = NDCore.getPlayer + for _, character in pairs(NDCore.getPlayers()) do + setCharacterInventory(character) + end end) -- Accounts that need to be synced with physical items server.accounts = { - money = 0, + money = 0 } -RegisterNetEvent("ND:characterLoaded", function(character) - if not character then - return - end - character.identifier = character.id - character.name = ("%s %s"):format(character.firstName, character.lastName) - character.dateofbirth = character.dob - character.sex = character.gender - - local groups = reorderGroups(character.data.groups) - server.setPlayerInventory(character, character.inventory) - Inventory.SetItem(character.source, "money", character.cash) +AddEventHandler("ND:characterLoaded", function(character) + if not character then return end + setCharacterInventory(character) end) -RegisterNetEvent("ND:moneyChange", function(player, account, amount, changeType) - if account ~= "cash" then - return - end - local item = Inventory.GetItem(player, "money", nil, true) - Inventory.SetItem( - player, - "money", - changeType == "set" and amount - or changeType == "remove" and item - amount - or changeType == "add" and item + amount - ) +AddEventHandler("ND:moneyChange", function(src, account, amount, changeType, reason) + if account ~= "cash" then return end + local item = Inventory.GetItem(src, "money", nil, true) + Inventory.SetItem(src, "money", changeType == "set" and amount or changeType == "remove" and item - amount or changeType == "add" and item + amount) end) ---@diagnostic disable-next-line: duplicate-set-field function server.syncInventory(inv) - local money = table.clone(server.accounts) + local accounts = Inventory.GetAccountItemCounts(inv) - for _, v in pairs(inv.items) do - if money[v.name] then - money[v.name] += v.count - end - end - - if money then - local character = NDCore.Functions.GetPlayer(inv.id) - NDCore.Functions.SetPlayerData(character.id, "cash", money.money) - end + if accounts then + local player = NDCore.getPlayer(inv.id) + player.setData("cash", accounts.money) + end end ---@diagnostic disable-next-line: duplicate-set-field function server.setPlayerData(player) - return { - source = player.source, - identifier = player.id, - name = ("%s %s"):format(player.firstName, player.lastName), - groups = player.data.groups, - sex = player.gender, - dateofbirth = player.dob, - job = player.job, - } + return { + source = player.source, + identifier = player.id, + name = ("%s %s"):format(player.firstname, player.lastname), + groups = player.groups, + sex = player.gender, + dateofbirth = player.dob + } end ---@diagnostic disable-next-line: duplicate-set-field function server.hasLicense(inv, license) - local character = NDCore.Functions.GetPlayer(inv.id) - if not character or not character.data.licences then - return - end - - for _, characterLicense in pairs(character.data.licences) do - if characterLicense.type == license and characterLicense.status == "valid" then - return characterLicense.type - end - end + local player = NDCore.getPlayer(inv.id) + if not player then return end + + local licenses = player.getMetadata("licenses") or {} + for i=1, #licenses do + local characterLicense = licenses[i] + if characterLicense.type == license and characterLicense.status == "valid" then + return characterLicense.type + end + end end ---@diagnostic disable-next-line: duplicate-set-field @@ -124,6 +93,24 @@ function server.buyLicense(inv, license) end Inventory.RemoveItem(inv, "money", license.price) - NDCore.Functions.CreatePlayerLicense(inv.owner, "weapon") + local player = NDCore.getPlayer(inv.id) + player.createLicense("weapon") return true, "have_purchased" end + +---@diagnostic disable-next-line: duplicate-set-field +function server.isPlayerBoss(playerId, group) + local player = NDCore.getPlayer(playerId) + if not player then return end + + local groupInfo = player.getGroup(group) + return groupInfo and groupInfo.isBoss +end + +---@param entityId number +---@return number | string +---@diagnostic disable-next-line: duplicate-set-field +function server.getOwnedVehicleId(entityId) + return NDCore.getVehicle(entityId)?.id +end + diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/client.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/client.lua index 3eee6f856..8e760bd08 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/client.lua @@ -1,10 +1,10 @@ -local onLogout = ... +CreateThread(function() lib.load('@ox_core.imports.client') end) -RegisterNetEvent("ox:playerLogout", onLogout) +RegisterNetEvent('ox:playerLogout', client.onLogout) -RegisterNetEvent("ox:setGroup", function(name, grade) +RegisterNetEvent('ox:setGroup', function(name, grade) PlayerData.groups[name] = grade - OnPlayerData("groups") + OnPlayerData('groups') end) ---@diagnostic disable-next-line: duplicate-set-field @@ -14,7 +14,7 @@ function client.setPlayerStatus(values) -- we need to awkwardly change the value if value > 100 or value < -100 then -- Hunger and thirst start at 0 and go up to 100 as you get hungry/thirsty (inverse of ESX) - if name == "hunger" or name == "thirst" then + if (name == 'hunger' or name == 'thirst') then value = -value end diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/server.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/server.lua index 93e402470..ec2bd664d 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/ox/server.lua @@ -1,13 +1,12 @@ -local playerDropped = ... -local Inventory = require("modules.inventory.server") +CreateThread(function() lib.load('@ox_core.imports.server') end) -AddEventHandler("ox:playerLogout", playerDropped) +local Inventory = require 'modules.inventory.server' -AddEventHandler("ox:setGroup", function(source, name, grade) +AddEventHandler('ox:playerLogout', server.playerDropped) + +AddEventHandler('ox:setGroup', function(source, name, grade) local inventory = Inventory(source) - if not inventory then - return - end + if not inventory then return end inventory.player.groups[name] = grade end) @@ -22,20 +21,26 @@ function server.buyLicense(inv, license) local player = Ox.GetPlayer(inv.id) if player.getLicense(license.name) then - return false, "already_have" - elseif Inventory.GetItem(inv, "money", false, true) < license.price then - return false, "can_not_afford" + return false, 'already_have' + elseif Inventory.GetItem(inv, 'money', false, true) < license.price then + return false, 'can_not_afford' end - Inventory.RemoveItem(inv, "money", license.price) + Inventory.RemoveItem(inv, 'money', license.price) player.addLicense(license.name) - return true, "have_purchased" + return true, 'have_purchased' end ---@diagnostic disable-next-line: duplicate-set-field function server.isPlayerBoss(playerId, group, grade) - local groupData = GlobalState[("group.%s"):format(group)] + local groupData = GlobalState[('group.%s'):format(group)] return groupData and grade >= groupData.adminGrade end + +---@param entityId number +---@return number | string +function server.getOwnedVehicleId(entityId) + return Ox.GetVehicle(entityId)?.id +end diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/client.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/client.lua index 6b7a11ddb..1571543bc 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/client.lua @@ -1,43 +1,34 @@ -local onLogout, Weapon = ... -local QBCore = exports["qb-core"]:GetCoreObject() -local Inventory = require("modules.inventory.client") +local QBCore = exports['qb-core']:GetCoreObject() +local Inventory = require 'modules.inventory.client' +local Weapon = require 'modules.weapon.client' -RegisterNetEvent("QBCore:Client:OnPlayerUnload", onLogout) +RegisterNetEvent('QBCore:Client:OnPlayerUnload', client.onLogout) -RegisterNetEvent("QBCore:Player:SetPlayerData", function(data) - if source == "" or not PlayerData.loaded then - return - end +RegisterNetEvent('QBCore:Player:SetPlayerData', function(data) + if source == '' or not PlayerData.loaded then return end if (data.metadata.isdead or data.metadata.inlaststand) ~= PlayerData.dead then PlayerData.dead = data.metadata.isdead or data.metadata.inlaststand - OnPlayerData("dead", PlayerData.dead) + OnPlayerData('dead', PlayerData.dead) end local groups = PlayerData.groups - if - not groups[data.job.name] - or not groups[data.gang.name] - or groups[data.job.name] ~= data.job.grade.level - or groups[data.gang.name] ~= data.gang.grade.level - then + if not groups[data.job.name] or not groups[data.gang.name] or groups[data.job.name] ~= data.job.grade.level or groups[data.gang.name] ~= data.gang.grade.level then PlayerData.groups = { [data.job.name] = data.job.grade.level, [data.gang.name] = data.gang.grade.level, } - OnPlayerData("groups", PlayerData.groups) + OnPlayerData('groups', PlayerData.groups) end end) -RegisterNetEvent("police:client:GetCuffed", function() +RegisterNetEvent('police:client:GetCuffed', function() PlayerData.cuffed = not PlayerData.cuffed - LocalPlayer.state:set("invBusy", PlayerData.cuffed, false) + LocalPlayer.state:set('invBusy', PlayerData.cuffed, false) - if not PlayerData.cuffed then - return - end + if not PlayerData.cuffed then return end Weapon.Disarm() end) @@ -45,21 +36,22 @@ end) ---@diagnostic disable-next-line: duplicate-set-field function client.setPlayerStatus(values) for name, value in pairs(values) do + -- compatibility for ESX style values if value > 100 or value < -100 then value = value * 0.0001 end if name == "hunger" then - TriggerServerEvent("consumables:server:addHunger", QBCore.Functions.GetPlayerData().metadata.hunger + value) + TriggerServerEvent('consumables:server:addHunger', QBCore.Functions.GetPlayerData().metadata.hunger + value) elseif name == "thirst" then - TriggerServerEvent("consumables:server:addThirst", QBCore.Functions.GetPlayerData().metadata.thirst + value) + TriggerServerEvent('consumables:server:addThirst', QBCore.Functions.GetPlayerData().metadata.thirst + value) elseif name == "stress" then if value > 0 then - TriggerServerEvent("hud:server:GainStress", value) + TriggerServerEvent('hud:server:GainStress', value) else value = math.abs(value) - TriggerServerEvent("hud:server:RelieveStress", value) + TriggerServerEvent('hud:server:RelieveStress', value) end end end @@ -67,23 +59,27 @@ end -- taken from qbox-core (https://github.com/Qbox-project/qb-core/blob/f4174f311aae8157181a48fa2e2bd30c8d13edb1/client/functions.lua#L25) local function hasItem(items, amount) - amount = amount or 1 + amount = amount or 1 - local count = Inventory.Search("count", items) + local count = Inventory.Search('count', items) - if type(items) == "table" and type(count) == "table" then - for _, v in pairs(count) do - if v < amount then - return false - end - end + if type(items) == 'table' and type(count) == 'table' then + for _, v in pairs(count) do + if v < amount then + return false + end + end - return true - end + return true + end - return count >= amount + return count >= amount end -AddEventHandler("__cfx_export_qb-inventory_HasItem", function(setCB) +AddStateBagChangeHandler('inv_busy', ('player:%s'):format(cache.serverId), function(_, _, value) + LocalPlayer.state:set('invBusy', value, false) +end) + +AddEventHandler(('__cfx_export_qb-inventory_HasItem'), function(setCB) setCB(hasItem) end) diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/server.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/server.lua index 69b2ff93f..fb7f6a2ee 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/qb/server.lua @@ -1,14 +1,9 @@ -local playerDropped = ... -local Inventory, Items - -CreateThread(function() - Inventory = require 'modules.inventory.server' - Items = require 'modules.items.server' -end) +local Inventory = require 'modules.inventory.server' +local Items = require 'modules.items.server' local QBCore -AddEventHandler('QBCore:Server:OnPlayerUnload', playerDropped) +AddEventHandler('QBCore:Server:OnPlayerUnload', server.playerDropped) AddEventHandler('QBCore:Server:OnJobUpdate', function(source, job) local inventory = Inventory(source) @@ -43,14 +38,6 @@ local function setItemCompatibilityProps(item) end local function setupPlayer(Player) - QBCore.Functions.AddPlayerField(Player.PlayerData.source, 'syncInventory', function(_, _, items, money) - Player.Functions.SetPlayerData('items', items) - - if money.money then - Player.Functions.SetMoney('cash', money.money, "Sync money with inventory") - end - end) - Player.PlayerData.inventory = Player.PlayerData.items Player.PlayerData.identifier = Player.PlayerData.citizenid @@ -108,11 +95,6 @@ SetTimeout(500, function() for _, Player in pairs(QBCore.Functions.GetQBPlayers()) do setupPlayer(Player) end end) --- Accounts that need to be synced with physical items -server.accounts = { - money = 0 -} - function server.UseItem(source, itemName, data) local cb = QBCore.Functions.CanUseItem(itemName) return cb and cb(source, data) @@ -120,7 +102,11 @@ end AddEventHandler('QBCore:Server:OnMoneyChange', function(src, account, amount, changeType) if account ~= "cash" then return end + local item = Inventory.GetItem(src, 'money', nil, false) + + if not item then return end + Inventory.SetItem(src, 'money', changeType == "set" and amount or changeType == "remove" and item.count - amount or changeType == "add" and item.count + amount) end) @@ -144,16 +130,16 @@ end ---@diagnostic disable-next-line: duplicate-set-field function server.syncInventory(inv) - local money = table.clone(server.accounts) + local accounts = Inventory.GetAccountItemCounts(inv) - for _, v in pairs(inv.items) do - if money[v.name] then - money[v.name] += v.count + if accounts then + local player = server.GetPlayerFromId(inv.id) + player.Functions.SetPlayerData('items', inv.items) + + if accounts.money and accounts.money ~= player.Functions.GetMoney('cash') then + player.Functions.SetMoney('cash', accounts.money, "Sync money with inventory") end end - - local player = server.GetPlayerFromId(inv.id) - player.syncInventory(inv.weight, inv.maxWeight, inv.items, money) end ---@diagnostic disable-next-line: duplicate-set-field @@ -167,14 +153,14 @@ function server.buyLicense(inv, license) local player = server.GetPlayerFromId(inv.id) if not player then return end - if player.PlayerData.metadata.licences[license] then + if player.PlayerData.metadata.licences[license.name] then return false, 'already_have' elseif Inventory.GetItem(inv, 'money', false, true) < license.price then return false, 'can_not_afford' end Inventory.RemoveItem(inv, 'money', license.price) - player.PlayerData.metadata.licences.weapon = true + player.PlayerData.metadata.licences[license.name] = true player.Functions.SetMetaData('licences', player.PlayerData.metadata.licences) return true, 'have_purchased' diff --git a/server-data/resources/[ox]/ox_inventory/modules/bridge/server.lua b/server-data/resources/[ox]/ox_inventory/modules/bridge/server.lua index fa14d1428..2c68e84ee 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/bridge/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/bridge/server.lua @@ -37,45 +37,23 @@ function server.buyLicense() warn('Licenses are not supported for the current framework.') end -local Inventory +local Inventory = require 'modules.inventory.server' -CreateThread(function() - Inventory = require 'modules.inventory.server' -end) - -local function playerDropped(source) +function server.playerDropped(source) local inv = Inventory(source) --[[@as OxInventory]] if inv?.player then inv:closeInventory() - - if shared.framework ~= 'esx' then - db.savePlayer(inv.owner, json.encode(inv:minimal())) - end - - Inventory.Remove(inv, true) + Inventory.Remove(inv) end end -AddEventHandler('playerDropped', function() - playerDropped(source) -end) - -local scriptPath = ('modules/bridge/%s/server.lua'):format(shared.framework) -local resourceFile = LoadResourceFile(cache.resource, scriptPath) +local success, result = pcall(lib.load, ('modules.bridge.%s.server'):format(shared.framework)) -if not resourceFile then - lib = nil - return error(("Unable to find framework bridge for '%s'"):format(shared.framework)) +if not success then + lib.print.error(result) + lib = nil + return end -local func, err = load(resourceFile, ('@@%s/%s'):format(cache.resource, scriptPath)) - -if not func or err then - lib = nil - return error(err) -end - -func(playerDropped) - if server.convertInventory then exports('ConvertItems', server.convertInventory) end diff --git a/server-data/resources/[ox]/ox_inventory/modules/crafting/client.lua b/server-data/resources/[ox]/ox_inventory/modules/crafting/client.lua new file mode 100644 index 000000000..5c3b4246c --- /dev/null +++ b/server-data/resources/[ox]/ox_inventory/modules/crafting/client.lua @@ -0,0 +1,101 @@ +if not lib then return end + +local CraftingBenches = {} +local Items = require 'modules.items.client' +local createBlip = require 'modules.utils.client'.CreateBlip + +---@param id number +---@param data table +local function createCraftingBench(id, data) + CraftingBenches[id] = {} + local recipes = data.items + + if recipes then + data.slots = #recipes + + for i = 1, data.slots do + local recipe = recipes[i] + local item = Items[recipe.name] + + if item then + recipe.weight = item.weight + recipe.slot = i + else + warn(('failed to setup crafting recipe (bench: %s, slot: %s) - item "%s" does not exist'):format(id, i, recipe.name)) + end + end + + local blip = data.blip + + if blip then + blip.name = blip.name or ('ox_crafting_%s'):format(data.label and id or 0) + AddTextEntry(blip.name, data.label or locale('crafting_bench')) + end + + if shared.target then + data.points = nil + if data.zones then + for i = 1, #data.zones do + local zone = data.zones[i] + zone.name = ("craftingbench_%s:%s"):format(id, i) + zone.id = id + zone.index = i + zone.options = { + { + label = zone.label or locale('open_crafting_bench'), + canInteract = data.groups and function() + return client.hasGroup(data.groups) + end or nil, + onSelect = function() + client.openInventory('crafting', { id = id, index = i }) + end, + distance = zone.distance or 2.0, + icon = zone.icon or 'fas fa-wrench', + } + } + + exports.ox_target:addBoxZone(zone) + + if blip then + createBlip(blip, zone.coords) + end + end + end + elseif data.points then + data.zones = nil + + ---@param point CPoint + local function nearbyBench(point) + ---@diagnostic disable-next-line: param-type-mismatch + DrawMarker(2, point.coords.x, point.coords.y, point.coords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.15, 150, 150, 30, 222, false, false, 0, true, false, false, false) + + if point.isClosest and point.currentDistance < 1.2 and IsControlJustReleased(0, 38) then + client.openInventory('crafting', { id = point.benchid, index = point.index }) + end + end + + for i = 1, #data.points do + local coords = data.points[i] + + lib.points.new({ + coords = coords, + distance = 16, + benchid = id, + index = i, + inv = 'crafting', + nearby = nearbyBench + }) + + if blip then + createBlip(blip, coords) + end + end + end + + CraftingBenches[id] = data + end +end + +for id, data in pairs(lib.load('data.crafting')) do createCraftingBench(id, data) end + +return CraftingBenches diff --git a/server-data/resources/[ox]/ox_inventory/modules/crafting/server.lua b/server-data/resources/[ox]/ox_inventory/modules/crafting/server.lua new file mode 100644 index 000000000..aca650dd8 --- /dev/null +++ b/server-data/resources/[ox]/ox_inventory/modules/crafting/server.lua @@ -0,0 +1,230 @@ +if not lib then return end + +local CraftingBenches = {} +local Items = require 'modules.items.server' +local Inventory = require 'modules.inventory.server' + +---@param id number +---@param data table +local function createCraftingBench(id, data) + CraftingBenches[id] = {} + local recipes = data.items + + if recipes then + for i = 1, #recipes do + local recipe = recipes[i] + local item = Items(recipe.name) + + if item then + recipe.weight = item.weight + recipe.slot = i + else + warn(('failed to setup crafting recipe (bench: %s, slot: %s) - item "%s" does not exist'):format(id, i, recipe.name)) + end + + for ingredient, needs in pairs(recipe.ingredients) do + if needs < 1 then + item = Items(ingredient) + + if item and not item.durability then + item.durability = true + end + end + end + end + + if shared.target then + data.points = nil + else + data.zones = nil + end + + CraftingBenches[id] = data + end +end + +for id, data in pairs(lib.load('data.crafting')) do createCraftingBench(id, data) end + +---falls back to player coords if zones and points are both nil +---@param source number +---@param bench table +---@param index number +---@return vector3 +local function getCraftingCoords(source, bench, index) + if not bench.zones and not bench.points then + return GetEntityCoords(GetPlayerPed(source)) + else + return shared.target and bench.zones[index].coords or bench.points[index] + end +end + +lib.callback.register('ox_inventory:openCraftingBench', function(source, id, index) + local left, bench = Inventory(source), CraftingBenches[id] + + if not left then return end + + if bench then + local groups = bench.groups + local coords = getCraftingCoords(source, bench, index) + + if not coords then return end + + if groups and not server.hasGroup(left, groups) then return end + if #(GetEntityCoords(GetPlayerPed(source)) - coords) > 10 then return end + + if left.open and left.open ~= source then + local inv = Inventory(left.open) --[[@as OxInventory]] + + -- Why would the player inventory open with an invalid target? Can't repro but whatever. + if inv?.player then + inv:closeInventory() + end + end + + left:openInventory(left) + end + + return { label = left.label, type = left.type, slots = left.slots, weight = left.weight, maxWeight = left.maxWeight } +end) + +local TriggerEventHooks = require 'modules.hooks.server' + +lib.callback.register('ox_inventory:craftItem', function(source, id, index, recipeId, toSlot) + local left, bench = Inventory(source), CraftingBenches[id] + + if not left then return end + + if bench then + local groups = bench.groups + local coords = getCraftingCoords(source, bench, index) + + if groups and not server.hasGroup(left, groups) then return end + if #(GetEntityCoords(GetPlayerPed(source)) - coords) > 10 then return end + + local recipe = bench.items[recipeId] + + if recipe then + local tbl, num = {}, 0 + + for name in pairs(recipe.ingredients) do + num += 1 + tbl[num] = name + end + + local craftedItem = Items(recipe.name) + local craftCount = (type(recipe.count) == 'number' and recipe.count) or (table.type(recipe.count) == 'array' and math.random(recipe.count[1], recipe.count[2])) or 1 + local newWeight = left.weight + (craftedItem.weight + (recipe.metadata?.weight or 0)) * craftCount + ---@todo new iterator or something to accept a map + local items = Inventory.Search(left, 'slots', tbl) or {} + table.wipe(tbl) + + for name, needs in pairs(recipe.ingredients) do + local slots = items[name] or items + + for i = 1, #slots do + local slot = slots[i] + + if needs == 0 then + if not slot.metadata.durability or slot.metadata.durability > 0 then + break + end + elseif needs < 1 then + local item = Items(name) + local durability = slot.metadata.durability + + if durability and durability >= needs * 100 then + if durability > 100 then + local degrade = (slot.metadata.degrade or item.degrade) * 60 + local percentage = ((durability - os.time()) * 100) / degrade + + if percentage >= needs * 100 then + tbl[slot.slot] = needs + break + end + else + tbl[slot.slot] = needs + break + end + end + elseif needs <= slot.count then + local itemWeight = slot.weight / slot.count + newWeight = (newWeight - slot.weight) + (slot.count - needs) * itemWeight + tbl[slot.slot] = needs + break + else + tbl[slot.slot] = slot.count + newWeight -= slot.weight + needs -= slot.count + end + + if needs == 0 then break end + -- Player does not have enough items (ui should prevent crafting if lacking items, so this shouldn't trigger) + if needs > 0 and i == #slots then return end + end + end + + if newWeight > left.maxWeight then + return false, 'cannot_carry' + end + + if not TriggerEventHooks('craftItem', { + source = source, + benchId = id, + benchIndex = index, + recipe = recipe, + toInventory = left.id, + toSlot = toSlot, + }) then return false end + + local success = lib.callback.await('ox_inventory:startCrafting', source, id, recipeId) + + if success then + for name, needs in pairs(recipe.ingredients) do + if Inventory.GetItem(left, name, nil, true) < needs then return end + end + + for slot, count in pairs(tbl) do + local invSlot = left.items[slot] + + if not invSlot then return end + + if count < 1 then + local item = Items(invSlot.name) + local durability = invSlot.metadata.durability or 100 + + if durability > 100 then + local degrade = (invSlot.metadata.degrade or item.degrade) * 60 + durability -= degrade * count + else + durability -= count * 100 + end + + if invSlot.count > 1 then + local emptySlot = Inventory.GetEmptySlot(left) + + if emptySlot then + local newItem = Inventory.SetSlot(left, item, 1, table.deepclone(invSlot.metadata), emptySlot) + + if newItem then + Items.UpdateDurability(left, newItem, item, durability < 0 and 0 or durability) + end + end + + invSlot.count -= 1 + else + Items.UpdateDurability(left, invSlot, item, durability < 0 and 0 or durability) + end + else + local removed = invSlot and Inventory.RemoveItem(left, invSlot.name, count, nil, slot) + -- Failed to remove item (inventory state unexpectedly changed?) + if not removed then return end + end + end + + Inventory.AddItem(left, craftedItem, craftCount, recipe.metadata or {}, craftedItem.stack and toSlot or nil) + end + + return success + end + end +end) diff --git a/server-data/resources/[ox]/ox_inventory/modules/hooks/server.lua b/server-data/resources/[ox]/ox_inventory/modules/hooks/server.lua index 50296622a..011d2e578 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/hooks/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/hooks/server.lua @@ -1,15 +1,13 @@ -if not lib then - return -end +if not lib then return end local eventHooks = {} local microtime = os.microtime local function itemFilter(filter, item, secondItem) - local itemName = type(item) == "table" and item.name or item + local itemName = type(item) == 'table' and item.name or item if not itemName or not filter[itemName] then - if type(secondItem) ~= "table" or not filter[secondItem.name] then + if type(secondItem) ~= 'table' or not filter[secondItem.name] then return false end end @@ -34,25 +32,16 @@ local function typeFilter(filter, type) end local function TriggerEventHooks(event, payload) - local hooks = eventHooks[event] + local hooks = eventHooks[event] - if hooks then - local fromInventory = payload.fromInventory and tostring(payload.fromInventory) - or payload.inventoryId and tostring(payload.inventoryId) - or payload.shopType and tostring(payload.shopType) + if hooks then + local fromInventory = payload.fromInventory and tostring(payload.fromInventory) or payload.inventoryId and tostring(payload.inventoryId) or payload.shopType and tostring(payload.shopType) local toInventory = payload.toInventory and tostring(payload.toInventory) - for i = 1, #hooks do + for i = 1, #hooks do local hook = hooks[i] - if - hook.itemFilter - and not itemFilter( - hook.itemFilter, - payload.fromSlot or payload.item or payload.itemName or payload.recipe, - payload.toSlot - ) - then + if hook.itemFilter and not itemFilter(hook.itemFilter, payload.fromSlot or payload.item or payload.itemName or payload.recipe, payload.toSlot) then goto skipLoop end @@ -60,7 +49,7 @@ local function TriggerEventHooks(event, payload) goto skipLoop end - if hook.typeFilter and not typeFilter(hook.typeFilter, payload.inventoryType or payload.shopType) then + if hook.typeFilter and not typeFilter(hook.typeFilter, payload.inventoryType or payload.shopType or payload.fromType) then goto skipLoop end @@ -69,50 +58,43 @@ local function TriggerEventHooks(event, payload) end local start = microtime() - local _, response = pcall(hooks[i], payload) + local _, response = pcall(hooks[i], payload) local executionTime = microtime() - start if executionTime >= 100000 then - warn( - ('Execution of event hook "%s:%s:%s" took %.2fms.'):format( - hook.resource, - event, - i, - executionTime / 1e3 - ) - ) + warn(('Execution of event hook "%s:%s:%s" took %.2fms.'):format(hook.resource, event, i, executionTime / 1e3)) end - if event == "createItem" then - if type(response) == "table" then + if event == 'createItem' then + if type(response) == 'table' then payload.metadata = response end elseif response == false then - return false - end + return false + end ::skipLoop:: - end - end + end + end - if event == "createItem" then + if event == 'createItem' then return payload.metadata end - return true + return true end local hookId = 0 -exports("registerHook", function(event, cb, options) - if not eventHooks[event] then - eventHooks[event] = {} - end +exports('registerHook', function(event, cb, options) + if not eventHooks[event] then + eventHooks[event] = {} + end local mt = getmetatable(cb) mt.__index = nil mt.__newindex = nil - cb.resource = GetInvokingResource() + cb.resource = GetInvokingResource() hookId += 1 cb.hookId = hookId @@ -122,25 +104,25 @@ exports("registerHook", function(event, cb, options) end end - eventHooks[event][#eventHooks[event] + 1] = cb + eventHooks[event][#eventHooks[event] + 1] = cb return hookId end) local function removeResourceHooks(resource, id) - for _, hooks in pairs(eventHooks) do - for i = #hooks, 1, -1 do + for _, hooks in pairs(eventHooks) do + for i = #hooks, 1, -1 do local hook = hooks[i] - if hook.resource == resource and (not id or hook.id == id) then - table.remove(hooks, i) - end - end - end + if hook.resource == resource and (not id or hook.hookId == id) then + table.remove(hooks, i) + end + end + end end -AddEventHandler("onResourceStop", removeResourceHooks) +AddEventHandler('onResourceStop', removeResourceHooks) -exports("removeHooks", function(id) +exports('removeHooks', function(id) removeResourceHooks(GetInvokingResource() or cache.resource, id) end) diff --git a/server-data/resources/[ox]/ox_inventory/modules/interface/client.lua b/server-data/resources/[ox]/ox_inventory/modules/interface/client.lua index 6861c77f0..8a7dbdb95 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/interface/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/interface/client.lua @@ -1,13 +1,11 @@ -if not lib then - return -end +if not lib then return end -- Module is deprecated and provided for compatibility -- All functions are now part of with ox_lib -exports("Keyboard", lib.inputDialog) +exports('Keyboard', lib.inputDialog) -exports("Progress", function(options, completed) +exports('Progress', function(options, completed) local success = lib.progressBar(options) if completed then @@ -15,5 +13,5 @@ exports("Progress", function(options, completed) end end) -exports("CancelProgress", lib.cancelProgress) -exports("ProgressActive", lib.progressActive) +exports('CancelProgress', lib.cancelProgress) +exports('ProgressActive', lib.progressActive) diff --git a/server-data/resources/[ox]/ox_inventory/modules/inventory/client.lua b/server-data/resources/[ox]/ox_inventory/modules/inventory/client.lua index 3f36161d5..cff71f701 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/inventory/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/inventory/client.lua @@ -18,19 +18,89 @@ function Inventory.OpenDumpster(entity) end end +local Utils = require 'modules.utils.client' +local Vehicles = lib.load('data.vehicles') +local backDoorIds = { 2, 3 } + +function Inventory.CanAccessTrunk(entity) + if cache.vehicle or not NetworkGetEntityIsNetworked(entity) then return end + + local vehicleHash = GetEntityModel(entity) + local vehicleClass = GetVehicleClass(entity) + local checkVehicle = Vehicles.Storage[vehicleHash] + + if (checkVehicle == 0 or checkVehicle == 1) or (not Vehicles.trunk[vehicleClass] and not Vehicles.trunk.models[vehicleHash]) then return end + + ---@type number | number[] + local doorId = checkVehicle and 4 or 5 + + if not Vehicles.trunk.boneIndex?[vehicleHash] and not GetIsDoorValid(entity, doorId --[[@as number]]) then + if vehicleClass ~= 11 and (doorId ~= 5 or GetEntityBoneIndexByName(entity, 'boot') ~= -1 or not GetIsDoorValid(entity, 2)) then + return + end + + if vehicleClass ~= 11 then + doorId = backDoorIds + end + end + + local min, max = GetModelDimensions(vehicleHash) + local offset = (max - min) * (not checkVehicle and vec3(0.5, 0, 0.5) or vec3(0.5, 1, 0.5)) + min + offset = GetOffsetFromEntityInWorldCoords(entity, offset.x, offset.y, offset.z) + + if #(GetEntityCoords(cache.ped) - offset) < 1.5 then + local coords = GetEntityCoords(entity) + + TaskTurnPedToFaceCoord(cache.ped, coords.x, coords.y, coords.z, 0) + + return doorId + end +end + +function Inventory.OpenTrunk(entity) + ---@type number | number[] | nil + local door = Inventory.CanAccessTrunk(entity) + + if not door then return end + + if GetVehicleDoorLockStatus(entity) > 1 then + return lib.notify({ id = 'vehicle_locked', type = 'error', description = locale('vehicle_locked') }) + end + + local plate = GetVehicleNumberPlateText(entity) + local invId = 'trunk'..plate + local coords = GetEntityCoords(entity) + + TaskTurnPedToFaceCoord(cache.ped, coords.x, coords.y, coords.z, 0) + + if not client.openInventory('trunk', { id = invId, netid = NetworkGetNetworkIdFromEntity(entity), entityid = entity, door = door }) then return end + + if type(door) == 'table' then + for i = 1, #door do + SetVehicleDoorOpen(entity, door[i], false, false) + end + else + SetVehicleDoorOpen(entity, door --[[@as number]], false, false) + end +end + if shared.target then - exports.qtarget:AddTargetModel(Inventory.Dumpsters, { - options = { - { - icon = 'fas fa-dumpster', - label = locale('search_dumpster'), - action = function(entity) - Inventory.OpenDumpster(entity) - end - }, - }, - distance = 2 + exports.ox_target:addModel(Inventory.Dumpsters, { + icon = 'fas fa-dumpster', + label = locale('search_dumpster'), + onSelect = function(data) return Inventory.OpenDumpster(data.entity) end, + distance = 2 }) + + exports.ox_target:addGlobalVehicle({ + icon = 'fas fa-truck-ramp-box', + label = locale('open_label', locale('storage')), + distance = 1.5, + canInteract = Inventory.CanAccessTrunk, + onSelect = function(data) + return Inventory.OpenTrunk(data.entity) + end + }) else local dumpsters = table.create(0, #Inventory.Dumpsters) @@ -41,8 +111,6 @@ else Inventory.Dumpsters = dumpsters end -local table = lib.table - ---@param search 'slots' | 1 | 'count' | 2 ---@param item table | string ---@param metadata? table | string @@ -94,7 +162,7 @@ exports('GetPlayerWeight', function() end) exports('GetPlayerMaxWeight', function() - return PlayerData.weight + return PlayerData.maxWeight end) local Items = require 'modules.items.client' @@ -229,37 +297,28 @@ local function nearbyEvidence(point) end end -Inventory.Evidence = setmetatable(data('evidence'), { +Inventory.Evidence = setmetatable(lib.load('data.evidence'), { __call = function(self) for _, evidence in pairs(self) do if evidence.point then evidence.point:remove() - end + elseif evidence.zoneId then + exports.ox_target:removeZone(evidence.zoneId) + evidence.zone = nil + end if client.hasGroup(shared.police) then if shared.target then if evidence.target then - exports.qtarget:RemoveZone(evidence.target.name) - exports.qtarget:AddBoxZone(evidence.target.name, evidence.target.loc, evidence.target.length or 0.5, evidence.target.width or 0.5, - { - name = evidence.target.name, - heading = evidence.target.heading or 0.0, - debugPoly = evidence.target.debug, - minZ = evidence.target.minZ, - maxZ = evidence.target.maxZ, - drawSprite = evidence.target.drawSprite, - }, { - options = { - { - icon = evidence.target.icon or 'fas fa-warehouse', - label = locale('open_police_evidence'), - job = shared.police, - action = openEvidence, - iconColor = evidence.target.iconColor, - }, - }, - distance = evidence.target.distance or 2.0 - }) + evidence.zoneId = Utils.CreateBoxZone(evidence.target, { + { + icon = evidence.target.icon or 'fas fa-warehouse', + label = locale('open_police_evidence'), + groups = shared.police, + onSelect = openEvidence, + iconColor = evidence.target.iconColor, + } + }) end else evidence.target = nil @@ -280,41 +339,32 @@ local function nearbyStash(self) DrawMarker(2, self.coords.x, self.coords.y, self.coords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.15, 30, 30, 150, 222, false, false, 0, true, false, false, false) end -Inventory.Stashes = setmetatable(data('stashes'), { +Inventory.Stashes = setmetatable(lib.load('data.stashes'), { __call = function(self) for id, stash in pairs(self) do if stash.jobs then stash.groups = stash.jobs end if stash.point then stash.point:remove() - end + elseif stash.zoneId then + exports.ox_target:removeZone(stash.zoneId) + stash.zoneId = nil + end if not stash.groups or client.hasGroup(stash.groups) then if shared.target then if stash.target then - exports.qtarget:RemoveZone(stash.name) - exports.qtarget:AddBoxZone(stash.name, stash.target.loc, stash.target.length or 0.5, stash.target.width or 0.5, - { - name = stash.name, - heading = stash.target.heading or 0.0, - debugPoly = stash.target.debug, - minZ = stash.target.minZ, - maxZ = stash.target.maxZ, - drawSprite = stash.target.drawSprite, - }, { - options = { - { - icon = stash.target.icon or 'fas fa-warehouse', - label = stash.target.label or locale('open_stash'), - job = stash.groups, - action = function() - exports.ox_inventory:openInventory('stash', stash.name) - end, - iconColor = stash.target.iconColor, - }, - }, - distance = stash.target.distance or 3.0 - }) + stash.zoneId = Utils.CreateBoxZone(stash.target, { + { + icon = stash.target.icon or 'fas fa-warehouse', + label = stash.target.label or locale('open_stash'), + groups = stash.groups, + onSelect = function() + exports.ox_inventory:openInventory('stash', stash.name) + end, + iconColor = stash.target.iconColor, + }, + }) end else stash.target = nil @@ -331,7 +381,11 @@ Inventory.Stashes = setmetatable(data('stashes'), { end }) -RegisterNetEvent('refreshMaxWeight', function(data) +RegisterNetEvent('ox_inventory:refreshMaxWeight', function(data) + if data.inventoryId == cache.serverId then + PlayerData.maxWeight = data.maxWeight + end + SendNUIMessage({ action = 'refreshSlots', data = { @@ -343,4 +397,16 @@ RegisterNetEvent('refreshMaxWeight', function(data) }) end) +RegisterNetEvent('ox_inventory:refreshSlotCount', function(data) + SendNUIMessage({ + action = 'refreshSlots', + data = { + slotsData = { + inventoryId = data.inventoryId, + slots = data.slots + } + } + }) +end) + return Inventory diff --git a/server-data/resources/[ox]/ox_inventory/modules/inventory/server.lua b/server-data/resources/[ox]/ox_inventory/modules/inventory/server.lua index 5c7756b85..79a14b037 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/inventory/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/inventory/server.lua @@ -2,43 +2,17 @@ if not lib then return end local Inventory = {} ----@class OxInventoryProperties ----@field id any trust me it's less annoying this way ----@field dbId string|number ----@field label string ----@field type string ----@field slots number ----@field weight number ----@field maxWeight number ----@field open? number|false ----@field items table ----@field set function ----@field get function ----@field minimal function ----@field time number ----@field owner? string|number|boolean ----@field groups? table ----@field coords? vector3 ----@field datastore? boolean ----@field changed? boolean ----@field weapon? number ----@field containerSlot? number ----@field player? { source: number, ped: number, groups: table, name?: string, sex?: string, dateofbirth?: string } ----@field netid? number ----@field distance? number ----@field openedBy { [number]: true } ----@field currentShop? string - ----@alias inventory OxInventory | table | string | number - ----@class OxInventory : OxInventoryProperties +---@type table +local Inventories = {} + +---@class OxInventory local OxInventory = {} OxInventory.__index = OxInventory ---Open a player's inventory, optionally with a secondary inventory. ---@param inv? inventory function OxInventory:openInventory(inv) - if not self.player then return end + if not self?.player then return end inv = Inventory(inv) @@ -54,14 +28,14 @@ end ---Close a player's inventory. ---@param noEvent? boolean function OxInventory:closeInventory(noEvent) - if not self.player then return end + if not self.player or not self.open then return end - local inv = self.open and Inventory(self.open) + local inv = Inventory(self.open) if not inv then return end - inv:set('open', false) inv.openedBy[self.id] = nil + inv:set('open', false) self.open = false self.currentShop = nil self.containerSlot = nil @@ -84,26 +58,27 @@ end ---Sync an inventory's state with all player's accessing it. ---@param slots updateSlot[] ----@param weight { left?: number, right?: number } ---@param syncOwner? boolean -function OxInventory:syncSlotsWithClients(slots, weight, syncOwner) +function OxInventory:syncSlotsWithClients(slots, syncOwner) for playerId in pairs(self.openedBy) do if self.id ~= playerId then - TriggerClientEvent('ox_inventory:updateSlots', playerId, slots, weight) + local target = Inventories[playerId] + + if target then + TriggerClientEvent('ox_inventory:updateSlots', playerId, slots, target.weight) + end end end if syncOwner and self.player then - TriggerClientEvent('ox_inventory:updateSlots', self.id, slots, weight) + TriggerClientEvent('ox_inventory:updateSlots', self.id, slots, self.weight) end end ----@type table -local Inventories = {} -local Vehicles = data 'vehicles' +local Vehicles = lib.load('data.vehicles') local RegisteredStashes = {} -for _, stash in pairs(data 'stashes') do +for _, stash in pairs(lib.load('data.stashes')) do RegisteredStashes[stash.name] = { name = stash.name, label = stash.label, @@ -111,7 +86,7 @@ for _, stash in pairs(data 'stashes') do slots = stash.slots, maxWeight = stash.weight, groups = stash.groups or stash.jobs, - coords = shared.target and stash.target.loc or stash.coords + coords = shared.target and stash.target?.loc or stash.coords } end @@ -154,6 +129,8 @@ local function loadInventoryData(data, player) if not entity then return shared.info('Failed to load vehicle inventory data (no entity exists with given netid).') end + + data.entityId = entity else local vehicles = GetAllVehicles() @@ -163,6 +140,7 @@ local function loadInventoryData(data, player) if _plate:find(plate) then entity = vehicle + data.entityId = entity data.netid = NetworkGetNetworkIdFromEntity(entity) break end @@ -183,18 +161,15 @@ local function loadInventoryData(data, player) local model, class = lib.callback.await('ox_inventory:getVehicleData', source, data.netid) local storage = Vehicles[data.type].models[model] or Vehicles[data.type][class] + local dbId - if Ox then - local vehicle = Ox.GetVehicle(entity) + if server.getOwnedVehicleId then + dbId = server.getOwnedVehicleId(entity) + else + dbId = data.id:sub(6) + end - if vehicle then - inventory = Inventory.Create(vehicle.id or vehicle.plate, plate, data.type, storage[1], 0, storage[2], false) - end - end - - if not inventory then - inventory = Inventory.Create(data.id, plate, data.type, storage[1], 0, storage[2], false) - end + inventory = Inventory.Create(data.id, plate, data.type, storage[1], 0, storage[2], false, nil, nil, dbId) end elseif data.type == 'policeevidence' then inventory = Inventory.Create(data.id, locale('police_evidence'), data.type, 100, 0, 100000, false) @@ -209,7 +184,7 @@ local function loadInventoryData(data, player) if stash.owner then if stash.owner == true then - owner = data.owner or player.owner + owner = data.owner or player?.owner else owner = stash.owner end @@ -224,6 +199,7 @@ local function loadInventoryData(data, player) end if data.netid then + inventory.entityId = data.entityId or NetworkGetEntityFromNetworkId(data.netid) inventory.netid = data.netid end @@ -235,7 +211,7 @@ setmetatable(Inventory, { if not inv then return self elseif type(inv) == 'table' then - if inv.items then return inv end + if inv.__index then return inv end return not inv.owner and Inventories[inv.id] or loadInventoryData(inv, player) end @@ -267,7 +243,7 @@ exports('GetInventory', getInventory) ---@param owner? string | number ---@return table? exports('GetInventoryItems', function(inv, owner) - return getInventory(inv, owner).items + return getInventory(inv, owner)?.items end) ---@param inv inventory @@ -312,7 +288,9 @@ function Inventory.CloseAll(inv, ignoreId) for playerId in pairs(inv.openedBy) do local playerInv = Inventory(playerId) - if playerInv and (not ignoreId or playerId ~= ignoreId) then playerInv:closeInventory() end + if playerInv and playerId ~= ignoreId then + playerInv:closeInventory() + end end end @@ -329,7 +307,7 @@ function Inventory.Set(inv, k, v) if inv.type ~= 'player' then if inv.player then inv.type = 'player' - elseif inv.type == 'drop' and not next(inv.items) then + elseif inv.type == 'drop' and not next(inv.items) and not next(inv.openedBy) then return Inventory.Remove(inv) else inv.time = os.time() @@ -356,8 +334,14 @@ function Inventory.Get(inv, key) end end +---@class MinimalInventorySlot +---@field name string +---@field count number +---@field slot number +---@field metadata? table + ---@param inv inventory ----@return table items table containing minimal inventory data +---@return MinimalInventorySlot[] items local function minimal(inv) inv = Inventory(inv) --[[@as OxInventory]] local inventory, count = {}, 0 @@ -408,57 +392,28 @@ function Inventory.SetSlot(inv, item, count, metadata, slot) return currentSlot end -local Items +local Items = require 'modules.items.server' CreateThread(function() - TriggerEvent('ox_inventory:loadInventory', Inventory) - Items = require 'modules.items.server' - - -- Require "set inventory:weaponmismatch 1" to enable experimental weapon checks. - -- Maybe need some tweaks, and will definitely need more hashes added to the ignore list. - -- May even use weaponDamageEvent, depending on performance.. - -- if GetConvarInt('inventory:weaponmismatch', 0) == 0 then return end - - -- Disable this loop, client-side handling should be "good enough". - do return end - - local ignore = { - [0] = 1, -- GetSelectedPedWeapon returns 0 when using a firetruk; likely some other cases - [966099553] = 1, -- I don't know - [`WEAPON_UNARMED`] = 1, - [`WEAPON_ANIMAL`] = 1, - [`WEAPON_COUGAR`] = 1, - } - - while true do - Wait(30000) - - for id, inv in pairs(Inventories) do - if inv.player then - local hash = GetSelectedPedWeapon(inv.player.ped) + Inventory.accounts = server.accounts + TriggerEvent('ox_inventory:loadInventory', Inventory) +end) - if not ignore[hash] then - local currentWeapon = inv.items[inv.weapon].name +function Inventory.GetAccountItemCounts(inv) + inv = Inventory(inv) - if currentWeapon then - local currentHash = Items(currentWeapon).hash + if not inv then return end - if currentHash ~= hash then - inv.weapon = nil - print(('Player.%s weapon mismatch (%s). Current weapon: %s (%s)'):format(id, hash, currentWeapon, currentHash)) - end - else - print(('Player.%s weapon mismatch (%s)'):format(id, hash, currentWeapon)) - end + local accounts = table.clone(server.accounts) - if not inv.weapon then - TriggerClientEvent('ox_inventory:disarm', id) - end - end - end + for _, v in pairs(inv.items) do + if accounts[v.name] then + accounts[v.name] += v.count end end -end) + + return accounts +end ---@param item table ---@param slot table @@ -468,7 +423,7 @@ function Inventory.SlotWeight(item, slot, ignoreCount) if not slot.metadata then slot.metadata = {} end if item.ammoname and slot.metadata.ammo then - local ammoWeight = Items(item.ammoname).weight + local ammoWeight = Items(item.ammoname)?.weight if ammoWeight then weight += (ammoWeight * slot.metadata.ammo) @@ -477,7 +432,7 @@ function Inventory.SlotWeight(item, slot, ignoreCount) if slot.metadata.components then for i = #slot.metadata.components, 1, -1 do - local componentWeight = Items(slot.metadata.components[i]).weight + local componentWeight = Items(slot.metadata.components[i])?.weight if componentWeight then weight += componentWeight @@ -511,12 +466,32 @@ local function hasActiveInventory(playerId, owner) local activePlayer = activeIdentifiers[owner] if activePlayer then + if activePlayer == playerId then + error('attempted to load active player\'s inventory a secondary time', 0) + end + local inventory = Inventory(activePlayer) if inventory then - if GetPlayerEndpoint(activePlayer) then + local endpoint = GetPlayerEndpoint(activePlayer) + + if endpoint then DropPlayer(playerId, ("Character identifier '%s' is already active."):format(owner)) + -- Supposedly still getting stuck? Print info and hope somebody reports back (lol) + print(('kicked player.%s (charid is already in use)'):format(playerId), json.encode({ + oldId = activePlayer, + newId = playerId, + charid = owner, + endpoint = endpoint, + playerName = GetPlayerName(activePlayer), + fivem = GetPlayerIdentifierByType(activePlayer, 'fivem'), + license = GetPlayerIdentifierByType(activePlayer, 'license2') or GetPlayerIdentifierByType(activePlayer, 'license'), + }, { + indent = true, + sort_keys = true + })) + return true end @@ -530,6 +505,41 @@ local function hasActiveInventory(playerId, owner) activeIdentifiers[owner] = playerId end +---Manually clear an inventory state tied to the given identifier. +---Temporary workaround until somebody actually gives me info. +RegisterCommand('clearActiveIdentifier', function(source, args) + ---Server console only. + if source ~= 0 then return end + + local activePlayer = activeIdentifiers[args[1]] or activeIdentifiers[tonumber(args[1])] + local inventory = activePlayer and Inventory(activePlayer) + + if not inventory then return end + + local endpoint = GetPlayerEndpoint(activePlayer) + + if endpoint then + DropPlayer(activePlayer, 'Kicked') + + -- Supposedly still getting stuck? Print info and hope somebody reports back (lol) + print(('kicked player.%s (clearActiveIdentifier)'):format(activePlayer), json.encode({ + oldId = activePlayer, + charid = inventory.owner, + endpoint = endpoint, + playerName = GetPlayerName(activePlayer), + fivem = GetPlayerIdentifierByType(activePlayer, 'fivem'), + license = GetPlayerIdentifierByType(activePlayer, 'license2') or GetPlayerIdentifierByType(activePlayer, 'license'), + }, { + indent = true, + sort_keys = true + })) + end + + Inventory.CloseAll(inventory) + db.savePlayer(inventory.owner, json.encode(inventory:minimal())) + Inventory.Remove(inventory) +end, true) + ---@param id string|number ---@param label string|nil ---@param invType string @@ -538,10 +548,11 @@ end ---@param maxWeight number ---@param owner string | number | boolean ---@param items? table +---@param dbId? string | number ---@return OxInventory? --- This should only be utilised internally! --- To create a stash, please use `exports.ox_inventory:RegisterStash` instead. -function Inventory.Create(id, label, invType, slots, weight, maxWeight, owner, items, groups) +function Inventory.Create(id, label, invType, slots, weight, maxWeight, owner, items, groups, dbId) if invType == 'player' and hasActiveInventory(id, owner) then return end local self = { @@ -560,9 +571,10 @@ function Inventory.Create(id, label, invType, slots, weight, maxWeight, owner, i time = os.time(), groups = groups, openedBy = {}, + dbId = dbId } - if invType == 'drop' or invType == 'temp' then + if invType == 'drop' or invType == 'temp' or invType == 'dumpster' then self.datastore = true else self.changed = false @@ -573,18 +585,11 @@ function Inventory.Create(id, label, invType, slots, weight, maxWeight, owner, i if invType ~= 'player' and owner and type(owner) ~= 'boolean' then self.id = ('%s:%s'):format(self.id, owner) end - else - if Ox then - self.dbId = id - self.id = (invType == 'glovebox' and 'glove' or invType)..label - else - self.dbId = label - end end end if not items then - self.items, self.weight, self.datastore = Inventory.Load(self.dbId, invType, owner) + self.items, self.weight = Inventory.Load(self.dbId, invType, owner) elseif weight == 0 and next(items) then self.weight = Inventory.CalculateWeight(items) end @@ -605,10 +610,26 @@ function Inventory.Remove(inv) activeIdentifiers[inv.owner] = nil end + for playerId in pairs(inv.openedBy) do + if inv.id ~= playerId then + local target = Inventories[playerId] + + if target then + target:closeInventory() + end + end + end + + if not inv.datastore and inv.changed then + Inventory.Save(inv) + end + Inventories[inv.id] = nil end end +exports('RemoveInventory', Inventory.Remove) + ---Update the internal reference to vehicle stashes. Does not trigger a save or update the database. ---@param oldPlate string ---@param newPlate string @@ -650,22 +671,34 @@ exports('UpdateVehicle', Inventory.UpdateVehicle) function Inventory.Save(inv) inv = Inventory(inv) --[[@as OxInventory]] - if inv then - local items = json.encode(minimal(inv)) - inv.changed = false + if not inv or inv.datastore then return end - if inv.player then - db.savePlayer(inv.owner, items) - else - if inv.type == 'trunk' then - db.saveTrunk(inv.dbId, items) - elseif inv.type == 'glovebox' then - db.saveGlovebox(inv.dbId, items) - else - db.saveStash(inv.owner, inv.dbId, items) - end - end - end + local buffer, n = {}, 0 + + for k, v in pairs(inv.items) do + if not Items.UpdateDurability(inv, v, Items(v.name), nil, os.time()) then + n += 1 + buffer[n] = { + name = v.name, + count = v.count, + slot = k, + metadata = next(v.metadata) and v.metadata or nil + } + end + end + + local data = next(buffer) and json.encode(buffer) or nil + inv.changed = false + + if inv.player then + return shared.framework ~= 'esx' and db.savePlayer(inv.owner, data) + elseif inv.type == 'trunk' then + return db.saveTrunk(inv.dbId, data) + elseif inv.type == 'glovebox' then + return db.saveGlovebox(inv.dbId, data) + end + + return db.saveStash(inv.owner, inv.dbId, data) end local function randomItem(loot, items, size) @@ -701,7 +734,7 @@ end ---@param inv inventory ---@param invType string ---@param items? table ----@return table returnData, number totalWeight, boolean true +---@return table returnData, number totalWeight local function generateItems(inv, invType, items) if items == nil then if invType == 'dumpster' then @@ -729,35 +762,33 @@ local function generateItems(inv, invType, items) end end - return returnData, totalWeight, true + return returnData, totalWeight end ---@param id string|number ---@param invType string ---@param owner string | number | boolean function Inventory.Load(id, invType, owner) - local datastore, result + if not invType then return end - if id and invType then - if invType == 'dumpster' then - if server.randomloot then - return generateItems(id, invType) - else - datastore = true - end - elseif invType == 'trunk' or invType == 'glovebox' then - result = invType == 'trunk' and db.loadTrunk(id) or db.loadGlovebox(id) + local result - if not result then - if server.randomloot then - return generateItems(id, 'vehicle') - else - datastore = true - end - else result = result[invType] end - else - result = db.loadStash(owner or '', id) + if invType == 'trunk' or invType == 'glovebox' then + result = id and (invType == 'trunk' and db.loadTrunk(id) or db.loadGlovebox(id)) + + if not result then + if server.randomloot then + return generateItems(id, 'vehicle') + end + else + result = result[invType] + end + elseif invType == 'dumpster' then + if server.randomloot then + return generateItems(id, invType) end + elseif id then + result = db.loadStash(owner or '', id) end local returnData, weight = {}, 0 @@ -780,11 +811,9 @@ function Inventory.Load(id, invType, owner) end end - return returnData, weight, datastore + return returnData, weight end -local table = lib.table - local function assertMetadata(metadata) if metadata and type(metadata) ~= 'table' then metadata = metadata and { type = metadata or nil } @@ -811,13 +840,8 @@ function Inventory.GetItem(inv, item, metadata, returnsCount) metadata = assertMetadata(metadata) for _, v in pairs(inv.items) do - if v and v.name == item.name and (not metadata or table.contains(v.metadata, metadata)) then - count += v.count - local durability = v.metadata.durability - - if durability and durability > 100 and ostime >= durability then - v.metadata.durability = 0 - end + if v.name == item.name and (not metadata or table.contains(v.metadata, metadata)) and not Items.UpdateDurability(inv, v, item, nil, ostime) then + count += v.count end end end @@ -886,7 +910,7 @@ exports('SetItem', Inventory.SetItem) function Inventory.GetCurrentWeapon(inv) inv = Inventory(inv) --[[@as OxInventory]] - if inv.player then + if inv?.player then local weapon = inv.items[inv.weapon] if weapon and Items(weapon.name).weapon then @@ -899,96 +923,79 @@ end exports('GetCurrentWeapon', Inventory.GetCurrentWeapon) ---@param inv inventory ----@param slot number +---@param slotId number ---@return table? item -function Inventory.GetSlot(inv, slot) +function Inventory.GetSlot(inv, slotId) inv = Inventory(inv) --[[@as OxInventory]] - local slotData = inv and inv.items[slot] + local slot = inv and inv.items[slotId] - if slotData then - local durability = slotData.metadata.durability - - if durability and durability > 100 and os.time() >= durability then - slotData.metadata.durability = 0 - end - - return slotData + if slot and not Items.UpdateDurability(inv, slot, Items(slot.name), nil, os.time()) then + return slot end end exports('GetSlot', Inventory.GetSlot) ---@param inv inventory ----@param slot number -function Inventory.SetDurability(inv, slot, durability) +---@param slotId number +function Inventory.SetDurability(inv, slotId, durability) inv = Inventory(inv) --[[@as OxInventory]] - local slotData = inv and inv.items[slot] + local slot = inv and inv.items[slotId] - if inv and slotData then - inv.changed = true - slotData.metadata.durability = durability + if not slot then return end - if inv.player and server.syncInventory then - server.syncInventory(inv) - end + Items.UpdateDurability(inv, slot, Items(slot.name), durability) - inv:syncSlotsWithClients({ - { - item = slotData, - inventory = inv.id - } - }, - { - left = inv.weight, - right = inv.open and Inventories[inv.open].weight or nil - }, true) - end + if inv.player and server.syncInventory then + server.syncInventory(inv) + end end exports('SetDurability', Inventory.SetDurability) local Utils = require 'modules.utils.server' ---@param inv inventory ----@param slot number | false +---@param slotId number ---@param metadata { [string]: any } -function Inventory.SetMetadata(inv, slot, metadata) +function Inventory.SetMetadata(inv, slotId, metadata) inv = Inventory(inv) --[[@as OxInventory]] - local slotData = inv and type(slot) == 'number' and inv.items[slot] + local slot = inv and inv.items[slotId] - if inv and slotData then - inv.changed = true - local imageurl = slotData.metadata.imageurl - slotData.metadata = type(metadata) == 'table' and metadata or { type = metadata or nil } + if not slot then return end - if metadata.weight then - inv.weight -= slotData.weight - slotData.weight = Inventory.SlotWeight(Items(slotData.name), slotData) - inv.weight += slotData.weight - end + local item = Items(slot.name) + local imageurl = slot.metadata.imageurl + slot.metadata = type(metadata) == 'table' and metadata or { type = metadata or nil } + inv.changed = true - if inv.player and server.syncInventory then - server.syncInventory(inv) - end + if metadata.weight then + inv.weight -= slot.weight + slot.weight = Inventory.SlotWeight(item, slot) + inv.weight += slot.weight + end - inv:syncSlotsWithClients({ - { - item = slotData, - inventory = inv.id - } - }, - { - left = inv.weight, - right = inv.open and Inventories[inv.open].weight or nil - }, true) + if metadata.durability ~= slot.metadata.durability then + Items.UpdateDurability(inv, slot, item, metadata.durability) + else + inv:syncSlotsWithClients({ + { + item = slot, + inventory = inv.id + } + }, true) + end - if metadata.imageurl ~= imageurl and Utils.IsValidImageUrl then - if Utils.IsValidImageUrl(metadata.imageurl) then - Utils.DiscordEmbed('Valid image URL', ('Updated item "%s" (%s) with valid url in "%s".\n%s\nid: %s\nowner: %s'):format(metadata.label or slotData.label, slotData.name, inv.label, metadata.imageurl, inv.id, inv.owner, metadata.imageurl), metadata.imageurl, 65280) - else - Utils.DiscordEmbed('Invalid image URL', ('Updated item "%s" (%s) with invalid url in "%s".\n%s\nid: %s\nowner: %s'):format(metadata.label or slotData.label, slotData.name, inv.label, metadata.imageurl, inv.id, inv.owner, metadata.imageurl), metadata.imageurl, 16711680) - metadata.imageurl = nil - end - end - end + if inv.player and server.syncInventory then + server.syncInventory(inv) + end + + if metadata.imageurl ~= imageurl and Utils.IsValidImageUrl then + if Utils.IsValidImageUrl(metadata.imageurl) then + Utils.DiscordEmbed('Valid image URL', ('Updated item "%s" (%s) with valid url in "%s".\n%s\nid: %s\nowner: %s'):format(metadata.label or slot.label, slot.name, inv.label, metadata.imageurl, inv.id, inv.owner, metadata.imageurl), metadata.imageurl, 65280) + else + Utils.DiscordEmbed('Invalid image URL', ('Updated item "%s" (%s) with invalid url in "%s".\n%s\nid: %s\nowner: %s'):format(metadata.label or slot.label, slot.name, inv.label, metadata.imageurl, inv.id, inv.owner, metadata.imageurl), metadata.imageurl, 16711680) + metadata.imageurl = nil + end + end end exports('SetMetadata', Inventory.SetMetadata) @@ -1003,6 +1010,16 @@ function Inventory.SetSlotCount(inv, slots) inv.changed = true inv.slots = slots + + if inv.player then + TriggerClientEvent('ox_inventory:refreshSlotCount', inv.id, {inventoryId = inv.id, slots = inv.slots}) + end + + for playerId in pairs(inv.openedBy) do + if playerId ~= inv.id then + TriggerClientEvent('ox_inventory:refreshSlotCount', playerId, {inventoryId = inv.id, slots = inv.slots}) + end + end end exports('SetSlotCount', Inventory.SetSlotCount) @@ -1016,9 +1033,16 @@ function Inventory.SetMaxWeight(inv, maxWeight) if type(maxWeight) ~= 'number' then return end inv.maxWeight = maxWeight - if not inv.open then return end - TriggerClientEvent('refreshMaxWeight', inv.open, {inventoryId = inv.id, maxWeight = inv.maxWeight}) + if inv.player then + TriggerClientEvent('ox_inventory:refreshMaxWeight', inv.id, {inventoryId = inv.id, maxWeight = inv.maxWeight}) + end + + for playerId in pairs(inv.openedBy) do + if playerId ~= inv.id then + TriggerClientEvent('ox_inventory:refreshMaxWeight', playerId, {inventoryId = inv.id, maxWeight = inv.maxWeight}) + end + end end exports('SetMaxWeight', Inventory.SetMaxWeight) @@ -1037,7 +1061,7 @@ function Inventory.AddItem(inv, item, count, metadata, slot, cb) inv = Inventory(inv) --[[@as OxInventory]] - if not inv.slots then return false, 'invalid_inventory' end + if not inv?.slots then return false, 'invalid_inventory' end local toSlot, slotMetadata, slotCount local success, response = false @@ -1099,10 +1123,6 @@ function Inventory.AddItem(inv, item, count, metadata, slot, cb) item = inv.items[toSlot], inventory = inv.id } - }, - { - left = inv.weight, - right = inv.open and Inventories[inv.open].weight or nil }, true) if invokingResource then @@ -1125,10 +1145,7 @@ function Inventory.AddItem(inv, item, count, metadata, slot, cb) server.syncInventory(inv) end - inv:syncSlotsWithClients(toSlot, { - left = inv.weight, - right = inv.open and Inventories[inv.open].weight or nil - }, true) + inv:syncSlotsWithClients(toSlot, true) if invokingResource then lib.logger(inv.owner, 'addItem', ('"%s" added %sx %s to "%s"'):format(invokingResource, added, item.name, inv.label)) @@ -1208,7 +1225,7 @@ exports('Search', Inventory.Search) function Inventory.GetItemSlots(inv, item, metadata) inv = Inventory(inv) --[[@as OxInventory]] - if not inv.slots then return end + if not inv?.slots then return end local totalCount, slots, emptySlots = 0, {}, inv.slots @@ -1246,7 +1263,7 @@ function Inventory.RemoveItem(inv, item, count, metadata, slot, ignoreTotal) if count > 0 then inv = Inventory(inv) --[[@as OxInventory]] - if not inv.slots then return false, 'invalid_inventory' end + if not inv?.slots then return false, 'invalid_inventory' end metadata = assertMetadata(metadata) local itemSlots, totalCount = Inventory.GetItemSlots(inv, item, metadata) @@ -1306,10 +1323,7 @@ function Inventory.RemoveItem(inv, item, count, metadata, slot, ignoreTotal) array[k] = {item = type(v) == 'number' and { slot = v } or v, inventory = inv.id} end - inv:syncSlotsWithClients(array, { - left = inv.weight, - right = inv.open and Inventories[inv.open].weight or nil - }, true) + inv:syncSlotsWithClients(array, true) local invokingResource = server.loglevel > 1 and GetInvokingResource() @@ -1434,14 +1448,11 @@ end local function CustomDrop(prefix, items, coords, slots, maxWeight, instance, model) local dropId = generateInvId() - local inventory = Inventory.Create(dropId, ('%s %s'):format(prefix, dropId:gsub('%D', '')), 'drop', slots or shared.playerslots, 0, maxWeight or shared.playerweight, false) + local inventory = Inventory.Create(dropId, ('%s %s'):format(prefix, dropId:gsub('%D', '')), 'drop', slots or shared.playerslots, 0, maxWeight or shared.playerweight, false, {}) if not inventory then return end - local items, weight = generateItems(inventory, 'drop', items) - - inventory.items = items - inventory.weight = weight + inventory.items, inventory.weight = generateItems(inventory, 'drop', items) inventory.coords = coords Inventory.Drops[dropId] = { coords = inventory.coords, @@ -1450,6 +1461,8 @@ local function CustomDrop(prefix, items, coords, slots, maxWeight, instance, mod } TriggerClientEvent('ox_inventory:createDrop', -1, dropId, Inventory.Drops[dropId]) + + return dropId end AddEventHandler('ox_inventory:customDrop', CustomDrop) @@ -1480,14 +1493,28 @@ end) local TriggerEventHooks = require 'modules.hooks.server' -local function dropItem(source, data) - local playerInventory = Inventory(source) +---@class SwapSlotData +---@field count number +---@field fromSlot number +---@field toSlot number +---@field instance any +---@field fromType string +---@field toType string +---@field coords? vector3 - if not playerInventory then return end +---@param source number +---@param playerInventory OxInventory +---@param fromData SlotWithItem? +---@param data SwapSlotData +local function dropItem(source, playerInventory, fromData, data) + if not fromData then return end - local fromData = playerInventory.items[data.fromSlot] + local toData = table.clone(fromData) + toData.slot = data.toSlot + toData.count = data.count + toData.weight = Inventory.SlotWeight(Items(toData.name), toData) - if not fromData then return end + if toData.weight > shared.playerweight then return end if not TriggerEventHooks('swapItems', { source = source, @@ -1498,21 +1525,20 @@ local function dropItem(source, data) toSlot = data.toSlot, toType = 'drop', count = data.count, + action = 'move', }) then return end - if data.count > fromData.count then data.count = fromData.count end - - local toData = table.clone(fromData) - toData.slot = data.toSlot - toData.count = data.count - fromData.count -= data.count - fromData.weight = Inventory.SlotWeight(Items(fromData.name), fromData) - toData.weight = Inventory.SlotWeight(Items(toData.name), toData) + fromData.count -= data.count + fromData.weight = Inventory.SlotWeight(Items(fromData.name), fromData) - if fromData.count < 1 then fromData = nil end + if fromData.count < 1 then + fromData = nil + else + toData.metadata = table.clone(toData.metadata) + end - playerInventory.weight -= toData.weight local slot = data.fromSlot + playerInventory.weight -= toData.weight playerInventory.items[slot] = fromData if slot == playerInventory.weapon then @@ -1549,13 +1575,11 @@ end local activeSlots = {} +---@param source number +---@param data SwapSlotData lib.callback.register('ox_inventory:swapItems', function(source, data) if data.count < 1 then return end - if data.toType == 'newdrop' then - return dropItem(source, data) - end - local playerInventory = Inventory(source) if not playerInventory then return end @@ -1568,6 +1592,8 @@ lib.callback.register('ox_inventory:swapItems', function(source, data) return end + if data.toType == 'inspect' or data.fromType == 'inspect' then return end + local fromRef = ('%s:%s'):format(fromInventory.id, data.fromSlot) local toRef = ('%s:%s'):format(toInventory.id, data.toSlot) @@ -1587,7 +1613,6 @@ lib.callback.register('ox_inventory:swapItems', function(source, data) local sameInventory = fromInventory.id == toInventory.id local fromOtherPlayer = fromInventory.player and fromInventory ~= playerInventory local toOtherPlayer = toInventory.player and toInventory ~= playerInventory - local toData = toInventory.items[data.toSlot] if not sameInventory and (fromInventory.type == 'policeevidence' or (toInventory.type == 'policeevidence' and toData)) then @@ -1606,7 +1631,7 @@ lib.callback.register('ox_inventory:swapItems', function(source, data) activeSlots[toRef] = nil end) - if toInventory and fromInventory and (fromInventory.id ~= toInventory.id or data.fromSlot ~= data.toSlot) then + if toInventory and (data.toType == 'newdrop' or fromInventory ~= toInventory or data.fromSlot ~= data.toSlot) then local fromData = fromInventory.items[data.fromSlot] if not fromData then @@ -1622,8 +1647,17 @@ lib.callback.register('ox_inventory:swapItems', function(source, data) } end - if fromData and (not fromData.metadata.container or fromData.metadata.container and toInventory.type ~= 'container') then - if data.count > fromData.count then data.count = fromData.count end + if data.count > fromData.count then + data.count = fromData.count + end + + if data.toType == 'newdrop' then + return dropItem(source, playerInventory, fromData, data) + end + + if fromData then + if fromData.metadata.container and toInventory.type == 'container' then return false end + if toData and toData.metadata.container and fromInventory.type == 'container' then return false end local container, containerItem = (not sameInventory and playerInventory.containerSlot) and (fromInventory.type == 'container' and fromInventory or toInventory) @@ -1654,15 +1688,15 @@ lib.callback.register('ox_inventory:swapItems', function(source, data) if containerItem then local toContainer = toInventory.type == 'container' - local whitelist = Items.containers[containerItem.name].whitelist - local blacklist = Items.containers[containerItem.name].blacklist + local whitelist = Items.containers[containerItem.name]?.whitelist + local blacklist = Items.containers[containerItem.name]?.blacklist local checkItem = toContainer and fromData.name or toData.name if (whitelist and not whitelist[checkItem]) or (blacklist and blacklist[checkItem]) then return end - Inventory.ContainerWeight(containerItem, toContainer and fromWeight or toWeight, playerInventory) + Inventory.ContainerWeight(containerItem, toContainer and toWeight or fromWeight, playerInventory) end if fromOtherPlayer then @@ -1748,8 +1782,8 @@ lib.callback.register('ox_inventory:swapItems', function(source, data) if container then if toContainer and containerItem then - local whitelist = Items.containers[containerItem.name].whitelist - local blacklist = Items.containers[containerItem.name].blacklist + local whitelist = Items.containers[containerItem.name]?.whitelist + local blacklist = Items.containers[containerItem.name]?.blacklist if (whitelist and not whitelist[fromData.name]) or (blacklist and blacklist[fromData.name]) then return @@ -1813,32 +1847,34 @@ lib.callback.register('ox_inventory:swapItems', function(source, data) if fromInventory.changed ~= nil then fromInventory.changed = true end if toInventory.changed ~= nil then toInventory.changed = true end - if sameInventory then - fromInventory:syncSlotsWithClients({ - { - item = fromInventory.items[data.toSlot] or { slot = data.toSlot }, - inventory = fromInventory.id - }, - { - item = fromInventory.items[data.fromSlot] or { slot = data.fromSlot }, - inventory = fromInventory.id - } - }, { left = fromInventory.weight }, true) - else - toInventory:syncSlotsWithClients({ - { - item = toInventory.items[data.toSlot] or { slot = data.toSlot }, - inventory = toInventory.id - } - }, { left = toInventory.weight }, true) - - fromInventory:syncSlotsWithClients({ - { - item = fromInventory.items[data.fromSlot] or { slot = data.fromSlot }, - inventory = fromInventory.id - } - }, { left = fromInventory.weight }, true) - end + CreateThread(function() + if sameInventory then + fromInventory:syncSlotsWithClients({ + { + item = fromInventory.items[data.toSlot] or { slot = data.toSlot }, + inventory = fromInventory.id + }, + { + item = fromInventory.items[data.fromSlot] or { slot = data.fromSlot }, + inventory = fromInventory.id + } + }, true) + else + toInventory:syncSlotsWithClients({ + { + item = toInventory.items[data.toSlot] or { slot = data.toSlot }, + inventory = toInventory.id + } + }, true) + + fromInventory:syncSlotsWithClients({ + { + item = fromInventory.items[data.fromSlot] or { slot = data.fromSlot }, + inventory = fromInventory.id + } + }, true) + end + end) local resp @@ -1886,7 +1922,7 @@ end) function Inventory.Confiscate(source) local inv = Inventories[source] - if inv.player then + if inv?.player then db.saveStash(inv.owner, inv.owner, json.encode(minimal(inv))) table.wipe(inv.items) inv.weight = 0 @@ -1902,37 +1938,41 @@ exports('ConfiscateInventory', Inventory.Confiscate) function Inventory.Return(source) local inv = Inventories[source] - if inv.player then - MySQL.scalar('SELECT data FROM ox_inventory WHERE name = ?', { inv.owner }, function(data) - if data then - MySQL.query('DELETE FROM ox_inventory WHERE name = ?', { inv.owner }) - data = json.decode(data) - local inventory, totalWeight = {}, 0 - - if data and next(data) then - for i = 1, #data do - local i = data[i] - if type(i) == 'number' then break end - local item = Items(i.name) - if item then - local weight = Inventory.SlotWeight(item, i) - totalWeight = totalWeight + weight - inventory[i.slot] = {name = i.name, label = item.label, weight = weight, slot = i.slot, count = i.count, description = item.description, metadata = i.metadata, stack = item.stack, close = item.close} - end - end - end + if not inv?.player then return end - inv.changed = true - inv.weight = totalWeight - inv.items = inventory + local items = MySQL.scalar.await('SELECT data FROM ox_inventory WHERE name = ?', { inv.owner }) - TriggerClientEvent('ox_inventory:inventoryReturned', source, {inventory, totalWeight}) + if not items then return end - if server.syncInventory then server.syncInventory(inv) end - end - end) - end + MySQL.update.await('DELETE FROM ox_inventory WHERE name = ?', { inv.owner }) + + items = json.decode(items) + local inventory, totalWeight = {}, 0 + + if table.type(items) == 'array' then + for i = 1, #items do + local data = items[i] + if type(data) == 'number' then break end + + local item = Items(data.name) + + if item then + local weight = Inventory.SlotWeight(item, data) + totalWeight = totalWeight + weight + inventory[data.slot] = {name = data.name, label = item.label, weight = weight, slot = data.slot, count = data.count, description = item.description, metadata = data.metadata, stack = item.stack, close = item.close} + end + end + end + + inv.changed = true + inv.weight = totalWeight + inv.items = inventory + + TriggerClientEvent('ox_inventory:inventoryReturned', source, { inventory, totalWeight }) + + if server.syncInventory then server.syncInventory(inv) end end + exports('ReturnInventory', Inventory.Return) ---@param inv inventory @@ -1995,10 +2035,7 @@ function Inventory.Clear(inv, keep) inv.weight = newWeight inv.changed = true - inv:syncSlotsWithClients(updateSlots, { - left = inv.weight, - right = inv.open and Inventories[inv.open].weight or nil - }, true) + inv:syncSlotsWithClients(updateSlots, true) if not inv.player then if inv.open then @@ -2083,13 +2120,9 @@ function Inventory.GetSlotWithItem(inv, itemName, metadata, strict) for _, slotData in pairs(inventory.items) do if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then - local durability = slotData.metadata.durability - - if durability and durability > 100 and os.time() >= durability then - slotData.metadata.durability = 0 - end - - return slotData + if not Items.UpdateDurability(inventory, slotData, item, nil, os.time()) then + return slotData + end end end end @@ -2102,7 +2135,7 @@ exports('GetSlotWithItem', Inventory.GetSlotWithItem) ---@param strict? boolean Strictly match metadata properties, otherwise use partial matching. ---@return number? function Inventory.GetSlotIdWithItem(inv, itemName, metadata, strict) - return Inventory.GetSlotWithItem(inv, itemName, metadata, strict).slot + return Inventory.GetSlotWithItem(inv, itemName, metadata, strict)?.slot end exports('GetSlotIdWithItem', Inventory.GetSlotIdWithItem) @@ -2122,19 +2155,13 @@ function Inventory.GetSlotsWithItem(inv, itemName, metadata, strict) local response = {} local n = 0 local tablematch = strict and table.matches or table.contains - local ostime = os.time() for _, slotData in pairs(inventory.items) do - if slotData and slotData.name == item.name and tablematch(slotData.metadata, metadata) then - n += 1 - - local durability = slotData.metadata.durability - - if durability and durability > 100 and ostime >= durability then - slotData.metadata.durability = 0 - end - - response[n] = slotData + if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then + if not Items.UpdateDurability(inventory, slotData, item, nil, os.time()) then + n += 1 + response[n] = slotData + end end end @@ -2161,6 +2188,8 @@ function Inventory.GetSlotIdsWithItem(inv, itemName, metadata, strict) end end +exports('GetSlotIdsWithItem', Inventory.GetSlotIdsWithItem) + ---@param inv inventory ---@param itemName string ---@param metadata? any @@ -2187,94 +2216,143 @@ end exports('GetItemCount', Inventory.GetItemCount) -local function prepareSave(inv) - inv.changed = false +---@alias InventorySaveData { [1]: MinimalInventorySlot, [2]: string | number, [3]: string | number | nil } - if inv.player then - if shared.framework ~= 'esx' then - return 1, { json.encode(minimal(inv)), inv.owner } - end - elseif inv.type == 'trunk' then - return 2, { json.encode(minimal(inv)), inv.dbId } - elseif inv.type == 'glovebox' then - return 3, { json.encode(minimal(inv)), inv.dbId } - else - return 4, { inv.owner or '', inv.dbId, json.encode(minimal(inv)) } +---@param inv OxInventory +---@param buffer table +---@param time integer +---@return integer? +---@return InventorySaveData? +local function prepareInventorySave(inv, buffer, time) + local shouldSave = not inv.datastore and inv.changed + local n = 0 + + for k, v in pairs(inv.items) do + if not Items.UpdateDurability(inv, v, Items(v.name), nil, time) and shouldSave then + n += 1 + buffer[n] = { + name = v.name, + count = v.count, + slot = k, + metadata = next(v.metadata) and v.metadata or nil + } + end end + + if not shouldSave then return end + + local data = next(buffer) and json.encode(buffer) or nil + inv.changed = false + table.wipe(buffer) + + if inv.player then + if shared.framework == 'esx' then return end + + return 1, { data, inv.owner } + end + + if inv.type == 'trunk' then + return 2, { data, inv.dbId } + end + + if inv.type == 'glovebox' then + return 3, { data, inv.dbId } + end + + return 4, { data, inv.owner and tostring(inv.owner) or '', inv.dbId } end -lib.cron.new('*/5 * * * *', function() +local isSaving = false +local inventoryClearTime = GetConvarInt('inventory:cleartime', 5) * 60 + +local function saveInventories(clearInventories) + if isSaving then return end + + isSaving = true local time = os.time() local parameters = { {}, {}, {}, {} } - local size = { 0, 0, 0, 0 } + local total = { 0, 0, 0, 0, 0 } + local buffer = {} for _, inv in pairs(Inventories) do - if not inv.open then - if not inv.datastore and inv.changed then - local i, data = prepareSave(inv) + local index, data = prepareInventorySave(inv, buffer, time) - if i then - size[i] += 1 - parameters[i][size[i]] = data - end - end + if index and data then + total[5] += 1 - if inv.datastore and inv.netid and (inv.type == 'trunk' or inv.type == 'glovebox') then - if NetworkGetEntityFromNetworkId(inv.netid) == 0 then - Inventory.Remove(inv) - end - elseif not inv.player and (inv.datastore or inv.owner) and time - inv.time >= 1200 then - -- inv.time is a timestamp for when the inventory was last closed - -- if unopened for n seconds, the inventory is unloaded (datastore/temp stash is deleted) - Inventory.Remove(inv) - end - end + if index == 4 and server.bulkstashsave then + for i = 1, 3 do + total[index] += 1 + parameters[index][total[index]] = data[i] + end + else + total[index] += 1 + parameters[index][total[index]] = data + end + end end - db.saveInventories(parameters[1], parameters[2], parameters[3], parameters[4]) + if total[5] > 0 then + db.saveInventories(parameters[1], parameters[2], parameters[3], parameters[4], total) + end + + isSaving = false + + if not clearInventories then return end + + for _, inv in pairs(Inventories) do + if not inv.open and not inv.player then + -- clear inventory from memory if unused for x minutes, or on entity/netid mismatch + if inv.type == 'glovebox' or inv.type == 'trunk' then + if NetworkGetEntityFromNetworkId(inv.netid) ~= inv.entityId then + Inventory.Remove(inv) + end + elseif time - inv.time >= inventoryClearTime then + Inventory.Remove(inv) + end + end + end +end + +lib.cron.new('*/5 * * * *', function() + saveInventories(true) end) -function Inventory.SaveInventories(lock) - local parameters = { {}, {}, {}, {} } - local size = { 0, 0, 0, 0 } +function Inventory.SaveInventories(lock, clearInventories) Inventory.Lock = lock or nil Inventory.CloseAll() - - for _, inv in pairs(Inventories) do - if not inv.datastore and inv.changed then - local i, data = prepareSave(inv) - - if i then - size[i] += 1 - parameters[i][size[i]] = data - end - end - end - - db.saveInventories(parameters[1], parameters[2], parameters[3], parameters[4]) + saveInventories(clearInventories) end AddEventHandler('playerDropped', function() + server.playerDropped(source) + if GetNumPlayerIndices() == 0 then - Inventory.SaveInventories() + Inventory.SaveInventories(false, true) end end) AddEventHandler('txAdmin:events:serverShuttingDown', function() - Inventory.SaveInventories(true) + Inventory.SaveInventories(true, false) +end) + +AddEventHandler('txAdmin:events:scheduledRestart', function(eventData) + if eventData.secondsRemaining ~= 60 then return end + + Inventory.SaveInventories(true, true) end) AddEventHandler('onResourceStop', function(resource) if resource == shared.resource then - Inventory.SaveInventories(true) + Inventory.SaveInventories(true, false) end end) RegisterServerEvent('ox_inventory:closeInventory', function() local inventory = Inventories[source] - if inventory.open then + if inventory?.open then local secondary = Inventories[inventory.open] if secondary then @@ -2291,14 +2369,14 @@ RegisterServerEvent('ox_inventory:giveItem', function(slot, target, count) if count <= 0 then count = 1 end - if toInventory.player then + if toInventory?.player then local data = fromInventory.items[slot] if not data then return end local item = Items(data.name) - if not item or data.count < count or not Inventory.CanCarryItem(toInventory, item, count, data.metadata) then + if not item or data.count < count or not Inventory.CanCarryItem(toInventory, item, count, data.metadata) or #(GetEntityCoords(fromInventory.player.ped) - GetEntityCoords(toInventory.player.ped)) > 15 then return TriggerClientEvent('ox_lib:notify', fromInventory.id, { type = 'error', description = locale('cannot_give', count, data.label) }) end @@ -2370,6 +2448,8 @@ local function updateWeapon(source, action, value, slot, specialAmmo) { item = item } }, inventory.weight) + if server.syncInventory then server.syncInventory(inventory) end + return true end end @@ -2389,7 +2469,7 @@ local function updateWeapon(source, action, value, slot, specialAmmo) if action == 'load' and weapon.metadata.durability > 0 then local ammo = Items(weapon.name).ammoname - local diff = value - weapon.metadata.ammo + local diff = value - (weapon.metadata.ammo or 0) if not Inventory.RemoveItem(inventory, ammo, diff, specialAmmo) then return end @@ -2426,6 +2506,10 @@ local function updateWeapon(source, action, value, slot, specialAmmo) weapon.metadata.durability = weapon.metadata.durability - ((Items(weapon.name).durability or 1) * value) end + if (weapon.metadata.durability or 0) < 0 then + weapon.metadata.durability = 0 + end + if action ~= 'throw' then inventory:syncSlotsWithPlayer({ { item = weapon } @@ -2472,8 +2556,6 @@ lib.callback.register('ox_inventory:removeAmmoFromWeapon', function(source, slot end end) -Inventory.accounts = server.accounts - local function checkStashProperties(properties) local name, slots, maxWeight, coords in properties @@ -2566,15 +2648,6 @@ end exports('RegisterStash', registerStash) ----@class TemporaryStashProperties ----@field label string ----@field slots number ----@field maxWeight number ----@field owner? string|number|boolean ----@field groups? table ----@field coords? vector3 ----@field items? { [number]: string, [number]: number, [number]: table | string }[] - ---@param properties TemporaryStashProperties function Inventory.CreateTemporaryStash(properties) properties.name = generateInvId('temp') @@ -2592,4 +2665,16 @@ end exports('CreateTemporaryStash', Inventory.CreateTemporaryStash) +function Inventory.InspectInventory(playerId, invId) + local inventory = invId ~= playerId and Inventory(invId) + local playerInventory = Inventory(playerId) + + if playerInventory and inventory then + playerInventory:openInventory(inventory) + TriggerClientEvent('ox_inventory:viewInventory', playerId, playerInventory, inventory) + end +end + +exports('InspectInventory', Inventory.InspectInventory) + return Inventory diff --git a/server-data/resources/[ox]/ox_inventory/modules/items/client.lua b/server-data/resources/[ox]/ox_inventory/modules/items/client.lua index 36004faa4..070b51f0b 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/items/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/items/client.lua @@ -2,14 +2,24 @@ if not lib then return end local Items = require 'modules.items.shared' --[[@as table]] +local function sendDisplayMetadata(data) + SendNUIMessage({ + action = 'displayMetadata', + data = data + }) +end + --- use array of single key value pairs to dictate order ---@param metadata string | table | table[] ---@param value? string local function displayMetadata(metadata, value) local data = {} - if type(metadata) == 'string' and value then data = { [1] = { metadata = metadata, value = value } } - elseif metadata[1] then -- assume its an array + if type(metadata) == 'string' then + if not value then return end + + data = { { metadata = metadata, value = value } } + elseif table.type(metadata) == 'array' then for i = 1, #metadata do for k, v in pairs(metadata[i]) do data[i] = { @@ -20,18 +30,24 @@ local function displayMetadata(metadata, value) end else for k, v in pairs(metadata) do - data[#data+1] = { + data[#data + 1] = { metadata = k, value = v, } end end - SendNUIMessage({ - action = 'displayMetadata', - data = data - }) + if client.uiLoaded then + return sendDisplayMetadata(data) + end + + CreateThread(function() + repeat Wait(100) until client.uiLoaded + + sendDisplayMetadata(data) + end) end + exports('displayMetadata', displayMetadata) ---@param _ table? @@ -61,7 +77,7 @@ setmetatable(Items --[[@as table]], { local function Item(name, cb) local item = Items[name] if item then - if not item.client.export and not item.client.event then + if not item.client?.export and not item.client?.event then item.effect = cb end end @@ -175,4 +191,4 @@ end) exports('Items', function(item) return getItem(nil, item) end) exports('ItemList', function(item) return getItem(nil, item) end) -return Items \ No newline at end of file +return Items diff --git a/server-data/resources/[ox]/ox_inventory/modules/items/containers.lua b/server-data/resources/[ox]/ox_inventory/modules/items/containers.lua index ddc8f449c..e8b510af2 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/items/containers.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/items/containers.lua @@ -27,20 +27,20 @@ local function setContainerProperties(itemName, properties) if blacklist then local tableType = table.type(blacklist) - if tableType == "array" then + if tableType == 'array' then blacklist = arrayToSet(blacklist) - elseif tableType ~= "hash" then - TypeError("blacklist", "table", type(blacklist)) + elseif tableType ~= 'hash' then + TypeError('blacklist', 'table', type(blacklist)) end end if whitelist then local tableType = table.type(whitelist) - if tableType == "array" then + if tableType == 'array' then whitelist = arrayToSet(whitelist) - elseif tableType ~= "hash" then - TypeError("whitelist", "table", type(whitelist)) + elseif tableType ~= 'hash' then + TypeError('whitelist', 'table', type(whitelist)) end end @@ -51,16 +51,16 @@ local function setContainerProperties(itemName, properties) } end -setContainerProperties("paperbag", { +setContainerProperties('paperbag', { slots = 5, maxWeight = 1000, - blacklist = { "testburger" }, + blacklist = { 'testburger' } }) -setContainerProperties("pizzabox", { +setContainerProperties('pizzabox', { slots = 5, maxWeight = 1000, - whitelist = { "pizza" }, + whitelist = { 'pizza' } }) return containers diff --git a/server-data/resources/[ox]/ox_inventory/modules/items/server.lua b/server-data/resources/[ox]/ox_inventory/modules/items/server.lua index 3d1b4d33e..ded5bcab1 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/items/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/items/server.lua @@ -25,17 +25,17 @@ local trash = { ---@param name string? ---@return table? local function getItem(_, name) - if name then - name = name:lower() + if not name then return ItemList end - if name:sub(0, 7) == 'weapon_' then - name = name:upper() - end + if type(name) ~= 'string' then return end - return ItemList[name] - end + name = name:lower() + + if name:sub(0, 7) == 'weapon_' then + name = name:upper() + end - return ItemList + return ItemList[name] end setmetatable(Items --[[@as table]], { @@ -219,12 +219,6 @@ CreateThread(function() Wait(500) end - local clearStashes = GetConvar('inventory:clearstashes', '6 MONTH') - - if clearStashes ~= '' then - pcall(MySQL.query.await, ('DELETE FROM ox_inventory WHERE lastupdated < (NOW() - INTERVAL %s) OR data = "[]"'):format(clearStashes)) - end - local count = 0 Wait(1000) @@ -272,7 +266,7 @@ local TriggerEventHooks = require 'modules.hooks.server' ---@param inv inventory ---@param item OxServerItem ----@param metadata table | string | nil +---@param metadata any ---@param count number ---@return table, number ---Generates metadata for new items being created through AddItem, buyItem, etc. @@ -291,13 +285,8 @@ function Items.Metadata(inv, item, metadata, count) if metadata.registered ~= false and (metadata.ammo or item.name == 'WEAPON_STUNGUN') then local registered = type(metadata.registered) == 'string' and metadata.registered or inv?.player?.name - - if registered then - metadata.registered = registered - metadata.serial = GenerateSerial(metadata.serial) - else - metadata.registered = nil - end + metadata.registered = registered + metadata.serial = GenerateSerial(metadata.serial) end if item.hash == `WEAPON_PETROLCAN` or item.hash == `WEAPON_HAZARDCAN` or item.hash == `WEAPON_FERTILIZERCAN` or item.hash == `WEAPON_FIREEXTINGUISHER` then @@ -372,7 +361,7 @@ function Items.CheckMetadata(metadata, item, name, ostime) local durability = metadata.durability if durability then - if durability > 100 and ostime >= durability then + if durability < 0 or durability > 100 and ostime >= durability then metadata.durability = 0 end else @@ -414,6 +403,41 @@ function Items.CheckMetadata(metadata, item, name, ostime) return metadata end +---Update item durability, and call `Inventory.RemoveItem` if it was removed from decay. +---@param inv OxInventory +---@param slot SlotWithItem +---@param item OxServerItem +---@param value? number +---@param ostime? number +---@return boolean? removed +function Items.UpdateDurability(inv, slot, item, value, ostime) + local durability = slot.metadata.durability or value + + if not durability then return end + + if value then + durability = value + elseif ostime and durability > 100 and ostime >= durability then + durability = 0 + end + + if item.decay and durability == 0 then + return Inventory.RemoveItem(inv, slot.name, slot.count, nil, slot.slot) + end + + if slot.metadata.durability == durability then return end + + inv.changed = true + slot.metadata.durability = durability + + inv:syncSlotsWithClients({ + { + item = slot, + inventory = inv.id + } + }, true) +end + local function Item(name, cb) local item = ItemList[name] diff --git a/server-data/resources/[ox]/ox_inventory/modules/items/shared.lua b/server-data/resources/[ox]/ox_inventory/modules/items/shared.lua index 35192fc22..cd40ff492 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/items/shared.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/items/shared.lua @@ -1,56 +1,3 @@ ----wip types - ----@class OxItem ----@field name string ----@field label string ----@field weight number Weight of the item in grams. ----@field description? string Text to display in the item tooltip. ----@field consume? number Number of items to remove on use.
Using a value under 1 will remove durability, if the item cannot be stacked. ----@field degrade? number Amount of time for the item durability to degrade to 0, in minutes. ----@field stack? boolean Set to false to prevent the item from stacking. ----@field close? boolean Set to false to keep the inventory open on item use. ----@field allowArmed? boolean Set to true to allow an item to be used while a weapon is equipped. ----@field buttons? { label: string, group: string, action: fun(slot: number) }[] Add interactions when right-clicking an item. ----@field [string] any - ----@class SlotWithItem ----@field name string ----@field label string ----@field weight number ----@field slot number ----@field count number ----@field metadata { [string]: any } ----@field description? string ----@field stack? boolean ----@field close? boolean - ----@class OxClientProps ----@field status? table ----@field anim? string | { dict?: string, clip: string, flag?: number, blendIn?: number, blendOut?: number, duration?: number, playbackRate?: number, lockX?: boolean, lockY?: boolean, lockZ?: boolean, scenario?: string, playEnter?: boolean } ----@field prop? string | ProgressPropProps ----@field usetime? number ----@field label? string ----@field useWhileDead? boolean ----@field canCancel? boolean ----@field disable? { move?: boolean, car?: boolean, combat?: boolean, mouse?: boolean } ----@field export string ----@field [string] any - ----@class OxClientItem : OxItem ----@field client? OxClientProps - ----@class OxServerItem : OxItem ----@field server? { export: string, [string]: any } - ----@class OxWeapon : OxItem ----@field hash number ----@field durability number ----@field weapon? true ----@field ammo? true ----@field component? true ----@field throwable? boolean ----@field model? string - local function useExport(resource, export) return function(...) return exports[resource][export](nil, ...) @@ -108,10 +55,11 @@ local function newItem(data) ItemList[data.name] = data end -for type, data in pairs(data('weapons')) do +for type, data in pairs(lib.load('data.weapons')) do for k, v in pairs(data) do v.name = k v.close = type == 'Ammo' and true or false + v.weight = v.weight or 0 if type == 'Weapons' then ---@cast v OxWeapon @@ -140,9 +88,13 @@ for type, data in pairs(data('weapons')) do end end -for k, v in pairs(data 'items') do +for k, v in pairs(lib.load('data.items')) do v.name = k - newItem(v) + local success, response = pcall(newItem, v) + + if not success then + warn(('An error occurred while creating item "%s" callback!\n^1SCRIPT ERROR: %s^0'):format(k, response)) + end end ItemList.cash = ItemList.money diff --git a/server-data/resources/[ox]/ox_inventory/modules/mysql/server.lua b/server-data/resources/[ox]/ox_inventory/modules/mysql/server.lua index 3eb91057b..5fb493f11 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/mysql/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/mysql/server.lua @@ -1,177 +1,250 @@ -if not lib then - return -end +if not lib then return end local Query = { - SELECT_STASH = "SELECT data FROM ox_inventory WHERE owner = ? AND name = ?", - UPDATE_STASH = "INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)", - SELECT_GLOVEBOX = "SELECT plate, glovebox FROM `{vehicle_table}` WHERE `{vehicle_column}` = ?", - SELECT_TRUNK = "SELECT plate, trunk FROM `{vehicle_table}` WHERE `{vehicle_column}` = ?", - SELECT_PLAYER = "SELECT inventory FROM `{user_table}` WHERE `{user_column}` = ?", - UPDATE_TRUNK = "UPDATE `{vehicle_table}` SET trunk = ? WHERE `{vehicle_column}` = ?", - UPDATE_GLOVEBOX = "UPDATE `{vehicle_table}` SET glovebox = ? WHERE `{vehicle_column}` = ?", - UPDATE_PLAYER = "UPDATE `{user_table}` SET inventory = ? WHERE `{user_column}` = ?", + SELECT_STASH = 'SELECT data FROM ox_inventory WHERE owner = ? AND name = ?', + UPDATE_STASH = 'UPDATE ox_inventory SET data = ? WHERE owner = ? AND name = ?', + UPSERT_STASH = 'INSERT INTO ox_inventory (data, owner, name) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)', + INSERT_STASH = 'INSERT INTO ox_inventory (owner, name) VALUES (?, ?)', + SELECT_GLOVEBOX = 'SELECT plate, glovebox FROM `{vehicle_table}` WHERE `{vehicle_column}` = ?', + SELECT_TRUNK = 'SELECT plate, trunk FROM `{vehicle_table}` WHERE `{vehicle_column}` = ?', + SELECT_PLAYER = 'SELECT inventory FROM `{user_table}` WHERE `{user_column}` = ?', + UPDATE_TRUNK = 'UPDATE `{vehicle_table}` SET trunk = ? WHERE `{vehicle_column}` = ?', + UPDATE_GLOVEBOX = 'UPDATE `{vehicle_table}` SET glovebox = ? WHERE `{vehicle_column}` = ?', + UPDATE_PLAYER = 'UPDATE `{user_table}` SET inventory = ? WHERE `{user_column}` = ?', } Citizen.CreateThreadNow(function() - local playerTable, playerColumn, vehicleTable, vehicleColumn - - if shared.framework == "ox" then - playerTable = "character_inventory" - playerColumn = "charid" - vehicleTable = "vehicles" - vehicleColumn = "id" - elseif shared.framework == "esx" then - playerTable = "users" - playerColumn = "identifier" - vehicleTable = "owned_vehicles" - vehicleColumn = "plate" - elseif shared.framework == "qb" then - playerTable = "players" - playerColumn = "citizenid" - vehicleTable = "player_vehicles" - vehicleColumn = "plate" - elseif shared.framework == "nd" then - playerTable = "characters" - playerColumn = "character_id" - vehicleTable = "vehicles" - vehicleColumn = "id" - end - - for k, v in pairs(Query) do - Query[k] = v:gsub("{user_table}", playerTable) - :gsub("{user_column}", playerColumn) - :gsub("{vehicle_table}", vehicleTable) - :gsub("{vehicle_column}", vehicleColumn) - end - - Wait(0) - - local success, result = pcall(MySQL.scalar.await, "SELECT 1 FROM ox_inventory") - - if not success then - MySQL.query([[CREATE TABLE `ox_inventory` ( + local playerTable, playerColumn, vehicleTable, vehicleColumn + + if shared.framework == 'ox' then + playerTable = 'character_inventory' + playerColumn = 'charid' + vehicleTable = 'vehicles' + vehicleColumn = 'id' + elseif shared.framework == 'esx' then + playerTable = 'users' + playerColumn = 'identifier' + vehicleTable = 'owned_vehicles' + vehicleColumn = 'plate' + elseif shared.framework == 'qb' then + playerTable = 'players' + playerColumn = 'citizenid' + vehicleTable = 'player_vehicles' + vehicleColumn = 'plate' + elseif shared.framework == 'nd' then + playerTable = 'nd_characters' + playerColumn = 'charid' + vehicleTable = 'nd_vehicles' + vehicleColumn = 'id' + end + + for k, v in pairs(Query) do + Query[k] = v:gsub('{user_table}', playerTable):gsub('{user_column}', playerColumn):gsub('{vehicle_table}', + vehicleTable):gsub('{vehicle_column}', vehicleColumn) + end + + Wait(0) + + local success, result = pcall(MySQL.scalar.await, 'SELECT 1 FROM ox_inventory') + + if not success then + MySQL.query([[CREATE TABLE `ox_inventory` ( `owner` varchar(60) DEFAULT NULL, `name` varchar(100) NOT NULL, `data` longtext DEFAULT NULL, `lastupdated` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), UNIQUE KEY `owner` (`owner`,`name`) )]]) - else - -- Shouldn't be needed anymore; was used for some data conversion for v2.5.0 (back in March 2022) - -- result = MySQL.query.await("SELECT owner, name FROM ox_inventory WHERE NOT owner = ''") - - -- if result and next(result) then - -- local parameters = {} - -- local count = 0 - - -- for i = 1, #result do - -- local data = result[i] - -- local snip = data.name:sub(-#data.owner, #data.name) - - -- if data.owner == snip then - -- local name = data.name:sub(0, #data.name - #snip) - - -- count += 1 - -- parameters[count] = { query = 'UPDATE ox_inventory SET `name` = ? WHERE `owner` = ? AND `name` = ?', values = { name, data.owner, data.name } } - -- end - -- end - - -- if #parameters > 0 then - -- MySQL.transaction(parameters) - -- end - -- end - end + else + -- Shouldn't be needed anymore; was used for some data conversion for v2.5.0 (back in March 2022) + -- result = MySQL.query.await("SELECT owner, name FROM ox_inventory WHERE NOT owner = ''") - result = MySQL.query.await(("SHOW COLUMNS FROM `%s`"):format(vehicleTable)) + -- if result and next(result) then + -- local parameters = {} + -- local count = 0 - if result then - local glovebox, trunk + -- for i = 1, #result do + -- local data = result[i] + -- local snip = data.name:sub(-#data.owner, #data.name) - for i = 1, #result do - local column = result[i] - if column.Field == "glovebox" then - glovebox = true - elseif column.Field == "trunk" then - trunk = true - end - end + -- if data.owner == snip then + -- local name = data.name:sub(0, #data.name - #snip) - if not glovebox then - MySQL.query(("ALTER TABLE `%s` ADD COLUMN `glovebox` LONGTEXT NULL"):format(vehicleTable)) - end + -- count += 1 + -- parameters[count] = { query = 'UPDATE ox_inventory SET `name` = ? WHERE `owner` = ? AND `name` = ?', values = { name, data.owner, data.name } } + -- end + -- end - if not trunk then - MySQL.query(("ALTER TABLE `%s` ADD COLUMN `trunk` LONGTEXT NULL"):format(vehicleTable)) - end - end + -- if #parameters > 0 then + -- MySQL.transaction(parameters) + -- end + -- end + end + + result = MySQL.query.await(('SHOW COLUMNS FROM `%s`'):format(vehicleTable)) + + if result then + local glovebox, trunk + + for i = 1, #result do + local column = result[i] + if column.Field == 'glovebox' then + glovebox = true + elseif column.Field == 'trunk' then + trunk = true + end + end - success, result = pcall(MySQL.scalar.await, ("SELECT inventory FROM `%s`"):format(playerTable)) + if not glovebox then + MySQL.query(('ALTER TABLE `%s` ADD COLUMN `glovebox` LONGTEXT NULL'):format(vehicleTable)) + end - if not success then - return MySQL.query(("ALTER TABLE `%s` ADD COLUMN `inventory` LONGTEXT NULL"):format(playerTable)) + if not trunk then + MySQL.query(('ALTER TABLE `%s` ADD COLUMN `trunk` LONGTEXT NULL'):format(vehicleTable)) + end + end + + success, result = pcall(MySQL.scalar.await, ('SELECT inventory FROM `%s`'):format(playerTable)) + + if not success then + MySQL.query(('ALTER TABLE `%s` ADD COLUMN `inventory` LONGTEXT NULL'):format(playerTable)) + end + + local clearStashes = GetConvar('inventory:clearstashes', '6 MONTH') + + if clearStashes ~= '' then + pcall(MySQL.query.await, ('DELETE FROM ox_inventory WHERE lastupdated < (NOW() - INTERVAL %s)'):format(clearStashes)) end end) db = {} function db.loadPlayer(identifier) - local inventory = MySQL.prepare.await(Query.SELECT_PLAYER, { identifier }) --[[@as string?]] - return inventory and json.decode(inventory) + local inventory = MySQL.prepare.await(Query.SELECT_PLAYER, { identifier }) --[[@as string?]] + return inventory and json.decode(inventory) end function db.savePlayer(owner, inventory) - return MySQL.prepare(Query.UPDATE_PLAYER, { inventory, owner }) + return MySQL.prepare(Query.UPDATE_PLAYER, { inventory, owner }) end function db.saveStash(owner, dbId, inventory) - return MySQL.prepare(Query.UPDATE_STASH, { owner or "", dbId, inventory }) + return MySQL.prepare(Query.UPSERT_STASH, { inventory, owner and tostring(owner) or '', dbId }) end function db.loadStash(owner, name) - return MySQL.prepare.await(Query.SELECT_STASH, { owner or "", name }) + return MySQL.prepare.await(Query.SELECT_STASH, { owner and tostring(owner) or '', name }) end function db.saveGlovebox(id, inventory) - return MySQL.prepare(Query.UPDATE_GLOVEBOX, { inventory, id }) + return MySQL.prepare(Query.UPDATE_GLOVEBOX, { inventory, id }) end function db.loadGlovebox(id) - return MySQL.prepare.await(Query.SELECT_GLOVEBOX, { id }) + return MySQL.prepare.await(Query.SELECT_GLOVEBOX, { id }) end function db.saveTrunk(id, inventory) - return MySQL.prepare(Query.UPDATE_TRUNK, { inventory, id }) + return MySQL.prepare(Query.UPDATE_TRUNK, { inventory, id }) end function db.loadTrunk(id) - return MySQL.prepare.await(Query.SELECT_TRUNK, { id }) + return MySQL.prepare.await(Query.SELECT_TRUNK, { id }) end -function db.saveInventories(players, trunks, gloveboxes, stashes) - local numPlayer, numTrunk, numGlove, numStash = #players, #trunks, #gloveboxes, #stashes - - if numPlayer > 0 then - MySQL.prepare(Query.UPDATE_PLAYER, players) - end - - if numTrunk > 0 then - MySQL.prepare(Query.UPDATE_TRUNK, trunks) - end +---@param rows number | MySQLQuery | MySQLQuery[] +local function countRows(rows) + if type(rows) == 'number' then return rows end - if numGlove > 0 then - MySQL.prepare(Query.UPDATE_GLOVEBOX, gloveboxes) - end + local n = 0 - if numStash > 0 then - MySQL.prepare(Query.UPDATE_STASH, stashes) - end + for i = 1, #rows do + if rows[i] == 1 then n += 1 end + end - local total = numPlayer + numTrunk + numGlove + numStash + return n +end - if total > 0 then - shared.info(("Saving %s inventories to the database"):format(total)) - end +---@param players InventorySaveData[] +---@param trunks InventorySaveData[] +---@param gloveboxes InventorySaveData[] +---@param stashes (InventorySaveData | string | number)[] +---@param total number[] +function db.saveInventories(players, trunks, gloveboxes, stashes, total) + local promises = {} + local start = os.nanotime() + + shared.info(('Saving %s inventories to the database'):format(total[5])) + + if total[1] > 0 then + local p = promise.new() + promises[#promises + 1] = p + + MySQL.prepare(Query.UPDATE_PLAYER, players, function(resp) + shared.info(('Saved %d/%d players (%.4f ms)'):format(countRows(resp), total[1], (os.nanotime() - start) / 1e6)) + p:resolve() + end) + end + + if total[2] > 0 then + local p = promise.new() + promises[#promises + 1] = p + + MySQL.prepare(Query.UPDATE_TRUNK, trunks, function(resp) + shared.info(('Saved %d/%d trunks (%.4f ms)'):format(countRows(resp), total[2], (os.nanotime() - start) / 1e6)) + p:resolve() + end) + end + + if total[3] > 0 then + local p = promise.new() + promises[#promises + 1] = p + + MySQL.prepare(Query.UPDATE_GLOVEBOX, gloveboxes, function(resp) + shared.info(('Saved %d/%d gloveboxes (%.4f ms)'):format(countRows(resp), total[3], (os.nanotime() - start) / 1e6)) + p:resolve() + end) + end + + if total[4] > 0 then + local p = promise.new() + promises[#promises + 1] = p + + if server.bulkstashsave then + total[4] /= 3 + + MySQL.query(Query.UPSERT_STASH:gsub('%(%?, %?, %?%)', string.rep('(?, ?, ?)', total[4], ', ')), stashes, function(resp) + local affectedRows = resp.affectedRows + + if total[4] == 1 then + if affectedRows == 2 then affectedRows = 1 end + else + affectedRows -= tonumber(resp.info:match('Duplicates: (%d+)'), 10) or 0 + end + + shared.info(('Saved %d/%d stashes (%.4f ms)'):format(affectedRows, total[4], (os.nanotime() - start) / 1e6)) + p:resolve() + end) + else + MySQL.rawExecute(Query.UPSERT_STASH, stashes, function(resp) + local affectedRows = 0 + + if table.type(resp) == 'hash' then + if resp.affectedRows > 0 then affectedRows = 1 end + else + for i = 1, #resp do + if resp[i].affectedRows > 0 then affectedRows += 1 end + end + end + + shared.info(('Saved %s/%s stashes (%.4f ms)'):format(affectedRows, total[4], (os.nanotime() - start) / 1e6)) + p:resolve() + end) + end + end + + -- All queries must run asynchronously on resource stop, so we'll await multiple promises instead. + Citizen.Await(promise.all(promises)) end return db diff --git a/server-data/resources/[ox]/ox_inventory/modules/pefcl/server.lua b/server-data/resources/[ox]/ox_inventory/modules/pefcl/server.lua index 28c92984f..9414bf621 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/pefcl/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/pefcl/server.lua @@ -9,41 +9,41 @@ This is mostly here for ox_core. ]] -local Inventory = require("modules.inventory.server") +local Inventory = require 'modules.inventory.server' ---@param source number ---@param amount number -exports("addCash", function(source, amount) - Inventory.AddItem(source, "money", amount) +exports('addCash', function(source, amount) + Inventory.AddItem(source, 'money', amount) end) ---@param source number ---@param amount number -exports("removeCash", function(source, amount) - Inventory.RemoveItem(source, "money", amount) +exports('removeCash', function(source, amount) + Inventory.RemoveItem(source, 'money', amount) end) ---@param source number ---@return number? -exports("getCash", function(source) - return Inventory.GetItem(source, "money", false, true) or 0 --[[@as number]] +exports('getCash', function(source) + return Inventory.GetItem(source, 'money', false, true) or 0 --[[@as number]] end) ---@param source number ---@return table? -exports("getCards", function(source) - local items = Inventory(source).items +exports('getCards', function(source) + local items = Inventory(source)?.items if items then local retval, num = {}, 0 for _, data in pairs(items) do - if data.name == "mastercard" then + if data.name == 'mastercard' then num += 1 retval[num] = { id = data.metadata.id, holder = data.metadata.holder, - number = data.metadata.number, + number = data.metadata.number } end end @@ -54,14 +54,15 @@ end) ---@param source number ---@param card table -exports("giveCard", function(source, card) - Inventory.AddItem(source, "mastercard", 1, { +exports('giveCard', function(source, card) + Inventory.AddItem(source, 'mastercard', 1, { id = card.id, holder = card.holder, number = card.number, - description = ("Card Number: %s"):format(card.number), + description = ('Card Number: %s'):format(card.number) }) end) ---no-op -exports("getBank", function() end) +exports('getBank', function() end) + diff --git a/server-data/resources/[ox]/ox_inventory/modules/shops/client.lua b/server-data/resources/[ox]/ox_inventory/modules/shops/client.lua index e454e7e35..f5b3e780a 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/shops/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/shops/client.lua @@ -4,12 +4,13 @@ local shopTypes = {} local shops = {} local createBlip = require 'modules.utils.client'.CreateBlip -for shopType, shopData in pairs(data('shops') --[[@as table]]) do +for shopType, shopData in pairs(lib.load('data.shops') --[[@as table]]) do local shop = { name = shopData.name, groups = shopData.groups or shopData.jobs, blip = shopData.blip, label = shopData.label, + icon = shopData.icon } if shared.target then @@ -54,20 +55,17 @@ local function onEnterShop(point) SetEntityInvincible(entity, true) SetBlockingOfNonTemporaryEvents(entity, true) - exports.qtarget:AddTargetEntity(entity, { - options = { - { - icon = point.icon or 'fas fa-shopping-basket', - label = point.label, - job = point.groups, - action = function() - client.openInventory('shop', { id = point.invId, type = point.type }) - end, - iconColor = point.iconColor, - } - }, - - distance = point.shopDistance or 2.0 + exports.ox_target:addLocalEntity(entity, { + { + icon = point.icon or 'fas fa-shopping-basket', + label = point.label, + groups = point.groups, + onSelect = function() + client.openInventory('shop', { id = point.invId, type = point.type }) + end, + iconColor = point.iconColor, + distance = point.shopDistance or 2.0 + } }) point.entity = entity @@ -81,7 +79,7 @@ local function onExitShop(point) if not entity then return end - exports.qtarget:RemoveTargetEntity(entity, point.label) + exports.ox_target:removeLocalEntity(entity) Utils.DeleteEntity(entity) point.entity = nil @@ -96,7 +94,8 @@ local function wipeShops() local shop = shops[i] if shop.zoneId then - exports.qtarget:RemoveZone(shop.zoneId) + exports.ox_target:removeZone(shop.zoneId) + shop.zoneId = nil end if shop.remove then @@ -126,18 +125,17 @@ local function refreshShops() if shop.model then if not hasShopAccess(shop) then goto skipLoop end - exports.qtarget:RemoveTargetModel(shop.model, label) - exports.qtarget:AddTargetModel(shop.model, { - options = { - { - icon = shop.icon or 'fas fa-shopping-basket', - label = label, - action = function() - client.openInventory('shop', { type = type }) - end - }, - }, - distance = 2 + exports.ox_target:removeModel(shop.model, shop.name) + exports.ox_target:addModel(shop.model, { + { + name = shop.name, + icon = shop.icon or 'fas fa-shopping-basket', + label = label, + onSelect = function() + client.openInventory('shop', { type = type }) + end, + distance = 2 + }, }) elseif shop.targets then for i = 1, #shop.targets do @@ -165,37 +163,26 @@ local function refreshShops() onExit = onExitShop, shopDistance = target.distance, }) - elseif target.loc then + else if not hasShopAccess(shop) then goto nextShop end id += 1 shops[id] = { - zoneId = shopid, - blip = blip and createBlip(blip, target.loc) + zoneId = Utils.CreateBoxZone(target, { + { + name = shopid, + icon = 'fas fa-shopping-basket', + label = label, + groups = shop.groups, + onSelect = function() + client.openInventory('shop', { id = i, type = type }) + end, + iconColor = target.iconColor, + } + }), + blip = blip and createBlip(blip, target.coords) } - - exports.qtarget:AddBoxZone(shopid, target.loc, target.length or 0.5, target.width or 0.5, { - name = shopid, - heading = target.heading or 0.0, - debugPoly = target.debug, - minZ = target.minZ, - maxZ = target.maxZ, - drawSprite = target.drawSprite, - }, { - options = { - { - icon = 'fas fa-shopping-basket', - label = label, - job = shop.groups, - action = function() - client.openInventory('shop', { id = i, type = type }) - end, - iconColor = target.iconColor, - }, - }, - distance = target.distance or 2.0 - }) end ::nextShop:: diff --git a/server-data/resources/[ox]/ox_inventory/modules/shops/server.lua b/server-data/resources/[ox]/ox_inventory/modules/shops/server.lua index 3e4b4c14a..d5cb70693 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/shops/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/shops/server.lua @@ -6,25 +6,11 @@ local Shops = {} local locations = shared.target and 'targets' or 'locations' ---@class OxShopItem ----@field name string ---@field slot number ---@field weight number ----@field price number ----@field metadata? table ----@field license? string ----@field currency? string ----@field grade? number | number[] ----@field count? number - ----@class OxShopServer : OxShop ----@field id string ----@field coords vector3 ----@field items OxShopItem[] ----@field slots number ----@field [string] any local function setupShopItems(id, shopType, shopName, groups) - local shop = id and Shops[shopType][id] or Shops[shopType] --[[@as OxShopServer]] + local shop = id and Shops[shopType][id] or Shops[shopType] --[[@as OxShop]] for i = 1, shop.slots do local slot = shop.items[i] @@ -43,7 +29,7 @@ local function setupShopItems(id, shopType, shopName, groups) slot = i, weight = Item.weight, count = slot.count, - price = (server.randomprices and not slot.currency or slot.currency == 'money') and (math.ceil(slot.price * (math.random(80, 120)/100))) or slot.price or 0, + price = (server.randomprices and (not slot.currency or slot.currency == 'money')) and (math.ceil(slot.price * (math.random(80, 120)/100))) or slot.price or 0, metadata = slot.metadata, license = slot.license, currency = slot.currency, @@ -60,7 +46,7 @@ local function setupShopItems(id, shopType, shopName, groups) end ---@param shopType string ----@param properties OxShopServer +---@param properties OxShop local function registerShopType(shopType, properties) local shopLocations = properties[locations] or properties.locations @@ -87,12 +73,25 @@ local function createShop(shopType, id) if not shop then return end - local shopLocations = shop[locations] or shop.locations - local groups = shop.groups or shop.jobs + local store = (shop[locations] or shop.locations)?[id] - if not shopLocations or not shopLocations[id] then return end + if not store then return end - ---@type OxShopServer + local groups = shop.groups or shop.jobs + local coords + + if shared.target then + if store.length then + local z = store.loc.z + math.abs(store.minZ - store.maxZ) / 2 + coords = vec3(store.loc.x, store.loc.y, z) + else + coords = store.coords or store.loc + end + else + coords = store + end + + ---@type OxShop shop[id] = { label = shop.name, id = shopType..' '..id, @@ -100,7 +99,7 @@ local function createShop(shopType, id) items = table.clone(shop.inventory), slots = #shop.inventory, type = 'shop', - coords = shared.target and shop.targets?[id]?.loc or shopLocations[id], + coords = coords, distance = shared.target and shop.targets?[id]?.distance, } @@ -109,12 +108,12 @@ local function createShop(shopType, id) return shop[id] end -for shopType, shopDetails in pairs(data('shops')) do +for shopType, shopDetails in pairs(lib.load('data.shops')) do registerShopType(shopType, shopDetails) end ---@param shopType string ----@param shopDetails OxShopServer +---@param shopDetails OxShop exports('RegisterShop', function(shopType, shopDetails) registerShopType(shopType, shopDetails) end) @@ -135,7 +134,7 @@ lib.callback.register('ox_inventory:openShop', function(source, data) if not shop then return end end - ---@cast shop OxShopServer + ---@cast shop OxShop if shop.groups then local group = server.hasGroup(left, shop.groups) @@ -154,21 +153,12 @@ lib.callback.register('ox_inventory:openShop', function(source, data) return { label = left.label, type = left.type, slots = left.slots, weight = left.weight, maxWeight = left.maxWeight }, shop end) -local table = lib.table - --- http://lua-users.org/wiki/FormattingNumbers --- credit http://richard.warburton.it -local function comma_value(n) - local left, num, right = string.match(n,'^([^%d]*%d)(%d*)(.-)$') - return left..(num:reverse():gsub('(%d%d%d)','%1,'):reverse())..right -end - local function canAffordItem(inv, currency, price) local canAfford = price >= 0 and Inventory.GetItem(inv, currency, false, true) >= price return canAfford or { type = 'error', - description = locale('cannot_afford', ('%s%s'):format((currency == 'money' and locale('$') or comma_value(price)), (currency == 'money' and comma_value(price) or ' '..Items(currency).label))) + description = locale('cannot_afford', ('%s%s'):format((currency == 'money' and locale('$') or math.groupdigits(price)), (currency == 'money' and math.groupdigits(price) or ' '..Items(currency).label))) } end @@ -277,7 +267,7 @@ lib.callback.register('ox_inventory:buyItem', function(source, data) if server.syncInventory then server.syncInventory(playerInv) end - local message = locale('purchased_for', count, fromItem.label, (currency == 'money' and locale('$') or comma_value(price)), (currency == 'money' and comma_value(price) or ' '..Items(currency).label)) + local message = locale('purchased_for', count, fromItem.label, (currency == 'money' and locale('$') or math.groupdigits(price)), (currency == 'money' and math.groupdigits(price) or ' '..Items(currency).label)) if server.loglevel > 0 then if server.loglevel > 1 or fromData.price >= 500 then diff --git a/server-data/resources/[ox]/ox_inventory/modules/utils/client.lua b/server-data/resources/[ox]/ox_inventory/modules/utils/client.lua index 3ab89e975..54c1ad5c2 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/utils/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/utils/client.lua @@ -1,6 +1,4 @@ -if not lib then - return -end +if not lib then return end local Utils = {} @@ -9,76 +7,34 @@ function Utils.PlayAnim(wait, dict, name, blendIn, blendOut, duration, flag, rat TaskPlayAnim(cache.ped, dict, name, blendIn, blendOut, duration, flag, rate, lockX, lockY, lockZ) RemoveAnimDict(dict) - if wait > 0 then - Wait(wait) - end + if wait > 0 then Wait(wait) end end -function Utils.PlayAnimAdvanced( - wait, - dict, - name, - posX, - posY, - posZ, - rotX, - rotY, - rotZ, - blendIn, - blendOut, - duration, - flag, - time -) +function Utils.PlayAnimAdvanced(wait, dict, name, posX, posY, posZ, rotX, rotY, rotZ, blendIn, blendOut, duration, flag, time) lib.requestAnimDict(dict) - TaskPlayAnimAdvanced( - cache.ped, - dict, - name, - posX, - posY, - posZ, - rotX, - rotY, - rotZ, - blendIn, - blendOut, - duration, - flag, - time, - 0, - 0 - ) + TaskPlayAnimAdvanced(cache.ped, dict, name, posX, posY, posZ, rotX, rotY, rotZ, blendIn, blendOut, duration, flag, time, 0, 0) RemoveAnimDict(dict) - if wait > 0 then - Wait(wait) - end + if wait > 0 then Wait(wait) end end -function Utils.Raycast(flag) +---@param flag number +---@param destination? vector3 +---@param size? number +---@return number | false +---@return number? +function Utils.Raycast(flag, destination, size) local playerCoords = GetEntityCoords(cache.ped) - local plyOffset = GetOffsetFromEntityInWorldCoords(cache.ped, 0.0, 2.2, -0.25) - local rayHandle = StartShapeTestCapsule( - playerCoords.x, - playerCoords.y, - playerCoords.z + 0.5, - plyOffset.x, - plyOffset.y, - plyOffset.z, - 2.2, - flag or 30, - cache.ped, - 4 - ) + destination = destination or GetOffsetFromEntityInWorldCoords(cache.ped, 0.0, 2.2, -0.25) + local rayHandle = StartShapeTestCapsule(playerCoords.x, playerCoords.y, playerCoords.z + 0.5, destination.x, destination.y, destination.z, size or 2.2, flag or 30, cache.ped, 4) while true do Wait(0) - local result, _, _, _, entityHit = GetShapeTestResult(rayHandle) + local result, _, coords, _, entityHit = GetShapeTestResult(rayHandle) if result ~= 1 then + -- DrawLine(playerCoords.x, playerCoords.y, playerCoords.z + 0.5, destination.x, destination.y, destination.z, 0, 0, 255, 255) + -- DrawLine(playerCoords.x, playerCoords.y, playerCoords.z + 0.5, coords.x, coords.y, coords.z, 255, 0, 0, 255) local entityType - if entityHit then - entityType = GetEntityType(entityHit) - end + if entityHit then entityType = GetEntityType(entityHit) end if entityHit and entityType ~= 0 then return entityHit, entityType end @@ -117,18 +73,18 @@ function Utils.Notify(data) lib.notify(data) end -RegisterNetEvent("ox_inventory:notify", Utils.Notify) -exports("notify", Utils.Notify) +RegisterNetEvent('ox_inventory:notify', Utils.Notify) +exports('notify', Utils.Notify) function Utils.ItemNotify(data) if not client.itemnotify then return end - SendNUIMessage({ action = "itemNotify", data = data }) + SendNUIMessage({action = 'itemNotify', data = data}) end -RegisterNetEvent("ox_inventory:itemNotify", Utils.ItemNotify) +RegisterNetEvent('ox_inventory:itemNotify', Utils.ItemNotify) ---@deprecated function Utils.DeleteObject(obj) @@ -148,9 +104,7 @@ local rewardTypes = 1 << 0 | 1 << 1 | 1 << 2 | 1 << 3 | 1 << 7 | 1 << 10 -- Enables the weapon wheel, but disables the use of inventory items -- Mostly used for weaponised vehicles, though could be called for "minigames" function Utils.WeaponWheel(state) - if state == nil then - state = EnableWeaponWheel - end + if state == nil then state = EnableWeaponWheel end EnableWeaponWheel = state SetWeaponsNoAutoswap(not state) @@ -162,7 +116,7 @@ function Utils.WeaponWheel(state) end end -exports("weaponWheel", Utils.WeaponWheel) +exports('weaponWheel', Utils.WeaponWheel) function Utils.CreateBlip(settings, coords) local blip = AddBlipForCoord(coords.x, coords.y, coords.z) @@ -177,4 +131,38 @@ function Utils.CreateBlip(settings, coords) return blip end +---Takes OxTargetBoxZone or legacy zone data (PolyZone) and creates a zone. +---@param data OxTargetBoxZone | { length: number, minZ: number, maxZ: number, loc: vector3, heading: number, width: number, distance: number } +---@param options? OxTargetOption[] +---@return number +function Utils.CreateBoxZone(data, options) + if data.length then + local height = math.abs(data.maxZ - data.minZ) + local z = data.loc.z + math.abs(data.minZ - data.maxZ) / 2 + data.coords = vec3(data.loc.x, data.loc.y, z) + data.size = vec3(data.width, data.length, height) + data.rotation = data.heading + data.loc = nil + data.heading = nil + data.length = nil + data.width = nil + data.maxZ = nil + data.minZ = nil + end + + if not data.options and options then + local distance = data.distance or 2.0 + + for k, v in pairs(options) do + if not v.distance then + v.distance = distance + end + end + + data.options = options + end + + return exports.ox_target:addBoxZone(data) +end + return Utils diff --git a/server-data/resources/[ox]/ox_inventory/modules/utils/server.lua b/server-data/resources/[ox]/ox_inventory/modules/utils/server.lua index f46c3ce7c..5bac990ff 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/utils/server.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/utils/server.lua @@ -1,26 +1,24 @@ -if not lib then - return -end +if not lib then return end local Utils = {} -local webHook = GetConvar("inventory:webhook", "") +local webHook = GetConvar('inventory:webhook', '') -if webHook ~= "" then +if webHook ~= '' then local validHosts = { - ["i.imgur.com"] = true, + ['i.imgur.com'] = true, } local validExtensions = { - ["png"] = true, - ["apng"] = true, - ["webp"] = true, + ['png'] = true, + ['apng'] = true, + ['webp'] = true, } - local headers = { ["Content-Type"] = "application/json" } + local headers = { ['Content-Type'] = 'application/json' } function Utils.IsValidImageUrl(url) - local host, extension = url:match("^https?://([^/]+).+%.([%l]+)") + local host, extension = url:match('^https?://([^/]+).+%.([%l]+)') return host and extension and validHosts[host] and validExtensions[extension] end @@ -28,29 +26,22 @@ if webHook ~= "" then ---@param message string ---@param image string function Utils.DiscordEmbed(title, message, image, color) - PerformHttpRequest( - webHook, - function() end, - "POST", - json.encode({ - username = "ox_inventory", - embeds = { - { - title = title, - color = color, - footer = { - text = os.date("%c"), - }, - description = message, - thumbnail = { - url = image, - width = 100, - }, + PerformHttpRequest(webHook, function() end, 'POST', json.encode({ + username = 'ox_inventory', embeds = { + { + title = title, + color = color, + footer = { + text = os.date('%c'), }, - }, - }), - headers - ) + description = message, + thumbnail = { + url = image, + width = 100, + } + } + } + }), headers) end end diff --git a/server-data/resources/[ox]/ox_inventory/modules/weapon/client.lua b/server-data/resources/[ox]/ox_inventory/modules/weapon/client.lua index e6c3f4103..d73ae9baa 100644 --- a/server-data/resources/[ox]/ox_inventory/modules/weapon/client.lua +++ b/server-data/resources/[ox]/ox_inventory/modules/weapon/client.lua @@ -1,16 +1,13 @@ -if not lib then - return -end +if not lib then return end local Weapon = {} -local Items = require("modules.items.client") -local Utils = require("modules.utils.client") +local Items = require 'modules.items.client' +local Utils = require 'modules.utils.client' -- generic group animation data local anims = {} -anims[`GROUP_MELEE`] = { "melee@holster", "unholster", 200, "melee@holster", "holster", 600 } -anims[`GROUP_PISTOL`] = - { "reaction@intimidation@cop@unarmed", "intro", 400, "reaction@intimidation@cop@unarmed", "outro", 450 } +anims[`GROUP_MELEE`] = { 'melee@holster', 'unholster', 200, 'melee@holster', 'holster', 600 } +anims[`GROUP_PISTOL`] = { 'reaction@intimidation@cop@unarmed', 'intro', 400, 'reaction@intimidation@cop@unarmed', 'outro', 450 } anims[`GROUP_STUNGUN`] = anims[`GROUP_PISTOL`] local function vehicleIsCycle(vehicle) @@ -21,6 +18,7 @@ end function Weapon.Equip(item, data) local playerPed = cache.ped local coords = GetEntityCoords(playerPed, true) + local sleep if client.weaponanims then if cache.vehicle and vehicleIsCycle(cache.vehicle) then @@ -33,24 +31,9 @@ function Weapon.Equip(item, data) anim = nil end - local sleep = anim and anim[3] or 1200 - - Utils.PlayAnimAdvanced( - sleep, - anim and anim[1] or "reaction@intimidation@1h", - anim and anim[2] or "intro", - coords.x, - coords.y, - coords.z, - 0, - 0, - GetEntityHeading(playerPed), - 8.0, - 3.0, - sleep * 2, - 50, - 0.1 - ) + sleep = anim and anim[3] or 1200 + + Utils.PlayAnimAdvanced(sleep, anim and anim[1] or 'reaction@intimidation@1h', anim and anim[2] or 'intro', coords.x, coords.y, coords.z, 0, 0, GetEntityHeading(playerPed), 8.0, 3.0, sleep*2, 50, 0.1) end ::skipAnim:: @@ -64,14 +47,12 @@ function Weapon.Equip(item, data) GiveWeaponToPed(playerPed, data.hash, 0, false, true) - if item.metadata.tint then - SetPedWeaponTintIndex(playerPed, data.hash, item.metadata.tint) - end + if item.metadata.tint then SetPedWeaponTintIndex(playerPed, data.hash, item.metadata.tint) end if item.metadata.components then for i = 1, #item.metadata.components do local components = Items[item.metadata.components[i]].client.component - for v = 1, #components do + for v=1, #components do local component = components[v] if DoesWeaponTakeWeaponComponent(data.hash, component) then if not HasPedGotWeaponComponent(playerPed, data.hash, component) then @@ -83,8 +64,8 @@ function Weapon.Equip(item, data) end if item.metadata.specialAmmo then - local clipComponentKey = ("%s_CLIP"):format(data.model:gsub("WEAPON_", "COMPONENT_")) - local specialClip = ("%s_%s"):format(clipComponentKey, item.metadata.specialAmmo:upper()) + local clipComponentKey = ('%s_CLIP'):format(data.model:gsub('WEAPON_', 'COMPONENT_')) + local specialClip = ('%s_%s'):format(clipComponentKey, item.metadata.specialAmmo:upper()) if DoesWeaponTakeWeaponComponent(data.hash, specialClip) then GiveWeaponComponentToPed(playerPed, data.hash, specialClip) @@ -93,31 +74,29 @@ function Weapon.Equip(item, data) local ammo = item.metadata.ammo or item.throwable and 1 or 0 - SetPedAmmo(playerPed, data.hash, ammo) SetCurrentPedWeapon(playerPed, data.hash, true) SetPedCurrentWeaponVisible(playerPed, true, false, false, false) SetWeaponsNoAutoswap(true) - SetTimeout(0, function() - RefillAmmoInstantly(playerPed) - end) + SetPedAmmo(playerPed, data.hash, ammo) + SetTimeout(0, function() RefillAmmoInstantly(playerPed) end) if item.group == `GROUP_PETROLCAN` or item.group == `GROUP_FIREEXTINGUISHER` then item.metadata.ammo = item.metadata.durability SetPedInfiniteAmmo(playerPed, true, data.hash) end - TriggerEvent("ox_inventory:currentWeapon", item) - Utils.ItemNotify({ item, "ui_equipped" }) + TriggerEvent('ox_inventory:currentWeapon', item) + Utils.ItemNotify({ item, 'ui_equipped' }) - return item + return item, sleep end function Weapon.Disarm(currentWeapon, noAnim) - if currentWeapon.timer then + if currentWeapon?.timer then currentWeapon.timer = nil - if source == "" then - TriggerServerEvent("ox_inventory:updateWeapon") + if source == '' then + TriggerServerEvent('ox_inventory:updateWeapon') end SetPedAmmo(cache.ped, currentWeapon.hash, 0) @@ -139,28 +118,13 @@ function Weapon.Disarm(currentWeapon, noAnim) local sleep = anim and anim[6] or 1400 - Utils.PlayAnimAdvanced( - sleep, - anim and anim[4] or "reaction@intimidation@1h", - anim and anim[5] or "outro", - coords.x, - coords.y, - coords.z, - 0, - 0, - GetEntityHeading(cache.ped), - 8.0, - 3.0, - sleep, - 50, - 0 - ) + Utils.PlayAnimAdvanced(sleep, anim and anim[4] or 'reaction@intimidation@1h', anim and anim[5] or 'outro', coords.x, coords.y, coords.z, 0, 0, GetEntityHeading(cache.ped), 8.0, 3.0, sleep, 50, 0) end ::skipAnim:: - Utils.ItemNotify({ currentWeapon, "ui_holstered" }) - TriggerEvent("ox_inventory:currentWeapon") + Utils.ItemNotify({ currentWeapon, 'ui_holstered' }) + TriggerEvent('ox_inventory:currentWeapon') end Utils.WeaponWheel() diff --git a/server-data/resources/[ox]/ox_inventory/server.lua b/server-data/resources/[ox]/ox_inventory/server.lua index f4c517810..e19e6de02 100644 --- a/server-data/resources/[ox]/ox_inventory/server.lua +++ b/server-data/resources/[ox]/ox_inventory/server.lua @@ -12,6 +12,7 @@ local db = require 'modules.mysql.server' local Items = require 'modules.items.server' local Inventory = require 'modules.inventory.server' +require 'modules.crafting.server' require 'modules.shops.server' ---@param player table @@ -93,7 +94,7 @@ end ---@param source number ---@param invType string ----@param data string|number|table +---@param data? string|number|table ---@param ignoreSecurityChecks boolean? ---@return boolean|table|nil ---@return table? @@ -103,7 +104,12 @@ local function openInventory(source, invType, data, ignoreSecurityChecks) local left = Inventory(source) --[[@as OxInventory]] local right, closestCoords - Inventory.CloseAll(left, (invType == 'drop' or invType == 'container' or not invType) and source) + left:closeInventory(true) + Inventory.CloseAll(left, source) + + if invType == 'player' and data == source then + data = nil + end if data then if invType == 'stash' then @@ -135,7 +141,7 @@ local function openInventory(source, invType, data, ignoreSecurityChecks) end end elseif invType == 'container' then - left.containerSlot = data + left.containerSlot = data --[[@as number]] data = left.items[data] if data then @@ -161,6 +167,8 @@ local function openInventory(source, invType, data, ignoreSecurityChecks) if not TriggerEventHooks('openInventory', hookPayload) then return end + if left == right then return end + if right.player then if right.open then return end @@ -216,7 +224,7 @@ end) ---@param invType string ---@param data string|number|table exports('forceOpenInventory', function(playerId, invType, data) - local left, right = openInventory(playerId, invType, data) + local left, right = openInventory(playerId, invType, data, true) if left and right then TriggerClientEvent('ox_inventory:forceOpenInventory', playerId, left, right) @@ -224,7 +232,7 @@ exports('forceOpenInventory', function(playerId, invType, data) end end) -local Licenses = data 'licenses' +local Licenses = lib.load('data.licenses') lib.callback.register('ox_inventory:buyLicense', function(source, id) local license = Licenses[id] @@ -255,6 +263,25 @@ lib.callback.register('ox_inventory:getInventory', function(source, id) } end) +RegisterNetEvent('ox_inventory:usedItemInternal', function(slot) + local inventory = Inventory(source) + + if not inventory then return end + + local item = inventory.usingItem + + if not item or item.slot ~= slot then + ---@todo + DropPlayer(inventory.id, 'sussy') + + return + end + + TriggerEvent('ox_inventory:usedItem', inventory.id, item.name, item.slot, next(item.metadata) and item.metadata) + + inventory.usingItem = nil +end) + ---@param source number ---@param itemName string ---@param slot number? @@ -279,8 +306,7 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m local ostime = os.time() if ostime > durability then - inventory.items[slot].metadata.durability = 0 - + Items.UpdateDurability(inventory, data, item, 0) return TriggerClientEvent('ox_lib:notify', source, { type = 'error', description = locale('no_durability', label) }) elseif consume ~= 0 and consume < 1 then local degrade = (data.metadata.degrade or item.degrade) * 60 @@ -302,7 +328,7 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m end if item and data and data.count > 0 and data.name == item.name then - data = {name=data.name, label=label, count=data.count, slot=slot, metadata=data.metadata} + data = {name=data.name, label=label, count=data.count, slot=slot, metadata=data.metadata, weight=data.weight} if item.ammo then if inventory.weapon then @@ -328,6 +354,7 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m return TriggerClientEvent('ox_lib:notify', source, { type = 'error', description = locale('item_not_enough', item.name) }) end elseif not item.weapon and server.UseItem then + inventory.usingItem = data -- This is used to call an external useItem function, i.e. ESX.UseItem / QBCore.Functions.CanUseItem -- If an error is being thrown on item use there is no internal solution. We previously kept a list -- of usable items which led to issues when restarting resources (for obvious reasons), but config @@ -338,6 +365,7 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m data.consume = consume + ---@type boolean local success = lib.callback.await('ox_inventory:usingItem', source, data) if item.weapon then @@ -346,6 +374,8 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m if not success then return end + inventory.usingItem = data + if consume and consume ~= 0 and not data.component then data = inventory.items[data.slot] @@ -368,19 +398,13 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m local newItem = Inventory.SetSlot(inventory, item, 1, table.deepclone(data.metadata), emptySlot) if newItem then - newItem.metadata.durability = durability - - inventory:syncSlotsWithPlayer({ - { - item = newItem, - } - }, inventory.weight) + Items.UpdateDurability(inventory, newItem, item, durability) end end durability = 0 else - data.metadata.durability = durability + Items.UpdateDurability(inventory, data, item, durability) end if durability <= 0 then @@ -393,12 +417,6 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m else inventory.changed = true - inventory:syncSlotsWithPlayer({ - { - item = inventory.items[data.slot], - } - }, inventory.weight) - if server.syncInventory then server.syncInventory(inventory) end end @@ -535,7 +553,7 @@ lib.addCommand('clearevidence', { local hasPermission = group and server.isPlayerBoss(source, group, grade) if hasPermission then - MySQL.query('DELETE FROM ox_inventory WHERE name = ?', {('evidence-%s'):format(args.evidence)}) + MySQL.query('DELETE FROM ox_inventory WHERE name = ?', {('evidence-%s'):format(args.locker)}) end end) @@ -576,7 +594,7 @@ lib.addCommand('saveinv', { }, restricted = 'group.admin', }, function(source, args) - Inventory.SaveInventories(args.lock == 'true') + Inventory.SaveInventories(args.lock == 'true', false) end) lib.addCommand('viewinv', { @@ -586,12 +604,5 @@ lib.addCommand('viewinv', { }, restricted = 'group.admin', }, function(source, args) - local invId = tonumber(args.invId) or args.invId - local inventory = invId ~= source and Inventory(invId) - local playerInventory = Inventory(source) - - if playerInventory and inventory then - playerInventory:openInventory(inventory) - TriggerClientEvent('ox_inventory:viewInventory', source, inventory) - end + Inventory.InspectInventory(source, tonumber(args.invId) or args.invId) end) diff --git a/server-data/resources/[ox]/ox_inventory/setup/convert.lua b/server-data/resources/[ox]/ox_inventory/setup/convert.lua index 1e713aae7..7e327e3ee 100644 --- a/server-data/resources/[ox]/ox_inventory/setup/convert.lua +++ b/server-data/resources/[ox]/ox_inventory/setup/convert.lua @@ -171,7 +171,7 @@ local function ConvertQB() inventory[slot].metadata.durability = v.info.quality or 100 inventory[slot].metadata.ammo = v.info.ammo or 0 inventory[slot].metadata.components = {} - inventory[slot].metadata.serial = GenerateSerial() + inventory[slot].metadata.serial = v.info.serie or GenerateSerial() inventory[slot].metadata.quality = nil end end @@ -228,7 +228,7 @@ local function ConvertQB() inventory[slot].metadata.durability = v.info.quality or 100 inventory[slot].metadata.ammo = v.info.ammo or 0 inventory[slot].metadata.components = {} - inventory[slot].metadata.serial = GenerateSerial() + inventory[slot].metadata.serial = v.info.serie or GenerateSerial() inventory[slot].metadata.quality = nil end end @@ -280,7 +280,7 @@ local function ConvertQB() inventory[slot].metadata.durability = v.info.quality or 100 inventory[slot].metadata.ammo = v.info.ammo or 0 inventory[slot].metadata.components = {} - inventory[slot].metadata.serial = GenerateSerial() + inventory[slot].metadata.serial = v.info.serie or GenerateSerial() inventory[slot].metadata.quality = nil end end @@ -330,8 +330,7 @@ local function ConvertQB() for name, items in pairs(oxEvidence) do count += 1 parameters[count] = { "INSERT INTO ox_inventory (owner, name, data) VALUES ('', ?, ?) ON DUPLICATE KEY UPDATE name = VALUES(name), data = VALUES(data)", { - name = name, - data = json.encode(items) + name, json.encode(items) }} end diff --git a/server-data/resources/[ox]/ox_inventory/web/build/LICENSE b/server-data/resources/[ox]/ox_inventory/web/build/LICENSE new file mode 100644 index 000000000..e6a7e76ca --- /dev/null +++ b/server-data/resources/[ox]/ox_inventory/web/build/LICENSE @@ -0,0 +1,18 @@ +Ox Inventory +Copyright © 2023 Overextended (https://github.com/overextended) +Linden (https://github.com/thelindat) +Luke (https://github.com/LukeWasTakenn) +Dunak (https://github.com/dunak-debug) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . diff --git a/server-data/resources/[ox]/ox_inventory/web/build/assets/index-95f8e076.css b/server-data/resources/[ox]/ox_inventory/web/build/assets/index-95f8e076.css deleted file mode 100644 index 37e843457..000000000 --- a/server-data/resources/[ox]/ox_inventory/web/build/assets/index-95f8e076.css +++ /dev/null @@ -1,427 +0,0 @@ -body { - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - height: 100vh; - background: none !important; - overflow: hidden !important; - user-select: none -} - -#root { - height: 100% -} - -code { - font-family: source-code-pro, Menlo, Monaco, Consolas, Courier New, monospace -} - -::-webkit-scrollbar { - display: none -} - -p { - margin: 0; - padding: 0; - font-family: Roboto -} - -input[type=number]::-webkit-inner-spin-button, -input[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - -moz-appearance: none; - appearance: none -} - -.MuiMenuItem-root>div>p { - padding: 0 !important -} - -.MuiMenu-list { - min-width: 200px; - background-color: #22232c; - color: #c1c2c5; - padding: 4px; - border-color: #0003; - border-style: inset; - border-width: 1px; - font-size: 16px !important -} - -.MuiMenuItem-gutters { - padding: 4px 16px !important; - font-size: 16px !important -} - -.tooltip-description { - padding-top: 5px -} - -.tooltip-markdown>p { - margin: 0 -} - -button:active { - transform: translateY(3px) -} - -.item-drag-preview { - width: 7.7vh; - height: 7.7vh; - z-index: 1; - position: fixed; - pointer-events: none; - top: 0; - left: 0; - background-repeat: no-repeat; - background-position: center; - background-size: 7vh; - image-rendering: -webkit-optimize-contrast -} - -.inventory-wrapper { - display: flex; - flex-direction: row; - justify-content: center; - align-items: center; - height: 100%; - gap: 20px -} - -.inventory-control { - display: flex -} - -.inventory-control .inventory-control-wrapper { - display: flex; - flex-direction: column; - gap: 20px; - justify-content: center; - align-items: center -} - -.inventory-control .inventory-control-input { - transition: .2s; - padding: 16px 8px; - border-radius: 2.5%; - font-family: Roboto; - font-size: 16px; - text-align: center; - outline: none; - border: none; - color: #fff; - background-color: #0c0c0c66 -} - -.inventory-control .inventory-control-input:focus-within { - background-color: #0c0c0ccc -} - -.inventory-control .inventory-control-button { - font-size: 14px; - color: #fff; - background-color: #0c0c0c66; - transition: .2s; - padding: 12px 8px; - border-radius: 2.5%; - border: none; - text-transform: uppercase; - font-family: Roboto; - width: 100%; - font-weight: 500 -} - -.inventory-control .inventory-control-button:hover { - background-color: #0c0c0ccc -} - -.useful-controls-dialog { - font-size: 18px -} - -.useful-controls-content-wrapper { - display: flex; - flex-direction: column; - gap: 20px -} - -.useful-controls-button { - position: absolute !important; - bottom: 25px; - right: 25px; - transition: .2s !important; - border-radius: 5% !important; - background-color: #0c0c0c66 !important -} - -.useful-controls-button:hover { - background-color: #0c0c0ccc !important -} - -.useful-controls-exit-button { - position: absolute !important; - right: 8px; - top: 8px; - border-radius: 2.5% !important; - color: gray !important -} - -.MuiDialogContent-root, -.MuiDialogTitle-root, -.MuiDialogActions-root { - background-color: #22232c; - color: #c1c2c5 -} - -.inventory-grid-wrapper { - display: flex; - flex-direction: column; - gap: 4px -} - -.inventory-grid-header-wrapper { - display: flex; - flex-direction: row; - justify-content: space-between -} - -.inventory-grid-header-wrapper p { - font-size: 16px -} - -.inventory-grid-container { - display: grid; - height: calc(52.1vh + 10px); - grid-template-columns: repeat(5, 10.2vh); - grid-auto-rows: 10.42vh; - gap: 2px; - overflow-y: scroll -} - -.inventory-slot, -.item-notification-item-box, -.hotbar-item-slot { - background-color: #0c0c0c66; - background-repeat: no-repeat; - background-position: center; - border-radius: 2.5%; - image-rendering: -webkit-optimize-contrast; - position: relative; - background-size: 7vh; - color: #c1c2c5; - border-color: #0003; - border-style: inset; - border-width: 1px -} - -.inventory-slot-label-box { - background-color: #22232c; - color: #c1c2c5; - text-align: center; - border-bottom-left-radius: .25vh; - border-bottom-right-radius: .25vh; - border-top-color: #0003; - border-top-style: inset; - border-top-width: 1px -} - -.inventory-slot-label-text { - text-transform: uppercase; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - padding: 2px 3px; - font-weight: 400; - font-family: Roboto; - font-size: 12px -} - -.inventory-slot-number { - background-color: #fff; - color: #000; - height: 12px; - border-top-left-radius: .25vh; - border-bottom-right-radius: .25vh; - padding: 3px; - font-size: 12px; - font-family: Roboto -} - -.item-slot-wrapper { - display: flex; - flex-direction: column; - justify-content: space-between; - height: 100% -} - -.item-slot-wrapper p { - font-size: 12px -} - -.item-slot-header-wrapper, -.item-hotslot-header-wrapper { - display: flex; - flex-direction: row; - justify-content: flex-end -} - -.item-hotslot-header-wrapper { - justify-content: space-between !important -} - -.item-slot-info-wrapper { - display: flex; - flex-direction: row; - align-self: flex-end; - padding: 3px; - gap: 3px -} - -.item-slot-info-wrapper p { - font-size: 12px -} - -.item-slot-currency-wrapper { - display: flex; - flex-direction: row; - justify-content: flex-end; - align-items: center; - padding-right: 3px -} - -.item-slot-currency-wrapper p { - font-size: 14px; - text-shadow: .1vh .1vh 0 rgba(0, 0, 0, .7) -} - -.item-slot-price-wrapper { - display: flex; - flex-direction: row; - justify-content: flex-end; - padding-right: 3px -} - -.item-slot-price-wrapper p { - font-size: 14px; - text-shadow: .1vh .1vh 0 rgba(0, 0, 0, .7) -} - -.MuiTooltip-tooltip { - background-color: #22232c !important; - min-width: 200px !important; - color: #c1c2c5 !important; - font-family: Roboto !important; - border-radius: 4px !important; - border-color: #0003 !important; - border-style: inset !important; - border-width: 1px !important -} - -.tooltip-wrapper { - display: flex; - flex-direction: column -} - -.tooltip-wrapper p { - font-size: 14px; - font-weight: 400 -} - -.tooltip-header-wrapper { - display: flex; - flex-direction: row; - justify-content: space-between; - align-items: center -} - -.tooltip-header-wrapper p { - font-size: 15px; - font-weight: 400 -} - -.tooltip-ingredients { - padding-top: 5px -} - -.tooltip-ingredient { - display: flex; - flex-direction: row; - align-items: center -} - -.tooltip-ingredient img { - width: 28px; - height: 28px; - padding-right: 5px -} - -.hotbar-container { - display: flex; - align-items: center; - gap: 2px; - justify-content: center; - width: 100%; - position: absolute; - bottom: 2vh -} - -.hotbar-item-slot { - width: 10.2vh; - height: 10.2vh -} - -.hotbar-slot-header-wrapper { - display: flex; - flex-direction: row; - justify-content: space-between -} - -.item-notification-container { - display: flex; - overflow-x: scroll; - flex-wrap: nowrap; - gap: 2px; - position: absolute; - bottom: 20vh; - left: 50%; - width: 100%; - margin-left: calc(50% - 5.1vh); - transform: translate(-50%) -} - -.item-notification-action-box { - width: 100%; - color: #c1c2c5; - background-color: #0c0c0c66; - text-transform: uppercase; - text-align: center; - border-top-left-radius: .25vh; - border-top-right-radius: .25vh; - font-family: Roboto -} - -.item-notification-action-box p { - font-size: 11px; - padding: 2px; - font-weight: 600 -} - -.item-notification-item-box { - height: 10.2vh; - width: 10.2vh -} - -.durability-bar { - background: rgba(0, 0, 0, .5); - height: 3px; - overflow: hidden -} - -.weight-bar { - background: rgba(0, 0, 0, .4); - border: 1px inset rgba(0, 0, 0, .1); - height: .8vh; - border-radius: 5%; - overflow: hidden -} \ No newline at end of file diff --git a/server-data/resources/[ox]/ox_inventory/web/build/assets/index-9aba2ab3.css b/server-data/resources/[ox]/ox_inventory/web/build/assets/index-9aba2ab3.css new file mode 100644 index 000000000..de5dc4268 --- /dev/null +++ b/server-data/resources/[ox]/ox_inventory/web/build/assets/index-9aba2ab3.css @@ -0,0 +1 @@ +body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;height:100vh;background:none!important;overflow:hidden!important;user-select:none}#root{height:100%}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}::-webkit-scrollbar{display:none}p{margin:0;padding:0;font-family:Roboto}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.app-wrapper{height:100%;width:100%;color:#fff}.context-menu-list{min-width:200px;background-color:#22232c;color:#c1c2c5;padding:4px;border-color:#0003;border-style:inset;border-width:1px;border-radius:4px;outline:none;display:flex;flex-direction:column}.context-menu-item{padding:8px;border-radius:4px;background-color:transparent;outline:none;border:none;color:#c1c2c5;display:flex;justify-content:space-between;align-items:center}.context-menu-item:active{transform:none}.context-menu-item:hover{background-color:#33343f;cursor:pointer}.tooltip-description{padding-top:5px}.tooltip-markdown>p{margin:0}button:active{transform:translateY(3px)}.item-drag-preview{width:7.7vh;height:7.7vh;z-index:1;position:fixed;pointer-events:none;top:0;left:0;background-repeat:no-repeat;background-position:center;background-size:7vh;image-rendering:-webkit-optimize-contrast}.inventory-wrapper{display:flex;flex-direction:row;justify-content:center;align-items:center;height:100%;gap:20px}.inventory-control{display:flex}.inventory-control .inventory-control-wrapper{display:flex;flex-direction:column;gap:20px;justify-content:center;align-items:center}.inventory-control .inventory-control-input{transition:.2s;padding:16px 8px;border-radius:2.5%;font-family:Roboto;font-size:16px;text-align:center;outline:none;border:none;color:#fff;background-color:#0c0c0c66}.inventory-control .inventory-control-input:focus-within{background-color:#0c0c0ccc}.inventory-control .inventory-control-button{font-size:14px;color:#fff;background-color:#0c0c0c66;transition:.2s;padding:12px 8px;border-radius:2.5%;border:none;text-transform:uppercase;font-family:Roboto;width:100%;font-weight:500}.inventory-control .inventory-control-button:hover{background-color:#0c0c0ccc}.useful-controls-dialog{background-color:#22232c;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#c1c2c5;width:450px;display:flex;flex-direction:column;padding:16px;border-radius:4px;gap:16px}.useful-controls-dialog-overlay{background-color:#00000080}.useful-controls-dialog-title{display:flex;width:100%;justify-content:space-between;align-items:center;font-size:18px}.useful-controls-dialog-close{width:25px;height:25px;padding:6px;display:flex;justify-content:center;align-items:center;border-radius:4px;fill:#c1c2c5}.useful-controls-dialog-close:hover{background-color:#33343f;cursor:pointer}.useful-controls-content-wrapper{display:flex;flex-direction:column;gap:20px}.divider{width:100%;height:1px;background-color:#ffffff1f}.useful-controls-button{position:absolute!important;bottom:25px;right:25px;transition:.2s!important;border:none;color:#fff;width:52px;height:52px;display:flex;justify-content:center;align-items:center;fill:#fff;border-radius:5%!important;background-color:#0c0c0c66!important}.useful-controls-button:hover{background-color:#0c0c0ccc!important;cursor:pointer}.useful-controls-exit-button{position:absolute!important;right:8px;top:8px;border-radius:2.5%!important;color:gray!important}.inventory-grid-wrapper{display:flex;flex-direction:column;gap:4px}.inventory-grid-header-wrapper{display:flex;flex-direction:row;justify-content:space-between}.inventory-grid-header-wrapper p{font-size:16px}.inventory-grid-container{display:grid;height:calc(52.1vh + 10px);grid-template-columns:repeat(5,10.2vh);grid-auto-rows:10.42vh;gap:2px;overflow-y:scroll}.inventory-slot,.item-notification-item-box,.hotbar-item-slot{background-color:#0c0c0c66;background-repeat:no-repeat;background-position:center;border-radius:2.5%;image-rendering:-webkit-optimize-contrast;position:relative;background-size:7vh;color:#c1c2c5;border-color:#0003;border-style:inset;border-width:1px}.inventory-slot-label-box{background-color:#22232c;color:#c1c2c5;text-align:center;border-bottom-left-radius:.25vh;border-bottom-right-radius:.25vh;border-top-color:#0003;border-top-style:inset;border-top-width:1px}.inventory-slot-label-text{text-transform:uppercase;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:2px 3px;font-weight:400;font-family:Roboto;font-size:12px}.inventory-slot-number{background-color:#fff;color:#000;height:12px;border-top-left-radius:.25vh;border-bottom-right-radius:.25vh;padding:3px;font-size:12px;font-family:Roboto}.item-slot-wrapper{display:flex;flex-direction:column;justify-content:space-between;height:100%}.item-slot-wrapper p{font-size:12px}.item-slot-header-wrapper,.item-hotslot-header-wrapper{display:flex;flex-direction:row;justify-content:flex-end}.item-hotslot-header-wrapper{justify-content:space-between!important}.item-slot-info-wrapper{display:flex;flex-direction:row;align-self:flex-end;padding:3px;gap:3px}.item-slot-info-wrapper p{font-size:12px}.item-slot-currency-wrapper{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;padding-right:3px}.item-slot-currency-wrapper p{font-size:14px;text-shadow:.1vh .1vh 0 rgba(0,0,0,.7)}.item-slot-price-wrapper{display:flex;flex-direction:row;justify-content:flex-end;padding-right:3px}.item-slot-price-wrapper p{font-size:14px;text-shadow:.1vh .1vh 0 rgba(0,0,0,.7)}.tooltip-wrapper{pointer-events:none;display:flex;background-color:#22232c;width:200px;padding:8px;flex-direction:column;min-width:200px;color:#c1c2c5;font-family:Roboto;border-radius:4px;border-color:#0003;border-style:inset;border-width:1px}.tooltip-wrapper p{font-size:12px;font-weight:400}.tooltip-header-wrapper{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.tooltip-header-wrapper p{font-size:15px;font-weight:400}.tooltip-crafting-duration{display:flex;flex-direction:row;align-items:center;justify-content:center}.tooltip-crafting-duration svg{padding-right:3px}.tooltip-crafting-duration p{font-size:14px}.tooltip-ingredients{padding-top:5px}.tooltip-ingredient{display:flex;flex-direction:row;align-items:center}.tooltip-ingredient img{width:28px;height:28px;padding-right:5px}.hotbar-container{display:flex;align-items:center;gap:2px;justify-content:center;width:100%;position:absolute;bottom:2vh}.hotbar-item-slot{width:10.2vh;height:10.2vh}.hotbar-slot-header-wrapper{display:flex;flex-direction:row;justify-content:space-between}.item-notification-container{display:flex;overflow-x:scroll;flex-wrap:nowrap;gap:2px;position:absolute;bottom:20vh;left:50%;width:100%;margin-left:calc(50% - 5.1vh);transform:translate(-50%)}.item-notification-action-box{width:100%;color:#c1c2c5;background-color:#0c0c0c66;text-transform:uppercase;text-align:center;border-top-left-radius:.25vh;border-top-right-radius:.25vh;font-family:Roboto}.item-notification-action-box p{font-size:11px;padding:2px;font-weight:600}.item-notification-item-box{height:10.2vh;width:10.2vh}.durability-bar{background:rgba(0,0,0,.5);height:3px;overflow:hidden}.weight-bar{background:rgba(0,0,0,.4);border:1px inset rgba(0,0,0,.1);height:.8vh;border-radius:5%;overflow:hidden}.transition-fade-enter{opacity:0}.transition-fade-enter-active{opacity:1;transition:opacity .2s}.transition-fade-exit{opacity:1}.transition-fade-exit-active{opacity:0;transition:opacity .2s}.transition-slide-up-enter{transform:translateY(200px)}.transition-slide-up-enter-active{transform:translateY(0);transition:all .2s}.transition-slide-up-exit{transform:translateY(0)}.transition-slide-up-exit-active{transform:translateY(200px);transition:all .2s} diff --git a/server-data/resources/[ox]/ox_inventory/web/build/assets/index-9fceb909.js b/server-data/resources/[ox]/ox_inventory/web/build/assets/index-9fceb909.js deleted file mode 100644 index a3218f821..000000000 --- a/server-data/resources/[ox]/ox_inventory/web/build/assets/index-9fceb909.js +++ /dev/null @@ -1,894 +0,0 @@ -function cL(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var ru=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qy(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ih(e){var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var i=[null];i.push.apply(i,arguments);var o=Function.bind.apply(t,i);return new o}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var oh={exports:{}},ah={},T={exports:{}},Ge={};var zc=Symbol.for("react.element"),fL=Symbol.for("react.portal"),dL=Symbol.for("react.fragment"),pL=Symbol.for("react.strict_mode"),hL=Symbol.for("react.profiler"),mL=Symbol.for("react.provider"),gL=Symbol.for("react.context"),vL=Symbol.for("react.forward_ref"),yL=Symbol.for("react.suspense"),xL=Symbol.for("react.memo"),bL=Symbol.for("react.lazy"),rk=Symbol.iterator;function wL(e){return e===null||typeof e!="object"?null:(e=rk&&e[rk]||e["@@iterator"],typeof e=="function"?e:null)}var gO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vO=Object.assign,yO={};function kl(e,t,n){this.props=e,this.context=t,this.refs=yO,this.updater=n||gO}kl.prototype.isReactComponent={};kl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};kl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function xO(){}xO.prototype=kl.prototype;function Yy(e,t,n){this.props=e,this.context=t,this.refs=yO,this.updater=n||gO}var Ky=Yy.prototype=new xO;Ky.constructor=Yy;vO(Ky,kl.prototype);Ky.isPureReactComponent=!0;var ik=Array.isArray,bO=Object.prototype.hasOwnProperty,Xy={current:null},wO={key:!0,ref:!0,__self:!0,__source:!0};function SO(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)bO.call(t,r)&&!wO.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1>>1,M=H[A];if(0>>1;Ai(Se,K))mei(Ae,Se)?(H[A]=Ae,H[me]=K,A=me):(H[A]=Se,H[xe]=K,A=xe);else if(mei(Ae,K))H[A]=Ae,H[me]=K,A=me;else break e}}return Q}function i(H,Q){var K=H.sortIndex-Q.sortIndex;return K!==0?K:H.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,u=s.now();e.unstable_now=function(){return s.now()-u}}var c=[],f=[],p=1,h=null,g=3,v=!1,y=!1,b=!1,C=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(H){for(var Q=n(f);Q!==null;){if(Q.callback===null)r(f);else if(Q.startTime<=H)r(f),Q.sortIndex=Q.expirationTime,t(c,Q);else break;Q=n(f)}}function E(H){if(b=!1,S(H),!y)if(n(c)!==null)y=!0,oe(I);else{var Q=n(f);Q!==null&&le(E,Q.startTime-H)}}function I(H,Q){y=!1,b&&(b=!1,x(D),D=-1),v=!0;var K=g;try{for(S(Q),h=n(c);h!==null&&(!(h.expirationTime>Q)||H&&!B());){var A=h.callback;if(typeof A=="function"){h.callback=null,g=h.priorityLevel;var M=A(h.expirationTime<=Q);Q=e.unstable_now(),typeof M=="function"?h.callback=M:h===n(c)&&r(c),S(Q)}else r(c);h=n(c)}if(h!==null)var we=!0;else{var xe=n(f);xe!==null&&le(E,xe.startTime-Q),we=!1}return we}finally{h=null,g=K,v=!1}}var _=!1,R=null,D=-1,W=5,L=-1;function B(){return!(e.unstable_now()-LH||125A?(H.sortIndex=K,t(f,H),n(c)===null&&H===n(f)&&(b?(x(D),D=-1):b=!0,le(E,K-A))):(H.sortIndex=M,t(c,H),y||v||(y=!0,oe(I))),H},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(H){var Q=g;return function(){var K=g;g=Q;try{return H.apply(this,arguments)}finally{g=K}}}})(EO);(function(e){e.exports=EO})(CO);var OO=T.exports,br=CO.exports;function ie(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),e0=Object.prototype.hasOwnProperty,AL=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ak={},sk={};function ML(e){return e0.call(sk,e)?!0:e0.call(ak,e)?!1:AL.test(e)?sk[e]=!0:(ak[e]=!0,!1)}function $L(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function DL(e,t,n,r){if(t===null||typeof t>"u"||$L(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function jn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var wn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){wn[e]=new jn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];wn[t]=new jn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){wn[e]=new jn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){wn[e]=new jn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){wn[e]=new jn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){wn[e]=new jn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){wn[e]=new jn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){wn[e]=new jn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){wn[e]=new jn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Zy=/[\-:]([a-z])/g;function Jy(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Zy,Jy);wn[t]=new jn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Zy,Jy);wn[t]=new jn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Zy,Jy);wn[t]=new jn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){wn[e]=new jn(e,1,!1,e.toLowerCase(),null,!1,!1)});wn.xlinkHref=new jn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){wn[e]=new jn(e,1,!1,e.toLowerCase(),null,!0,!0)});function e1(e,t,n,r){var i=wn.hasOwnProperty(t)?wn[t]:null;(i!==null?i.type!==0:r||!(2u||i[s]!==o[u]){var c=` -`+i[s].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=s&&0<=u);break}}}finally{Hg=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Au(e):""}function NL(e){switch(e.tag){case 5:return Au(e.type);case 16:return Au("Lazy");case 13:return Au("Suspense");case 19:return Au("SuspenseList");case 0:case 2:case 15:return e=Vg(e.type,!1),e;case 11:return e=Vg(e.type.render,!1),e;case 1:return e=Vg(e.type,!0),e;default:return""}}function i0(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Is:return"Fragment";case Ts:return"Portal";case t0:return"Profiler";case t1:return"StrictMode";case n0:return"Suspense";case r0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case TO:return(e.displayName||"Context")+".Consumer";case PO:return(e._context.displayName||"Context")+".Provider";case n1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case r1:return t=e.displayName||null,t!==null?t:i0(e.type)||"Memo";case _o:t=e._payload,e=e._init;try{return i0(e(t))}catch{}}return null}function LL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return i0(t);case 8:return t===t1?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function RO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FL(e){var t=RO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ad(e){e._valueTracker||(e._valueTracker=FL(e))}function AO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=RO(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pp(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function o0(e,t){var n=t.checked;return zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function uk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function MO(e,t){t=t.checked,t!=null&&e1(e,"checked",t,!1)}function a0(e,t){MO(e,t);var n=qo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?s0(e,t.type,n):t.hasOwnProperty("defaultValue")&&s0(e,t.type,qo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ck(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function s0(e,t,n){(t!=="number"||pp(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mu=Array.isArray;function Vs(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=sd.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function lc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ju={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},zL=["Webkit","ms","Moz","O"];Object.keys(ju).forEach(function(e){zL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ju[t]=ju[e]})});function LO(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ju.hasOwnProperty(e)&&ju[e]?(""+t).trim():t+"px"}function FO(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=LO(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var BL=zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function c0(e,t){if(t){if(BL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ie(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ie(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ie(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ie(62))}}function f0(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var d0=null;function i1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var p0=null,Gs=null,qs=null;function pk(e){if(e=Wc(e)){if(typeof p0!="function")throw Error(ie(280));var t=e.stateNode;t&&(t=fh(t),p0(e.stateNode,e.type,t))}}function zO(e){Gs?qs?qs.push(e):qs=[e]:Gs=e}function BO(){if(Gs){var e=Gs,t=qs;if(qs=Gs=null,pk(e),t)for(e=0;e>>=0,e===0?32:31-(QL(e)/ZL|0)|0}var ld=64,ud=4194304;function $u(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function vp(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var u=s&~i;u!==0?r=$u(u):(o&=s,o!==0&&(r=$u(o)))}else s=n&~i,s!==0?r=$u(s):o!==0&&(r=$u(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Bc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-fi(t),e[t]=n}function n6(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Uu),Sk=String.fromCharCode(32),kk=!1;function a_(e,t){switch(e){case"keyup":return I6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function s_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rs=!1;function A6(e,t){switch(e){case"compositionend":return s_(t);case"keypress":return t.which!==32?null:(kk=!0,Sk);case"textInput":return e=t.data,e===Sk&&kk?null:e;default:return null}}function M6(e,t){if(Rs)return e==="compositionend"||!d1&&a_(e,t)?(e=i_(),Vd=u1=Ao=null,Rs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_k(n)}}function f_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?f_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function d_(){for(var e=window,t=pp();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pp(e.document)}return t}function p1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function W6(e){var t=d_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&f_(n.ownerDocument.documentElement,n)){if(r!==null&&p1(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Pk(n,o);var s=Pk(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,As=null,x0=null,Vu=null,b0=!1;function Tk(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;b0||As==null||As!==pp(r)||(r=As,"selectionStart"in r&&p1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vu&&hc(Vu,r)||(Vu=r,r=bp(x0,"onSelect"),0Ds||(e.current=O0[Ds],O0[Ds]=null,Ds--)}function bt(e,t){Ds++,O0[Ds]=e.current,e.current=t}var Yo={},An=ia(Yo),Xn=ia(!1),Ba=Yo;function al(e,t){var n=e.type.contextTypes;if(!n)return Yo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Qn(e){return e=e.childContextTypes,e!=null}function Sp(){Tt(Xn),Tt(An)}function Nk(e,t,n){if(An.current!==Yo)throw Error(ie(168));bt(An,t),bt(Xn,n)}function w_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(ie(108,LL(e)||"Unknown",i));return zt({},n,r)}function kp(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yo,Ba=An.current,bt(An,e),bt(Xn,Xn.current),!0}function Lk(e,t,n){var r=e.stateNode;if(!r)throw Error(ie(169));n?(e=w_(e,t,Ba),r.__reactInternalMemoizedMergedChildContext=e,Tt(Xn),Tt(An),bt(An,e)):Tt(Xn),bt(Xn,n)}var qi=null,dh=!1,ov=!1;function S_(e){qi===null?qi=[e]:qi.push(e)}function eF(e){dh=!0,S_(e)}function oa(){if(!ov&&qi!==null){ov=!0;var e=0,t=st;try{var n=qi;for(st=1;e>=s,i-=s,Yi=1<<32-fi(t)+i|n<D?(W=R,R=null):W=R.sibling;var L=g(x,R,S[D],E);if(L===null){R===null&&(R=W);break}e&&R&&L.alternate===null&&t(x,R),w=o(L,w,D),_===null?I=L:_.sibling=L,_=L,R=W}if(D===S.length)return n(x,R),$t&&Ca(x,D),I;if(R===null){for(;DD?(W=R,R=null):W=R.sibling;var B=g(x,R,L.value,E);if(B===null){R===null&&(R=W);break}e&&R&&B.alternate===null&&t(x,R),w=o(B,w,D),_===null?I=B:_.sibling=B,_=B,R=W}if(L.done)return n(x,R),$t&&Ca(x,D),I;if(R===null){for(;!L.done;D++,L=S.next())L=h(x,L.value,E),L!==null&&(w=o(L,w,D),_===null?I=L:_.sibling=L,_=L);return $t&&Ca(x,D),I}for(R=r(x,R);!L.done;D++,L=S.next())L=v(R,x,D,L.value,E),L!==null&&(e&&L.alternate!==null&&R.delete(L.key===null?D:L.key),w=o(L,w,D),_===null?I=L:_.sibling=L,_=L);return e&&R.forEach(function(Y){return t(x,Y)}),$t&&Ca(x,D),I}function C(x,w,S,E){if(typeof S=="object"&&S!==null&&S.type===Is&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case od:e:{for(var I=S.key,_=w;_!==null;){if(_.key===I){if(I=S.type,I===Is){if(_.tag===7){n(x,_.sibling),w=i(_,S.props.children),w.return=x,x=w;break e}}else if(_.elementType===I||typeof I=="object"&&I!==null&&I.$$typeof===_o&&Hk(I)===_.type){n(x,_.sibling),w=i(_,S.props),w.ref=uu(x,_,S),w.return=x,x=w;break e}n(x,_);break}else t(x,_);_=_.sibling}S.type===Is?(w=La(S.props.children,x.mode,E,S.key),w.return=x,x=w):(E=Jd(S.type,S.key,S.props,null,x.mode,E),E.ref=uu(x,w,S),E.return=x,x=E)}return s(x);case Ts:e:{for(_=S.key;w!==null;){if(w.key===_)if(w.tag===4&&w.stateNode.containerInfo===S.containerInfo&&w.stateNode.implementation===S.implementation){n(x,w.sibling),w=i(w,S.children||[]),w.return=x,x=w;break e}else{n(x,w);break}else t(x,w);w=w.sibling}w=pv(S,x.mode,E),w.return=x,x=w}return s(x);case _o:return _=S._init,C(x,w,_(S._payload),E)}if(Mu(S))return y(x,w,S,E);if(iu(S))return b(x,w,S,E);gd(x,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,w!==null&&w.tag===6?(n(x,w.sibling),w=i(w,S),w.return=x,x=w):(n(x,w),w=dv(S,x.mode,E),w.return=x,x=w),s(x)):n(x,w)}return C}var ll=I_(!0),R_=I_(!1),Uc={},Pi=ia(Uc),yc=ia(Uc),xc=ia(Uc);function Aa(e){if(e===Uc)throw Error(ie(174));return e}function S1(e,t){switch(bt(xc,t),bt(yc,e),bt(Pi,Uc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:u0(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=u0(t,e)}Tt(Pi),bt(Pi,t)}function ul(){Tt(Pi),Tt(yc),Tt(xc)}function A_(e){Aa(xc.current);var t=Aa(Pi.current),n=u0(t,e.type);t!==n&&(bt(yc,e),bt(Pi,n))}function k1(e){yc.current===e&&(Tt(Pi),Tt(yc))}var Lt=ia(0);function Tp(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var av=[];function C1(){for(var e=0;en?n:4,e(!0);var r=sv.transition;sv.transition={};try{e(!1),t()}finally{st=n,sv.transition=r}}function Y_(){return qr().memoizedState}function iF(e,t,n){var r=Wo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},K_(e))X_(t,n);else if(n=O_(e,t,n,r),n!==null){var i=zn();di(n,e,r,i),Q_(n,t,r)}}function oF(e,t,n){var r=Wo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(K_(e))X_(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,u=o(s,n);if(i.hasEagerState=!0,i.eagerState=u,pi(u,s)){var c=t.interleaved;c===null?(i.next=i,b1(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=O_(e,t,i,r),n!==null&&(i=zn(),di(n,e,r,i),Q_(n,t,r))}}function K_(e){var t=e.alternate;return e===Ft||t!==null&&t===Ft}function X_(e,t){Gu=Ip=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Q_(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,a1(e,n)}}var Rp={readContext:Gr,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},aF={readContext:Gr,useCallback:function(e,t){return xi().memoizedState=[e,t===void 0?null:t],e},useContext:Gr,useEffect:Gk,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Kd(4194308,4,U_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Kd(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kd(4,2,e,t)},useMemo:function(e,t){var n=xi();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xi();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=iF.bind(null,Ft,e),[r.memoizedState,e]},useRef:function(e){var t=xi();return e={current:e},t.memoizedState=e},useState:Vk,useDebugValue:T1,useDeferredValue:function(e){return xi().memoizedState=e},useTransition:function(){var e=Vk(!1),t=e[0];return e=rF.bind(null,e[1]),xi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ft,i=xi();if($t){if(n===void 0)throw Error(ie(407));n=n()}else{if(n=t(),dn===null)throw Error(ie(349));(Wa&30)!==0||D_(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Gk(L_.bind(null,r,o,e),[e]),r.flags|=2048,Sc(9,N_.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=xi(),t=dn.identifierPrefix;if($t){var n=Ki,r=Yi;n=(r&~(1<<32-fi(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=bc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[ki]=t,e[vc]=r,aP(e,t,!1,!1),t.stateNode=e;e:{switch(s=f0(n,r),n){case"dialog":Et("cancel",e),Et("close",e),i=r;break;case"iframe":case"object":case"embed":Et("load",e),i=r;break;case"video":case"audio":for(i=0;ifl&&(t.flags|=128,r=!0,cu(o,!1),t.lanes=4194304)}else{if(!r)if(e=Tp(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),cu(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!$t)return _n(t),null}else 2*Gt()-o.renderingStartTime>fl&&n!==1073741824&&(t.flags|=128,r=!0,cu(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Gt(),t.sibling=null,n=Lt.current,bt(Lt,r?n&1|2:n&1),t):(_n(t),null);case 22:case 23:return D1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(pr&1073741824)!==0&&(_n(t),t.subtreeFlags&6&&(t.flags|=8192)):_n(t),null;case 24:return null;case 25:return null}throw Error(ie(156,t.tag))}function hF(e,t){switch(m1(t),t.tag){case 1:return Qn(t.type)&&Sp(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ul(),Tt(Xn),Tt(An),C1(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return k1(t),null;case 13:if(Tt(Lt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ie(340));sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Tt(Lt),null;case 4:return ul(),null;case 10:return x1(t.type._context),null;case 22:case 23:return D1(),null;case 24:return null;default:return null}}var yd=!1,In=!1,mF=typeof WeakSet=="function"?WeakSet:Set,pe=null;function zs(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Wt(e,t,r)}else n.current=null}function F0(e,t,n){try{n()}catch(r){Wt(e,t,r)}}var t2=!1;function gF(e,t){if(w0=yp,e=d_(),p1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,u=-1,c=-1,f=0,p=0,h=e,g=null;t:for(;;){for(var v;h!==n||i!==0&&h.nodeType!==3||(u=s+i),h!==o||r!==0&&h.nodeType!==3||(c=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(v=h.firstChild)!==null;)g=h,h=v;for(;;){if(h===e)break t;if(g===n&&++f===i&&(u=s),g===o&&++p===r&&(c=s),(v=h.nextSibling)!==null)break;h=g,g=h.parentNode}h=v}n=u===-1||c===-1?null:{start:u,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(S0={focusedElem:e,selectionRange:n},yp=!1,pe=t;pe!==null;)if(t=pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pe=e;else for(;pe!==null;){t=pe;try{var y=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var b=y.memoizedProps,C=y.memoizedState,x=t.stateNode,w=x.getSnapshotBeforeUpdate(t.elementType===t.type?b:oi(t.type,b),C);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ie(163))}}catch(E){Wt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,pe=e;break}pe=t.return}return y=t2,t2=!1,y}function qu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&F0(t,n,o)}i=i.next}while(i!==r)}}function mh(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function z0(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function uP(e){var t=e.alternate;t!==null&&(e.alternate=null,uP(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ki],delete t[vc],delete t[E0],delete t[Z6],delete t[J6])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function cP(e){return e.tag===5||e.tag===3||e.tag===4}function n2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cP(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function B0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=wp));else if(r!==4&&(e=e.child,e!==null))for(B0(e,t,n),e=e.sibling;e!==null;)B0(e,t,n),e=e.sibling}function j0(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(j0(e,t,n),e=e.sibling;e!==null;)j0(e,t,n),e=e.sibling}var gn=null,ai=!1;function So(e,t,n){for(n=n.child;n!==null;)fP(e,t,n),n=n.sibling}function fP(e,t,n){if(_i&&typeof _i.onCommitFiberUnmount=="function")try{_i.onCommitFiberUnmount(sh,n)}catch{}switch(n.tag){case 5:In||zs(n,t);case 6:var r=gn,i=ai;gn=null,So(e,t,n),gn=r,ai=i,gn!==null&&(ai?(e=gn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):gn.removeChild(n.stateNode));break;case 18:gn!==null&&(ai?(e=gn,n=n.stateNode,e.nodeType===8?iv(e.parentNode,n):e.nodeType===1&&iv(e,n),dc(e)):iv(gn,n.stateNode));break;case 4:r=gn,i=ai,gn=n.stateNode.containerInfo,ai=!0,So(e,t,n),gn=r,ai=i;break;case 0:case 11:case 14:case 15:if(!In&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&((o&2)!==0||(o&4)!==0)&&F0(n,t,s),i=i.next}while(i!==r)}So(e,t,n);break;case 1:if(!In&&(zs(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Wt(n,t,u)}So(e,t,n);break;case 21:So(e,t,n);break;case 22:n.mode&1?(In=(r=In)||n.memoizedState!==null,So(e,t,n),In=r):So(e,t,n);break;default:So(e,t,n)}}function r2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new mF),t.forEach(function(r){var i=EF.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ii(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=Gt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yF(r/1960))-r,10e?16:e,Mo===null)var r=!1;else{if(e=Mo,Mo=null,$p=0,(Xe&6)!==0)throw Error(ie(331));var i=Xe;for(Xe|=4,pe=e.current;pe!==null;){var o=pe,s=o.child;if((pe.flags&16)!==0){var u=o.deletions;if(u!==null){for(var c=0;cGt()-M1?Na(e,0):A1|=n),Zn(e,t)}function xP(e,t){t===0&&((e.mode&1)===0?t=1:(t=ud,ud<<=1,(ud&130023424)===0&&(ud=4194304)));var n=zn();e=eo(e,t),e!==null&&(Bc(e,t,n),Zn(e,n))}function CF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xP(e,n)}function EF(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(ie(314))}r!==null&&r.delete(t),xP(e,n)}var bP;bP=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xn.current)Kn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Kn=!1,dF(e,t,n);Kn=(e.flags&131072)!==0}else Kn=!1,$t&&(t.flags&1048576)!==0&&k_(t,Ep,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Xd(e,t),e=t.pendingProps;var i=al(t,An.current);Ks(t,n),i=O1(null,t,r,e,i,n);var o=_1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qn(r)?(o=!0,kp(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,w1(t),i.updater=ph,t.stateNode=i,i._reactInternals=t,R0(t,r,e,n),t=$0(null,t,r,!0,o,n)):(t.tag=0,$t&&o&&h1(t),Ln(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Xd(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=_F(r),e=oi(r,e),i){case 0:t=M0(null,t,r,e,n);break e;case 1:t=Zk(null,t,r,e,n);break e;case 11:t=Xk(null,t,r,e,n);break e;case 14:t=Qk(null,t,r,oi(r.type,e),n);break e}throw Error(ie(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),M0(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),Zk(e,t,r,i,n);case 3:e:{if(rP(t),e===null)throw Error(ie(387));r=t.pendingProps,o=t.memoizedState,i=o.element,__(e,t),Pp(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=cl(Error(ie(423)),t),t=Jk(e,t,r,n,i);break e}else if(r!==i){i=cl(Error(ie(424)),t),t=Jk(e,t,r,n,i);break e}else for(mr=zo(t.stateNode.containerInfo.firstChild),vr=t,$t=!0,si=null,n=R_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sl(),r===i){t=to(e,t,n);break e}Ln(e,t,r,n)}t=t.child}return t;case 5:return A_(t),e===null&&P0(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,k0(r,i)?s=null:o!==null&&k0(r,o)&&(t.flags|=32),nP(e,t),Ln(e,t,s,n),t.child;case 6:return e===null&&P0(t),null;case 13:return iP(e,t,n);case 4:return S1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ll(t,null,r,n):Ln(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),Xk(e,t,r,i,n);case 7:return Ln(e,t,t.pendingProps,n),t.child;case 8:return Ln(e,t,t.pendingProps.children,n),t.child;case 12:return Ln(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,bt(Op,r._currentValue),r._currentValue=s,o!==null)if(pi(o.value,s)){if(o.children===i.children&&!Xn.current){t=to(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){s=o.child;for(var c=u.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=Qi(-1,n&-n),c.tag=2;var f=o.updateQueue;if(f!==null){f=f.shared;var p=f.pending;p===null?c.next=c:(c.next=p.next,p.next=c),f.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),T0(o.return,n,t),u.lanes|=n;break}c=c.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(ie(341));s.lanes|=n,u=s.alternate,u!==null&&(u.lanes|=n),T0(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ln(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ks(t,n),i=Gr(i),r=r(i),t.flags|=1,Ln(e,t,r,n),t.child;case 14:return r=t.type,i=oi(r,t.pendingProps),i=oi(r.type,i),Qk(e,t,r,i,n);case 15:return eP(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:oi(r,i),Xd(e,t),t.tag=1,Qn(r)?(e=!0,kp(t)):e=!1,Ks(t,n),T_(t,r,i),R0(t,r,i,n),$0(null,t,r,!0,e,n);case 19:return oP(e,t,n);case 22:return tP(e,t,n)}throw Error(ie(156,t.tag))};function wP(e,t){return qO(e,t)}function OF(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Br(e,t,n,r){return new OF(e,t,n,r)}function L1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _F(e){if(typeof e=="function")return L1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===n1)return 11;if(e===r1)return 14}return 2}function Uo(e,t){var n=e.alternate;return n===null?(n=Br(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jd(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")L1(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Is:return La(n.children,i,o,t);case t1:s=8,i|=8;break;case t0:return e=Br(12,n,t,i|2),e.elementType=t0,e.lanes=o,e;case n0:return e=Br(13,n,t,i),e.elementType=n0,e.lanes=o,e;case r0:return e=Br(19,n,t,i),e.elementType=r0,e.lanes=o,e;case IO:return vh(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case PO:s=10;break e;case TO:s=9;break e;case n1:s=11;break e;case r1:s=14;break e;case _o:s=16,r=null;break e}throw Error(ie(130,e==null?e:typeof e,""))}return t=Br(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function La(e,t,n,r){return e=Br(7,e,r,t),e.lanes=n,e}function vh(e,t,n,r){return e=Br(22,e,r,t),e.elementType=IO,e.lanes=n,e.stateNode={isHidden:!1},e}function dv(e,t,n){return e=Br(6,e,null,t),e.lanes=n,e}function pv(e,t,n){return t=Br(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function PF(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qg(0),this.expirationTimes=qg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qg(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function F1(e,t,n,r,i,o,s,u,c){return e=new PF(e,t,n,u,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Br(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},w1(o),e}function TF(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Sr})(Xa);const wd=qy(Xa.exports);var EP,f2=Xa.exports;EP=f2.createRoot,f2.hydrateRoot;var OP={exports:{}},_P={};var dl=T.exports;function $F(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var DF=typeof Object.is=="function"?Object.is:$F,NF=dl.useState,LF=dl.useEffect,FF=dl.useLayoutEffect,zF=dl.useDebugValue;function BF(e,t){var n=t(),r=NF({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return FF(function(){i.value=n,i.getSnapshot=t,hv(i)&&o({inst:i})},[e,n,t]),LF(function(){return hv(i)&&o({inst:i}),e(function(){hv(i)&&o({inst:i})})},[e]),zF(n),n}function hv(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!DF(e,n)}catch{return!0}}function jF(e,t){return t()}var WF=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?jF:BF;_P.useSyncExternalStore=dl.useSyncExternalStore!==void 0?dl.useSyncExternalStore:WF;(function(e){e.exports=_P})(OP);var PP={exports:{}},TP={};var Sh=T.exports,UF=OP.exports;function HF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var VF=typeof Object.is=="function"?Object.is:HF,GF=UF.useSyncExternalStore,qF=Sh.useRef,YF=Sh.useEffect,KF=Sh.useMemo,XF=Sh.useDebugValue;TP.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=qF(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=KF(function(){function c(v){if(!f){if(f=!0,p=v,v=r(v),i!==void 0&&s.hasValue){var y=s.value;if(i(y,v))return h=y}return h=v}if(y=h,VF(p,v))return y;var b=r(v);return i!==void 0&&i(y,b)?y:(p=v,h=b)}var f=!1,p,h,g=n===void 0?null:n;return[function(){return c(t())},g===null?void 0:function(){return c(g())}]},[t,n,r,i]);var u=GF(e,o[0],o[1]);return YF(function(){s.hasValue=!0,s.value=u},[u]),XF(u),u};(function(e){e.exports=TP})(PP);function QF(e){e()}let IP=QF;const ZF=e=>IP=e,JF=()=>IP,Ko=T.exports.createContext(null);function RP(){return T.exports.useContext(Ko)}const ez=()=>{throw new Error("uSES not initialized!")};let AP=ez;const tz=e=>{AP=e},nz=(e,t)=>e===t;function rz(e=Ko){const t=e===Ko?RP:()=>T.exports.useContext(e);return function(r,i=nz){const{store:o,subscription:s,getServerState:u}=t(),c=AP(s.addNestedSub,o.getState,u||o.getState,r,i);return T.exports.useDebugValue(c),c}}const iz=rz();function z(){return z=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var MP={exports:{}},lt={};var pn=typeof Symbol=="function"&&Symbol.for,W1=pn?Symbol.for("react.element"):60103,U1=pn?Symbol.for("react.portal"):60106,kh=pn?Symbol.for("react.fragment"):60107,Ch=pn?Symbol.for("react.strict_mode"):60108,Eh=pn?Symbol.for("react.profiler"):60114,Oh=pn?Symbol.for("react.provider"):60109,_h=pn?Symbol.for("react.context"):60110,H1=pn?Symbol.for("react.async_mode"):60111,Ph=pn?Symbol.for("react.concurrent_mode"):60111,Th=pn?Symbol.for("react.forward_ref"):60112,Ih=pn?Symbol.for("react.suspense"):60113,az=pn?Symbol.for("react.suspense_list"):60120,Rh=pn?Symbol.for("react.memo"):60115,Ah=pn?Symbol.for("react.lazy"):60116,sz=pn?Symbol.for("react.block"):60121,lz=pn?Symbol.for("react.fundamental"):60117,uz=pn?Symbol.for("react.responder"):60118,cz=pn?Symbol.for("react.scope"):60119;function Cr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case W1:switch(e=e.type,e){case H1:case Ph:case kh:case Eh:case Ch:case Ih:return e;default:switch(e=e&&e.$$typeof,e){case _h:case Th:case Ah:case Rh:case Oh:return e;default:return t}}case U1:return t}}}function $P(e){return Cr(e)===Ph}lt.AsyncMode=H1;lt.ConcurrentMode=Ph;lt.ContextConsumer=_h;lt.ContextProvider=Oh;lt.Element=W1;lt.ForwardRef=Th;lt.Fragment=kh;lt.Lazy=Ah;lt.Memo=Rh;lt.Portal=U1;lt.Profiler=Eh;lt.StrictMode=Ch;lt.Suspense=Ih;lt.isAsyncMode=function(e){return $P(e)||Cr(e)===H1};lt.isConcurrentMode=$P;lt.isContextConsumer=function(e){return Cr(e)===_h};lt.isContextProvider=function(e){return Cr(e)===Oh};lt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===W1};lt.isForwardRef=function(e){return Cr(e)===Th};lt.isFragment=function(e){return Cr(e)===kh};lt.isLazy=function(e){return Cr(e)===Ah};lt.isMemo=function(e){return Cr(e)===Rh};lt.isPortal=function(e){return Cr(e)===U1};lt.isProfiler=function(e){return Cr(e)===Eh};lt.isStrictMode=function(e){return Cr(e)===Ch};lt.isSuspense=function(e){return Cr(e)===Ih};lt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kh||e===Ph||e===Eh||e===Ch||e===Ih||e===az||typeof e=="object"&&e!==null&&(e.$$typeof===Ah||e.$$typeof===Rh||e.$$typeof===Oh||e.$$typeof===_h||e.$$typeof===Th||e.$$typeof===lz||e.$$typeof===uz||e.$$typeof===cz||e.$$typeof===sz)};lt.typeOf=Cr;(function(e){e.exports=lt})(MP);var DP=MP.exports,fz={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},dz={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},NP={};NP[DP.ForwardRef]=fz;NP[DP.Memo]=dz;var Lp={exports:{}},ut={};var V1=Symbol.for("react.element"),G1=Symbol.for("react.portal"),Mh=Symbol.for("react.fragment"),$h=Symbol.for("react.strict_mode"),Dh=Symbol.for("react.profiler"),Nh=Symbol.for("react.provider"),Lh=Symbol.for("react.context"),pz=Symbol.for("react.server_context"),Fh=Symbol.for("react.forward_ref"),zh=Symbol.for("react.suspense"),Bh=Symbol.for("react.suspense_list"),jh=Symbol.for("react.memo"),Wh=Symbol.for("react.lazy"),hz=Symbol.for("react.offscreen"),LP;LP=Symbol.for("react.module.reference");function Xr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case V1:switch(e=e.type,e){case Mh:case Dh:case $h:case zh:case Bh:return e;default:switch(e=e&&e.$$typeof,e){case pz:case Lh:case Fh:case Wh:case jh:case Nh:return e;default:return t}}case G1:return t}}}ut.ContextConsumer=Lh;ut.ContextProvider=Nh;ut.Element=V1;ut.ForwardRef=Fh;ut.Fragment=Mh;ut.Lazy=Wh;ut.Memo=jh;ut.Portal=G1;ut.Profiler=Dh;ut.StrictMode=$h;ut.Suspense=zh;ut.SuspenseList=Bh;ut.isAsyncMode=function(){return!1};ut.isConcurrentMode=function(){return!1};ut.isContextConsumer=function(e){return Xr(e)===Lh};ut.isContextProvider=function(e){return Xr(e)===Nh};ut.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===V1};ut.isForwardRef=function(e){return Xr(e)===Fh};ut.isFragment=function(e){return Xr(e)===Mh};ut.isLazy=function(e){return Xr(e)===Wh};ut.isMemo=function(e){return Xr(e)===jh};ut.isPortal=function(e){return Xr(e)===G1};ut.isProfiler=function(e){return Xr(e)===Dh};ut.isStrictMode=function(e){return Xr(e)===$h};ut.isSuspense=function(e){return Xr(e)===zh};ut.isSuspenseList=function(e){return Xr(e)===Bh};ut.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Mh||e===Dh||e===$h||e===zh||e===Bh||e===hz||typeof e=="object"&&e!==null&&(e.$$typeof===Wh||e.$$typeof===jh||e.$$typeof===Nh||e.$$typeof===Lh||e.$$typeof===Fh||e.$$typeof===LP||e.getModuleId!==void 0)};ut.typeOf=Xr;(function(e){e.exports=ut})(Lp);const mz=qy(Lp.exports);function gz(){const e=JF();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const d2={notify(){},get:()=>[]};function vz(e,t){let n,r=d2;function i(h){return c(),r.subscribe(h)}function o(){r.notify()}function s(){p.onStateChange&&p.onStateChange()}function u(){return Boolean(n)}function c(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=gz())}function f(){n&&(n(),n=void 0,r.clear(),r=d2)}const p={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:s,isSubscribed:u,trySubscribe:c,tryUnsubscribe:f,getListeners:()=>r};return p}const yz=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",xz=yz?T.exports.useLayoutEffect:T.exports.useEffect;function bz({store:e,context:t,children:n,serverState:r}){const i=T.exports.useMemo(()=>{const u=vz(e);return{store:e,subscription:u,getServerState:r?()=>r:void 0}},[e,r]),o=T.exports.useMemo(()=>e.getState(),[e]);xz(()=>{const{subscription:u}=i;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),o!==e.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[i,o]);const s=t||Ko;return Ye.createElement(s.Provider,{value:i},n)}function FP(e=Ko){const t=e===Ko?RP:()=>T.exports.useContext(e);return function(){const{store:r}=t();return r}}const wz=FP();function Sz(e=Ko){const t=e===Ko?wz:FP(e);return function(){return t().dispatch}}const kz=Sz();tz(PP.exports.useSyncExternalStoreWithSelector);ZF(Xa.exports.unstable_batchedUpdates);const zP=T.exports.createContext({dragDropManager:void 0});function Cc(e){return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function Cz(e,t){if(Cc(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Cc(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ez(e){var t=Cz(e,"string");return Cc(t)==="symbol"?t:String(t)}function Oz(e,t,n){return t=Ez(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function h2(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Tn(1));return n(q1)(e,t)}if(typeof e!="function")throw new Error(Tn(2));var i=e,o=t,s=[],u=s,c=!1;function f(){u===s&&(u=s.slice())}function p(){if(c)throw new Error(Tn(3));return o}function h(b){if(typeof b!="function")throw new Error(Tn(4));if(c)throw new Error(Tn(5));var C=!0;return f(),u.push(b),function(){if(!!C){if(c)throw new Error(Tn(6));C=!1,f();var w=u.indexOf(b);u.splice(w,1),s=null}}}function g(b){if(!_z(b))throw new Error(Tn(7));if(typeof b.type>"u")throw new Error(Tn(8));if(c)throw new Error(Tn(9));try{c=!0,o=i(o,b)}finally{c=!1}for(var C=s=u,x=0;x"u")throw new Error(Tn(12));if(typeof n(void 0,{type:Fp.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Tn(13))})}function Tz(e){for(var t=Object.keys(e),n={},r=0;r"u")throw f&&f.type,new Error(Tn(14));h[v]=C,p=p||C!==b}return p=p||o.length!==Object.keys(c).length,p?h:c}}function zp(){for(var e=arguments.length,t=new Array(e),n=0;nr&&r[i]?r[i]:n||null,e)}function Mz(e,t){return e.filter(n=>n!==t)}function BP(e){return typeof e=="object"}function $z(e,t){const n=new Map,r=o=>{n.set(o,n.has(o)?n.get(o)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((o,s)=>{o===1&&i.push(s)}),i}function Dz(e,t){return e.filter(n=>t.indexOf(n)>-1)}const Y1="dnd-core/INIT_COORDS",Uh="dnd-core/BEGIN_DRAG",K1="dnd-core/PUBLISH_DRAG_SOURCE",Hh="dnd-core/HOVER",Vh="dnd-core/DROP",Gh="dnd-core/END_DRAG";function g2(e,t){return{type:Y1,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const Nz={type:Y1,payload:{clientOffset:null,sourceClientOffset:null}};function Lz(e){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:s}=r,u=e.getMonitor(),c=e.getRegistry();e.dispatch(g2(o)),Fz(n,u,c);const f=jz(n,u);if(f==null){e.dispatch(Nz);return}let p=null;if(o){if(!s)throw new Error("getSourceClientOffset must be defined");zz(s),p=s(f)}e.dispatch(g2(o,p));const g=c.getSource(f).beginDrag(u,f);if(g==null)return;Bz(g),c.pinSource(f);const v=c.getSourceType(f);return{type:Uh,payload:{itemType:v,item:g,sourceId:f,clientOffset:o||null,sourceClientOffset:p||null,isSourcePublic:!!i}}}}function Fz(e,t,n){$e(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){$e(n.getSource(r),"Expected sourceIds to be registered.")})}function zz(e){$e(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Bz(e){$e(BP(e),"Item must be an object.")}function jz(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function Wz(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uz(e){for(var t=1;t{const c=Gz(s,u,i,r),f={type:Vh,payload:{dropResult:Uz({},n,c)}};e.dispatch(f)})}}function Vz(e){$e(e.isDragging(),"Cannot call drop while not dragging."),$e(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Gz(e,t,n,r){const i=n.getTarget(e);let o=i?i.drop(r,e):void 0;return qz(o),typeof o>"u"&&(o=t===0?{}:r.getDropResult()),o}function qz(e){$e(typeof e>"u"||BP(e),"Drop result must either be an object or undefined.")}function Yz(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Kz(e){return function(){const n=e.getMonitor(),r=e.getRegistry();Xz(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Gh}}}function Xz(e){$e(e.isDragging(),"Cannot call endDrag while not dragging.")}function G0(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function Qz(e){return function(n,{clientOffset:r}={}){Zz(n);const i=n.slice(0),o=e.getMonitor(),s=e.getRegistry(),u=o.getItemType();return e8(i,s,u),Jz(i,o,s),t8(i,o,s),{type:Hh,payload:{targetIds:i,clientOffset:r||null}}}}function Zz(e){$e(Array.isArray(e),"Expected targetIds to be an array.")}function Jz(e,t,n){$e(t.isDragging(),"Cannot call hover while not dragging."),$e(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const i=e[r],o=t.getTargetType(i);G0(o,n)||e.splice(r,1)}}function t8(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function n8(e){return function(){if(e.getMonitor().isDragging())return{type:K1}}}function r8(e){return{beginDrag:Lz(e),publishDragSource:n8(e),hover:Qz(e),drop:Hz(e),endDrag:Kz(e)}}class i8{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(o){return(...s)=>{const u=o.apply(t,s);typeof u<"u"&&n(u)}}const i=r8(this);return Object.keys(i).reduce((o,s)=>{const u=i[s];return o[s]=r(u),o},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function o8(e,t){return{x:e.x+t.x,y:e.y+t.y}}function jP(e,t){return{x:e.x-t.x,y:e.y-t.y}}function a8(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:jP(o8(t,r),n)}function s8(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:jP(t,n)}const Xu=[],X1=[];Xu.__IS_NONE__=!0;X1.__IS_ALL__=!0;function l8(e,t){return e===Xu?!1:e===X1||typeof t>"u"?!0:Dz(t,e).length>0}class u8{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;$e(typeof t=="function","listener must be a function."),$e(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const s=this.store.getState(),u=s.stateId;try{u===i||u===i+1&&!l8(s.dirtyHandlerIds,r)||t()}finally{i=u}};return this.store.subscribe(o)}subscribeToOffsetChange(t){$e(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return $e(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if($e(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),i=this.getItemType();return G0(r,i)&&n.canDrop(this,t)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if($e(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),i=this.getItemType();return r!==i?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),o=this.getItemType();if(o&&!G0(i,o))return!1;const s=this.getTargetIds();if(!s.length)return!1;const u=s.indexOf(t);return r?u===s.length-1:u>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return a8(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return s8(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const v2=typeof global<"u"?global:self,WP=v2.MutationObserver||v2.WebKitMutationObserver;function UP(e){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),e()}}}function c8(e){let t=1;const n=new WP(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const f8=typeof WP=="function"?c8:UP;class d8{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let r=0,i=t.length-this.index;r{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=f8(this.flush),this.requestErrorThrow=UP(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class p8{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class h8{create(t){const n=this.freeTasks,r=n.length?n.pop():new p8(this.onError,i=>n[n.length]=i);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const HP=new d8,m8=new h8(HP.registerPendingError);function g8(e){HP.enqueueTask(m8.create(e))}const Q1="dnd-core/ADD_SOURCE",Z1="dnd-core/ADD_TARGET",J1="dnd-core/REMOVE_SOURCE",qh="dnd-core/REMOVE_TARGET";function v8(e){return{type:Q1,payload:{sourceId:e}}}function y8(e){return{type:Z1,payload:{targetId:e}}}function x8(e){return{type:J1,payload:{sourceId:e}}}function b8(e){return{type:qh,payload:{targetId:e}}}function w8(e){$e(typeof e.canDrag=="function","Expected canDrag to be a function."),$e(typeof e.beginDrag=="function","Expected beginDrag to be a function."),$e(typeof e.endDrag=="function","Expected endDrag to be a function.")}function S8(e){$e(typeof e.canDrop=="function","Expected canDrop to be a function."),$e(typeof e.hover=="function","Expected hover to be a function."),$e(typeof e.drop=="function","Expected beginDrag to be a function.")}function q0(e,t){if(t&&Array.isArray(e)){e.forEach(n=>q0(n,!1));return}$e(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var Fr;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(Fr||(Fr={}));let k8=0;function C8(){return k8++}function E8(e){const t=C8().toString();switch(e){case Fr.SOURCE:return`S${t}`;case Fr.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function y2(e){switch(e[0]){case"S":return Fr.SOURCE;case"T":return Fr.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function x2(e,t){const n=e.entries();let r=!1;do{const{done:i,value:[,o]}=n.next();if(o===t)return!0;r=!!i}while(!r);return!1}class O8{addSource(t,n){q0(t),w8(n);const r=this.addHandler(Fr.SOURCE,t,n);return this.store.dispatch(v8(r)),r}addTarget(t,n){q0(t,!0),S8(n);const r=this.addHandler(Fr.TARGET,t,n);return this.store.dispatch(y8(r)),r}containsHandler(t){return x2(this.dragSources,t)||x2(this.dropTargets,t)}getSource(t,n=!1){return $e(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return $e(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return $e(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return $e(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return y2(t)===Fr.SOURCE}isTargetId(t){return y2(t)===Fr.TARGET}removeSource(t){$e(this.getSource(t),"Expected an existing source."),this.store.dispatch(x8(t)),g8(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){$e(this.getTarget(t),"Expected an existing target."),this.store.dispatch(b8(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);$e(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){$e(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const i=E8(t);return this.types.set(i,n),t===Fr.SOURCE?this.dragSources.set(i,r):t===Fr.TARGET&&this.dropTargets.set(i,r),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const _8=(e,t)=>e===t;function P8(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function T8(e,t,n=_8){if(e.length!==t.length)return!1;for(let r=0;r0||!T8(n,r)))return Xu;const s=r[r.length-1],u=n[n.length-1];return s!==u&&(s&&i.push(s),u&&i.push(u)),i}function R8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function A8(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function V8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}let w2=0;const ep=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var G8=T.exports.memo(function(t){var{children:n}=t,r=H8(t,["children"]);const[i,o]=q8(r);return T.exports.useEffect(()=>{if(o){const s=VP();return++w2,()=>{--w2===0&&(s[ep]=null)}}},[]),N(zP.Provider,{value:i,children:n})});function q8(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Y8(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function Y8(e,t=VP(),n,r){const i=t;return i[ep]||(i[ep]={dragDropManager:W8(e,t,n,r)}),i[ep]}function VP(){return typeof global<"u"?global:window}var K8=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var s=o[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const Va=typeof window<"u"?T.exports.useLayoutEffect:T.exports.useEffect;function GP(e,t,n){const[r,i]=T.exports.useState(()=>t(e)),o=T.exports.useCallback(()=>{const s=t(e);K8(r,s)||(i(s),n&&n())},[r,e,n]);return Va(o),[r,o]}function X8(e,t,n){const[r,i]=GP(e,t,n);return Va(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),r}function qP(e,t,n){return X8(t,e||(()=>({})),()=>n.reconnect())}function YP(e,t){const n=[...t||[]];return t==null&&typeof e!="function"&&n.push(e),T.exports.useMemo(()=>typeof e=="function"?e():e,n)}function Q8(e){return T.exports.useMemo(()=>e.hooks.dragSource(),[e])}function Z8(e){return T.exports.useMemo(()=>e.hooks.dragPreview(),[e])}let gv=!1,vv=!1;class J8{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){$e(!gv,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return gv=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{gv=!1}}isDragging(){if(!this.sourceId)return!1;$e(!vv,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return vv=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{vv=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let yv=!1;class e9{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;$e(!yv,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return yv=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{yv=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function t9(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function n9(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function Y0(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),s=Object.keys(t);if(o.length!==s.length)return!1;const u=Object.prototype.hasOwnProperty.bind(t);for(let c=0;c, or turn it into a drag source or a drop target itself.`)}function i9(e){return(t=null,n=null)=>{if(!T.exports.isValidElement(t)){const o=t;return e(o,n),o}const r=t;return r9(r),o9(r,n?o=>e(o,n):e)}}function KP(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=i9(r);t[n]=()=>i}}),t}function S2(e,t){typeof e=="function"?e(t):e.current=t}function o9(e,t){const n=e.ref;return $e(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?T.exports.cloneElement(e,{ref:r=>{S2(n,r),S2(t,r)}}):T.exports.cloneElement(e,{ref:t})}class a9{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Y0(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Y0(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=KP({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,K0(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,K0(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class s9{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(!!this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Y0(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=KP({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,K0(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function lo(){const{dragDropManager:e}=T.exports.useContext(zP);return $e(e!=null,"Expected drag drop context"),e}function l9(e,t){const n=lo(),r=T.exports.useMemo(()=>new a9(n.getBackend()),[n]);return Va(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),Va(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function u9(){const e=lo();return T.exports.useMemo(()=>new J8(e),[e])}class c9{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:o}=r;return o?o(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function f9(e,t,n){const r=T.exports.useMemo(()=>new c9(e,t,n),[t,n]);return T.exports.useEffect(()=>{r.spec=e},[e]),r}function d9(e){return T.exports.useMemo(()=>{const t=e.type;return $e(t!=null,"spec.type must be defined"),t},[e])}function p9(e,t,n){const r=lo(),i=f9(e,t,n),o=d9(e);Va(function(){if(o!=null){const[u,c]=n9(o,i,r);return t.receiveHandlerId(u),n.receiveHandlerId(u),c}},[r,t,n,i,o])}function h9(e,t){const n=YP(e,t);$e(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=u9(),i=l9(n.options,n.previewOptions);return p9(n,r,i),[qP(n.collect,r,i),Q8(i),Z8(i)]}function m9(e){const n=lo().getMonitor(),[r,i]=GP(n,e);return T.exports.useEffect(()=>n.subscribeToOffsetChange(i)),T.exports.useEffect(()=>n.subscribeToStateChange(i)),r}function g9(e){return T.exports.useMemo(()=>e.hooks.dropTarget(),[e])}function v9(e){const t=lo(),n=T.exports.useMemo(()=>new s9(t.getBackend()),[t]);return Va(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function y9(){const e=lo();return T.exports.useMemo(()=>new e9(e),[e])}function x9(e){const{accept:t}=e;return T.exports.useMemo(()=>($e(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class b9{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function w9(e,t){const n=T.exports.useMemo(()=>new b9(e,t),[t]);return T.exports.useEffect(()=>{n.spec=e},[e]),n}function S9(e,t,n){const r=lo(),i=w9(e,t),o=x9(e);Va(function(){const[u,c]=t9(o,i,r);return t.receiveHandlerId(u),n.receiveHandlerId(u),c},[r,t,i,n,o.map(s=>s.toString()).join("|")])}function X0(e,t){const n=YP(e,t),r=y9(),i=v9(n.options);return S9(n,r,i),[qP(n.collect,r,i),g9(i)]}var Ho;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Ho||(Ho={}));class k9{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0?t:!1}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0?t:!1}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0?t:!1}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0?t:!1}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)!==null&&t!==void 0?t:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var t;if(!((t=this.context)===null||t===void 0)&&t.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,n){this.args=t,this.context=n}}function C9(e,t,n,r){return Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2))}function E9(e,t,n,r,i){if(!i)return!1;const o=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let s=0;s=u.start)&&(u.end==null||o<=u.end))return!0}return!1}const O9={Left:1,Right:2,Center:4},_9={Left:0,Center:1,Right:2};function xv(e){return e.button===void 0||e.button===_9.Left}function P9(e){return e.buttons===void 0||(e.buttons&O9.Left)===0}function XP(e){return!!e.targetTouches}const T9=1;function I9(e){const t=e.nodeType===T9?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function R9(e,t){if(e.targetTouches.length===1)return Bp(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return Bp(e.touches[0])}function Bp(e,t){return XP(e)?R9(e,t):{x:e.clientX,y:e.clientY}}const k2=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),du={[Ho.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Ho.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Ho.keyboard]:{keydown:"keydown"}};class Qu{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;!t||($e(!Qu.isSetUp,"Cannot have two Touch backends at the same time."),Qu.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;!t||(Qu.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,n,r,i=!1){const o=k2?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const u=du[s][n];u&&t.addEventListener(u,r,o)})}removeEventListener(t,n,r,i=!1){const o=k2?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const u=du[s][n];u&&t.removeEventListener(u,r,o)})}connectDragSource(t,n){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,n),this.addEventListener(n,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(n,"start",r)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,n){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const i=o=>{if(!this.document||!r||!this.monitor.isDragging())return;let s;switch(o.type){case du.mouse.move:s={x:o.clientX,y:o.clientY};break;case du.touch.move:var u,c;s={x:((u=o.touches[0])===null||u===void 0?void 0:u.clientX)||0,y:((c=o.touches[0])===null||c===void 0?void 0:c.clientY)||0};break}const f=s!=null?this.document.elementFromPoint(s.x,s.y):void 0,p=f&&n.contains(f);if(f===n||p)return this.handleMove(o,t)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(t,n),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!t||!t.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,n,r){this.getSourceClientOffset=i=>{const o=this.sourceNodes.get(i);return o&&I9(o)},this.handleTopMoveStartCapture=i=>{!xv(i)||(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!xv(i))return;const o=Bp(i);o&&(XP(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=o),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!xv(i))return;const o=i.type===du.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),o),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,o)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(o)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:o,dragOverTargetIds:s}=this,u=this.options.enableHoverOutsideTarget,c=Bp(i,this.lastTargetTouchFallback);if(!c)return;if(this._isScrolling||!this.monitor.isDragging()&&E9(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&o&&C9(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,c.x,c.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(o,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const f=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(f),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const p=(s||[]).map(y=>this.targetNodes.get(y)).filter(y=>!!y),h=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(c.x,c.y,p):this.document.elementsFromPoint(c.x,c.y),g=[];for(const y in h){if(!h.hasOwnProperty(y))continue;let b=h[y];for(b!=null&&g.push(b);b;)b=b.parentElement,b&&g.indexOf(b)===-1&&g.push(b)}const v=g.filter(y=>p.indexOf(y)>-1).map(y=>this._getDropTargetId(y)).filter(y=>!!y).filter((y,b,C)=>C.indexOf(y)===b);if(u)for(const y in this.targetNodes){const b=this.targetNodes.get(y);if(f&&b&&b.contains(f)&&v.indexOf(y)===-1){v.unshift(y);break}}v.reverse(),this.actions.hover(v,{clientOffset:c})},this._getDropTargetId=i=>{const o=this.targetNodes.keys();let s=o.next();for(;s.done===!1;){const u=s.value;if(i===this.targetNodes.get(u))return u;s=o.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!P9(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new k9(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Ho.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Ho.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Ho.keyboard)}}const A9=function(t,n={},r={}){return new Qu(t,n,r)};function li(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:ex(e)?2:tx(e)?3:0}function Qs(e,t){return Ol(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function M9(e,t){return Ol(e)===2?e.get(t):e[t]}function QP(e,t,n){var r=Ol(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function ZP(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ex(e){return F9&&e instanceof Map}function tx(e){return z9&&e instanceof Set}function Oa(e){return e.o||e.t}function nx(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=eT(e);delete t[Mt];for(var n=Zs(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=$9),Object.freeze(e),t&&Ga(e,function(n,r){return rx(r,!0)},!0)),e}function $9(){li(2)}function ix(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Ti(e){var t=ty[e];return t||li(18,e),t}function D9(e,t){ty[e]||(ty[e]=t)}function Q0(){return Ec}function bv(e,t){t&&(Ti("Patches"),e.u=[],e.s=[],e.v=t)}function jp(e){Z0(e),e.p.forEach(N9),e.p=null}function Z0(e){e===Ec&&(Ec=e.l)}function C2(e){return Ec={p:[],l:Ec,h:e,m:!0,_:0}}function N9(e){var t=e[Mt];t.i===0||t.i===1?t.j():t.O=!0}function wv(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Ti("ES5").S(t,e,r),r?(n[Mt].P&&(jp(t),li(4)),no(e)&&(e=Wp(t,e),t.l||Up(t,e)),t.u&&Ti("Patches").M(n[Mt].t,e,t.u,t.s)):e=Wp(t,n,[]),jp(t),t.u&&t.v(t.u,t.s),e!==JP?e:void 0}function Wp(e,t,n){if(ix(t))return t;var r=t[Mt];if(!r)return Ga(t,function(o,s){return E2(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Up(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=nx(r.k):r.o;Ga(r.i===3?new Set(i):i,function(o,s){return E2(e,r,i,o,s,n)}),Up(e,i,!1),n&&e.u&&Ti("Patches").R(r,n,e.u,e.s)}return r.o}function E2(e,t,n,r,i,o){if(Xo(i)){var s=Wp(e,i,o&&t&&t.i!==3&&!Qs(t.D,r)?o.concat(r):void 0);if(QP(n,r,s),!Xo(s))return;e.m=!1}if(no(i)&&!ix(i)){if(!e.h.F&&e._<1)return;Wp(e,i),t&&t.A.l||Up(e,i)}}function Up(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&rx(t,n)}function Sv(e,t){var n=e[Mt];return(n?Oa(n):e)[t]}function O2(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Ro(e){e.P||(e.P=!0,e.l&&Ro(e.l))}function kv(e){e.o||(e.o=nx(e.t))}function J0(e,t,n){var r=ex(t)?Ti("MapSet").N(t,n):tx(t)?Ti("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),u={i:s?1:0,A:o?o.A:Q0(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},c=u,f=Oc;s&&(c=[u],f=Nu);var p=Proxy.revocable(c,f),h=p.revoke,g=p.proxy;return u.k=g,u.j=h,g}(t,n):Ti("ES5").J(t,n);return(n?n.A:Q0()).p.push(r),r}function ey(e){return Xo(e)||li(22,e),function t(n){if(!no(n))return n;var r,i=n[Mt],o=Ol(n);if(i){if(!i.P&&(i.i<4||!Ti("ES5").K(i)))return i.t;i.I=!0,r=_2(n,o),i.I=!1}else r=_2(n,o);return Ga(r,function(s,u){i&&M9(i.t,s)===u||QP(r,s,t(u))}),o===3?new Set(r):r}(e)}function _2(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return nx(e)}function L9(){function e(o,s){var u=i[o];return u?u.enumerable=s:i[o]=u={configurable:!0,enumerable:s,get:function(){var c=this[Mt];return Oc.get(c,o)},set:function(c){var f=this[Mt];Oc.set(f,o,c)}},u}function t(o){for(var s=o.length-1;s>=0;s--){var u=o[s][Mt];if(!u.P)switch(u.i){case 5:r(u)&&Ro(u);break;case 4:n(u)&&Ro(u)}}}function n(o){for(var s=o.t,u=o.k,c=Zs(u),f=c.length-1;f>=0;f--){var p=c[f];if(p!==Mt){var h=s[p];if(h===void 0&&!Qs(s,p))return!0;var g=u[p],v=g&&g[Mt];if(v?v.t!==h:!ZP(g,h))return!0}}var y=!!s[Mt];return c.length!==Zs(s).length+(y?0:1)}function r(o){var s=o.k;if(s.length!==o.t.length)return!0;var u=Object.getOwnPropertyDescriptor(s,s.length-1);if(u&&!u.get)return!0;for(var c=0;c1?x-1:0),S=1;S1?p-1:0),g=1;g=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Ti("Patches").$;return Xo(n)?s(n,r):this.produce(n,function(u){return s(u,r)})},e}(),wr=new j9,tT=wr.produce;wr.produceWithPatches.bind(wr);wr.setAutoFreeze.bind(wr);wr.setUseProxies.bind(wr);wr.applyPatches.bind(wr);wr.createDraft.bind(wr);wr.finishDraft.bind(wr);function nT(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(s){return function(u){return typeof u=="function"?u(i,o,e):s(u)}}};return t}var rT=nT();rT.withExtraArgument=nT;const R2=rT;var W9=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),U9=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,s;return s={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(f){return function(p){return c([f,p])}}function c(f){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=f[0]&2?i.return:f[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,f[1])).done)return o;switch(i=0,o&&(f=[f[0]&2,o.value]),f[0]){case 0:case 1:o=f;break;case 4:return n.label++,{value:f[1],done:!1};case 5:n.label++,i=f[1],f=[0];continue;case 7:f=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(f[0]===6||f[0]===2)){n=0;continue}if(f[0]===3&&(!o||f[1]>o[0]&&f[1]-1;return n&&r}function ux(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function oT(){for(var e=[],t=0;t(e.PLAYER="player",e.SHOP="shop",e.CONTAINER="container",e.CRAFTING="crafting",e))(Rn||{}),Vp={exports:{}};(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",u="Invalid `variable` option passed into `_.template`",c="__lodash_hash_undefined__",f=500,p="__lodash_placeholder__",h=1,g=2,v=4,y=1,b=2,C=1,x=2,w=4,S=8,E=16,I=32,_=64,R=128,D=256,W=512,L=30,B="...",Y=800,Z=16,re=1,te=2,oe=3,le=1/0,H=9007199254740991,Q=17976931348623157e292,K=0/0,A=4294967295,M=A-1,we=A>>>1,xe=[["ary",R],["bind",C],["bindKey",x],["curry",S],["curryRight",E],["flip",W],["partial",I],["partialRight",_],["rearg",D]],Se="[object Arguments]",me="[object Array]",Ae="[object AsyncFunction]",Pe="[object Boolean]",de="[object Date]",We="[object DOMException]",Ie="[object Error]",qt="[object Function]",Yt="[object GeneratorFunction]",it="[object Map]",dt="[object Number]",kn="[object Null]",pt="[object Object]",ot="[object Promise]",Wn="[object Proxy]",Ze="[object RegExp]",Qe="[object Set]",Kt="[object String]",ln="[object Symbol]",Xt="[object Undefined]",ht="[object WeakMap]",Dt="[object WeakSet]",vt="[object ArrayBuffer]",V="[object DataView]",q="[object Float32Array]",be="[object Float64Array]",Ce="[object Int8Array]",ft="[object Int16Array]",nr="[object Int32Array]",Ke="[object Uint8Array]",St="[object Uint8ClampedArray]",rr="[object Uint16Array]",Or="[object Uint32Array]",kt=/\b__p \+= '';/g,ca=/\b(__p \+=) '' \+/g,ir=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ll=/&(?:amp|lt|gt|quot|#39);/g,Fl=/[&<>"']/g,uf=RegExp(Ll.source),cf=RegExp(Fl.source),ff=/<%-([\s\S]+?)%>/g,df=/<%([\s\S]+?)%>/g,pf=/<%=([\s\S]+?)%>/g,Cm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Em=/^\w*$/,fa=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,da=/[\\^$.*+?()[\]{}|]/g,Om=RegExp(da.source),Di=/^\s+/,zl=/\s/,or=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pa=/\{\n\/\* \[wrapped with (.+)\] \*/,_m=/,? & /,ha=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bl=/[()=,{}\[\]\/\s]/,hf=/\\(\\)?/g,mf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,jl=/\w*$/,gf=/^[-+]0x[0-9a-f]+$/i,Pm=/^0b[01]+$/i,Tm=/^\[object .+?Constructor\]$/,Im=/^0o[0-7]+$/i,Rm=/^(?:0|[1-9]\d*)$/,Ue=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,un=/($^)/,nM=/['\n\r\u2028\u2029\\]/g,vf="\\ud800-\\udfff",rM="\\u0300-\\u036f",iM="\\ufe20-\\ufe2f",oM="\\u20d0-\\u20ff",Ab=rM+iM+oM,Mb="\\u2700-\\u27bf",$b="a-z\\xdf-\\xf6\\xf8-\\xff",aM="\\xac\\xb1\\xd7\\xf7",sM="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",lM="\\u2000-\\u206f",uM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Db="A-Z\\xc0-\\xd6\\xd8-\\xde",Nb="\\ufe0e\\ufe0f",Lb=aM+sM+lM+uM,Am="['’]",cM="["+vf+"]",Fb="["+Lb+"]",yf="["+Ab+"]",zb="\\d+",fM="["+Mb+"]",Bb="["+$b+"]",jb="[^"+vf+Lb+zb+Mb+$b+Db+"]",Mm="\\ud83c[\\udffb-\\udfff]",dM="(?:"+yf+"|"+Mm+")",Wb="[^"+vf+"]",$m="(?:\\ud83c[\\udde6-\\uddff]){2}",Dm="[\\ud800-\\udbff][\\udc00-\\udfff]",is="["+Db+"]",Ub="\\u200d",Hb="(?:"+Bb+"|"+jb+")",pM="(?:"+is+"|"+jb+")",Vb="(?:"+Am+"(?:d|ll|m|re|s|t|ve))?",Gb="(?:"+Am+"(?:D|LL|M|RE|S|T|VE))?",qb=dM+"?",Yb="["+Nb+"]?",hM="(?:"+Ub+"(?:"+[Wb,$m,Dm].join("|")+")"+Yb+qb+")*",mM="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gM="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Kb=Yb+qb+hM,vM="(?:"+[fM,$m,Dm].join("|")+")"+Kb,yM="(?:"+[Wb+yf+"?",yf,$m,Dm,cM].join("|")+")",xM=RegExp(Am,"g"),bM=RegExp(yf,"g"),Nm=RegExp(Mm+"(?="+Mm+")|"+yM+Kb,"g"),wM=RegExp([is+"?"+Bb+"+"+Vb+"(?="+[Fb,is,"$"].join("|")+")",pM+"+"+Gb+"(?="+[Fb,is+Hb,"$"].join("|")+")",is+"?"+Hb+"+"+Vb,is+"+"+Gb,gM,mM,zb,vM].join("|"),"g"),SM=RegExp("["+Ub+vf+Ab+Nb+"]"),kM=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,CM=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],EM=-1,Ct={};Ct[q]=Ct[be]=Ct[Ce]=Ct[ft]=Ct[nr]=Ct[Ke]=Ct[St]=Ct[rr]=Ct[Or]=!0,Ct[Se]=Ct[me]=Ct[vt]=Ct[Pe]=Ct[V]=Ct[de]=Ct[Ie]=Ct[qt]=Ct[it]=Ct[dt]=Ct[pt]=Ct[Ze]=Ct[Qe]=Ct[Kt]=Ct[ht]=!1;var yt={};yt[Se]=yt[me]=yt[vt]=yt[V]=yt[Pe]=yt[de]=yt[q]=yt[be]=yt[Ce]=yt[ft]=yt[nr]=yt[it]=yt[dt]=yt[pt]=yt[Ze]=yt[Qe]=yt[Kt]=yt[ln]=yt[Ke]=yt[St]=yt[rr]=yt[Or]=!0,yt[Ie]=yt[qt]=yt[ht]=!1;var OM={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},_M={"&":"&","<":"<",">":">",'"':""","'":"'"},PM={"&":"&","<":"<",">":">",""":'"',"'":"'"},TM={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},IM=parseFloat,RM=parseInt,Xb=typeof ru=="object"&&ru&&ru.Object===Object&&ru,AM=typeof self=="object"&&self&&self.Object===Object&&self,hn=Xb||AM||Function("return this")(),Lm=t&&!t.nodeType&&t,ma=Lm&&!0&&e&&!e.nodeType&&e,Qb=ma&&ma.exports===Lm,Fm=Qb&&Xb.process,_r=function(){try{var j=ma&&ma.require&&ma.require("util").types;return j||Fm&&Fm.binding&&Fm.binding("util")}catch{}}(),Zb=_r&&_r.isArrayBuffer,Jb=_r&&_r.isDate,ew=_r&&_r.isMap,tw=_r&&_r.isRegExp,nw=_r&&_r.isSet,rw=_r&&_r.isTypedArray;function ar(j,X,G){switch(G.length){case 0:return j.call(X);case 1:return j.call(X,G[0]);case 2:return j.call(X,G[0],G[1]);case 3:return j.call(X,G[0],G[1],G[2])}return j.apply(X,G)}function MM(j,X,G,ce){for(var Re=-1,Je=j==null?0:j.length;++Re-1}function zm(j,X,G){for(var ce=-1,Re=j==null?0:j.length;++ce-1;);return G}function fw(j,X){for(var G=j.length;G--&&os(X,j[G],0)>-1;);return G}function WM(j,X){for(var G=j.length,ce=0;G--;)j[G]===X&&++ce;return ce}var UM=Um(OM),HM=Um(_M);function VM(j){return"\\"+TM[j]}function GM(j,X){return j==null?n:j[X]}function as(j){return SM.test(j)}function qM(j){return kM.test(j)}function YM(j){for(var X,G=[];!(X=j.next()).done;)G.push(X.value);return G}function qm(j){var X=-1,G=Array(j.size);return j.forEach(function(ce,Re){G[++X]=[Re,ce]}),G}function dw(j,X){return function(G){return j(X(G))}}function mo(j,X){for(var G=-1,ce=j.length,Re=0,Je=[];++G-1}function D5(a,l){var d=this.__data__,m=Nf(d,a);return m<0?(++this.size,d.push([a,l])):d[m][1]=l,this}Ni.prototype.clear=R5,Ni.prototype.delete=A5,Ni.prototype.get=M5,Ni.prototype.has=$5,Ni.prototype.set=D5;function Li(a){var l=-1,d=a==null?0:a.length;for(this.clear();++l=l?a:l)),a}function Rr(a,l,d,m,k,P){var $,F=l&h,U=l&g,J=l&v;if(d&&($=k?d(a,m,k,P):d(a)),$!==n)return $;if(!Nt(a))return a;var ee=Me(a);if(ee){if($=z$(a),!F)return Un(a,$)}else{var ne=En(a),ue=ne==qt||ne==Yt;if(wo(a))return Yw(a,F);if(ne==pt||ne==Se||ue&&!k){if($=U||ue?{}:pS(a),!F)return U?P$(a,Q5($,a)):_$(a,Cw($,a))}else{if(!yt[ne])return k?a:{};$=B$(a,ne,F)}}P||(P=new ti);var ve=P.get(a);if(ve)return ve;P.set(a,$),WS(a)?a.forEach(function(_e){$.add(Rr(_e,l,d,_e,a,P))}):BS(a)&&a.forEach(function(_e,He){$.set(He,Rr(_e,l,d,He,a,P))});var Oe=J?U?xg:yg:U?Vn:cn,ze=ee?n:Oe(a);return Pr(ze||a,function(_e,He){ze&&(He=_e,_e=a[He]),Yl($,He,Rr(_e,l,d,He,a,P))}),$}function Z5(a){var l=cn(a);return function(d){return Ew(d,a,l)}}function Ew(a,l,d){var m=d.length;if(a==null)return!m;for(a=mt(a);m--;){var k=d[m],P=l[k],$=a[k];if($===n&&!(k in a)||!P($))return!1}return!0}function Ow(a,l,d){if(typeof a!="function")throw new Tr(s);return tu(function(){a.apply(n,d)},l)}function Kl(a,l,d,m){var k=-1,P=xf,$=!0,F=a.length,U=[],J=l.length;if(!F)return U;d&&(l=Rt(l,sr(d))),m?(P=zm,$=!1):l.length>=i&&(P=Wl,$=!1,l=new ya(l));e:for(;++kk?0:k+d),m=m===n||m>k?k:Le(m),m<0&&(m+=k),m=d>m?0:HS(m);d0&&d(F)?l>1?mn(F,l-1,d,m,k):ho(k,F):m||(k[k.length]=F)}return k}var eg=eS(),Tw=eS(!0);function mi(a,l){return a&&eg(a,l,cn)}function tg(a,l){return a&&Tw(a,l,cn)}function Ff(a,l){return po(l,function(d){return Wi(a[d])})}function ba(a,l){l=xo(l,a);for(var d=0,m=l.length;a!=null&&dl}function t$(a,l){return a!=null&&at.call(a,l)}function n$(a,l){return a!=null&&l in mt(a)}function r$(a,l,d){return a>=Cn(l,d)&&a=120&&ee.length>=120)?new ya($&&ee):n}ee=a[0];var ne=-1,ue=F[0];e:for(;++ne-1;)F!==a&&Tf.call(F,U,1),Tf.call(a,U,1);return a}function Bw(a,l){for(var d=a?l.length:0,m=d-1;d--;){var k=l[d];if(d==m||k!==P){var P=k;ji(k)?Tf.call(a,k,1):fg(a,k)}}return a}function lg(a,l){return a+Af(bw()*(l-a+1))}function g$(a,l,d,m){for(var k=-1,P=nn(Rf((l-a)/(d||1)),0),$=G(P);P--;)$[m?P:++k]=a,a+=d;return $}function ug(a,l){var d="";if(!a||l<1||l>H)return d;do l%2&&(d+=a),l=Af(l/2),l&&(a+=a);while(l);return d}function je(a,l){return Og(gS(a,l,Gn),a+"")}function v$(a){return kw(vs(a))}function y$(a,l){var d=vs(a);return Kf(d,xa(l,0,d.length))}function Zl(a,l,d,m){if(!Nt(a))return a;l=xo(l,a);for(var k=-1,P=l.length,$=P-1,F=a;F!=null&&++kk?0:k+l),d=d>k?k:d,d<0&&(d+=k),k=l>d?0:d-l>>>0,l>>>=0;for(var P=G(k);++m>>1,$=a[P];$!==null&&!ur($)&&(d?$<=l:$=i){var J=l?null:A$(a);if(J)return wf(J);$=!1,k=Wl,U=new ya}else U=l?[]:F;e:for(;++m=m?a:Ar(a,l,d)}var qw=u5||function(a){return hn.clearTimeout(a)};function Yw(a,l){if(l)return a.slice();var d=a.length,m=mw?mw(d):new a.constructor(d);return a.copy(m),m}function mg(a){var l=new a.constructor(a.byteLength);return new _f(l).set(new _f(a)),l}function k$(a,l){var d=l?mg(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.byteLength)}function C$(a){var l=new a.constructor(a.source,jl.exec(a));return l.lastIndex=a.lastIndex,l}function E$(a){return ql?mt(ql.call(a)):{}}function Kw(a,l){var d=l?mg(a.buffer):a.buffer;return new a.constructor(d,a.byteOffset,a.length)}function Xw(a,l){if(a!==l){var d=a!==n,m=a===null,k=a===a,P=ur(a),$=l!==n,F=l===null,U=l===l,J=ur(l);if(!F&&!J&&!P&&a>l||P&&$&&U&&!F&&!J||m&&$&&U||!d&&U||!k)return 1;if(!m&&!P&&!J&&a=F)return U;var J=d[m];return U*(J=="desc"?-1:1)}}return a.index-l.index}function Qw(a,l,d,m){for(var k=-1,P=a.length,$=d.length,F=-1,U=l.length,J=nn(P-$,0),ee=G(U+J),ne=!m;++F1?d[k-1]:n,$=k>2?d[2]:n;for(P=a.length>3&&typeof P=="function"?(k--,P):n,$&&Dn(d[0],d[1],$)&&(P=k<3?n:P,k=1),l=mt(l);++m-1?k[P?l[$]:$]:n}}function rS(a){return Bi(function(l){var d=l.length,m=d,k=Ir.prototype.thru;for(a&&l.reverse();m--;){var P=l[m];if(typeof P!="function")throw new Tr(s);if(k&&!$&&qf(P)=="wrapper")var $=new Ir([],!0)}for(m=$?m:d;++m1&&qe.reverse(),ee&&UF))return!1;var J=P.get(a),ee=P.get(l);if(J&&ee)return J==l&&ee==a;var ne=-1,ue=!0,ve=d&b?new ya:n;for(P.set(a,l),P.set(l,a);++ne1?"& ":"")+l[m],l=l.join(d>2?", ":" "),a.replace(or,`{ -/* [wrapped with `+l+`] */ -`)}function W$(a){return Me(a)||ka(a)||!!(yw&&a&&a[yw])}function ji(a,l){var d=typeof a;return l=l??H,!!l&&(d=="number"||d!="symbol"&&Rm.test(a))&&a>-1&&a%1==0&&a0){if(++l>=Y)return arguments[0]}else l=0;return a.apply(n,arguments)}}function Kf(a,l){var d=-1,m=a.length,k=m-1;for(l=l===n?m:l;++d1?a[l-1]:n;return d=typeof d=="function"?(a.pop(),d):n,PS(a,d)});function TS(a){var l=O(a);return l.__chain__=!0,l}function J4(a,l){return l(a),a}function Xf(a,l){return l(a)}var e3=Bi(function(a){var l=a.length,d=l?a[0]:0,m=this.__wrapped__,k=function(P){return Jm(P,a)};return l>1||this.__actions__.length||!(m instanceof Ve)||!ji(d)?this.thru(k):(m=m.slice(d,+d+(l?1:0)),m.__actions__.push({func:Xf,args:[k],thisArg:n}),new Ir(m,this.__chain__).thru(function(P){return l&&!P.length&&P.push(n),P}))});function t3(){return TS(this)}function n3(){return new Ir(this.value(),this.__chain__)}function r3(){this.__values__===n&&(this.__values__=US(this.value()));var a=this.__index__>=this.__values__.length,l=a?n:this.__values__[this.__index__++];return{done:a,value:l}}function i3(){return this}function o3(a){for(var l,d=this;d instanceof Df;){var m=SS(d);m.__index__=0,m.__values__=n,l?k.__wrapped__=m:l=m;var k=m;d=d.__wrapped__}return k.__wrapped__=a,l}function a3(){var a=this.__wrapped__;if(a instanceof Ve){var l=a;return this.__actions__.length&&(l=new Ve(this)),l=l.reverse(),l.__actions__.push({func:Xf,args:[_g],thisArg:n}),new Ir(l,this.__chain__)}return this.thru(_g)}function s3(){return Vw(this.__wrapped__,this.__actions__)}var l3=Wf(function(a,l,d){at.call(a,d)?++a[d]:Fi(a,d,1)});function u3(a,l,d){var m=Me(a)?iw:J5;return d&&Dn(a,l,d)&&(l=n),m(a,Ee(l,3))}function c3(a,l){var d=Me(a)?po:Pw;return d(a,Ee(l,3))}var f3=nS(kS),d3=nS(CS);function p3(a,l){return mn(Qf(a,l),1)}function h3(a,l){return mn(Qf(a,l),le)}function m3(a,l,d){return d=d===n?1:Le(d),mn(Qf(a,l),d)}function IS(a,l){var d=Me(a)?Pr:vo;return d(a,Ee(l,3))}function RS(a,l){var d=Me(a)?$M:_w;return d(a,Ee(l,3))}var g3=Wf(function(a,l,d){at.call(a,d)?a[d].push(l):Fi(a,d,[l])});function v3(a,l,d,m){a=Hn(a)?a:vs(a),d=d&&!m?Le(d):0;var k=a.length;return d<0&&(d=nn(k+d,0)),nd(a)?d<=k&&a.indexOf(l,d)>-1:!!k&&os(a,l,d)>-1}var y3=je(function(a,l,d){var m=-1,k=typeof l=="function",P=Hn(a)?G(a.length):[];return vo(a,function($){P[++m]=k?ar(l,$,d):Xl($,l,d)}),P}),x3=Wf(function(a,l,d){Fi(a,d,l)});function Qf(a,l){var d=Me(a)?Rt:$w;return d(a,Ee(l,3))}function b3(a,l,d,m){return a==null?[]:(Me(l)||(l=l==null?[]:[l]),d=m?n:d,Me(d)||(d=d==null?[]:[d]),Fw(a,l,d))}var w3=Wf(function(a,l,d){a[d?0:1].push(l)},function(){return[[],[]]});function S3(a,l,d){var m=Me(a)?Bm:lw,k=arguments.length<3;return m(a,Ee(l,4),d,k,vo)}function k3(a,l,d){var m=Me(a)?DM:lw,k=arguments.length<3;return m(a,Ee(l,4),d,k,_w)}function C3(a,l){var d=Me(a)?po:Pw;return d(a,ed(Ee(l,3)))}function E3(a){var l=Me(a)?kw:v$;return l(a)}function O3(a,l,d){(d?Dn(a,l,d):l===n)?l=1:l=Le(l);var m=Me(a)?Y5:y$;return m(a,l)}function _3(a){var l=Me(a)?K5:b$;return l(a)}function P3(a){if(a==null)return 0;if(Hn(a))return nd(a)?ss(a):a.length;var l=En(a);return l==it||l==Qe?a.size:og(a).length}function T3(a,l,d){var m=Me(a)?jm:w$;return d&&Dn(a,l,d)&&(l=n),m(a,Ee(l,3))}var I3=je(function(a,l){if(a==null)return[];var d=l.length;return d>1&&Dn(a,l[0],l[1])?l=[]:d>2&&Dn(l[0],l[1],l[2])&&(l=[l[0]]),Fw(a,mn(l,1),[])}),Zf=c5||function(){return hn.Date.now()};function R3(a,l){if(typeof l!="function")throw new Tr(s);return a=Le(a),function(){if(--a<1)return l.apply(this,arguments)}}function AS(a,l,d){return l=d?n:l,l=a&&l==null?a.length:l,zi(a,R,n,n,n,n,l)}function MS(a,l){var d;if(typeof l!="function")throw new Tr(s);return a=Le(a),function(){return--a>0&&(d=l.apply(this,arguments)),a<=1&&(l=n),d}}var Tg=je(function(a,l,d){var m=C;if(d.length){var k=mo(d,ms(Tg));m|=I}return zi(a,m,l,d,k)}),$S=je(function(a,l,d){var m=C|x;if(d.length){var k=mo(d,ms($S));m|=I}return zi(l,m,a,d,k)});function DS(a,l,d){l=d?n:l;var m=zi(a,S,n,n,n,n,n,l);return m.placeholder=DS.placeholder,m}function NS(a,l,d){l=d?n:l;var m=zi(a,E,n,n,n,n,n,l);return m.placeholder=NS.placeholder,m}function LS(a,l,d){var m,k,P,$,F,U,J=0,ee=!1,ne=!1,ue=!0;if(typeof a!="function")throw new Tr(s);l=$r(l)||0,Nt(d)&&(ee=!!d.leading,ne="maxWait"in d,P=ne?nn($r(d.maxWait)||0,l):P,ue="trailing"in d?!!d.trailing:ue);function ve(Vt){var ri=m,Hi=k;return m=k=n,J=Vt,$=a.apply(Hi,ri),$}function Oe(Vt){return J=Vt,F=tu(He,l),ee?ve(Vt):$}function ze(Vt){var ri=Vt-U,Hi=Vt-J,nk=l-ri;return ne?Cn(nk,P-Hi):nk}function _e(Vt){var ri=Vt-U,Hi=Vt-J;return U===n||ri>=l||ri<0||ne&&Hi>=P}function He(){var Vt=Zf();if(_e(Vt))return qe(Vt);F=tu(He,ze(Vt))}function qe(Vt){return F=n,ue&&m?ve(Vt):(m=k=n,$)}function cr(){F!==n&&qw(F),J=0,m=U=k=F=n}function Nn(){return F===n?$:qe(Zf())}function fr(){var Vt=Zf(),ri=_e(Vt);if(m=arguments,k=this,U=Vt,ri){if(F===n)return Oe(U);if(ne)return qw(F),F=tu(He,l),ve(U)}return F===n&&(F=tu(He,l)),$}return fr.cancel=cr,fr.flush=Nn,fr}var A3=je(function(a,l){return Ow(a,1,l)}),M3=je(function(a,l,d){return Ow(a,$r(l)||0,d)});function $3(a){return zi(a,W)}function Jf(a,l){if(typeof a!="function"||l!=null&&typeof l!="function")throw new Tr(s);var d=function(){var m=arguments,k=l?l.apply(this,m):m[0],P=d.cache;if(P.has(k))return P.get(k);var $=a.apply(this,m);return d.cache=P.set(k,$)||P,$};return d.cache=new(Jf.Cache||Li),d}Jf.Cache=Li;function ed(a){if(typeof a!="function")throw new Tr(s);return function(){var l=arguments;switch(l.length){case 0:return!a.call(this);case 1:return!a.call(this,l[0]);case 2:return!a.call(this,l[0],l[1]);case 3:return!a.call(this,l[0],l[1],l[2])}return!a.apply(this,l)}}function D3(a){return MS(2,a)}var N3=S$(function(a,l){l=l.length==1&&Me(l[0])?Rt(l[0],sr(Ee())):Rt(mn(l,1),sr(Ee()));var d=l.length;return je(function(m){for(var k=-1,P=Cn(m.length,d);++k=l}),ka=Rw(function(){return arguments}())?Rw:function(a){return jt(a)&&at.call(a,"callee")&&!vw.call(a,"callee")},Me=G.isArray,Q3=Zb?sr(Zb):o$;function Hn(a){return a!=null&&td(a.length)&&!Wi(a)}function Ht(a){return jt(a)&&Hn(a)}function Z3(a){return a===!0||a===!1||jt(a)&&$n(a)==Pe}var wo=d5||jg,J3=Jb?sr(Jb):a$;function eD(a){return jt(a)&&a.nodeType===1&&!nu(a)}function tD(a){if(a==null)return!0;if(Hn(a)&&(Me(a)||typeof a=="string"||typeof a.splice=="function"||wo(a)||gs(a)||ka(a)))return!a.length;var l=En(a);if(l==it||l==Qe)return!a.size;if(eu(a))return!og(a).length;for(var d in a)if(at.call(a,d))return!1;return!0}function nD(a,l){return Ql(a,l)}function rD(a,l,d){d=typeof d=="function"?d:n;var m=d?d(a,l):n;return m===n?Ql(a,l,n,d):!!m}function Rg(a){if(!jt(a))return!1;var l=$n(a);return l==Ie||l==We||typeof a.message=="string"&&typeof a.name=="string"&&!nu(a)}function iD(a){return typeof a=="number"&&xw(a)}function Wi(a){if(!Nt(a))return!1;var l=$n(a);return l==qt||l==Yt||l==Ae||l==Wn}function zS(a){return typeof a=="number"&&a==Le(a)}function td(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=H}function Nt(a){var l=typeof a;return a!=null&&(l=="object"||l=="function")}function jt(a){return a!=null&&typeof a=="object"}var BS=ew?sr(ew):l$;function oD(a,l){return a===l||ig(a,l,wg(l))}function aD(a,l,d){return d=typeof d=="function"?d:n,ig(a,l,wg(l),d)}function sD(a){return jS(a)&&a!=+a}function lD(a){if(V$(a))throw new Re(o);return Aw(a)}function uD(a){return a===null}function cD(a){return a==null}function jS(a){return typeof a=="number"||jt(a)&&$n(a)==dt}function nu(a){if(!jt(a)||$n(a)!=pt)return!1;var l=Pf(a);if(l===null)return!0;var d=at.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&Cf.call(d)==a5}var Ag=tw?sr(tw):u$;function fD(a){return zS(a)&&a>=-H&&a<=H}var WS=nw?sr(nw):c$;function nd(a){return typeof a=="string"||!Me(a)&&jt(a)&&$n(a)==Kt}function ur(a){return typeof a=="symbol"||jt(a)&&$n(a)==ln}var gs=rw?sr(rw):f$;function dD(a){return a===n}function pD(a){return jt(a)&&En(a)==ht}function hD(a){return jt(a)&&$n(a)==Dt}var mD=Gf(ag),gD=Gf(function(a,l){return a<=l});function US(a){if(!a)return[];if(Hn(a))return nd(a)?ei(a):Un(a);if(Ul&&a[Ul])return YM(a[Ul]());var l=En(a),d=l==it?qm:l==Qe?wf:vs;return d(a)}function Ui(a){if(!a)return a===0?a:0;if(a=$r(a),a===le||a===-le){var l=a<0?-1:1;return l*Q}return a===a?a:0}function Le(a){var l=Ui(a),d=l%1;return l===l?d?l-d:l:0}function HS(a){return a?xa(Le(a),0,A):0}function $r(a){if(typeof a=="number")return a;if(ur(a))return K;if(Nt(a)){var l=typeof a.valueOf=="function"?a.valueOf():a;a=Nt(l)?l+"":l}if(typeof a!="string")return a===0?a:+a;a=uw(a);var d=Pm.test(a);return d||Im.test(a)?RM(a.slice(2),d?2:8):gf.test(a)?K:+a}function VS(a){return gi(a,Vn(a))}function vD(a){return a?xa(Le(a),-H,H):a===0?a:0}function nt(a){return a==null?"":lr(a)}var yD=ps(function(a,l){if(eu(l)||Hn(l)){gi(l,cn(l),a);return}for(var d in l)at.call(l,d)&&Yl(a,d,l[d])}),GS=ps(function(a,l){gi(l,Vn(l),a)}),rd=ps(function(a,l,d,m){gi(l,Vn(l),a,m)}),xD=ps(function(a,l,d,m){gi(l,cn(l),a,m)}),bD=Bi(Jm);function wD(a,l){var d=ds(a);return l==null?d:Cw(d,l)}var SD=je(function(a,l){a=mt(a);var d=-1,m=l.length,k=m>2?l[2]:n;for(k&&Dn(l[0],l[1],k)&&(m=1);++d1),P}),gi(a,xg(a),d),m&&(d=Rr(d,h|g|v,M$));for(var k=l.length;k--;)fg(d,l[k]);return d});function BD(a,l){return YS(a,ed(Ee(l)))}var jD=Bi(function(a,l){return a==null?{}:h$(a,l)});function YS(a,l){if(a==null)return{};var d=Rt(xg(a),function(m){return[m]});return l=Ee(l),zw(a,d,function(m,k){return l(m,k[0])})}function WD(a,l,d){l=xo(l,a);var m=-1,k=l.length;for(k||(k=1,a=n);++ml){var m=a;a=l,l=m}if(d||a%1||l%1){var k=bw();return Cn(a+k*(l-a+IM("1e-"+((k+"").length-1))),l)}return lg(a,l)}var JD=hs(function(a,l,d){return l=l.toLowerCase(),a+(d?QS(l):l)});function QS(a){return Dg(nt(a).toLowerCase())}function ZS(a){return a=nt(a),a&&a.replace(Ue,UM).replace(bM,"")}function eN(a,l,d){a=nt(a),l=lr(l);var m=a.length;d=d===n?m:xa(Le(d),0,m);var k=d;return d-=l.length,d>=0&&a.slice(d,k)==l}function tN(a){return a=nt(a),a&&cf.test(a)?a.replace(Fl,HM):a}function nN(a){return a=nt(a),a&&Om.test(a)?a.replace(da,"\\$&"):a}var rN=hs(function(a,l,d){return a+(d?"-":"")+l.toLowerCase()}),iN=hs(function(a,l,d){return a+(d?" ":"")+l.toLowerCase()}),oN=tS("toLowerCase");function aN(a,l,d){a=nt(a),l=Le(l);var m=l?ss(a):0;if(!l||m>=l)return a;var k=(l-m)/2;return Vf(Af(k),d)+a+Vf(Rf(k),d)}function sN(a,l,d){a=nt(a),l=Le(l);var m=l?ss(a):0;return l&&m>>0,d?(a=nt(a),a&&(typeof l=="string"||l!=null&&!Ag(l))&&(l=lr(l),!l&&as(a))?bo(ei(a),0,d):a.split(l,d)):[]}var hN=hs(function(a,l,d){return a+(d?" ":"")+Dg(l)});function mN(a,l,d){return a=nt(a),d=d==null?0:xa(Le(d),0,a.length),l=lr(l),a.slice(d,d+l.length)==l}function gN(a,l,d){var m=O.templateSettings;d&&Dn(a,l,d)&&(l=n),a=nt(a),l=rd({},l,m,lS);var k=rd({},l.imports,m.imports,lS),P=cn(k),$=Gm(k,P),F,U,J=0,ee=l.interpolate||un,ne="__p += '",ue=Ym((l.escape||un).source+"|"+ee.source+"|"+(ee===pf?mf:un).source+"|"+(l.evaluate||un).source+"|$","g"),ve="//# sourceURL="+(at.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++EM+"]")+` -`;a.replace(ue,function(_e,He,qe,cr,Nn,fr){return qe||(qe=cr),ne+=a.slice(J,fr).replace(nM,VM),He&&(F=!0,ne+=`' + -__e(`+He+`) + -'`),Nn&&(U=!0,ne+=`'; -`+Nn+`; -__p += '`),qe&&(ne+=`' + -((__t = (`+qe+`)) == null ? '' : __t) + -'`),J=fr+_e.length,_e}),ne+=`'; -`;var Oe=at.call(l,"variable")&&l.variable;if(!Oe)ne=`with (obj) { -`+ne+` -} -`;else if(Bl.test(Oe))throw new Re(u);ne=(U?ne.replace(kt,""):ne).replace(ca,"$1").replace(ir,"$1;"),ne="function("+(Oe||"obj")+`) { -`+(Oe?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(F?", __e = _.escape":"")+(U?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+ne+`return __p -}`;var ze=ek(function(){return Je(P,ve+"return "+ne).apply(n,$)});if(ze.source=ne,Rg(ze))throw ze;return ze}function vN(a){return nt(a).toLowerCase()}function yN(a){return nt(a).toUpperCase()}function xN(a,l,d){if(a=nt(a),a&&(d||l===n))return uw(a);if(!a||!(l=lr(l)))return a;var m=ei(a),k=ei(l),P=cw(m,k),$=fw(m,k)+1;return bo(m,P,$).join("")}function bN(a,l,d){if(a=nt(a),a&&(d||l===n))return a.slice(0,pw(a)+1);if(!a||!(l=lr(l)))return a;var m=ei(a),k=fw(m,ei(l))+1;return bo(m,0,k).join("")}function wN(a,l,d){if(a=nt(a),a&&(d||l===n))return a.replace(Di,"");if(!a||!(l=lr(l)))return a;var m=ei(a),k=cw(m,ei(l));return bo(m,k).join("")}function SN(a,l){var d=L,m=B;if(Nt(l)){var k="separator"in l?l.separator:k;d="length"in l?Le(l.length):d,m="omission"in l?lr(l.omission):m}a=nt(a);var P=a.length;if(as(a)){var $=ei(a);P=$.length}if(d>=P)return a;var F=d-ss(m);if(F<1)return m;var U=$?bo($,0,F).join(""):a.slice(0,F);if(k===n)return U+m;if($&&(F+=U.length-F),Ag(k)){if(a.slice(F).search(k)){var J,ee=U;for(k.global||(k=Ym(k.source,nt(jl.exec(k))+"g")),k.lastIndex=0;J=k.exec(ee);)var ne=J.index;U=U.slice(0,ne===n?F:ne)}}else if(a.indexOf(lr(k),F)!=F){var ue=U.lastIndexOf(k);ue>-1&&(U=U.slice(0,ue))}return U+m}function kN(a){return a=nt(a),a&&uf.test(a)?a.replace(Ll,ZM):a}var CN=hs(function(a,l,d){return a+(d?" ":"")+l.toUpperCase()}),Dg=tS("toUpperCase");function JS(a,l,d){return a=nt(a),l=d?n:l,l===n?qM(a)?t5(a):FM(a):a.match(l)||[]}var ek=je(function(a,l){try{return ar(a,n,l)}catch(d){return Rg(d)?d:new Re(d)}}),EN=Bi(function(a,l){return Pr(l,function(d){d=vi(d),Fi(a,d,Tg(a[d],a))}),a});function ON(a){var l=a==null?0:a.length,d=Ee();return a=l?Rt(a,function(m){if(typeof m[1]!="function")throw new Tr(s);return[d(m[0]),m[1]]}):[],je(function(m){for(var k=-1;++kH)return[];var d=A,m=Cn(a,A);l=Ee(l),a-=A;for(var k=Vm(m,l);++d0||l<0)?new Ve(d):(a<0?d=d.takeRight(-a):a&&(d=d.drop(a)),l!==n&&(l=Le(l),d=l<0?d.dropRight(-l):d.take(l-a)),d)},Ve.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},Ve.prototype.toArray=function(){return this.take(A)},mi(Ve.prototype,function(a,l){var d=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),k=O[m?"take"+(l=="last"?"Right":""):l],P=m||/^find/.test(l);!k||(O.prototype[l]=function(){var $=this.__wrapped__,F=m?[1]:arguments,U=$ instanceof Ve,J=F[0],ee=U||Me($),ne=function(He){var qe=k.apply(O,ho([He],F));return m&&ue?qe[0]:qe};ee&&d&&typeof J=="function"&&J.length!=1&&(U=ee=!1);var ue=this.__chain__,ve=!!this.__actions__.length,Oe=P&&!ue,ze=U&&!ve;if(!P&&ee){$=ze?$:new Ve(this);var _e=a.apply($,F);return _e.__actions__.push({func:Xf,args:[ne],thisArg:n}),new Ir(_e,ue)}return Oe&&ze?a.apply(this,F):(_e=this.thru(ne),Oe?m?_e.value()[0]:_e.value():_e)})}),Pr(["pop","push","shift","sort","splice","unshift"],function(a){var l=Sf[a],d=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",m=/^(?:pop|shift)$/.test(a);O.prototype[a]=function(){var k=arguments;if(m&&!this.__chain__){var P=this.value();return l.apply(Me(P)?P:[],k)}return this[d](function($){return l.apply(Me($)?$:[],k)})}}),mi(Ve.prototype,function(a,l){var d=O[l];if(d){var m=d.name+"";at.call(fs,m)||(fs[m]=[]),fs[m].push({name:l,func:d})}}),fs[Uf(n,x).name]=[{name:"wrapper",func:n}],Ve.prototype.clone=k5,Ve.prototype.reverse=C5,Ve.prototype.value=E5,O.prototype.at=e3,O.prototype.chain=t3,O.prototype.commit=n3,O.prototype.next=r3,O.prototype.plant=o3,O.prototype.reverse=a3,O.prototype.toJSON=O.prototype.valueOf=O.prototype.value=s3,O.prototype.first=O.prototype.head,Ul&&(O.prototype[Ul]=i3),O},ls=n5();ma?((ma.exports=ls)._=ls,Lm._=ls):hn._=ls}).call(ru)})(Vp,Vp.exports);const xt={water:{name:"water",close:!1,label:"VODA",stack:!0,usable:!0,count:0},burger:{name:"burger",close:!1,label:"BURGR",stack:!1,usable:!1,count:0}};let tp="images";function g7(e){e&&e!==""&&(tp=e)}const lT=()=>!window.invokeNative,uT=()=>{},v7=window.GetParentResourceName?window.GetParentResourceName():"ox_inventory";async function Wr(e,t){if(!lT())try{return await(await fetch(`https://${v7}/${e}`,{method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)})).json()}catch(n){throw Error(`Failed to fetch NUI callback ${e}! (${n})`)}}const N2=(e,t)=>{if(t.type!=="shop"||!Fn(e))return!0;if(e.count!==void 0&&e.count===0)return!1;if(e.grade===void 0||!t.groups)return!0;const n=hr.getState().inventory.leftInventory;if(!n.groups)return!1;const r=Object.keys(t.groups);if(Array.isArray(e.grade)){for(let i=0;i=e.grade)return!0}return!1}},L2=(e,t)=>{if(!Fn(e)||t!=="crafting"||!e.ingredients)return!0;const n=hr.getState().inventory.leftInventory;return Object.entries(e.ingredients).filter(o=>{const[s,u]=[o[0],o[1]];return u>=1&&xt[s]&&xt[s].count>=u?!1:!n.items.find(f=>{if(Fn(f)&&f.name===s&&u<1)return f.metadata?.durability>=u*100})}).length===0},Fn=(e,t=!1)=>e.name!==void 0&&e.weight!==void 0||t&&e.name!==void 0&&e.count!==void 0&&e.weight!==void 0,y7=(e,t)=>e.name===t.name&&Vp.exports.isEqual(e.metadata,t.metadata),x7=(e,t,n)=>t.stack?n.find(i=>i.name===e.name&&Vp.exports.isEqual(i.metadata,e.metadata))||n.find(i=>i.name===void 0):n.find(i=>i.name===void 0),Yh=(e,t,n)=>({sourceInventory:t===Rn.PLAYER?e.leftInventory:e.rightInventory,targetInventory:n?n===Rn.PLAYER?e.leftInventory:e.rightInventory:t===Rn.PLAYER?e.rightInventory:e.leftInventory}),pl=(e,t)=>{if(e?.durability===void 0)return;let n=e.durability;return n>100&&e.degrade&&(n=(e.durability-t)/(60*e.degrade)*100),n<0&&(n=0),n},b7=e=>e.reduce((t,n)=>Fn(n)?t+n.weight:t,0),F2=async e=>{const t=await Wr("getItemData",e);if(t?.name)return xt[e]=t,t},Js=e=>{const t=typeof e=="object";if(t){if(!e.name)return;const i=e.metadata;if(i?.imageurl)return`${i.imageurl}`;if(i?.image)return`${tp}/${i.image}.png`}const n=t?e.name:e,r=xt[n];return r?(r.image||(r.image=`${tp}/${n}.png`),r.image):`${tp}/${n}.png`},w7=(e,t)=>{const{leftInventory:n,rightInventory:r}=t.payload,i=Math.floor(Date.now()/1e3);n&&(e.leftInventory={...n,items:Array.from(Array(n.slots),(o,s)=>{const u=Object.values(n.items).find(c=>c?.slot===s+1)||{slot:s+1};return u.name&&(typeof xt[u.name]>"u"&&F2(u.name),u.durability=pl(u.metadata,i)),u})}),r&&(e.rightInventory={...r,items:Array.from(Array(r.slots),(o,s)=>{const u=Object.values(r.items).find(c=>c?.slot===s+1)||{slot:s+1};return u.name&&(typeof xt[u.name]>"u"&&F2(u.name),u.durability=pl(u.metadata,i)),u})}),r?.type==="admin"?e.isBusy=!0:e.isBusy=!1},S7=(e,t)=>{if(t.payload.items){Array.isArray(t.payload.items)||(t.payload.items=[t.payload.items]);const n=Math.floor(Date.now()/1e3);Object.values(t.payload.items).filter(r=>!!r).forEach(r=>{const i=r.inventory&&r.inventory!==Rn.PLAYER?e.rightInventory:e.leftInventory;r.item.durability=pl(r.item.metadata,n),i.items[r.item.slot-1]=r.item}),e.rightInventory.type===Rn.CRAFTING&&(e.rightInventory={...e.rightInventory})}if(t.payload.itemCount){const n=Object.entries(t.payload.itemCount);for(let r=0;r{const{fromSlot:n,fromType:r,toSlot:i,toType:o}=t.payload,{sourceInventory:s,targetInventory:u}=Yh(e,r,o),c=Math.floor(Date.now()/1e3);[s.items[n.slot-1],u.items[i.slot-1]]=[{...u.items[i.slot-1],slot:n.slot,durability:pl(i.metadata,c)},{...s.items[n.slot-1],slot:i.slot,durability:pl(n.metadata,c)}]},C7=(e,t)=>{const{fromSlot:n,fromType:r,toSlot:i,toType:o,count:s}=t.payload,{sourceInventory:u,targetInventory:c}=Yh(e,r,o),f=n.weight/n.count;c.items[i.slot-1]={...c.items[i.slot-1],count:i.count+s,weight:f*(i.count+s)},!(r===Rn.SHOP||r===Rn.CRAFTING)&&(u.items[n.slot-1]=n.count-s>0?{...u.items[n.slot-1],count:n.count-s,weight:f*(n.count-s)}:{slot:n.slot})},E7=(e,t)=>{const{fromSlot:n,fromType:r,toSlot:i,toType:o,count:s}=t.payload,{sourceInventory:u,targetInventory:c}=Yh(e,r,o),f=n.weight/n.count,p=Math.floor(Date.now()/1e3),h=u.items[n.slot-1];c.items[i.slot-1]={...h,count:s,weight:f*s,slot:i.slot,durability:pl(h.metadata,p)},!(r===Rn.SHOP||r===Rn.CRAFTING)&&(u.items[n.slot-1]=n.count-s>0?{...u.items[n.slot-1],count:n.count-s,weight:f*(n.count-s)}:{slot:n.slot})},O7={leftInventory:{id:"",type:"",slots:0,maxWeight:0,items:[]},rightInventory:{id:"",type:"",slots:0,maxWeight:0,items:[]},additionalMetadata:{},contextMenu:{coords:null},itemAmount:0,shiftPressed:!1,isBusy:!1},cT=s7({name:"inventory",initialState:O7,reducers:{stackSlots:C7,swapSlots:k7,setupInventory:w7,moveSlots:E7,refreshSlots:S7,setContextMenu:(e,t)=>{e.contextMenu=t.payload},setAdditionalMetadata:(e,t)=>{e.additionalMetadata={...e.additionalMetadata,...t.payload}},setItemAmount:(e,t)=>{e.itemAmount=t.payload},setShiftPressed:(e,t)=>{e.shiftPressed=t.payload},setContainerWeight:(e,t)=>{const n=e.leftInventory.items.find(r=>r.metadata?.container===e.rightInventory.id);!n||(n.weight=t.payload)}},extraReducers:e=>{e.addMatcher(oT,t=>{t.isBusy=!0,t.history={leftInventory:ey(t.leftInventory),rightInventory:ey(t.rightInventory)}}),e.addMatcher(sT,t=>{t.isBusy=!1}),e.addMatcher(aT,t=>{t.history&&t.history.leftInventory&&t.history.rightInventory&&(t.leftInventory=t.history.leftInventory,t.rightInventory=t.history.rightInventory),t.isBusy=!1})}}),{setAdditionalMetadata:_7,setContextMenu:Gp,setItemAmount:P7,setShiftPressed:T7,setupInventory:fT,swapSlots:I7,moveSlots:R7,stackSlots:A7,refreshSlots:M7,setContainerWeight:$7}=cT.actions,dT=e=>e.inventory.leftInventory,D7=e=>e.inventory.rightInventory,N7=e=>e.inventory.itemAmount,L7=e=>e.inventory.isBusy,F7=cT.reducer,hr=r7({reducer:{inventory:F7}}),_l=()=>kz(),Ja=iz,z7={black:"#000",white:"#fff"},_c=z7,B7={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},bs=B7,j7={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},ws=j7,W7={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Ss=W7,U7={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},ks=U7,H7={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},Cs=H7,V7={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},pu=V7,G7={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},q7=G7;function pT(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Y7=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,K7=pT(function(e){return Y7.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function X7(e){if(e.sheet)return e.sheet;for(var t=0;t0?vn(Pl,--tr):0,hl--,Zt===10&&(hl=1,Xh--),Zt}function yr(){return Zt=tr2||Tc(Zt)>3?"":" "}function lB(e,t){for(;--t&&yr()&&!(Zt<48||Zt>102||Zt>57&&Zt<65||Zt>70&&Zt<97););return Hc(e,np()+(t<6&&Ii()==32&&yr()==32))}function iy(e){for(;yr();)switch(Zt){case e:return tr;case 34:case 39:e!==34&&e!==39&&iy(Zt);break;case 40:e===41&&iy(e);break;case 92:yr();break}return tr}function uB(e,t){for(;yr()&&e+Zt!==47+10;)if(e+Zt===42+42&&Ii()===47)break;return"/*"+Hc(t,tr-1)+"*"+Kh(e===47?e:yr())}function cB(e){for(;!Tc(Ii());)yr();return Hc(e,tr)}function fB(e){return xT(ip("",null,null,null,[""],e=yT(e),0,[0],e))}function ip(e,t,n,r,i,o,s,u,c){for(var f=0,p=0,h=s,g=0,v=0,y=0,b=1,C=1,x=1,w=0,S="",E=i,I=o,_=r,R=S;C;)switch(y=w,w=yr()){case 40:if(y!=108&&vn(R,h-1)==58){ry(R+=rt(rp(w),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:R+=rp(w);break;case 9:case 10:case 13:case 32:R+=sB(y);break;case 92:R+=lB(np()-1,7);continue;case 47:switch(Ii()){case 42:case 47:Sd(dB(uB(yr(),np()),t,n),c);break;default:R+="/"}break;case 123*b:u[f++]=wi(R)*x;case 125*b:case 59:case 0:switch(w){case 0:case 125:C=0;case 59+p:v>0&&wi(R)-h&&Sd(v>32?B2(R+";",r,n,h-1):B2(rt(R," ","")+";",r,n,h-2),c);break;case 59:R+=";";default:if(Sd(_=z2(R,t,n,f,p,i,u,S,E=[],I=[],h),o),w===123)if(p===0)ip(R,t,_,_,E,o,h,u,I);else switch(g===99&&vn(R,3)===110?100:g){case 100:case 109:case 115:ip(e,_,_,r&&Sd(z2(e,_,_,0,0,i,u,S,i,E=[],h),I),i,I,h,u,r?E:I);break;default:ip(R,_,_,_,[""],I,0,u,I)}}f=p=v=0,b=x=1,S=R="",h=s;break;case 58:h=1+wi(R),v=y;default:if(b<1){if(w==123)--b;else if(w==125&&b++==0&&aB()==125)continue}switch(R+=Kh(w),w*b){case 38:x=p>0?1:(R+="\f",-1);break;case 44:u[f++]=(wi(R)-1)*x,x=1;break;case 64:Ii()===45&&(R+=rp(yr())),g=Ii(),p=h=wi(S=R+=cB(np())),w++;break;case 45:y===45&&wi(R)==2&&(b=0)}}return o}function z2(e,t,n,r,i,o,s,u,c,f,p){for(var h=i-1,g=i===0?o:[""],v=px(g),y=0,b=0,C=0;y0?g[x]+" "+w:rt(w,/&\f/g,g[x])))&&(c[C++]=S);return Qh(e,t,n,i===0?fx:u,c,f,p)}function dB(e,t,n){return Qh(e,t,n,hT,Kh(oB()),Pc(e,2,-2),0)}function B2(e,t,n,r){return Qh(e,t,n,dx,Pc(e,0,r),Pc(e,r+1,-1),r)}function el(e,t){for(var n="",r=px(e),i=0;i6)switch(vn(e,t+1)){case 109:if(vn(e,t+4)!==45)break;case 102:return rt(e,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+qp+(vn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~ry(e,"stretch")?bT(rt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(vn(e,t+1)!==115)break;case 6444:switch(vn(e,wi(e)-3-(~ry(e,"!important")&&10))){case 107:return rt(e,":",":"+et)+e;case 101:return rt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(vn(e,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+Pn+"$2box$3")+e}break;case 5936:switch(vn(e,t+11)){case 114:return et+e+Pn+rt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return et+e+Pn+rt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return et+e+Pn+rt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return et+e+Pn+e+e}return e}var wB=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case dx:t.return=bT(t.value,t.length);break;case mT:return el([hu(t,{value:rt(t.value,"@","@"+et)})],i);case fx:if(t.length)return iB(t.props,function(o){switch(rB(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return el([hu(t,{props:[rt(o,/:(read-\w+)/,":"+qp+"$1")]})],i);case"::placeholder":return el([hu(t,{props:[rt(o,/:(plac\w+)/,":"+et+"input-$1")]}),hu(t,{props:[rt(o,/:(plac\w+)/,":"+qp+"$1")]}),hu(t,{props:[rt(o,/:(plac\w+)/,Pn+"input-$1")]})],i)}return""})}},SB=[wB],wT=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(b){var C=b.getAttribute("data-emotion");C.indexOf(" ")!==-1&&(document.head.appendChild(b),b.setAttribute("data-s",""))})}var i=t.stylisPlugins||SB,o={},s,u=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(b){for(var C=b.getAttribute("data-emotion").split(" "),x=1;x=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var OB={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_B=/[A-Z]|^ms/g,PB=/_EMO_([^_]+?)_([^]*?)_EMO_/g,CT=function(t){return t.charCodeAt(1)===45},W2=function(t){return t!=null&&typeof t!="boolean"},Ov=pT(function(e){return CT(e)?e:e.replace(_B,"-$&").toLowerCase()}),U2=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(PB,function(r,i,o){return Si={name:i,styles:o,next:Si},i})}return OB[t]!==1&&!CT(t)&&typeof n=="number"&&n!==0?n+"px":n};function Ic(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Si={name:n.name,styles:n.styles,next:Si},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Si={name:r.name,styles:r.styles,next:Si},r=r.next;var i=n.styles+";";return i}return TB(e,t,n)}case"function":{if(e!==void 0){var o=Si,s=n(e);return Si=o,Ic(e,t,s)}break}}if(t==null)return n;var u=t[n];return u!==void 0?u:n}function TB(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?$B:DB},q2=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},NB=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return ST(n,r,i),RB(function(){return kT(n,r,i)}),null},LB=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var u=q2(t,n,r),c=u||G2(i),f=!c("as");return function(){var p=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),p[0]==null||p[0].raw===void 0)h.push.apply(h,p);else{h.push(p[0][0]);for(var g=p.length,v=1;vt(GB(i)?n:i):t})}function RT(e,t){return zB(e,t)}const qB=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},YB={},KB=YB;function Jh(e,t){return()=>null}function js(e){return e!==null&&typeof e=="object"&&e.constructor===Object}function xr(e,t,n={clone:!0}){const r=n.clone?z({},e):e;return js(e)&&js(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(js(t[i])&&i in e&&js(e[i])?r[i]=xr(e[i],t[i],n):r[i]=t[i])}),r}const AT=Jh(se.exports.element);AT.isRequired=Jh(se.exports.element.isRequired);const XB=AT,QB=Jh(se.exports.elementType);function ZB(e){return e}function Qo(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nn==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function gx(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function aj(e,t){return()=>null}function sj(e,t){return T.exports.isValidElement(e)&&t.indexOf(e.type.muiName)!==-1}function bn(e){return e&&e.ownerDocument||document}function Zo(e){return bn(e).defaultView||window}function lj(e,t){return()=>null}function Yp(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const uj=typeof window<"u"?T.exports.useLayoutEffect:T.exports.useEffect,Jo=uj;let K2=0;function cj(e){const[t,n]=T.exports.useState(e),r=e||t;return T.exports.useEffect(()=>{t==null&&(K2+=1,n(`mui-${K2}`))},[t]),r}const X2=Jv["useId"];function vx(e){if(X2!==void 0){const t=X2();return e??t}return cj(e)}function fj(e,t,n,r,i){return null}function $T({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=T.exports.useRef(e!==void 0),[o,s]=T.exports.useState(t),u=i?e:o,c=T.exports.useCallback(f=>{i||s(f)},[]);return[u,c]}function ui(e){const t=T.exports.useRef(e);return Jo(()=>{t.current=e}),T.exports.useCallback((...n)=>(0,t.current)(...n),[])}function Sn(...e){return T.exports.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Yp(n,t)})},e)}let em=!0,sy=!1,Q2;const dj={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function pj(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&dj[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function hj(e){e.metaKey||e.altKey||e.ctrlKey||(em=!0)}function _v(){em=!1}function mj(){this.visibilityState==="hidden"&&sy&&(em=!0)}function gj(e){e.addEventListener("keydown",hj,!0),e.addEventListener("mousedown",_v,!0),e.addEventListener("pointerdown",_v,!0),e.addEventListener("touchstart",_v,!0),e.addEventListener("visibilitychange",mj,!0)}function vj(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return em||pj(t)}function yx(){const e=T.exports.useCallback(i=>{i!=null&&gj(i.ownerDocument)},[]),t=T.exports.useRef(!1);function n(){return t.current?(sy=!0,window.clearTimeout(Q2),Q2=window.setTimeout(()=>{sy=!1},100),t.current=!1,!0):!1}function r(i){return vj(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function xx(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}let Es;function DT(){if(Es)return Es;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Es="reverse",e.scrollLeft>0?Es="default":(e.scrollLeft=1,e.scrollLeft===0&&(Es="negative")),document.body.removeChild(e),Es}function yj(e,t){const n=e.scrollLeft;if(t!=="rtl")return n;switch(DT()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}const xj=e=>{const t=T.exports.useRef({});return T.exports.useEffect(()=>{t.current=e}),t.current},bj=xj,wj={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},Sj=wj;function ly(){return null}ly.isRequired=ly;const kj=ly;function bx(e,t){const n=z({},t);return Object.keys(e).forEach(r=>{n[r]===void 0&&(n[r]=e[r])}),n}function wt(e,t,n){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>(s&&(o.push(t(s)),n&&n[s]&&o.push(n[s])),o),[]).join(" ")}),r}const Z2=e=>e,Cj=()=>{let e=Z2;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Z2}}},Ej=Cj(),wx=Ej,Oj={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",required:"required",selected:"selected"};function tt(e,t,n="Mui"){const r=Oj[t];return r?`${n}-${r}`:`${wx.generate(e)}-${t}`}function ct(e,t,n="Mui"){const r={};return t.forEach(i=>{r[i]=tt(e,i,n)}),r}const _j=Object.freeze(Object.defineProperty({__proto__:null,chainPropTypes:Jh,deepmerge:xr,isPlainObject:js,elementAcceptingRef:XB,elementTypeAcceptingRef:QB,exactProp:ZB,formatMuiErrorMessage:Qo,getDisplayName:tj,HTMLElementType:nj,ponyfillGlobal:rj,refType:oj,unstable_capitalize:Ne,unstable_createChainedFunction:ay,unstable_debounce:gx,unstable_deprecatedPropType:aj,unstable_isMuiElement:sj,unstable_ownerDocument:bn,unstable_ownerWindow:Zo,unstable_requirePropFactory:lj,unstable_setRef:Yp,unstable_useEnhancedEffect:Jo,unstable_useId:vx,unstable_unsupportedProp:fj,unstable_useControlled:$T,unstable_useEventCallback:ui,unstable_useForkRef:Sn,unstable_useIsFocusVisible:yx,unstable_getScrollbarSize:xx,unstable_detectScrollType:DT,unstable_getNormalizedScrollLeft:yj,usePreviousProps:bj,visuallyHidden:Sj,integerPropType:kj,internal_resolveProps:bx,unstable_composeClasses:wt,unstable_generateUtilityClass:tt,unstable_generateUtilityClasses:ct,unstable_ClassNameGenerator:wx},Symbol.toStringTag,{value:"Module"}));function tl(e,t){return t?xr(e,t,{clone:!1}):e}const Sx={xs:0,sm:600,md:900,lg:1200,xl:1536},uy={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Sx[e]}px)`};function hi(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||uy;return t.reduce((s,u,c)=>(s[o.up(o.keys[c])]=n(t[c]),s),{})}if(typeof t=="object"){const o=r.breakpoints||uy;return Object.keys(t).reduce((s,u)=>{if(Object.keys(o.values||Sx).indexOf(u)!==-1){const c=o.up(u);s[c]=n(t[u],u)}else{const c=u;s[c]=t[c]}return s},{})}return n(t)}function Pj(e){const t=n=>{const r=n.theme||{},i=e(n),o=r.breakpoints||uy,s=o.keys.reduce((u,c)=>(n[c]&&(u=u||{},u[o.up(c)]=e(z({theme:r},n[c]))),u),null);return tl(i,s)};return t.propTypes={},t.filterProps=["xs","sm","md","lg","xl",...e.filterProps],t}function NT(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function LT(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function FT(e,...t){const n=NT(e),r=[n,...t].reduce((i,o)=>xr(i,o),{});return LT(Object.keys(n),r)}function Tj(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((i,o)=>{o{e[i]!=null&&(n[i]=!0)}),n}function ap({values:e,breakpoints:t,base:n}){const r=n||Tj(e,t),i=Object.keys(r);if(i.length===0)return e;let o;return i.reduce((s,u,c)=>(Array.isArray(e)?(s[u]=e[c]!=null?e[c]:e[o],o=c):typeof e=="object"?(s[u]=e[u]!=null?e[u]:e[o],o=u):s[u]=e,s),{})}function tm(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function cy(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=tm(e,n)||r,t&&(i=t(i,r)),i}function he(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const u=s[t],c=s.theme,f=tm(c,r)||{};return hi(s,u,h=>{let g=cy(f,i,h);return h===g&&typeof h=="string"&&(g=cy(f,i,`${t}${h==="default"?"":Ne(h)}`,h)),n===!1?g:{[n]:g}})};return o.propTypes={},o.filterProps=[t],o}function uo(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?tl(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Ij(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Rj={m:"margin",p:"padding"},Aj={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},J2={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Mj=Ij(e=>{if(e.length>2)if(J2[e])e=J2[e];else return[e];const[t,n]=e.split(""),r=Rj[t],i=Aj[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),kx=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Cx=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],zT=[...kx,...Cx];function Tl(e,t,n,r){var i;const o=(i=tm(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function nm(e){return Tl(e,"spacing",8)}function es(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function BT(e,t){return n=>e.reduce((r,i)=>(r[i]=es(t,n),r),{})}function $j(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=Mj(n),o=BT(i,r),s=e[n];return hi(e,s,o)}function Ex(e,t){const n=nm(e.theme);return Object.keys(e).map(r=>$j(e,t,r,n)).reduce(tl,{})}function Ox(e){return Ex(e,kx)}Ox.propTypes={};Ox.filterProps=kx;function _x(e){return Ex(e,Cx)}_x.propTypes={};_x.filterProps=Cx;function Vc(e){return Ex(e,zT)}Vc.propTypes={};Vc.filterProps=zT;function Gc(e){return typeof e!="number"?e:`${e}px solid`}const jT=he({prop:"border",themeKey:"borders",transform:Gc}),WT=he({prop:"borderTop",themeKey:"borders",transform:Gc}),UT=he({prop:"borderRight",themeKey:"borders",transform:Gc}),HT=he({prop:"borderBottom",themeKey:"borders",transform:Gc}),VT=he({prop:"borderLeft",themeKey:"borders",transform:Gc}),GT=he({prop:"borderColor",themeKey:"palette"}),qT=he({prop:"borderTopColor",themeKey:"palette"}),YT=he({prop:"borderRightColor",themeKey:"palette"}),KT=he({prop:"borderBottomColor",themeKey:"palette"}),XT=he({prop:"borderLeftColor",themeKey:"palette"}),rm=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=Tl(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:es(t,r)});return hi(e,e.borderRadius,n)}return null};rm.propTypes={};rm.filterProps=["borderRadius"];const Dj=uo(jT,WT,UT,HT,VT,GT,qT,YT,KT,XT,rm),Px=Dj,Nj=he({prop:"displayPrint",cssProperty:!1,transform:e=>({"@media print":{display:e}})}),Lj=he({prop:"display"}),Fj=he({prop:"overflow"}),zj=he({prop:"textOverflow"}),Bj=he({prop:"visibility"}),jj=he({prop:"whiteSpace"}),Tx=uo(Nj,Lj,Fj,zj,Bj,jj),QT=he({prop:"flexBasis"}),ZT=he({prop:"flexDirection"}),JT=he({prop:"flexWrap"}),eI=he({prop:"justifyContent"}),tI=he({prop:"alignItems"}),nI=he({prop:"alignContent"}),rI=he({prop:"order"}),iI=he({prop:"flex"}),oI=he({prop:"flexGrow"}),aI=he({prop:"flexShrink"}),sI=he({prop:"alignSelf"}),lI=he({prop:"justifyItems"}),uI=he({prop:"justifySelf"}),Wj=uo(QT,ZT,JT,eI,tI,nI,rI,iI,oI,aI,sI,lI,uI),Ix=Wj,im=e=>{if(e.gap!==void 0&&e.gap!==null){const t=Tl(e.theme,"spacing",8),n=r=>({gap:es(t,r)});return hi(e,e.gap,n)}return null};im.propTypes={};im.filterProps=["gap"];const om=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=Tl(e.theme,"spacing",8),n=r=>({columnGap:es(t,r)});return hi(e,e.columnGap,n)}return null};om.propTypes={};om.filterProps=["columnGap"];const am=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=Tl(e.theme,"spacing",8),n=r=>({rowGap:es(t,r)});return hi(e,e.rowGap,n)}return null};am.propTypes={};am.filterProps=["rowGap"];const cI=he({prop:"gridColumn"}),fI=he({prop:"gridRow"}),dI=he({prop:"gridAutoFlow"}),pI=he({prop:"gridAutoColumns"}),hI=he({prop:"gridAutoRows"}),mI=he({prop:"gridTemplateColumns"}),gI=he({prop:"gridTemplateRows"}),vI=he({prop:"gridTemplateAreas"}),yI=he({prop:"gridArea"}),Uj=uo(im,om,am,cI,fI,dI,pI,hI,mI,gI,vI,yI),Rx=Uj;function Ax(e,t){return t==="grey"?t:e}const xI=he({prop:"color",themeKey:"palette",transform:Ax}),bI=he({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Ax}),wI=he({prop:"backgroundColor",themeKey:"palette",transform:Ax}),Hj=uo(xI,bI,wI),Mx=Hj,SI=he({prop:"position"}),kI=he({prop:"zIndex",themeKey:"zIndex"}),CI=he({prop:"top"}),EI=he({prop:"right"}),OI=he({prop:"bottom"}),_I=he({prop:"left"}),$x=uo(SI,kI,CI,EI,OI,_I),Vj=he({prop:"boxShadow",themeKey:"shadows"}),Dx=Vj;function aa(e){return e<=1&&e!==0?`${e*100}%`:e}const PI=he({prop:"width",transform:aa}),Nx=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i,o;return{maxWidth:((r=e.theme)==null||(i=r.breakpoints)==null||(o=i.values)==null?void 0:o[n])||Sx[n]||aa(n)}};return hi(e,e.maxWidth,t)}return null};Nx.filterProps=["maxWidth"];const TI=he({prop:"minWidth",transform:aa}),II=he({prop:"height",transform:aa}),RI=he({prop:"maxHeight",transform:aa}),AI=he({prop:"minHeight",transform:aa}),Gj=he({prop:"size",cssProperty:"width",transform:aa}),qj=he({prop:"size",cssProperty:"height",transform:aa}),MI=he({prop:"boxSizing"}),Yj=uo(PI,Nx,TI,II,RI,AI,MI),Lx=Yj,$I=he({prop:"fontFamily",themeKey:"typography"}),DI=he({prop:"fontSize",themeKey:"typography"}),NI=he({prop:"fontStyle",themeKey:"typography"}),LI=he({prop:"fontWeight",themeKey:"typography"}),FI=he({prop:"letterSpacing"}),zI=he({prop:"textTransform"}),BI=he({prop:"lineHeight"}),jI=he({prop:"textAlign"}),WI=he({prop:"typography",cssProperty:!1,themeKey:"typography"}),Kj=uo(WI,$I,DI,NI,LI,FI,BI,jI,zI),Fx=Kj,eC={borders:Px.filterProps,display:Tx.filterProps,flexbox:Ix.filterProps,grid:Rx.filterProps,positions:$x.filterProps,palette:Mx.filterProps,shadows:Dx.filterProps,sizing:Lx.filterProps,spacing:Vc.filterProps,typography:Fx.filterProps},UI={borders:Px,display:Tx,flexbox:Ix,grid:Rx,positions:$x,palette:Mx,shadows:Dx,sizing:Lx,spacing:Vc,typography:Fx},HI=Object.keys(eC).reduce((e,t)=>(eC[t].forEach(n=>{e[n]=UI[t]}),e),{});function Xj(e,t,n){const r={[e]:t,theme:n},i=HI[e];return i?i(r):{[e]:t}}function Qj(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Zj(e,t){return typeof e=="function"?e(t):e}function VI(e=UI){const t=Object.keys(e).reduce((i,o)=>(e[o].filterProps.forEach(s=>{i[s]=e[o]}),i),{});function n(i,o,s){const u={[i]:o,theme:s},c=t[i];return c?c(u):{[i]:o}}function r(i){const{sx:o,theme:s={}}=i||{};if(!o)return null;function u(c){let f=c;if(typeof c=="function")f=c(s);else if(typeof c!="object")return c;if(!f)return null;const p=NT(s.breakpoints),h=Object.keys(p);let g=p;return Object.keys(f).forEach(v=>{const y=Zj(f[v],s);if(y!=null)if(typeof y=="object")if(t[v])g=tl(g,n(v,y,s));else{const b=hi({theme:s},y,C=>({[v]:C}));Qj(b,y)?g[v]=r({sx:y,theme:s}):g=tl(g,b)}else g=tl(g,n(v,y,s))}),LT(h,g)}return Array.isArray(o)?o.map(u):u(o)}return r}const GI=VI();GI.filterProps=["sx"];const sm=GI,Jj=["sx"],eW=e=>{const t={systemProps:{},otherProps:{}};return Object.keys(e).forEach(n=>{HI[n]?t.systemProps[n]=e[n]:t.otherProps[n]=e[n]}),t};function qc(e){const{sx:t}=e,n=ke(e,Jj),{systemProps:r,otherProps:i}=eW(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const u=t(...s);return js(u)?z({},r,u):r}:o=z({},r,t),z({},i,{sx:o})}function tW(e){return({theme:t})=>sm({sx:e,theme:t})}function qI(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>z({},n,{[r.key]:r.val}),{})};function YI(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=ke(e,nW),o=rW(t),s=Object.keys(o);function u(g){return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n})`}function c(g){return`@media (max-width:${(typeof t[g]=="number"?t[g]:g)-r/100}${n})`}function f(g,v){const y=s.indexOf(v);return`@media (min-width:${typeof t[g]=="number"?t[g]:g}${n}) and (max-width:${(y!==-1&&typeof t[s[y]]=="number"?t[s[y]]:v)-r/100}${n})`}function p(g){return s.indexOf(g)+1(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}const oW=["breakpoints","palette","spacing","shape"];function ts(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=ke(e,oW),u=YI(n),c=XI(i);let f=xr({breakpoints:u,direction:"ltr",components:{},palette:z({mode:"light"},r),spacing:c,shape:z({},KI,o)},s);return f=t.reduce((p,h)=>xr(p,h),f),f}const aW=T.exports.createContext(null),QI=aW;function zx(){return T.exports.useContext(QI)}const sW=typeof Symbol=="function"&&Symbol.for,lW=sW?Symbol.for("mui.nested"):"__THEME_NESTED__";function uW(e,t){return typeof t=="function"?t(e):z({},e,t)}function cW(e){const{children:t,theme:n}=e,r=zx(),i=T.exports.useMemo(()=>{const o=r===null?n:uW(r,n);return o!=null&&(o[lW]=r!==null),o},[n,r]);return N(QI.Provider,{value:i,children:t})}function fW(e){return Object.keys(e).length===0}function Bx(e=null){const t=zx();return!t||fW(t)?e:t}const dW=ts();function Il(e=dW){return Bx(e)}const pW=["className","component"];function jx(e={}){const{defaultTheme:t,defaultClassName:n="MuiBox-root",generateClassName:r,styleFunctionSx:i=sm}=e,o=RT("div",{shouldForwardProp:u=>u!=="theme"&&u!=="sx"&&u!=="as"})(i);return T.exports.forwardRef(function(c,f){const p=Il(t),h=qc(c),{className:g,component:v="div"}=h,y=ke(h,pW);return N(o,z({as:v,ref:f,className:De(g,r?r(n):n),theme:p},y))})}const hW=jx(),ZI=hW,mW=["variant"];function tC(e){return e.length===0}function JI(e){const{variant:t}=e,n=ke(e,mW);let r=t||"";return Object.keys(n).sort().forEach(i=>{i==="color"?r+=tC(r)?e[i]:Ne(e[i]):r+=`${tC(r)?i:Ne(i)}${Ne(e[i].toString())}`}),r}const gW=["name","slot","skipVariantsResolver","skipSx","overridesResolver"],vW=["theme"],yW=["theme"];function mu(e){return Object.keys(e).length===0}function xW(e){return typeof e=="string"&&e.charCodeAt(0)>96}const bW=(e,t)=>t.components&&t.components[e]&&t.components[e].styleOverrides?t.components[e].styleOverrides:null,wW=(e,t)=>{let n=[];t&&t.components&&t.components[e]&&t.components[e].variants&&(n=t.components[e].variants);const r={};return n.forEach(i=>{const o=JI(i.props);r[o]=i.style}),r},SW=(e,t,n,r)=>{var i,o;const{ownerState:s={}}=e,u=[],c=n==null||(i=n.components)==null||(o=i[r])==null?void 0:o.variants;return c&&c.forEach(f=>{let p=!0;Object.keys(f.props).forEach(h=>{s[h]!==f.props[h]&&e[h]!==f.props[h]&&(p=!1)}),p&&u.push(t[JI(f.props)])}),u};function Zu(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const eR=ts();function Wx(e={}){const{defaultTheme:t=eR,rootShouldForwardProp:n=Zu,slotShouldForwardProp:r=Zu,styleFunctionSx:i=sm}=e,o=s=>{const u=mu(s.theme)?t:s.theme;return i(z({},s,{theme:u}))};return o.__mui_systemSx=!0,(s,u={})=>{qB(s,E=>E.filter(I=>!(I!=null&&I.__mui_systemSx)));const{name:c,slot:f,skipVariantsResolver:p,skipSx:h,overridesResolver:g}=u,v=ke(u,gW),y=p!==void 0?p:f&&f!=="Root"||!1,b=h||!1;let C,x=Zu;f==="Root"?x=n:f?x=r:xW(s)&&(x=void 0);const w=RT(s,z({shouldForwardProp:x,label:C},v)),S=(E,...I)=>{const _=I?I.map(L=>typeof L=="function"&&L.__emotion_real!==L?B=>{let{theme:Y}=B,Z=ke(B,vW);return L(z({theme:mu(Y)?t:Y},Z))}:L):[];let R=E;c&&g&&_.push(L=>{const B=mu(L.theme)?t:L.theme,Y=bW(c,B);if(Y){const Z={};return Object.entries(Y).forEach(([re,te])=>{Z[re]=typeof te=="function"?te(z({},L,{theme:B})):te}),g(L,Z)}return null}),c&&!y&&_.push(L=>{const B=mu(L.theme)?t:L.theme;return SW(L,wW(c,B),B,c)}),b||_.push(o);const D=_.length-I.length;if(Array.isArray(E)&&D>0){const L=new Array(D).fill("");R=[...E,...L],R.raw=[...E.raw,...L]}else typeof E=="function"&&E.__emotion_real!==E&&(R=L=>{let{theme:B}=L,Y=ke(L,yW);return E(z({theme:mu(B)?t:B},Y))});return w(R,..._)};return w.withConfig&&(S.withConfig=w.withConfig),S}}const kW=Wx(),lm=kW;function tR(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:bx(t.components[n].defaultProps,r)}function Yc({props:e,name:t,defaultTheme:n}){const r=Il(n);return tR({theme:r,name:t,props:e})}function Ux(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function nR(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function CW(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Ai(e){if(e.type)return e;if(e.charAt(0)==="#")return Ai(nR(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error(Qo(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error(Qo(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const rR=e=>{const t=Ai(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")},EW=(e,t)=>{try{return rR(e)}catch{return e}};function Kc(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function OW(e){if(e.indexOf("#")===0)return e;const{values:t}=Ai(e);return`#${t.map((n,r)=>CW(r===3?Math.round(255*n):n)).join("")}`}function iR(e){e=Ai(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(f,p=(f+n/30)%12)=>i-o*Math.max(Math.min(p-3,9-p,1),-1);let u="rgb";const c=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(u+="a",c.push(t[3])),Kc({type:u,values:c})}function Kp(e){e=Ai(e);let t=e.type==="hsl"||e.type==="hsla"?Ai(iR(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function oR(e,t){const n=Kp(e),r=Kp(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function yn(e,t){return e=Ai(e),t=Ux(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Kc(e)}function _W(e,t,n){try{return yn(e,t)}catch{return e}}function ml(e,t){if(e=Ai(e),t=Ux(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Kc(e)}function PW(e,t,n){try{return ml(e,t)}catch{return e}}function gl(e,t){if(e=Ai(e),t=Ux(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Kc(e)}function TW(e,t,n){try{return gl(e,t)}catch{return e}}function aR(e,t=.15){return Kp(e)>.5?ml(e,t):gl(e,t)}function sR(e,t,n){try{return sR(e,t)}catch{return e}}const IW={};function RW(e){const t=Il();return N(mx.Provider,{value:typeof t=="object"?t:IW,children:e.children})}function Hx(e){const{children:t,theme:n}=e;return N(cW,{theme:n,children:N(RW,{children:t})})}const AW=(e,t,n,r=[])=>{let i=e;t.forEach((o,s)=>{s===t.length-1?Array.isArray(i)?i[Number(o)]=n:i&&typeof i=="object"&&(i[o]=n):i&&typeof i=="object"&&(i[o]||(i[o]=r.includes(o)?[]:{}),i=i[o])})},MW=(e,t,n)=>{function r(i,o=[],s=[]){Object.entries(i).forEach(([u,c])=>{(!n||n&&!n([...o,u]))&&c!=null&&(typeof c=="object"&&Object.keys(c).length>0?r(c,[...o,u],Array.isArray(c)?[...s,u]:s):t([...o,u],c,s))})}r(e)},$W=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().indexOf("opacity")>=0?t:`${t}px`:t;function nC(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},i={},o={};return MW(e,(s,u,c)=>{if((typeof u=="string"||typeof u=="number")&&(!r||!r(s,u))){const f=`--${n?`${n}-`:""}${s.join("-")}`;Object.assign(i,{[f]:$W(s,u)}),AW(o,s,`var(${f})`,c)}},s=>s[0]==="vars"),{css:i,vars:o}}const Vx="mode",Gx="color-scheme",lR="data-color-scheme";function DW(e){const{defaultMode:t="light",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:i=Vx,colorSchemeStorageKey:o=Gx,attribute:s=lR,colorSchemeNode:u="document.documentElement"}=e||{};return N("script",{dangerouslySetInnerHTML:{__html:`(function() { try { - var mode = localStorage.getItem('${i}') || '${t}'; - var cssColorScheme = mode; - var colorScheme = ''; - if (mode === 'system') { - // handle system mode - var mql = window.matchMedia('(prefers-color-scheme: dark)'); - if (mql.matches) { - cssColorScheme = 'dark'; - colorScheme = localStorage.getItem('${o}-dark') || '${r}'; - } else { - cssColorScheme = 'light'; - colorScheme = localStorage.getItem('${o}-light') || '${n}'; - } - } - if (mode === 'light') { - colorScheme = localStorage.getItem('${o}-light') || '${n}'; - } - if (mode === 'dark') { - colorScheme = localStorage.getItem('${o}-dark') || '${r}'; - } - if (colorScheme) { - ${u}.setAttribute('${s}', colorScheme); - } - } catch (e) {} })();`}},"mui-color-scheme-init")}function rC(e){if(typeof window<"u"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function uR(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function NW(e){return uR(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function Pv(e,t){if(typeof window>"u")return;let n;try{n=localStorage.getItem(e)||void 0,n||localStorage.setItem(e,t)}catch{}return n||t}function LW(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:i=[],modeStorageKey:o=Vx,colorSchemeStorageKey:s=Gx,storageWindow:u=typeof window>"u"?void 0:window}=e,c=i.join(","),[f,p]=T.exports.useState(()=>{const C=Pv(o,t),x=Pv(`${s}-light`,n),w=Pv(`${s}-dark`,r);return{mode:C,systemMode:rC(C),lightColorScheme:x,darkColorScheme:w}}),h=NW(f),g=T.exports.useCallback(C=>{p(x=>{if(C===x.mode)return x;const w=C||t;try{localStorage.setItem(o,w)}catch{}return z({},x,{mode:w,systemMode:rC(w)})})},[o,t]),v=T.exports.useCallback(C=>{C?typeof C=="string"?C&&!c.includes(C)?console.error(`\`${C}\` does not exist in \`theme.colorSchemes\`.`):p(x=>{const w=z({},x);return uR(x,S=>{try{localStorage.setItem(`${s}-${S}`,C)}catch{}S==="light"&&(w.lightColorScheme=C),S==="dark"&&(w.darkColorScheme=C)}),w}):p(x=>{const w=z({},x),S=C.light===null?n:C.light,E=C.dark===null?r:C.dark;if(S)if(!c.includes(S))console.error(`\`${S}\` does not exist in \`theme.colorSchemes\`.`);else{w.lightColorScheme=S;try{localStorage.setItem(`${s}-light`,S)}catch{}}if(E)if(!c.includes(E))console.error(`\`${E}\` does not exist in \`theme.colorSchemes\`.`);else{w.darkColorScheme=E;try{localStorage.setItem(`${s}-dark`,E)}catch{}}return w}):p(x=>{try{localStorage.setItem(`${s}-light`,n),localStorage.setItem(`${s}-dark`,r)}catch{}return z({},x,{lightColorScheme:n,darkColorScheme:r})})},[c,s,n,r]),y=T.exports.useCallback(C=>{f.mode==="system"&&p(x=>z({},x,{systemMode:C!=null&&C.matches?"dark":"light"}))},[f.mode]),b=T.exports.useRef(y);return b.current=y,T.exports.useEffect(()=>{const C=(...w)=>b.current(...w),x=window.matchMedia("(prefers-color-scheme: dark)");return x.addListener(C),C(x),()=>x.removeListener(C)},[]),T.exports.useEffect(()=>{const C=x=>{const w=x.newValue;typeof x.key=="string"&&x.key.startsWith(s)&&(!w||c.match(w))&&(x.key.endsWith("light")&&v({light:w}),x.key.endsWith("dark")&&v({dark:w})),x.key===o&&(!w||["light","dark","system"].includes(w))&&g(w||t)};if(u)return u.addEventListener("storage",C),()=>u.removeEventListener("storage",C)},[v,g,o,s,c,t,u]),z({},f,{colorScheme:h,setMode:g,setColorScheme:v})}const FW=["colorSchemes","components","cssVarPrefix"],zW="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function BW(e){const{theme:t={},attribute:n=lR,modeStorageKey:r=Vx,colorSchemeStorageKey:i=Gx,defaultMode:o="light",defaultColorScheme:s,disableTransitionOnChange:u=!1,shouldSkipGeneratingVar:c,resolveTheme:f,excludeVariablesFromRoot:p}=e;(!t.colorSchemes||typeof s=="string"&&!t.colorSchemes[s]||typeof s=="object"&&!t.colorSchemes[s?.light]||typeof s=="object"&&!t.colorSchemes[s?.dark])&&console.error(`MUI: \`${s}\` does not exist in \`theme.colorSchemes\`.`);const h=T.exports.createContext(void 0),g=()=>{const x=T.exports.useContext(h);if(!x)throw new Error(Qo(19));return x};function v({children:x,theme:w=t,modeStorageKey:S=r,colorSchemeStorageKey:E=i,attribute:I=n,defaultMode:_=o,defaultColorScheme:R=s,disableTransitionOnChange:D=u,storageWindow:W=typeof window>"u"?void 0:window,documentNode:L=typeof document>"u"?void 0:document,colorSchemeNode:B=typeof document>"u"?void 0:document.documentElement,colorSchemeSelector:Y=":root",shouldSkipGeneratingVar:Z=c,disableNestedContext:re=!1,disableStyleSheetGeneration:te=!1}){const oe=T.exports.useRef(!1),le=zx(),H=T.exports.useContext(h),Q=!!H&&!re,{colorSchemes:K={},components:A={},cssVarPrefix:M}=w,we=ke(w,FW),xe=Object.keys(K),Se=typeof R=="string"?R:R.light,me=typeof R=="string"?R:R.dark,{mode:Ae,setMode:Pe,systemMode:de,lightColorScheme:We,darkColorScheme:Ie,colorScheme:qt,setColorScheme:Yt}=LW({supportedColorSchemes:xe,defaultLightColorScheme:Se,defaultDarkColorScheme:me,modeStorageKey:S,colorSchemeStorageKey:E,defaultMode:_,storageWindow:W});let it=Ae,dt=qt;Q&&(it=H.mode,dt=H.colorScheme);const kn=(()=>it||(_==="system"?o:_))(),pt=(()=>dt||(kn==="dark"?me:Se))(),{css:ot,vars:Wn}=nC(we,{prefix:M,shouldSkipGeneratingVar:Z}),Ze=z({},we,{components:A,colorSchemes:K,cssVarPrefix:M,vars:Wn,getColorSchemeSelector:Dt=>`[${I}="${Dt}"] &`}),Qe={},Kt={};Object.entries(K).forEach(([Dt,vt])=>{const{css:V,vars:q}=nC(vt,{prefix:M,shouldSkipGeneratingVar:Z});Ze.vars=xr(Ze.vars,q),Dt===pt&&(Object.keys(vt).forEach(Ce=>{vt[Ce]&&typeof vt[Ce]=="object"?Ze[Ce]=z({},Ze[Ce],vt[Ce]):Ze[Ce]=vt[Ce]}),Ze.palette&&(Ze.palette.colorScheme=Dt));const be=(()=>typeof R=="string"?R:_==="dark"?R.dark:R.light)();if(Dt===be){if(p){const Ce={};p(M).forEach(ft=>{Ce[ft]=V[ft],delete V[ft]}),Qe[`[${I}="${Dt}"]`]=Ce}Qe[`${Y}, [${I}="${Dt}"]`]=V}else Kt[`${Y===":root"?"":Y}[${I}="${Dt}"]`]=V}),T.exports.useEffect(()=>{dt&&B&&B.setAttribute(I,dt)},[dt,I,B]),T.exports.useEffect(()=>{let Dt;if(D&&oe.current&&L){const vt=L.createElement("style");vt.appendChild(L.createTextNode(zW)),L.head.appendChild(vt),window.getComputedStyle(L.body),Dt=setTimeout(()=>{L.head.removeChild(vt)},1)}return()=>{clearTimeout(Dt)}},[dt,D,L]),T.exports.useEffect(()=>(oe.current=!0,()=>{oe.current=!1}),[]);const ln=T.exports.useMemo(()=>({mode:it,systemMode:de,setMode:Pe,lightColorScheme:We,darkColorScheme:Ie,colorScheme:dt,setColorScheme:Yt,allColorSchemes:xe}),[xe,dt,Ie,We,it,Yt,Pe,de]);let Xt=!0;(te||Q&&le?.cssVarPrefix===M)&&(Xt=!1);const ht=ge(T.exports.Fragment,{children:[Xt&&ge(T.exports.Fragment,{children:[N(op,{styles:{[Y]:ot}}),N(op,{styles:Qe}),N(op,{styles:Kt})]}),N(Hx,{theme:f?f(Ze):Ze,children:x})]});return Q?ht:N(h.Provider,{value:ln,children:ht})}const y=typeof s=="string"?s:s.light,b=typeof s=="string"?s:s.dark;return{CssVarsProvider:v,useColorScheme:g,getInitColorSchemeScript:x=>DW(z({attribute:n,colorSchemeStorageKey:i,defaultMode:o,defaultLightColorScheme:y,defaultDarkColorScheme:b,modeStorageKey:r},x))}}function jW(e=""){function t(...r){if(!r.length)return"";const i=r[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))/)?`, var(--${e?`${e}-`:""}${i}${t(...r.slice(1))})`:`, ${i}`}return(r,...i)=>`var(--${e?`${e}-`:""}${r}${t(...i)})`}const WW=["className","component","disableGutters","fixed","maxWidth","classes"],UW=ts(),HW=lm("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ne(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),VW=e=>Yc({props:e,name:"MuiContainer",defaultTheme:UW}),GW=(e,t)=>{const n=c=>tt(t,c),{classes:r,fixed:i,disableGutters:o,maxWidth:s}=e,u={root:["root",s&&`maxWidth${Ne(String(s))}`,i&&"fixed",o&&"disableGutters"]};return wt(u,n,r)};function cR(e={}){const{createStyledComponent:t=HW,useThemeProps:n=VW,componentName:r="MuiContainer"}=e,i=t(({theme:s,ownerState:u})=>z({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!u.disableGutters&&{paddingLeft:s.spacing(2),paddingRight:s.spacing(2),[s.breakpoints.up("sm")]:{paddingLeft:s.spacing(3),paddingRight:s.spacing(3)}}),({theme:s,ownerState:u})=>u.fixed&&Object.keys(s.breakpoints.values).reduce((c,f)=>{const p=f,h=s.breakpoints.values[p];return h!==0&&(c[s.breakpoints.up(p)]={maxWidth:`${h}${s.breakpoints.unit}`}),c},{}),({theme:s,ownerState:u})=>z({},u.maxWidth==="xs"&&{[s.breakpoints.up("xs")]:{maxWidth:Math.max(s.breakpoints.values.xs,444)}},u.maxWidth&&u.maxWidth!=="xs"&&{[s.breakpoints.up(u.maxWidth)]:{maxWidth:`${s.breakpoints.values[u.maxWidth]}${s.breakpoints.unit}`}}));return T.exports.forwardRef(function(u,c){const f=n(u),{className:p,component:h="div",disableGutters:g=!1,fixed:v=!1,maxWidth:y="lg"}=f,b=ke(f,WW),C=z({},f,{component:h,disableGutters:g,fixed:v,maxWidth:y}),x=GW(C,r);return N(i,z({as:h,ownerState:C,className:De(x.root,p),ref:c},b))})}const qW=cR(),YW=qW;function KW(e){return tt("MuiContainer",e)}const XW=ct("MuiContainer",["root","disableGutters","fixed","maxWidthXs","maxWidthSm","maxWidthMd","maxWidthLg","maxWidthXl"]),QW=XW,ZW=(e,t)=>e.filter(n=>t.includes(n)),Rl=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((i,o)=>{n((s,u)=>{o<=e.keys.length-1&&(o===0?Object.assign(s,u):s[e.up(e.keys[o])]=u)},i)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:ZW(e.keys,Object.keys(t))).forEach(o=>{if(e.keys.indexOf(o)!==-1){const s=t[o];s!==void 0&&n((u,c)=>{r===o?Object.assign(u,c):u[e.up(o)]=c},s)}}):(typeof t=="number"||typeof t=="string")&&n((i,o)=>{Object.assign(i,o)},t)},JW=({theme:e,ownerState:t})=>{const n={};return Rl(e.breakpoints,t.gridSize,(r,i)=>{let o={};i===!0&&(o={flexBasis:0,flexGrow:1,maxWidth:"100%"}),i==="auto"&&(o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof i=="number"&&(o={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${i} / var(--Grid-columns)${t.nested&&t.container?" + var(--Grid-columnSpacing)":""})`}),r(n,o)}),n},eU=({theme:e,ownerState:t})=>{const n={};return Rl(e.breakpoints,t.gridOffset,(r,i)=>{let o={};i==="auto"&&(o={marginLeft:"auto"}),typeof i=="number"&&(o={marginLeft:i===0?"0px":`calc(100% * ${i} / var(--Grid-columns))`}),r(n,o)}),n},tU=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={"--Grid-columns":12};return Rl(e.breakpoints,t.columns,(r,i)=>{r(n,{"--Grid-columns":i})}),n},nU=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Rl(e.breakpoints,t.rowSpacing,(r,i)=>{var o;r(n,{"--Grid-rowSpacing":typeof i=="string"?i:(o=e.spacing)==null?void 0:o.call(e,i)})}),n},rU=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Rl(e.breakpoints,t.columnSpacing,(r,i)=>{var o;r(n,{"--Grid-columnSpacing":typeof i=="string"?i:(o=e.spacing)==null?void 0:o.call(e,i)})}),n},iU=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Rl(e.breakpoints,t.direction,(r,i)=>{r(n,{flexDirection:i})}),n},oU=({ownerState:e})=>z({minWidth:0,boxSizing:"border-box"},e.container?z({display:"flex",flexWrap:"wrap"},e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},{margin:"calc(var(--Grid-rowSpacing) / -2) calc(var(--Grid-columnSpacing) / -2)"},e.disableEqualOverflow&&{margin:"calc(var(--Grid-rowSpacing) * -1) 0px 0px calc(var(--Grid-columnSpacing) * -1)"},e.nested?z({padding:"calc(var(--Grid-nested-rowSpacing) / 2) calc(var(--Grid-nested-columnSpacing) / 2)"},(e.disableEqualOverflow||e.parentDisableEqualOverflow)&&{padding:"calc(var(--Grid-nested-rowSpacing)) 0px 0px calc(var(--Grid-nested-columnSpacing))"}):{"--Grid-nested-rowSpacing":"var(--Grid-rowSpacing)","--Grid-nested-columnSpacing":"var(--Grid-columnSpacing)"}):z({padding:"calc(var(--Grid-rowSpacing) / 2) calc(var(--Grid-columnSpacing) / 2)"},e.disableEqualOverflow&&{padding:"calc(var(--Grid-rowSpacing)) 0px 0px calc(var(--Grid-columnSpacing))"})),aU=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},sU=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([i,o])=>{n(o)&&r.push(`spacing-${i}-${String(o)}`)}),r}return[]},lU=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],uU=["className","columns","container","component","direction","wrap","spacing","rowSpacing","columnSpacing","disableEqualOverflow"],cU=ts(),fU=lm("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function dU(e){return Yc({props:e,name:"MuiGrid",defaultTheme:cU})}function fR(e={}){const{createStyledComponent:t=fU,useThemeProps:n=dU,componentName:r="MuiGrid"}=e,i=T.exports.createContext(!1),o=T.exports.createContext(void 0),s=(f,p)=>{const{container:h,direction:g,spacing:v,wrap:y,gridSize:b}=f,C={root:["root",h&&"container",y!=="wrap"&&`wrap-xs-${String(y)}`,...lU(g),...aU(b),...h?sU(v,p.breakpoints.keys[0]):[]]};return wt(C,x=>tt(r,x),{})},u=t(tU,rU,nU,JW,iU,oU,eU);return T.exports.forwardRef(function(p,h){var g,v,y,b,C,x,w,S;const E=Il(),I=n(p),_=qc(I),R=T.exports.useContext(i),D=T.exports.useContext(o),{className:W,columns:L=12,container:B=!1,component:Y="div",direction:Z="row",wrap:re="wrap",spacing:te=0,rowSpacing:oe=te,columnSpacing:le=te,disableEqualOverflow:H}=_,Q=ke(_,uU);let K=H;R&&H!==void 0&&(K=p.disableEqualOverflow);const A={},M={},we={};Object.entries(Q).forEach(([Ie,qt])=>{E.breakpoints.values[Ie]!==void 0?A[Ie]=qt:E.breakpoints.values[Ie.replace("Offset","")]!==void 0?M[Ie.replace("Offset","")]=qt:we[Ie]=qt});const xe=(g=p.columns)!=null?g:R?void 0:L,Se=(v=p.spacing)!=null?v:R?void 0:te,me=(y=(b=p.rowSpacing)!=null?b:p.spacing)!=null?y:R?void 0:oe,Ae=(C=(x=p.columnSpacing)!=null?x:p.spacing)!=null?C:R?void 0:le,Pe=z({},_,{nested:R,columns:xe,container:B,direction:Z,wrap:re,spacing:Se,rowSpacing:me,columnSpacing:Ae,gridSize:A,gridOffset:M,disableEqualOverflow:(w=(S=K)!=null?S:D)!=null?w:!1,parentDisableEqualOverflow:D}),de=s(Pe,E);let We=N(u,z({ref:h,as:Y,ownerState:Pe,className:De(de.root,W)},we));return R||(We=N(i.Provider,{value:!0,children:We})),K!==void 0&&K!==(D??!1)&&(We=N(o.Provider,{value:K,children:We})),We})}const pU=fR(),hU=pU;function mU(e){return tt("MuiGrid",e)}const gU=[0,1,2,3,4,5,6,7,8,9,10],vU=["column-reverse","column","row-reverse","row"],yU=["nowrap","wrap-reverse","wrap"],gu=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],xU=ct("MuiGrid",["root","container","item",...gU.map(e=>`spacing-xs-${e}`),...vU.map(e=>`direction-xs-${e}`),...yU.map(e=>`wrap-xs-${e}`),...gu.map(e=>`grid-xs-${e}`),...gu.map(e=>`grid-sm-${e}`),...gu.map(e=>`grid-md-${e}`),...gu.map(e=>`grid-lg-${e}`),...gu.map(e=>`grid-xl-${e}`)]),bU=xU,wU=["component","direction","spacing","divider","children","className"],SU=ts(),kU=lm("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function CU(e){return Yc({props:e,name:"MuiStack",defaultTheme:SU})}function EU(e,t){const n=T.exports.Children.toArray(e).filter(Boolean);return n.reduce((r,i,o)=>(r.push(i),o({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],_U=({ownerState:e,theme:t})=>{let n=z({display:"flex",flexDirection:"column"},hi({theme:t},ap({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r})));if(e.spacing){const r=nm(t),i=Object.keys(t.breakpoints.values).reduce((c,f)=>((typeof e.spacing=="object"&&e.spacing[f]!=null||typeof e.direction=="object"&&e.direction[f]!=null)&&(c[f]=!0),c),{}),o=ap({values:e.direction,base:i}),s=ap({values:e.spacing,base:i});typeof o=="object"&&Object.keys(o).forEach((c,f,p)=>{if(!o[c]){const g=f>0?o[p[f-1]]:"column";o[c]=g}}),n=xr(n,hi({theme:t},s,(c,f)=>({"& > :not(style) + :not(style)":{margin:0,[`margin${OU(f?o[f]:e.direction)}`]:es(r,c)}})))}return n=FT(t.breakpoints,n),n};function dR(e={}){const{createStyledComponent:t=kU,useThemeProps:n=CU,componentName:r="MuiStack"}=e,i=()=>wt({root:["root"]},c=>tt(r,c),{}),o=t(_U);return T.exports.forwardRef(function(c,f){const p=n(c),h=qc(p),{component:g="div",direction:v="column",spacing:y=0,divider:b,children:C,className:x}=h,w=ke(h,wU),S={direction:v,spacing:y},E=i();return N(o,z({as:g,ownerState:S,ref:f,className:De(E.root,x)},w,{children:b?EU(C,b):C}))})}const PU=dR(),TU=PU;function IU(e){return tt("MuiStack",e)}const RU=ct("MuiStack",["root"]),AU=RU,MU=Object.freeze(Object.defineProperty({__proto__:null,css:PT,keyframes:Zh,GlobalStyles:op,StyledEngineProvider:VB,borders:Px,breakpoints:Pj,handleBreakpoints:hi,mergeBreakpointsInOrder:FT,unstable_resolveBreakpointValues:ap,compose:uo,display:Tx,flexbox:Ix,grid:Rx,palette:Mx,positions:$x,shadows:Dx,sizing:Lx,spacing:Vc,style:he,getPath:tm,getStyleValue:cy,typography:Fx,unstable_styleFunctionSx:sm,unstable_createStyleFunctionSx:VI,unstable_extendSxProp:qc,experimental_sx:tW,unstable_getThemeValue:Xj,Box:ZI,createBox:jx,createStyled:Wx,styled:lm,createTheme:ts,createBreakpoints:YI,createSpacing:XI,shape:KI,useThemeProps:Yc,getThemeProps:tR,useTheme:Il,useThemeWithoutDefault:Bx,ThemeProvider:Hx,unstable_createCssVarsProvider:BW,unstable_createGetCssVar:jW,responsivePropType:KB,createContainer:cR,Container:YW,Unstable_Grid:hU,Stack:TU,border:jT,borderTop:WT,borderRight:UT,borderBottom:HT,borderLeft:VT,borderColor:GT,borderTopColor:qT,borderRightColor:YT,borderBottomColor:KT,borderLeftColor:XT,borderRadius:rm,flexBasis:QT,flexDirection:ZT,flexWrap:JT,justifyContent:eI,alignItems:tI,alignContent:nI,order:rI,flex:iI,flexGrow:oI,flexShrink:aI,alignSelf:sI,justifyItems:lI,justifySelf:uI,gap:im,columnGap:om,rowGap:am,gridColumn:cI,gridRow:fI,gridAutoFlow:dI,gridAutoColumns:pI,gridAutoRows:hI,gridTemplateColumns:mI,gridTemplateRows:gI,gridTemplateAreas:vI,gridArea:yI,color:xI,bgcolor:bI,backgroundColor:wI,position:SI,zIndex:kI,top:CI,right:EI,bottom:OI,left:_I,width:PI,maxWidth:Nx,minWidth:TI,height:II,maxHeight:RI,minHeight:AI,sizeWidth:Gj,sizeHeight:qj,boxSizing:MI,createUnaryUnit:Tl,createUnarySpacing:nm,getValue:es,getStyleFromPropValue:BT,margin:Ox,padding:_x,fontFamily:$I,fontSize:DI,fontStyle:NI,fontWeight:LI,letterSpacing:FI,textTransform:zI,lineHeight:BI,textAlign:jI,typographyVariant:WI,shouldForwardProp:Zu,systemDefaultTheme:eR,hexToRgb:nR,decomposeColor:Ai,colorChannel:rR,private_safeColorChannel:EW,recomposeColor:Kc,rgbToHex:OW,hslToRgb:iR,getLuminance:Kp,getContrastRatio:oR,alpha:yn,private_safeAlpha:_W,darken:ml,private_safeDarken:PW,lighten:gl,private_safeLighten:TW,emphasize:aR,private_safeEmphasize:sR,containerClasses:QW,getContainerUtilityClass:KW,createGrid:fR,gridClasses:bU,getGridUtilityClass:mU,createStack:dR,stackClasses:AU,getStackUtilityClass:IU},Symbol.toStringTag,{value:"Module"})),$U=Object.freeze(Object.defineProperty({__proto__:null,default:tt},Symbol.toStringTag,{value:"Module"}));function DU(e,t){return z({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}const NU=["mode","contrastThreshold","tonalOffset"],iC={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:_c.white,default:_c.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Tv={text:{primary:_c.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:_c.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function oC(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=gl(e.main,i):t==="dark"&&(e.dark=ml(e.main,o)))}function LU(e="light"){return e==="dark"?{main:Ss[200],light:Ss[50],dark:Ss[400]}:{main:Ss[700],light:Ss[400],dark:Ss[800]}}function FU(e="light"){return e==="dark"?{main:ws[200],light:ws[50],dark:ws[400]}:{main:ws[500],light:ws[300],dark:ws[700]}}function zU(e="light"){return e==="dark"?{main:bs[500],light:bs[300],dark:bs[700]}:{main:bs[700],light:bs[400],dark:bs[800]}}function BU(e="light"){return e==="dark"?{main:ks[400],light:ks[300],dark:ks[700]}:{main:ks[700],light:ks[500],dark:ks[900]}}function jU(e="light"){return e==="dark"?{main:Cs[400],light:Cs[300],dark:Cs[700]}:{main:Cs[800],light:Cs[500],dark:Cs[900]}}function WU(e="light"){return e==="dark"?{main:pu[400],light:pu[300],dark:pu[700]}:{main:"#ed6c02",light:pu[500],dark:pu[900]}}function UU(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=ke(e,NU),o=e.primary||LU(t),s=e.secondary||FU(t),u=e.error||zU(t),c=e.info||BU(t),f=e.success||jU(t),p=e.warning||WU(t);function h(b){return oR(b,Tv.text.primary)>=n?Tv.text.primary:iC.text.primary}const g=({color:b,name:C,mainShade:x=500,lightShade:w=300,darkShade:S=700})=>{if(b=z({},b),!b.main&&b[x]&&(b.main=b[x]),!b.hasOwnProperty("main"))throw new Error(Qo(11,C?` (${C})`:"",x));if(typeof b.main!="string")throw new Error(Qo(12,C?` (${C})`:"",JSON.stringify(b.main)));return oC(b,"light",w,r),oC(b,"dark",S,r),b.contrastText||(b.contrastText=h(b.main)),b},v={dark:Tv,light:iC};return xr(z({common:z({},_c),mode:t,primary:g({color:o,name:"primary"}),secondary:g({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:g({color:u,name:"error"}),warning:g({color:p,name:"warning"}),info:g({color:c,name:"info"}),success:g({color:f,name:"success"}),grey:q7,contrastThreshold:n,getContrastText:h,augmentColor:g,tonalOffset:r},v[t]),i)}const HU=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function VU(e){return Math.round(e*1e5)/1e5}const aC={textTransform:"uppercase"},sC='"Roboto", "Helvetica", "Arial", sans-serif';function GU(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=sC,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:u=500,fontWeightBold:c=700,htmlFontSize:f=16,allVariants:p,pxToRem:h}=n,g=ke(n,HU),v=i/14,y=h||(x=>`${x/f*v}rem`),b=(x,w,S,E,I)=>z({fontFamily:r,fontWeight:x,fontSize:y(w),lineHeight:S},r===sC?{letterSpacing:`${VU(E/w)}em`}:{},I,p),C={h1:b(o,96,1.167,-1.5),h2:b(o,60,1.2,-.5),h3:b(s,48,1.167,0),h4:b(s,34,1.235,.25),h5:b(s,24,1.334,0),h6:b(u,20,1.6,.15),subtitle1:b(s,16,1.75,.15),subtitle2:b(u,14,1.57,.1),body1:b(s,16,1.5,.15),body2:b(s,14,1.43,.15),button:b(u,14,1.75,.4,aC),caption:b(s,12,1.66,.4),overline:b(s,12,2.66,1,aC)};return xr(z({htmlFontSize:f,pxToRem:y,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:u,fontWeightBold:c},C),g,{clone:!1})}const qU=.2,YU=.14,KU=.12;function At(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${qU})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${YU})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${KU})`].join(",")}const XU=["none",At(0,2,1,-1,0,1,1,0,0,1,3,0),At(0,3,1,-2,0,2,2,0,0,1,5,0),At(0,3,3,-2,0,3,4,0,0,1,8,0),At(0,2,4,-1,0,4,5,0,0,1,10,0),At(0,3,5,-1,0,5,8,0,0,1,14,0),At(0,3,5,-1,0,6,10,0,0,1,18,0),At(0,4,5,-2,0,7,10,1,0,2,16,1),At(0,5,5,-3,0,8,10,1,0,3,14,2),At(0,5,6,-3,0,9,12,1,0,3,16,2),At(0,6,6,-3,0,10,14,1,0,4,18,3),At(0,6,7,-4,0,11,15,1,0,4,20,3),At(0,7,8,-4,0,12,17,2,0,5,22,4),At(0,7,8,-4,0,13,19,2,0,5,24,4),At(0,7,9,-4,0,14,21,2,0,5,26,4),At(0,8,9,-5,0,15,22,2,0,6,28,5),At(0,8,10,-5,0,16,24,2,0,6,30,5),At(0,8,11,-5,0,17,26,2,0,6,32,5),At(0,9,11,-5,0,18,28,2,0,7,34,6),At(0,9,12,-6,0,19,29,2,0,7,36,6),At(0,10,13,-6,0,20,31,3,0,8,38,7),At(0,10,13,-6,0,21,33,3,0,8,40,7),At(0,10,14,-6,0,22,35,3,0,8,42,7),At(0,11,14,-7,0,23,36,3,0,9,44,8),At(0,11,15,-7,0,24,38,3,0,9,46,8)],QU=XU,ZU=["duration","easing","delay"],JU={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},eH={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function lC(e){return`${Math.round(e)}ms`}function tH(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function nH(e){const t=z({},JU,e.easing),n=z({},eH,e.duration);return z({getAutoHeightDuration:tH,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:u=t.easeInOut,delay:c=0}=o;return ke(o,ZU),(Array.isArray(i)?i:[i]).map(f=>`${f} ${typeof s=="string"?s:lC(s)} ${u} ${typeof c=="string"?c:lC(c)}`).join(",")}},e,{easing:t,duration:n})}const rH={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},iH=rH,oH=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function qx(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=ke(e,oH);if(e.vars)throw new Error(Qo(18));const u=UU(r),c=ts(e);let f=xr(c,{mixins:DU(c.breakpoints,n),palette:u,shadows:QU.slice(),typography:GU(u,o),transitions:nH(i),zIndex:z({},iH)});return f=xr(f,s),f=t.reduce((p,h)=>xr(p,h),f),f}const aH=qx(),Yx=aH;function ns(){return Il(Yx)}function Bt({props:e,name:t}){return Yc({props:e,name:t,defaultTheme:Yx})}const um=e=>Zu(e)&&e!=="classes",sH=Wx({defaultTheme:Yx,rootShouldForwardProp:um}),Fe=sH,lH=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)},uC=lH;function pR(e){return typeof e=="string"}function Lu(e,t,n){return e===void 0||pR(e)?t:z({},t,{ownerState:z({},t.ownerState,n)})}function uH(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function fy(e,t){return typeof e=="function"?e(t):e}function cC(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function cH(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const v=De(i?.className,r?.className,o,n?.className),y=z({},n?.style,i?.style,r?.style),b=z({},n,i,r);return v.length>0&&(b.className=v),Object.keys(y).length>0&&(b.style=y),{props:b,internalRef:void 0}}const s=uH(z({},i,r)),u=cC(r),c=cC(i),f=t(s),p=De(f?.className,n?.className,o,i?.className,r?.className),h=z({},f?.style,n?.style,i?.style,r?.style),g=z({},f,n,c,u);return p.length>0&&(g.className=p),Object.keys(h).length>0&&(g.style=h),{props:g,internalRef:f.ref}}const fH=["elementType","externalSlotProps","ownerState"];function dy(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i}=e,o=ke(e,fH),s=fy(r,i),{props:u,internalRef:c}=cH(z({},o,{externalSlotProps:s})),f=Sn(c,s?.ref,(t=e.additionalProps)==null?void 0:t.ref);return Lu(n,z({},u,{ref:f}),i)}function fC(e){return e.substring(2).toLowerCase()}function dH(e,t){return t.documentElement.clientWidth(setTimeout(()=>{c.current=!0},0),()=>{c.current=!1}),[]);const p=Sn(t.ref,u),h=ui(y=>{const b=f.current;f.current=!1;const C=bn(u.current);if(!c.current||!u.current||"clientX"in y&&dH(y,C))return;if(s.current){s.current=!1;return}let x;y.composedPath?x=y.composedPath().indexOf(u.current)>-1:x=!C.documentElement.contains(y.target)||u.current.contains(y.target),!x&&(n||!b)&&i(y)}),g=y=>b=>{f.current=!0;const C=t.props[y];C&&C(b)},v={ref:p};return o!==!1&&(v[o]=g(o)),T.exports.useEffect(()=>{if(o!==!1){const y=fC(o),b=bn(u.current),C=()=>{s.current=!0};return b.addEventListener(y,h),b.addEventListener("touchmove",C),()=>{b.removeEventListener(y,h),b.removeEventListener("touchmove",C)}}},[h,o]),r!==!1&&(v[r]=g(r)),T.exports.useEffect(()=>{if(r!==!1){const y=fC(r),b=bn(u.current);return b.addEventListener(y,h),()=>{b.removeEventListener(y,h)}}},[h,r]),N(T.exports.Fragment,{children:T.exports.cloneElement(t,v)})}const hH=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function mH(e){const t=parseInt(e.getAttribute("tabindex"),10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function gH(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function vH(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||gH(e))}function yH(e){const t=[],n=[];return Array.from(e.querySelectorAll(hH)).forEach((r,i)=>{const o=mH(r);o===-1||!vH(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function xH(){return!0}function bH(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=yH,isEnabled:s=xH,open:u}=e,c=T.exports.useRef(),f=T.exports.useRef(null),p=T.exports.useRef(null),h=T.exports.useRef(null),g=T.exports.useRef(null),v=T.exports.useRef(!1),y=T.exports.useRef(null),b=Sn(t.ref,y),C=T.exports.useRef(null);T.exports.useEffect(()=>{!u||!y.current||(v.current=!n)},[n,u]),T.exports.useEffect(()=>{if(!u||!y.current)return;const S=bn(y.current);return y.current.contains(S.activeElement)||(y.current.hasAttribute("tabIndex")||y.current.setAttribute("tabIndex",-1),v.current&&y.current.focus()),()=>{i||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}},[u]),T.exports.useEffect(()=>{if(!u||!y.current)return;const S=bn(y.current),E=R=>{const{current:D}=y;if(D!==null){if(!S.hasFocus()||r||!s()||c.current){c.current=!1;return}if(!D.contains(S.activeElement)){if(R&&g.current!==R.target||S.activeElement!==g.current)g.current=null;else if(g.current!==null)return;if(!v.current)return;let B=[];if((S.activeElement===f.current||S.activeElement===p.current)&&(B=o(y.current)),B.length>0){var W,L;const Y=Boolean(((W=C.current)==null?void 0:W.shiftKey)&&((L=C.current)==null?void 0:L.key)==="Tab"),Z=B[0],re=B[B.length-1];Y?re.focus():Z.focus()}else D.focus()}}},I=R=>{C.current=R,!(r||!s()||R.key!=="Tab")&&S.activeElement===y.current&&R.shiftKey&&(c.current=!0,p.current.focus())};S.addEventListener("focusin",E),S.addEventListener("keydown",I,!0);const _=setInterval(()=>{S.activeElement.tagName==="BODY"&&E()},50);return()=>{clearInterval(_),S.removeEventListener("focusin",E),S.removeEventListener("keydown",I,!0)}},[n,r,i,s,u,o]);const x=S=>{h.current===null&&(h.current=S.relatedTarget),v.current=!0,g.current=S.target;const E=t.props.onFocus;E&&E(S)},w=S=>{h.current===null&&(h.current=S.relatedTarget),v.current=!0};return ge(T.exports.Fragment,{children:[N("div",{tabIndex:u?0:-1,onFocus:w,ref:f,"data-testid":"sentinelStart"}),T.exports.cloneElement(t,{ref:b,onFocus:x}),N("div",{tabIndex:u?0:-1,onFocus:w,ref:p,"data-testid":"sentinelEnd"})]})}var Jn="top",Yr="bottom",Kr="right",er="left",Kx="auto",Xc=[Jn,Yr,Kr,er],vl="start",Rc="end",wH="clippingParents",hR="viewport",vu="popper",SH="reference",dC=Xc.reduce(function(e,t){return e.concat([t+"-"+vl,t+"-"+Rc])},[]),mR=[].concat(Xc,[Kx]).reduce(function(e,t){return e.concat([t,t+"-"+vl,t+"-"+Rc])},[]),kH="beforeRead",CH="read",EH="afterRead",OH="beforeMain",_H="main",PH="afterMain",TH="beforeWrite",IH="write",RH="afterWrite",AH=[kH,CH,EH,OH,_H,PH,TH,IH,RH];function Mi(e){return e?(e.nodeName||"").toLowerCase():null}function Qr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qa(e){var t=Qr(e).Element;return e instanceof t||e instanceof Element}function Ur(e){var t=Qr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Xx(e){if(typeof ShadowRoot>"u")return!1;var t=Qr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function MH(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Ur(o)||!Mi(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(s){var u=i[s];u===!1?o.removeAttribute(s):o.setAttribute(s,u===!0?"":u)}))})}function $H(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},s=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),u=s.reduce(function(c,f){return c[f]="",c},{});!Ur(i)||!Mi(i)||(Object.assign(i.style,u),Object.keys(o).forEach(function(c){i.removeAttribute(c)}))})}}const DH={name:"applyStyles",enabled:!0,phase:"write",fn:MH,effect:$H,requires:["computeStyles"]};function Ri(e){return e.split("-")[0]}var Fa=Math.max,Xp=Math.min,yl=Math.round;function py(){var e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function gR(){return!/^((?!chrome|android).)*safari/i.test(py())}function xl(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Ur(e)&&(i=e.offsetWidth>0&&yl(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&yl(r.height)/e.offsetHeight||1);var s=qa(e)?Qr(e):window,u=s.visualViewport,c=!gR()&&n,f=(r.left+(c&&u?u.offsetLeft:0))/i,p=(r.top+(c&&u?u.offsetTop:0))/o,h=r.width/i,g=r.height/o;return{width:h,height:g,top:p,right:f+h,bottom:p+g,left:f,x:f,y:p}}function Qx(e){var t=xl(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function vR(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Xx(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function ro(e){return Qr(e).getComputedStyle(e)}function NH(e){return["table","td","th"].indexOf(Mi(e))>=0}function sa(e){return((qa(e)?e.ownerDocument:e.document)||window.document).documentElement}function cm(e){return Mi(e)==="html"?e:e.assignedSlot||e.parentNode||(Xx(e)?e.host:null)||sa(e)}function pC(e){return!Ur(e)||ro(e).position==="fixed"?null:e.offsetParent}function LH(e){var t=/firefox/i.test(py()),n=/Trident/i.test(py());if(n&&Ur(e)){var r=ro(e);if(r.position==="fixed")return null}var i=cm(e);for(Xx(i)&&(i=i.host);Ur(i)&&["html","body"].indexOf(Mi(i))<0;){var o=ro(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Qc(e){for(var t=Qr(e),n=pC(e);n&&NH(n)&&ro(n).position==="static";)n=pC(n);return n&&(Mi(n)==="html"||Mi(n)==="body"&&ro(n).position==="static")?t:n||LH(e)||t}function Zx(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Ju(e,t,n){return Fa(e,Xp(t,n))}function FH(e,t,n){var r=Ju(e,t,n);return r>n?n:r}function yR(){return{top:0,right:0,bottom:0,left:0}}function xR(e){return Object.assign({},yR(),e)}function bR(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var zH=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,xR(typeof t!="number"?t:bR(t,Xc))};function BH(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,u=Ri(n.placement),c=Zx(u),f=[er,Kr].indexOf(u)>=0,p=f?"height":"width";if(!(!o||!s)){var h=zH(i.padding,n),g=Qx(o),v=c==="y"?Jn:er,y=c==="y"?Yr:Kr,b=n.rects.reference[p]+n.rects.reference[c]-s[c]-n.rects.popper[p],C=s[c]-n.rects.reference[c],x=Qc(o),w=x?c==="y"?x.clientHeight||0:x.clientWidth||0:0,S=b/2-C/2,E=h[v],I=w-g[p]-h[y],_=w/2-g[p]/2+S,R=Ju(E,_,I),D=c;n.modifiersData[r]=(t={},t[D]=R,t.centerOffset=R-_,t)}}function jH(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||!vR(t.elements.popper,i)||(t.elements.arrow=i))}const WH={name:"arrow",enabled:!0,phase:"main",fn:BH,effect:jH,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function bl(e){return e.split("-")[1]}var UH={top:"auto",right:"auto",bottom:"auto",left:"auto"};function HH(e){var t=e.x,n=e.y,r=window,i=r.devicePixelRatio||1;return{x:yl(t*i)/i||0,y:yl(n*i)/i||0}}function hC(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,s=e.offsets,u=e.position,c=e.gpuAcceleration,f=e.adaptive,p=e.roundOffsets,h=e.isFixed,g=s.x,v=g===void 0?0:g,y=s.y,b=y===void 0?0:y,C=typeof p=="function"?p({x:v,y:b}):{x:v,y:b};v=C.x,b=C.y;var x=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),S=er,E=Jn,I=window;if(f){var _=Qc(n),R="clientHeight",D="clientWidth";if(_===Qr(n)&&(_=sa(n),ro(_).position!=="static"&&u==="absolute"&&(R="scrollHeight",D="scrollWidth")),_=_,i===Jn||(i===er||i===Kr)&&o===Rc){E=Yr;var W=h&&_===I&&I.visualViewport?I.visualViewport.height:_[R];b-=W-r.height,b*=c?1:-1}if(i===er||(i===Jn||i===Yr)&&o===Rc){S=Kr;var L=h&&_===I&&I.visualViewport?I.visualViewport.width:_[D];v-=L-r.width,v*=c?1:-1}}var B=Object.assign({position:u},f&&UH),Y=p===!0?HH({x:v,y:b}):{x:v,y:b};if(v=Y.x,b=Y.y,c){var Z;return Object.assign({},B,(Z={},Z[E]=w?"0":"",Z[S]=x?"0":"",Z.transform=(I.devicePixelRatio||1)<=1?"translate("+v+"px, "+b+"px)":"translate3d("+v+"px, "+b+"px, 0)",Z))}return Object.assign({},B,(t={},t[E]=w?b+"px":"",t[S]=x?v+"px":"",t.transform="",t))}function VH(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,s=o===void 0?!0:o,u=n.roundOffsets,c=u===void 0?!0:u,f={placement:Ri(t.placement),variation:bl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,hC(Object.assign({},f,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,hC(Object.assign({},f,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const GH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:VH,data:{}};var kd={passive:!0};function qH(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,s=r.resize,u=s===void 0?!0:s,c=Qr(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&f.forEach(function(p){p.addEventListener("scroll",n.update,kd)}),u&&c.addEventListener("resize",n.update,kd),function(){o&&f.forEach(function(p){p.removeEventListener("scroll",n.update,kd)}),u&&c.removeEventListener("resize",n.update,kd)}}const YH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:qH,data:{}};var KH={left:"right",right:"left",bottom:"top",top:"bottom"};function sp(e){return e.replace(/left|right|bottom|top/g,function(t){return KH[t]})}var XH={start:"end",end:"start"};function mC(e){return e.replace(/start|end/g,function(t){return XH[t]})}function Jx(e){var t=Qr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function eb(e){return xl(sa(e)).left+Jx(e).scrollLeft}function QH(e,t){var n=Qr(e),r=sa(e),i=n.visualViewport,o=r.clientWidth,s=r.clientHeight,u=0,c=0;if(i){o=i.width,s=i.height;var f=gR();(f||!f&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}return{width:o,height:s,x:u+eb(e),y:c}}function ZH(e){var t,n=sa(e),r=Jx(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Fa(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),s=Fa(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),u=-r.scrollLeft+eb(e),c=-r.scrollTop;return ro(i||n).direction==="rtl"&&(u+=Fa(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:s,x:u,y:c}}function tb(e){var t=ro(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function wR(e){return["html","body","#document"].indexOf(Mi(e))>=0?e.ownerDocument.body:Ur(e)&&tb(e)?e:wR(cm(e))}function ec(e,t){var n;t===void 0&&(t=[]);var r=wR(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Qr(r),s=i?[o].concat(o.visualViewport||[],tb(r)?r:[]):r,u=t.concat(s);return i?u:u.concat(ec(cm(s)))}function hy(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function JH(e,t){var n=xl(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function gC(e,t,n){return t===hR?hy(QH(e,n)):qa(t)?JH(t,n):hy(ZH(sa(e)))}function eV(e){var t=ec(cm(e)),n=["absolute","fixed"].indexOf(ro(e).position)>=0,r=n&&Ur(e)?Qc(e):e;return qa(r)?t.filter(function(i){return qa(i)&&vR(i,r)&&Mi(i)!=="body"}):[]}function tV(e,t,n,r){var i=t==="clippingParents"?eV(e):[].concat(t),o=[].concat(i,[n]),s=o[0],u=o.reduce(function(c,f){var p=gC(e,f,r);return c.top=Fa(p.top,c.top),c.right=Xp(p.right,c.right),c.bottom=Xp(p.bottom,c.bottom),c.left=Fa(p.left,c.left),c},gC(e,s,r));return u.width=u.right-u.left,u.height=u.bottom-u.top,u.x=u.left,u.y=u.top,u}function SR(e){var t=e.reference,n=e.element,r=e.placement,i=r?Ri(r):null,o=r?bl(r):null,s=t.x+t.width/2-n.width/2,u=t.y+t.height/2-n.height/2,c;switch(i){case Jn:c={x:s,y:t.y-n.height};break;case Yr:c={x:s,y:t.y+t.height};break;case Kr:c={x:t.x+t.width,y:u};break;case er:c={x:t.x-n.width,y:u};break;default:c={x:t.x,y:t.y}}var f=i?Zx(i):null;if(f!=null){var p=f==="y"?"height":"width";switch(o){case vl:c[f]=c[f]-(t[p]/2-n[p]/2);break;case Rc:c[f]=c[f]+(t[p]/2-n[p]/2);break}}return c}function Ac(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,s=o===void 0?e.strategy:o,u=n.boundary,c=u===void 0?wH:u,f=n.rootBoundary,p=f===void 0?hR:f,h=n.elementContext,g=h===void 0?vu:h,v=n.altBoundary,y=v===void 0?!1:v,b=n.padding,C=b===void 0?0:b,x=xR(typeof C!="number"?C:bR(C,Xc)),w=g===vu?SH:vu,S=e.rects.popper,E=e.elements[y?w:g],I=tV(qa(E)?E:E.contextElement||sa(e.elements.popper),c,p,s),_=xl(e.elements.reference),R=SR({reference:_,element:S,strategy:"absolute",placement:i}),D=hy(Object.assign({},S,R)),W=g===vu?D:_,L={top:I.top-W.top+x.top,bottom:W.bottom-I.bottom+x.bottom,left:I.left-W.left+x.left,right:W.right-I.right+x.right},B=e.modifiersData.offset;if(g===vu&&B){var Y=B[i];Object.keys(L).forEach(function(Z){var re=[Kr,Yr].indexOf(Z)>=0?1:-1,te=[Jn,Yr].indexOf(Z)>=0?"y":"x";L[Z]+=Y[te]*re})}return L}function nV(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,u=n.flipVariations,c=n.allowedAutoPlacements,f=c===void 0?mR:c,p=bl(r),h=p?u?dC:dC.filter(function(y){return bl(y)===p}):Xc,g=h.filter(function(y){return f.indexOf(y)>=0});g.length===0&&(g=h);var v=g.reduce(function(y,b){return y[b]=Ac(e,{placement:b,boundary:i,rootBoundary:o,padding:s})[Ri(b)],y},{});return Object.keys(v).sort(function(y,b){return v[y]-v[b]})}function rV(e){if(Ri(e)===Kx)return[];var t=sp(e);return[mC(e),t,mC(t)]}function iV(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,u=s===void 0?!0:s,c=n.fallbackPlacements,f=n.padding,p=n.boundary,h=n.rootBoundary,g=n.altBoundary,v=n.flipVariations,y=v===void 0?!0:v,b=n.allowedAutoPlacements,C=t.options.placement,x=Ri(C),w=x===C,S=c||(w||!y?[sp(C)]:rV(C)),E=[C].concat(S).reduce(function(xe,Se){return xe.concat(Ri(Se)===Kx?nV(t,{placement:Se,boundary:p,rootBoundary:h,padding:f,flipVariations:y,allowedAutoPlacements:b}):Se)},[]),I=t.rects.reference,_=t.rects.popper,R=new Map,D=!0,W=E[0],L=0;L=0,te=re?"width":"height",oe=Ac(t,{placement:B,boundary:p,rootBoundary:h,altBoundary:g,padding:f}),le=re?Z?Kr:er:Z?Yr:Jn;I[te]>_[te]&&(le=sp(le));var H=sp(le),Q=[];if(o&&Q.push(oe[Y]<=0),u&&Q.push(oe[le]<=0,oe[H]<=0),Q.every(function(xe){return xe})){W=B,D=!1;break}R.set(B,Q)}if(D)for(var K=y?3:1,A=function(Se){var me=E.find(function(Ae){var Pe=R.get(Ae);if(Pe)return Pe.slice(0,Se).every(function(de){return de})});if(me)return W=me,"break"},M=K;M>0;M--){var we=A(M);if(we==="break")break}t.placement!==W&&(t.modifiersData[r]._skip=!0,t.placement=W,t.reset=!0)}}const oV={name:"flip",enabled:!0,phase:"main",fn:iV,requiresIfExists:["offset"],data:{_skip:!1}};function vC(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function yC(e){return[Jn,Kr,Yr,er].some(function(t){return e[t]>=0})}function aV(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,s=Ac(t,{elementContext:"reference"}),u=Ac(t,{altBoundary:!0}),c=vC(s,r),f=vC(u,i,o),p=yC(c),h=yC(f);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}const sV={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:aV};function lV(e,t,n){var r=Ri(e),i=[er,Jn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,s=o[0],u=o[1];return s=s||0,u=(u||0)*i,[er,Kr].indexOf(r)>=0?{x:u,y:s}:{x:s,y:u}}function uV(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,s=mR.reduce(function(p,h){return p[h]=lV(h,t.rects,o),p},{}),u=s[t.placement],c=u.x,f=u.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=f),t.modifiersData[r]=s}const cV={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uV};function fV(e){var t=e.state,n=e.name;t.modifiersData[n]=SR({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const dV={name:"popperOffsets",enabled:!0,phase:"read",fn:fV,data:{}};function pV(e){return e==="x"?"y":"x"}function hV(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,s=n.altAxis,u=s===void 0?!1:s,c=n.boundary,f=n.rootBoundary,p=n.altBoundary,h=n.padding,g=n.tether,v=g===void 0?!0:g,y=n.tetherOffset,b=y===void 0?0:y,C=Ac(t,{boundary:c,rootBoundary:f,padding:h,altBoundary:p}),x=Ri(t.placement),w=bl(t.placement),S=!w,E=Zx(x),I=pV(E),_=t.modifiersData.popperOffsets,R=t.rects.reference,D=t.rects.popper,W=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,L=typeof W=="number"?{mainAxis:W,altAxis:W}:Object.assign({mainAxis:0,altAxis:0},W),B=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,Y={x:0,y:0};if(!!_){if(o){var Z,re=E==="y"?Jn:er,te=E==="y"?Yr:Kr,oe=E==="y"?"height":"width",le=_[E],H=le+C[re],Q=le-C[te],K=v?-D[oe]/2:0,A=w===vl?R[oe]:D[oe],M=w===vl?-D[oe]:-R[oe],we=t.elements.arrow,xe=v&&we?Qx(we):{width:0,height:0},Se=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:yR(),me=Se[re],Ae=Se[te],Pe=Ju(0,R[oe],xe[oe]),de=S?R[oe]/2-K-Pe-me-L.mainAxis:A-Pe-me-L.mainAxis,We=S?-R[oe]/2+K+Pe+Ae+L.mainAxis:M+Pe+Ae+L.mainAxis,Ie=t.elements.arrow&&Qc(t.elements.arrow),qt=Ie?E==="y"?Ie.clientTop||0:Ie.clientLeft||0:0,Yt=(Z=B?.[E])!=null?Z:0,it=le+de-Yt-qt,dt=le+We-Yt,kn=Ju(v?Xp(H,it):H,le,v?Fa(Q,dt):Q);_[E]=kn,Y[E]=kn-le}if(u){var pt,ot=E==="x"?Jn:er,Wn=E==="x"?Yr:Kr,Ze=_[I],Qe=I==="y"?"height":"width",Kt=Ze+C[ot],ln=Ze-C[Wn],Xt=[Jn,er].indexOf(x)!==-1,ht=(pt=B?.[I])!=null?pt:0,Dt=Xt?Kt:Ze-R[Qe]-D[Qe]-ht+L.altAxis,vt=Xt?Ze+R[Qe]+D[Qe]-ht-L.altAxis:ln,V=v&&Xt?FH(Dt,Ze,vt):Ju(v?Dt:Kt,Ze,v?vt:ln);_[I]=V,Y[I]=V-Ze}t.modifiersData[r]=Y}}const mV={name:"preventOverflow",enabled:!0,phase:"main",fn:hV,requiresIfExists:["offset"]};function gV(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vV(e){return e===Qr(e)||!Ur(e)?Jx(e):gV(e)}function yV(e){var t=e.getBoundingClientRect(),n=yl(t.width)/e.offsetWidth||1,r=yl(t.height)/e.offsetHeight||1;return n!==1||r!==1}function xV(e,t,n){n===void 0&&(n=!1);var r=Ur(t),i=Ur(t)&&yV(t),o=sa(t),s=xl(e,i,n),u={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((Mi(t)!=="body"||tb(o))&&(u=vV(t)),Ur(t)?(c=xl(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):o&&(c.x=eb(o))),{x:s.left+u.scrollLeft-c.x,y:s.top+u.scrollTop-c.y,width:s.width,height:s.height}}function bV(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var s=[].concat(o.requires||[],o.requiresIfExists||[]);s.forEach(function(u){if(!n.has(u)){var c=t.get(u);c&&i(c)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function wV(e){var t=bV(e);return AH.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function SV(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function kV(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var xC={placement:"bottom",modifiers:[],strategy:"absolute"};function bC(){for(var e=arguments.length,t=new Array(e),n=0;n{o||u(_V(i)||document.body)},[i,o]),Jo(()=>{if(s&&!o)return Yp(n,s),()=>{Yp(n,null)}},[n,s,o]),o?T.exports.isValidElement(r)?T.exports.cloneElement(r,{ref:c}):r:N(T.exports.Fragment,{children:s&&Xa.exports.createPortal(r,s)})}),kR=PV;function TV(e){return tt("MuiPopperUnstyled",e)}ct("MuiPopperUnstyled",["root"]);const IV=["anchorEl","children","component","direction","disablePortal","modifiers","open","ownerState","placement","popperOptions","popperRef","slotProps","slots","TransitionProps"],RV=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition"];function AV(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function my(e){return typeof e=="function"?e():e}const MV=()=>wt({root:["root"]},TV,{}),$V={},DV=T.exports.forwardRef(function(t,n){var r;const{anchorEl:i,children:o,component:s,direction:u,disablePortal:c,modifiers:f,open:p,ownerState:h,placement:g,popperOptions:v,popperRef:y,slotProps:b={},slots:C={},TransitionProps:x}=t,w=ke(t,IV),S=T.exports.useRef(null),E=Sn(S,n),I=T.exports.useRef(null),_=Sn(I,y),R=T.exports.useRef(_);Jo(()=>{R.current=_},[_]),T.exports.useImperativeHandle(y,()=>I.current,[]);const D=AV(g,u),[W,L]=T.exports.useState(D);T.exports.useEffect(()=>{I.current&&I.current.forceUpdate()}),Jo(()=>{if(!i||!p)return;const te=H=>{L(H.placement)};my(i);let oe=[{name:"preventOverflow",options:{altBoundary:c}},{name:"flip",options:{altBoundary:c}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:H})=>{te(H)}}];f!=null&&(oe=oe.concat(f)),v&&v.modifiers!=null&&(oe=oe.concat(v.modifiers));const le=OV(my(i),S.current,z({placement:D},v,{modifiers:oe}));return R.current(le),()=>{le.destroy(),R.current(null)}},[i,c,f,p,v,D]);const B={placement:W};x!==null&&(B.TransitionProps=x);const Y=MV(),Z=(r=s??C.root)!=null?r:"div",re=dy({elementType:Z,externalSlotProps:b.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:E},ownerState:z({},t,h),className:Y.root});return N(Z,z({},re,{children:typeof o=="function"?o(B):o}))}),NV=T.exports.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:s="ltr",disablePortal:u=!1,keepMounted:c=!1,modifiers:f,open:p,placement:h="bottom",popperOptions:g=$V,popperRef:v,style:y,transition:b=!1}=t,C=ke(t,RV),[x,w]=T.exports.useState(!0),S=()=>{w(!1)},E=()=>{w(!0)};if(!c&&!p&&(!b||x))return null;const I=o||(r?bn(my(r)).body:void 0);return N(kR,{disablePortal:u,container:I,children:N(DV,z({anchorEl:r,direction:s,disablePortal:u,modifiers:f,ref:n,open:b?!x:p,placement:h,popperOptions:g,popperRef:v},C,{style:z({position:"fixed",top:0,left:0,display:!p&&c&&(!b||x)?"none":null},y),TransitionProps:b?{in:p,onEnter:S,onExited:E}:null,children:i}))})}),LV=NV;function FV(e){const t=bn(e);return t.body===e?Zo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function tc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function wC(e){return parseInt(Zo(e).getComputedStyle(e).paddingRight,10)||0}function zV(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function SC(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const u=o.indexOf(s)===-1,c=!zV(s);u&&c&&tc(s,i)})}function Iv(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function BV(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(FV(r)){const s=xx(bn(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${wC(r)+s}px`;const u=bn(r).querySelectorAll(".mui-fixed");[].forEach.call(u,c=>{n.push({value:c.style.paddingRight,property:"padding-right",el:c}),c.style.paddingRight=`${wC(c)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=bn(r).body;else{const s=r.parentElement,u=Zo(r);o=s?.nodeName==="HTML"&&u.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:u})=>{o?s.style.setProperty(u,o):s.style.removeProperty(u)})}}function jV(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class WV{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&tc(t.modalRef,!1);const i=jV(n);SC(n,t.mount,t.modalRef,i,!0);const o=Iv(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=Iv(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=BV(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=Iv(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&tc(t.modalRef,n),SC(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&tc(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function UV(e){return tt("MuiModal",e)}ct("MuiModal",["root","hidden"]);const HV=["children","classes","closeAfterTransition","component","container","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","manager","onBackdropClick","onClose","onKeyDown","open","onTransitionEnter","onTransitionExited","slotProps","slots"],VV=e=>{const{open:t,exited:n,classes:r}=e;return wt({root:["root",!t&&n&&"hidden"]},UV,r)};function GV(e){return typeof e=="function"?e():e}function qV(e){return e.children?e.children.props.hasOwnProperty("in"):!1}const YV=new WV,KV=T.exports.forwardRef(function(t,n){var r,i;const{children:o,classes:s,closeAfterTransition:u=!1,component:c,container:f,disableAutoFocus:p=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:g=!1,disablePortal:v=!1,disableRestoreFocus:y=!1,disableScrollLock:b=!1,hideBackdrop:C=!1,keepMounted:x=!1,manager:w=YV,onBackdropClick:S,onClose:E,onKeyDown:I,open:_,onTransitionEnter:R,onTransitionExited:D,slotProps:W={},slots:L={}}=t,B=ke(t,HV),[Y,Z]=T.exports.useState(!_),re=T.exports.useRef({}),te=T.exports.useRef(null),oe=T.exports.useRef(null),le=Sn(oe,n),H=qV(t),Q=(r=t["aria-hidden"])!=null?r:!0,K=()=>bn(te.current),A=()=>(re.current.modalRef=oe.current,re.current.mountNode=te.current,re.current),M=()=>{w.mount(A(),{disableScrollLock:b}),oe.current.scrollTop=0},we=ui(()=>{const ot=GV(f)||K().body;w.add(A(),ot),oe.current&&M()}),xe=T.exports.useCallback(()=>w.isTopModal(A()),[w]),Se=ui(ot=>{te.current=ot,ot&&(_&&xe()?M():tc(oe.current,Q))}),me=T.exports.useCallback(()=>{w.remove(A(),Q)},[w,Q]);T.exports.useEffect(()=>()=>{me()},[me]),T.exports.useEffect(()=>{_?we():(!H||!u)&&me()},[_,me,H,u,we]);const Ae=z({},t,{classes:s,closeAfterTransition:u,disableAutoFocus:p,disableEnforceFocus:h,disableEscapeKeyDown:g,disablePortal:v,disableRestoreFocus:y,disableScrollLock:b,exited:Y,hideBackdrop:C,keepMounted:x}),Pe=VV(Ae),de=()=>{Z(!1),R&&R()},We=()=>{Z(!0),D&&D(),u&&me()},Ie=ot=>{ot.target===ot.currentTarget&&(S&&S(ot),E&&E(ot,"backdropClick"))},qt=ot=>{I&&I(ot),!(ot.key!=="Escape"||!xe())&&(g||(ot.stopPropagation(),E&&E(ot,"escapeKeyDown")))},Yt={};o.props.tabIndex===void 0&&(Yt.tabIndex="-1"),H&&(Yt.onEnter=ay(de,o.props.onEnter),Yt.onExited=ay(We,o.props.onExited));const it=(i=c??L.root)!=null?i:"div",dt=dy({elementType:it,externalSlotProps:W.root,externalForwardedProps:B,additionalProps:{ref:le,role:"presentation",onKeyDown:qt},className:Pe.root,ownerState:Ae}),kn=L.backdrop,pt=dy({elementType:kn,externalSlotProps:W.backdrop,additionalProps:{"aria-hidden":!0,onClick:Ie,open:_},className:Pe.backdrop,ownerState:Ae});return!x&&!_&&(!H||Y)?null:N(kR,{ref:Se,container:f,disablePortal:v,children:ge(it,z({},dt,{children:[!C&&kn?N(kn,z({},pt)):null,N(bH,{disableEnforceFocus:h,disableAutoFocus:p,disableRestoreFocus:y,isEnabled:xe,open:_,children:T.exports.cloneElement(o,Yt)})]}))})}),XV=KV;function QV(e){return tt("MuiSvgIcon",e)}ct("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const ZV=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],JV=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Ne(t)}`,`fontSize${Ne(n)}`]};return wt(i,QV,r)},eG=Fe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ne(n.color)}`],t[`fontSize${Ne(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,u,c,f,p,h,g,v,y,b,C,x,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(o=i.duration)==null?void 0:o.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(u=s.pxToRem)==null?void 0:u.call(s,20))||"1.25rem",medium:((c=e.typography)==null||(f=c.pxToRem)==null?void 0:f.call(c,24))||"1.5rem",large:((p=e.typography)==null||(h=p.pxToRem)==null?void 0:h.call(p,35))||"2.1875rem"}[t.fontSize],color:(g=(v=(e.vars||e).palette)==null||(y=v[t.color])==null?void 0:y.main)!=null?g:{action:(b=(e.vars||e).palette)==null||(C=b.action)==null?void 0:C.active,disabled:(x=(e.vars||e).palette)==null||(w=x.action)==null?void 0:w.disabled,inherit:void 0}[t.color]}}),CR=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:u="svg",fontSize:c="medium",htmlColor:f,inheritViewBox:p=!1,titleAccess:h,viewBox:g="0 0 24 24"}=r,v=ke(r,ZV),y=z({},r,{color:s,component:u,fontSize:c,instanceFontSize:t.fontSize,inheritViewBox:p,viewBox:g}),b={};p||(b.viewBox=g);const C=JV(y);return ge(eG,z({as:u,className:De(C.root,o),focusable:"false",color:f,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},b,v,{ownerState:y,children:[i,h?N("title",{children:h}):null]}))});CR.muiName="SvgIcon";const Qp=CR;function Zc(e,t){function n(r,i){return N(Qp,z({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=Qp.muiName,T.exports.memo(T.exports.forwardRef(n))}function gy(e,t){return gy=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},gy(e,t)}function ER(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gy(e,t)}const kC={disabled:!1},Zp=Ye.createContext(null);var tG=function(t){return t.scrollTop},Fu="unmounted",_a="exited",Pa="entering",Ps="entered",vy="exiting",co=function(e){ER(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,u=s&&!s.isMounting?r.enter:r.appear,c;return o.appearStatus=null,r.in?u?(c=_a,o.appearStatus=Pa):c=Ps:r.unmountOnExit||r.mountOnEnter?c=Fu:c=_a,o.state={status:c},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Fu?{status:_a}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==Pa&&s!==Ps&&(o=Pa):(s===Pa||s===Ps)&&(o=vy)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,u;return o=s=u=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,u=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:u}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Pa){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:wd.findDOMNode(this);s&&tG(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_a&&this.setState({status:Fu})},n.performEnter=function(i){var o=this,s=this.props.enter,u=this.context?this.context.isMounting:i,c=this.props.nodeRef?[u]:[wd.findDOMNode(this),u],f=c[0],p=c[1],h=this.getTimeouts(),g=u?h.appear:h.enter;if(!i&&!s||kC.disabled){this.safeSetState({status:Ps},function(){o.props.onEntered(f)});return}this.props.onEnter(f,p),this.safeSetState({status:Pa},function(){o.props.onEntering(f,p),o.onTransitionEnd(g,function(){o.safeSetState({status:Ps},function(){o.props.onEntered(f,p)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:wd.findDOMNode(this);if(!o||kC.disabled){this.safeSetState({status:_a},function(){i.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:vy},function(){i.props.onExiting(u),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:_a},function(){i.props.onExited(u)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(u){s&&(s=!1,o.nextCallback=null,i(u))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:wd.findDOMNode(this),u=i==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var c=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],f=c[0],p=c[1];this.props.addEndListener(f,p)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Fu)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var u=ke(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Ye.createElement(Zp.Provider,{value:null},typeof s=="function"?s(i,u):Ye.cloneElement(Ye.Children.only(s),u))},t}(Ye.Component);co.contextType=Zp;co.propTypes={};function Os(){}co.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Os,onEntering:Os,onEntered:Os,onExit:Os,onExiting:Os,onExited:Os};co.UNMOUNTED=Fu;co.EXITED=_a;co.ENTERING=Pa;co.ENTERED=Ps;co.EXITING=vy;const nb=co;function nG(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rb(e,t){var n=function(o){return t&&T.exports.isValidElement(o)?t(o):o},r=Object.create(null);return e&&T.exports.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function rG(e,t){e=e||{},t=t||{};function n(p){return p in t?t[p]:e[p]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,u={};for(var c in t){if(r[c])for(s=0;se.scrollTop;function wl(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function lG(e){return tt("MuiPaper",e)}ct("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const uG=["className","component","elevation","square","variant"],cG=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return wt(o,lG,i)},fG=Fe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return z({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&z({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${yn("#fff",uC(t.elevation))}, ${yn("#fff",uC(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),dG=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:u=!1,variant:c="elevation"}=r,f=ke(r,uG),p=z({},r,{component:o,elevation:s,square:u,variant:c}),h=cG(p);return N(fG,z({as:o,ownerState:p,className:De(h.root,i),ref:n},f))}),Al=dG;function pG(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:u,onExited:c,timeout:f}=e,[p,h]=T.exports.useState(!1),g=De(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),v={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},y=De(n.child,p&&n.childLeaving,r&&n.childPulsate);return!u&&!p&&h(!0),T.exports.useEffect(()=>{if(!u&&c!=null){const b=setTimeout(c,f);return()=>{clearTimeout(b)}}},[c,u,f]),N("span",{className:g,style:v,children:N("span",{className:y})})}const hG=ct("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Dr=hG,mG=["center","classes","className"];let fm=e=>e,CC,EC,OC,_C;const yy=550,gG=80,vG=Zh(CC||(CC=fm` - 0% { - transform: scale(0); - opacity: 0.1; - } - - 100% { - transform: scale(1); - opacity: 0.3; - } -`)),yG=Zh(EC||(EC=fm` - 0% { - opacity: 1; - } - - 100% { - opacity: 0; - } -`)),xG=Zh(OC||(OC=fm` - 0% { - transform: scale(1); - } - - 50% { - transform: scale(0.92); - } - - 100% { - transform: scale(1); - } -`)),bG=Fe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),wG=Fe(pG,{name:"MuiTouchRipple",slot:"Ripple"})(_C||(_C=fm` - opacity: 0; - position: absolute; - - &.${0} { - opacity: 0.3; - transform: scale(1); - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - &.${0} { - animation-duration: ${0}ms; - } - - & .${0} { - opacity: 1; - display: block; - width: 100%; - height: 100%; - border-radius: 50%; - background-color: currentColor; - } - - & .${0} { - opacity: 0; - animation-name: ${0}; - animation-duration: ${0}ms; - animation-timing-function: ${0}; - } - - & .${0} { - position: absolute; - /* @noflip */ - left: 0px; - top: 0; - animation-name: ${0}; - animation-duration: 2500ms; - animation-timing-function: ${0}; - animation-iteration-count: infinite; - animation-delay: 200ms; - } -`),Dr.rippleVisible,vG,yy,({theme:e})=>e.transitions.easing.easeInOut,Dr.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Dr.child,Dr.childLeaving,yG,yy,({theme:e})=>e.transitions.easing.easeInOut,Dr.childPulsate,xG,({theme:e})=>e.transitions.easing.easeInOut),SG=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,u=ke(r,mG),[c,f]=T.exports.useState([]),p=T.exports.useRef(0),h=T.exports.useRef(null);T.exports.useEffect(()=>{h.current&&(h.current(),h.current=null)},[c]);const g=T.exports.useRef(!1),v=T.exports.useRef(null),y=T.exports.useRef(null),b=T.exports.useRef(null);T.exports.useEffect(()=>()=>{clearTimeout(v.current)},[]);const C=T.exports.useCallback(E=>{const{pulsate:I,rippleX:_,rippleY:R,rippleSize:D,cb:W}=E;f(L=>[...L,N(wG,{classes:{ripple:De(o.ripple,Dr.ripple),rippleVisible:De(o.rippleVisible,Dr.rippleVisible),ripplePulsate:De(o.ripplePulsate,Dr.ripplePulsate),child:De(o.child,Dr.child),childLeaving:De(o.childLeaving,Dr.childLeaving),childPulsate:De(o.childPulsate,Dr.childPulsate)},timeout:yy,pulsate:I,rippleX:_,rippleY:R,rippleSize:D},p.current)]),p.current+=1,h.current=W},[o]),x=T.exports.useCallback((E={},I={},_=()=>{})=>{const{pulsate:R=!1,center:D=i||I.pulsate,fakeElement:W=!1}=I;if(E?.type==="mousedown"&&g.current){g.current=!1;return}E?.type==="touchstart"&&(g.current=!0);const L=W?null:b.current,B=L?L.getBoundingClientRect():{width:0,height:0,left:0,top:0};let Y,Z,re;if(D||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)Y=Math.round(B.width/2),Z=Math.round(B.height/2);else{const{clientX:te,clientY:oe}=E.touches&&E.touches.length>0?E.touches[0]:E;Y=Math.round(te-B.left),Z=Math.round(oe-B.top)}if(D)re=Math.sqrt((2*B.width**2+B.height**2)/3),re%2===0&&(re+=1);else{const te=Math.max(Math.abs((L?L.clientWidth:0)-Y),Y)*2+2,oe=Math.max(Math.abs((L?L.clientHeight:0)-Z),Z)*2+2;re=Math.sqrt(te**2+oe**2)}E!=null&&E.touches?y.current===null&&(y.current=()=>{C({pulsate:R,rippleX:Y,rippleY:Z,rippleSize:re,cb:_})},v.current=setTimeout(()=>{y.current&&(y.current(),y.current=null)},gG)):C({pulsate:R,rippleX:Y,rippleY:Z,rippleSize:re,cb:_})},[i,C]),w=T.exports.useCallback(()=>{x({},{pulsate:!0})},[x]),S=T.exports.useCallback((E,I)=>{if(clearTimeout(v.current),E?.type==="touchend"&&y.current){y.current(),y.current=null,v.current=setTimeout(()=>{S(E,I)});return}y.current=null,f(_=>_.length>0?_.slice(1):_),h.current=I},[]);return T.exports.useImperativeHandle(n,()=>({pulsate:w,start:x,stop:S}),[w,x,S]),N(bG,z({className:De(Dr.root,o.root,s),ref:b},u,{children:N(OR,{component:null,exit:!0,children:c})}))}),kG=SG;function CG(e){return tt("MuiButtonBase",e)}const EG=ct("MuiButtonBase",["root","disabled","focusVisible"]),OG=EG,_G=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],PG=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=wt({root:["root",t&&"disabled",n&&"focusVisible"]},CG,i);return n&&r&&(s.root+=` ${r}`),s},TG=Fe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${OG.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),IG=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:u,component:c="button",disabled:f=!1,disableRipple:p=!1,disableTouchRipple:h=!1,focusRipple:g=!1,LinkComponent:v="a",onBlur:y,onClick:b,onContextMenu:C,onDragLeave:x,onFocus:w,onFocusVisible:S,onKeyDown:E,onKeyUp:I,onMouseDown:_,onMouseLeave:R,onMouseUp:D,onTouchEnd:W,onTouchMove:L,onTouchStart:B,tabIndex:Y=0,TouchRippleProps:Z,touchRippleRef:re,type:te}=r,oe=ke(r,_G),le=T.exports.useRef(null),H=T.exports.useRef(null),Q=Sn(H,re),{isFocusVisibleRef:K,onFocus:A,onBlur:M,ref:we}=yx(),[xe,Se]=T.exports.useState(!1);f&&xe&&Se(!1),T.exports.useImperativeHandle(i,()=>({focusVisible:()=>{Se(!0),le.current.focus()}}),[]);const[me,Ae]=T.exports.useState(!1);T.exports.useEffect(()=>{Ae(!0)},[]);const Pe=me&&!p&&!f;T.exports.useEffect(()=>{xe&&g&&!p&&me&&H.current.pulsate()},[p,g,xe,me]);function de(q,be,Ce=h){return ui(ft=>(be&&be(ft),!Ce&&H.current&&H.current[q](ft),!0))}const We=de("start",_),Ie=de("stop",C),qt=de("stop",x),Yt=de("stop",D),it=de("stop",q=>{xe&&q.preventDefault(),R&&R(q)}),dt=de("start",B),kn=de("stop",W),pt=de("stop",L),ot=de("stop",q=>{M(q),K.current===!1&&Se(!1),y&&y(q)},!1),Wn=ui(q=>{le.current||(le.current=q.currentTarget),A(q),K.current===!0&&(Se(!0),S&&S(q)),w&&w(q)}),Ze=()=>{const q=le.current;return c&&c!=="button"&&!(q.tagName==="A"&&q.href)},Qe=T.exports.useRef(!1),Kt=ui(q=>{g&&!Qe.current&&xe&&H.current&&q.key===" "&&(Qe.current=!0,H.current.stop(q,()=>{H.current.start(q)})),q.target===q.currentTarget&&Ze()&&q.key===" "&&q.preventDefault(),E&&E(q),q.target===q.currentTarget&&Ze()&&q.key==="Enter"&&!f&&(q.preventDefault(),b&&b(q))}),ln=ui(q=>{g&&q.key===" "&&H.current&&xe&&!q.defaultPrevented&&(Qe.current=!1,H.current.stop(q,()=>{H.current.pulsate(q)})),I&&I(q),b&&q.target===q.currentTarget&&Ze()&&q.key===" "&&!q.defaultPrevented&&b(q)});let Xt=c;Xt==="button"&&(oe.href||oe.to)&&(Xt=v);const ht={};Xt==="button"?(ht.type=te===void 0?"button":te,ht.disabled=f):(!oe.href&&!oe.to&&(ht.role="button"),f&&(ht["aria-disabled"]=f));const Dt=Sn(n,we,le),vt=z({},r,{centerRipple:o,component:c,disabled:f,disableRipple:p,disableTouchRipple:h,focusRipple:g,tabIndex:Y,focusVisible:xe}),V=PG(vt);return ge(TG,z({as:Xt,className:De(V.root,u),ownerState:vt,onBlur:ot,onClick:b,onContextMenu:Ie,onFocus:Wn,onKeyDown:Kt,onKeyUp:ln,onMouseDown:We,onMouseLeave:it,onMouseUp:Yt,onDragLeave:qt,onTouchEnd:kn,onTouchMove:pt,onTouchStart:dt,ref:Dt,tabIndex:f?-1:Y,type:te},ht,oe,{children:[s,Pe?N(kG,z({ref:Q,center:o},Z)):null]}))}),ab=IG;function RG(e){return tt("MuiAlert",e)}const AG=ct("MuiAlert",["root","action","icon","message","filled","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]),PC=AG;function MG(e){return tt("MuiIconButton",e)}const $G=ct("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),DG=$G,NG=["edge","children","className","color","disabled","disableFocusRipple","size"],LG=e=>{const{classes:t,disabled:n,color:r,edge:i,size:o}=e,s={root:["root",n&&"disabled",r!=="default"&&`color${Ne(r)}`,i&&`edge${Ne(i)}`,`size${Ne(o)}`]};return wt(s,MG,t)},FG=Fe(ab,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ne(n.color)}`],n.edge&&t[`edge${Ne(n.edge)}`],t[`size${Ne(n.size)}`]]}})(({theme:e,ownerState:t})=>z({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest})},!t.disableRipple&&{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:yn(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},t.edge==="start"&&{marginLeft:t.size==="small"?-3:-12},t.edge==="end"&&{marginRight:t.size==="small"?-3:-12}),({theme:e,ownerState:t})=>{var n;const r=(n=(e.vars||e).palette)==null?void 0:n[t.color];return z({},t.color==="inherit"&&{color:"inherit"},t.color!=="inherit"&&t.color!=="default"&&z({color:r?.main},!t.disableRipple&&{"&:hover":z({},r&&{backgroundColor:e.vars?`rgba(${r.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yn(r.main,e.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),t.size==="small"&&{padding:5,fontSize:e.typography.pxToRem(18)},t.size==="large"&&{padding:12,fontSize:e.typography.pxToRem(28)},{[`&.${DG.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}})}),zG=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiIconButton"}),{edge:i=!1,children:o,className:s,color:u="default",disabled:c=!1,disableFocusRipple:f=!1,size:p="medium"}=r,h=ke(r,NG),g=z({},r,{edge:i,color:u,disabled:c,disableFocusRipple:f,size:p}),v=LG(g);return N(FG,z({className:De(v.root,s),centerRipple:!0,focusRipple:!f,disabled:c,ref:n,ownerState:g},h,{children:o}))}),sb=zG,BG=Zc(N("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),jG=Zc(N("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),WG=Zc(N("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),UG=Zc(N("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),HG=Zc(N("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),VG=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],GG=e=>{const{variant:t,color:n,severity:r,classes:i}=e,o={root:["root",`${t}${Ne(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return wt(o,RG,i)},qG=Fe(Al,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ne(n.color||n.severity)}`]]}})(({theme:e,ownerState:t})=>{const n=e.palette.mode==="light"?ml:gl,r=e.palette.mode==="light"?gl:ml,i=t.color||t.severity;return z({},e.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px"},i&&t.variant==="standard"&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${i}StandardBg`]:r(e.palette[i].light,.9),[`& .${PC.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:e.palette.mode==="dark"?e.palette[i].main:e.palette[i].light}},i&&t.variant==="outlined"&&{color:e.vars?e.vars.palette.Alert[`${i}Color`]:n(e.palette[i].light,.6),border:`1px solid ${(e.vars||e).palette[i].light}`,[`& .${PC.icon}`]:e.vars?{color:e.vars.palette.Alert[`${i}IconColor`]}:{color:e.palette.mode==="dark"?e.palette[i].main:e.palette[i].light}},i&&t.variant==="filled"&&z({fontWeight:e.typography.fontWeightMedium},e.vars?{color:e.vars.palette.Alert[`${i}FilledColor`],backgroundColor:e.vars.palette.Alert[`${i}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[i].dark:e.palette[i].main,color:e.palette.getContrastText(e.palette.mode==="dark"?e.palette[i].dark:e.palette[i].main)}))}),YG=Fe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),KG=Fe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),TC=Fe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),IC={success:N(BG,{fontSize:"inherit"}),warning:N(jG,{fontSize:"inherit"}),error:N(WG,{fontSize:"inherit"}),info:N(UG,{fontSize:"inherit"})},XG=T.exports.forwardRef(function(t,n){var r,i,o,s,u,c;const f=Bt({props:t,name:"MuiAlert"}),{action:p,children:h,className:g,closeText:v="Close",color:y,components:b={},componentsProps:C={},icon:x,iconMapping:w=IC,onClose:S,role:E="alert",severity:I="success",slotProps:_={},slots:R={},variant:D="standard"}=f,W=ke(f,VG),L=z({},f,{color:y,severity:I,variant:D}),B=GG(L),Y=(r=(i=R.closeButton)!=null?i:b.CloseButton)!=null?r:sb,Z=(o=(s=R.closeIcon)!=null?s:b.CloseIcon)!=null?o:HG,re=(u=_.closeButton)!=null?u:C.closeButton,te=(c=_.closeIcon)!=null?c:C.closeIcon;return ge(qG,z({role:E,elevation:0,ownerState:L,className:De(B.root,g),ref:n},W,{children:[x!==!1?N(YG,{ownerState:L,className:B.icon,children:x||w[I]||IC[I]}):null,N(KG,{ownerState:L,className:B.message,children:h}),p!=null?N(TC,{ownerState:L,className:B.action,children:p}):null,p==null&&S?N(TC,{ownerState:L,className:B.action,children:N(Y,z({size:"small","aria-label":v,title:v,color:"inherit",onClick:S},re,{children:N(Z,z({fontSize:"small"},te))}))}):null]}))}),QG=XG;function ZG(e){return tt("MuiTypography",e)}ct("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const JG=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],eq=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,u={root:["root",o,e.align!=="inherit"&&`align${Ne(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return wt(u,ZG,s)},tq=Fe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Ne(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>z({margin:0},t.variant&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),RC={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},nq={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},rq=e=>nq[e]||e,iq=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiTypography"}),i=rq(r.color),o=qc(z({},r,{color:i})),{align:s="inherit",className:u,component:c,gutterBottom:f=!1,noWrap:p=!1,paragraph:h=!1,variant:g="body1",variantMapping:v=RC}=o,y=ke(o,JG),b=z({},o,{align:s,color:i,className:u,component:c,gutterBottom:f,noWrap:p,paragraph:h,variant:g,variantMapping:v}),C=c||(h?"p":v[g]||RC[g])||"span",x=eq(b);return N(tq,z({as:C,ref:n,ownerState:b,className:De(x.root,u)},y))}),_R=iq,oq=["components","componentsProps","slots","slotProps"],aq=Fe(LV,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sq=T.exports.forwardRef(function(t,n){var r;const i=Bx(),o=Bt({props:t,name:"MuiPopper"}),{components:s,componentsProps:u,slots:c,slotProps:f}=o,p=ke(o,oq),h=(r=c?.root)!=null?r:s?.Root;return N(aq,z({direction:i?.direction,slots:{root:h},slotProps:f??u},p,{ref:n}))}),PR=sq,lq=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],uq={entering:{opacity:1},entered:{opacity:1}},cq=T.exports.forwardRef(function(t,n){const r=ns(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:u,easing:c,in:f,onEnter:p,onEntered:h,onEntering:g,onExit:v,onExited:y,onExiting:b,style:C,timeout:x=i,TransitionComponent:w=nb}=t,S=ke(t,lq),E=T.exports.useRef(null),I=Sn(E,u.ref,n),_=re=>te=>{if(re){const oe=E.current;te===void 0?re(oe):re(oe,te)}},R=_(g),D=_((re,te)=>{ob(re);const oe=wl({style:C,timeout:x,easing:c},{mode:"enter"});re.style.webkitTransition=r.transitions.create("opacity",oe),re.style.transition=r.transitions.create("opacity",oe),p&&p(re,te)}),W=_(h),L=_(b),B=_(re=>{const te=wl({style:C,timeout:x,easing:c},{mode:"exit"});re.style.webkitTransition=r.transitions.create("opacity",te),re.style.transition=r.transitions.create("opacity",te),v&&v(re)}),Y=_(y);return N(w,z({appear:s,in:f,nodeRef:E,onEnter:D,onEntered:W,onEntering:R,onExit:B,onExited:Y,onExiting:L,addEndListener:re=>{o&&o(E.current,re)},timeout:x},S,{children:(re,te)=>T.exports.cloneElement(u,z({style:z({opacity:0,visibility:re==="exited"&&!f?"hidden":void 0},uq[re],C,u.props.style),ref:I},te))}))}),dm=cq;function fq(e){return tt("MuiBackdrop",e)}ct("MuiBackdrop",["root","invisible"]);const dq=["children","component","components","componentsProps","className","invisible","open","slotProps","slots","transitionDuration","TransitionComponent"],pq=e=>{const{classes:t,invisible:n}=e;return wt({root:["root",n&&"invisible"]},fq,t)},hq=Fe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>z({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),mq=T.exports.forwardRef(function(t,n){var r,i,o;const s=Bt({props:t,name:"MuiBackdrop"}),{children:u,component:c="div",components:f={},componentsProps:p={},className:h,invisible:g=!1,open:v,slotProps:y={},slots:b={},transitionDuration:C,TransitionComponent:x=dm}=s,w=ke(s,dq),S=z({},s,{component:c,invisible:g}),E=pq(S),I=(r=y.root)!=null?r:p.root;return N(x,z({in:v,timeout:C},w,{children:N(hq,z({"aria-hidden":!0},I,{as:(i=(o=b.root)!=null?o:f.Root)!=null?i:c,className:De(E.root,h,I?.className),ownerState:z({},S,I?.ownerState),classes:E,ref:n,children:u}))}))}),TR=mq,gq=qx(),vq=jx({defaultTheme:gq,defaultClassName:"MuiBox-root",generateClassName:wx.generate}),yq=vq;function xq(e){return tt("MuiButton",e)}const bq=ct("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),Cd=bq,wq=T.exports.createContext({}),Sq=wq,kq=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],Cq=e=>{const{color:t,disableElevation:n,fullWidth:r,size:i,variant:o,classes:s}=e,u={root:["root",o,`${o}${Ne(t)}`,`size${Ne(i)}`,`${o}Size${Ne(i)}`,t==="inherit"&&"colorInherit",n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["startIcon",`iconSize${Ne(i)}`],endIcon:["endIcon",`iconSize${Ne(i)}`]},c=wt(u,xq,s);return z({},s,c)},IR=e=>z({},e.size==="small"&&{"& > *:nth-of-type(1)":{fontSize:18}},e.size==="medium"&&{"& > *:nth-of-type(1)":{fontSize:20}},e.size==="large"&&{"& > *:nth-of-type(1)":{fontSize:22}}),Eq=Fe(ab,{shouldForwardProp:e=>um(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ne(n.color)}`],t[`size${Ne(n.size)}`],t[`${n.variant}Size${Ne(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(({theme:e,ownerState:t})=>{var n,r;return z({},e.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":z({textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:yn(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="text"&&t.color!=="inherit"&&{backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="outlined"&&t.color!=="inherit"&&{border:`1px solid ${(e.vars||e).palette[t.color].main}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t.color].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:yn(e.palette[t.color].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},t.variant==="contained"&&{backgroundColor:(e.vars||e).palette.grey.A100,boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2],backgroundColor:(e.vars||e).palette.grey[300]}},t.variant==="contained"&&t.color!=="inherit"&&{backgroundColor:(e.vars||e).palette[t.color].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t.color].main}}),"&:active":z({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[8]}),[`&.${Cd.focusVisible}`]:z({},t.variant==="contained"&&{boxShadow:(e.vars||e).shadows[6]}),[`&.${Cd.disabled}`]:z({color:(e.vars||e).palette.action.disabled},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},t.variant==="outlined"&&t.color==="secondary"&&{border:`1px solid ${(e.vars||e).palette.action.disabled}`},t.variant==="contained"&&{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground})},t.variant==="text"&&{padding:"6px 8px"},t.variant==="text"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main},t.variant==="outlined"&&{padding:"5px 15px",border:"1px solid currentColor"},t.variant==="outlined"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].main,border:e.vars?`1px solid rgba(${e.vars.palette[t.color].mainChannel} / 0.5)`:`1px solid ${yn(e.palette[t.color].main,.5)}`},t.variant==="contained"&&{color:e.vars?e.vars.palette.text.primary:(n=(r=e.palette).getContrastText)==null?void 0:n.call(r,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],boxShadow:(e.vars||e).shadows[2]},t.variant==="contained"&&t.color!=="inherit"&&{color:(e.vars||e).palette[t.color].contrastText,backgroundColor:(e.vars||e).palette[t.color].main},t.color==="inherit"&&{color:"inherit",borderColor:"currentColor"},t.size==="small"&&t.variant==="text"&&{padding:"4px 5px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="text"&&{padding:"8px 11px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="outlined"&&{padding:"3px 9px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="outlined"&&{padding:"7px 21px",fontSize:e.typography.pxToRem(15)},t.size==="small"&&t.variant==="contained"&&{padding:"4px 10px",fontSize:e.typography.pxToRem(13)},t.size==="large"&&t.variant==="contained"&&{padding:"8px 22px",fontSize:e.typography.pxToRem(15)},t.fullWidth&&{width:"100%"})},({ownerState:e})=>e.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Cd.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Cd.disabled}`]:{boxShadow:"none"}}),Oq=Fe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ne(n.size)}`]]}})(({ownerState:e})=>z({display:"inherit",marginRight:8,marginLeft:-4},e.size==="small"&&{marginLeft:-2},IR(e))),_q=Fe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ne(n.size)}`]]}})(({ownerState:e})=>z({display:"inherit",marginRight:-4,marginLeft:8},e.size==="small"&&{marginRight:-2},IR(e))),Pq=T.exports.forwardRef(function(t,n){const r=T.exports.useContext(Sq),i=bx(r,t),o=Bt({props:i,name:"MuiButton"}),{children:s,color:u="primary",component:c="button",className:f,disabled:p=!1,disableElevation:h=!1,disableFocusRipple:g=!1,endIcon:v,focusVisibleClassName:y,fullWidth:b=!1,size:C="medium",startIcon:x,type:w,variant:S="text"}=o,E=ke(o,kq),I=z({},o,{color:u,component:c,disabled:p,disableElevation:h,disableFocusRipple:g,fullWidth:b,size:C,type:w,variant:S}),_=Cq(I),R=x&&N(Oq,{className:_.startIcon,ownerState:I,children:x}),D=v&&N(_q,{className:_.endIcon,ownerState:I,children:v});return ge(Eq,z({ownerState:I,className:De(r.className,_.root,f),component:c,disabled:p,focusRipple:!g,focusVisibleClassName:De(_.focusVisible,y),ref:n,type:w},E,{classes:_,children:[R,s,D]}))}),Tq=Pq,Iq=["BackdropComponent","BackdropProps","closeAfterTransition","children","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","slotProps","slots","theme"],Rq=e=>e.classes,Aq=Fe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>z({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),Mq=Fe(TR,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),$q=T.exports.forwardRef(function(t,n){var r,i,o,s,u,c;const f=Bt({name:"MuiModal",props:t}),{BackdropComponent:p=Mq,BackdropProps:h,closeAfterTransition:g=!1,children:v,component:y,components:b={},componentsProps:C={},disableAutoFocus:x=!1,disableEnforceFocus:w=!1,disableEscapeKeyDown:S=!1,disablePortal:E=!1,disableRestoreFocus:I=!1,disableScrollLock:_=!1,hideBackdrop:R=!1,keepMounted:D=!1,slotProps:W,slots:L,theme:B}=f,Y=ke(f,Iq),[Z,re]=T.exports.useState(!0),te={closeAfterTransition:g,disableAutoFocus:x,disableEnforceFocus:w,disableEscapeKeyDown:S,disablePortal:E,disableRestoreFocus:I,disableScrollLock:_,hideBackdrop:R,keepMounted:D},oe=z({},f,te,{exited:Z}),le=Rq(oe),H=(r=(i=L?.root)!=null?i:b.Root)!=null?r:Aq,Q=(o=(s=L?.backdrop)!=null?s:b.Backdrop)!=null?o:p,K=(u=W?.root)!=null?u:C.root,A=(c=W?.backdrop)!=null?c:C.backdrop;return N(XV,z({slots:{root:H,backdrop:Q},slotProps:{root:()=>z({},fy(K,oe),!pR(H)&&{as:y,theme:B}),backdrop:()=>z({},h,fy(A,oe))},onTransitionEnter:()=>re(!1),onTransitionExited:()=>re(!0),ref:n},Y,{classes:le},te,{children:v}))}),RR=$q;function Dq(e){return tt("MuiDialog",e)}const Nq=ct("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Rv=Nq,Lq=T.exports.createContext({}),AR=Lq,Fq=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],zq=Fe(TR,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),Bq=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${Ne(n)}`],paper:["paper",`paperScroll${Ne(n)}`,`paperWidth${Ne(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return wt(s,Dq,t)},jq=Fe(RR,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),Wq=Fe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ne(n.scroll)}`]]}})(({ownerState:e})=>z({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&:after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),Uq=Fe(Al,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ne(n.scroll)}`],t[`paperWidth${Ne(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>z({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`${e.breakpoints.values.xs}${e.breakpoints.unit}`,[`&.${Rv.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${Rv.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Rv.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),Hq=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiDialog"}),i=ns(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":u,BackdropComponent:c,BackdropProps:f,children:p,className:h,disableEscapeKeyDown:g=!1,fullScreen:v=!1,fullWidth:y=!1,maxWidth:b="sm",onBackdropClick:C,onClose:x,open:w,PaperComponent:S=Al,PaperProps:E={},scroll:I="paper",TransitionComponent:_=dm,transitionDuration:R=o,TransitionProps:D}=r,W=ke(r,Fq),L=z({},r,{disableEscapeKeyDown:g,fullScreen:v,fullWidth:y,maxWidth:b,scroll:I}),B=Bq(L),Y=T.exports.useRef(),Z=le=>{Y.current=le.target===le.currentTarget},re=le=>{!Y.current||(Y.current=null,C&&C(le),x&&x(le,"backdropClick"))},te=vx(u),oe=T.exports.useMemo(()=>({titleId:te}),[te]);return N(jq,z({className:De(B.root,h),closeAfterTransition:!0,components:{Backdrop:zq},componentsProps:{backdrop:z({transitionDuration:R,as:c},f)},disableEscapeKeyDown:g,onClose:x,open:w,ref:n,onClick:re,ownerState:L},W,{children:N(_,z({appear:!0,in:w,timeout:R,role:"presentation"},D,{children:N(Wq,{className:De(B.container),onMouseDown:Z,ownerState:L,children:N(Uq,z({as:S,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":te},E,{className:De(B.paper,E.className),ownerState:L,children:N(AR.Provider,{value:oe,children:p})}))})}))}))}),Vq=Hq;function Gq(e){return tt("MuiDialogActions",e)}ct("MuiDialogActions",["root","spacing"]);const qq=["className","disableSpacing"],Yq=e=>{const{classes:t,disableSpacing:n}=e;return wt({root:["root",!n&&"spacing"]},Gq,t)},Kq=Fe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>z({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(:first-of-type)":{marginLeft:8}})),Xq=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:o=!1}=r,s=ke(r,qq),u=z({},r,{disableSpacing:o}),c=Yq(u);return N(Kq,z({className:De(c.root,i),ownerState:u,ref:n},s))}),Qq=Xq;function Zq(e){return tt("MuiDialogContent",e)}ct("MuiDialogContent",["root","dividers"]);function Jq(e){return tt("MuiDialogTitle",e)}const eY=ct("MuiDialogTitle",["root"]),tY=eY,nY=["className","dividers"],rY=e=>{const{classes:t,dividers:n}=e;return wt({root:["root",n&&"dividers"]},Zq,t)},iY=Fe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>z({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${tY.root} + &`]:{paddingTop:0}})),oY=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,s=ke(r,nY),u=z({},r,{dividers:o}),c=rY(u);return N(iY,z({className:De(c.root,i),ownerState:u,ref:n},s))}),aY=oY,sY=["className","id"],lY=e=>{const{classes:t}=e;return wt({root:["root"]},Jq,t)},uY=Fe(_R,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),cY=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiDialogTitle"}),{className:i,id:o}=r,s=ke(r,sY),u=r,c=lY(u),{titleId:f=o}=T.exports.useContext(AR);return N(uY,z({component:"h2",className:De(c.root,i),ownerState:u,ref:n,variant:"h6",id:f},s))}),fY=cY;function dY(e){return tt("MuiDivider",e)}const pY=ct("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),AC=pY,hY=["absolute","children","className","component","flexItem","light","orientation","role","textAlign","variant"],mY=e=>{const{absolute:t,children:n,classes:r,flexItem:i,light:o,orientation:s,textAlign:u,variant:c}=e;return wt({root:["root",t&&"absolute",c,o&&"light",s==="vertical"&&"vertical",i&&"flexItem",n&&"withChildren",n&&s==="vertical"&&"withChildrenVertical",u==="right"&&s!=="vertical"&&"textAlignRight",u==="left"&&s!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",s==="vertical"&&"wrapperVertical"]},dY,r)},gY=Fe("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(({theme:e,ownerState:t})=>z({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin"},t.absolute&&{position:"absolute",bottom:0,left:0,width:"100%"},t.light&&{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:yn(e.palette.divider,.08)},t.variant==="inset"&&{marginLeft:72},t.variant==="middle"&&t.orientation==="horizontal"&&{marginLeft:e.spacing(2),marginRight:e.spacing(2)},t.variant==="middle"&&t.orientation==="vertical"&&{marginTop:e.spacing(1),marginBottom:e.spacing(1)},t.orientation==="vertical"&&{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"},t.flexItem&&{alignSelf:"stretch",height:"auto"}),({theme:e,ownerState:t})=>z({},t.children&&{display:"flex",whiteSpace:"nowrap",textAlign:"center",border:0,"&::before, &::after":{position:"relative",width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,top:"50%",content:'""',transform:"translateY(50%)"}}),({theme:e,ownerState:t})=>z({},t.children&&t.orientation==="vertical"&&{flexDirection:"column","&::before, &::after":{height:"100%",top:"0%",left:"50%",borderTop:0,borderLeft:`thin solid ${(e.vars||e).palette.divider}`,transform:"translateX(0%)"}}),({ownerState:e})=>z({},e.textAlign==="right"&&e.orientation!=="vertical"&&{"&::before":{width:"90%"},"&::after":{width:"10%"}},e.textAlign==="left"&&e.orientation!=="vertical"&&{"&::before":{width:"10%"},"&::after":{width:"90%"}})),vY=Fe("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(({theme:e,ownerState:t})=>z({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`},t.orientation==="vertical"&&{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`})),yY=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiDivider"}),{absolute:i=!1,children:o,className:s,component:u=o?"div":"hr",flexItem:c=!1,light:f=!1,orientation:p="horizontal",role:h=u!=="hr"?"separator":void 0,textAlign:g="center",variant:v="fullWidth"}=r,y=ke(r,hY),b=z({},r,{absolute:i,component:u,flexItem:c,light:f,orientation:p,role:h,textAlign:g,variant:v}),C=mY(b);return N(gY,z({as:u,className:De(C.root,s),role:h,ref:n,ownerState:b},y,{children:o?N(vY,{className:C.wrapper,ownerState:b,children:o}):null}))}),nc=yY,xY=["addEndListener","appear","children","container","direction","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function bY(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=Zo(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const f=o.getComputedStyle(t);s=f.getPropertyValue("-webkit-transform")||f.getPropertyValue("transform")}let u=0,c=0;if(s&&s!=="none"&&typeof s=="string"){const f=s.split("(")[1].split(")")[0].split(",");u=parseInt(f[4],10),c=parseInt(f[5],10)}return e==="left"?i?`translateX(${i.right+u-r.left}px)`:`translateX(${o.innerWidth+u-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-u}px)`:`translateX(-${r.left+r.width-u}px)`:e==="up"?i?`translateY(${i.bottom+c-r.top}px)`:`translateY(${o.innerHeight+c-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-c}px)`:`translateY(-${r.top+r.height-c}px)`}function wY(e){return typeof e=="function"?e():e}function Ed(e,t,n){const r=wY(n),i=bY(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const SY=T.exports.forwardRef(function(t,n){const r=ns(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:u=!0,children:c,container:f,direction:p="down",easing:h=i,in:g,onEnter:v,onEntered:y,onEntering:b,onExit:C,onExited:x,onExiting:w,style:S,timeout:E=o,TransitionComponent:I=nb}=t,_=ke(t,xY),R=T.exports.useRef(null),D=Sn(c.ref,R,n),W=H=>Q=>{H&&(Q===void 0?H(R.current):H(R.current,Q))},L=W((H,Q)=>{Ed(p,H,f),ob(H),v&&v(H,Q)}),B=W((H,Q)=>{const K=wl({timeout:E,style:S,easing:h},{mode:"enter"});H.style.webkitTransition=r.transitions.create("-webkit-transform",z({},K)),H.style.transition=r.transitions.create("transform",z({},K)),H.style.webkitTransform="none",H.style.transform="none",b&&b(H,Q)}),Y=W(y),Z=W(w),re=W(H=>{const Q=wl({timeout:E,style:S,easing:h},{mode:"exit"});H.style.webkitTransition=r.transitions.create("-webkit-transform",Q),H.style.transition=r.transitions.create("transform",Q),Ed(p,H,f),C&&C(H)}),te=W(H=>{H.style.webkitTransition="",H.style.transition="",x&&x(H)}),oe=H=>{s&&s(R.current,H)},le=T.exports.useCallback(()=>{R.current&&Ed(p,R.current,f)},[p,f]);return T.exports.useEffect(()=>{if(g||p==="down"||p==="right")return;const H=gx(()=>{R.current&&Ed(p,R.current,f)}),Q=Zo(R.current);return Q.addEventListener("resize",H),()=>{H.clear(),Q.removeEventListener("resize",H)}},[p,g,f]),T.exports.useEffect(()=>{g||le()},[g,le]),N(I,z({nodeRef:R,onEnter:L,onEntered:Y,onEntering:B,onExit:re,onExited:te,onExiting:Z,addEndListener:oe,appear:u,in:g,timeout:E},_,{children:(H,Q)=>T.exports.cloneElement(c,z({ref:D,style:z({visibility:H==="exited"&&!g?"hidden":void 0},S,c.props.style)},Q))}))}),MR=SY,kY=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function xy(e){return`scale(${e}, ${e**2})`}const CY={entering:{opacity:1,transform:xy(1)},entered:{opacity:1,transform:"none"}},Av=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),$R=T.exports.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:u,onEnter:c,onEntered:f,onEntering:p,onExit:h,onExited:g,onExiting:v,style:y,timeout:b="auto",TransitionComponent:C=nb}=t,x=ke(t,kY),w=T.exports.useRef(),S=T.exports.useRef(),E=ns(),I=T.exports.useRef(null),_=Sn(I,o.ref,n),R=te=>oe=>{if(te){const le=I.current;oe===void 0?te(le):te(le,oe)}},D=R(p),W=R((te,oe)=>{ob(te);const{duration:le,delay:H,easing:Q}=wl({style:y,timeout:b,easing:s},{mode:"enter"});let K;b==="auto"?(K=E.transitions.getAutoHeightDuration(te.clientHeight),S.current=K):K=le,te.style.transition=[E.transitions.create("opacity",{duration:K,delay:H}),E.transitions.create("transform",{duration:Av?K:K*.666,delay:H,easing:Q})].join(","),c&&c(te,oe)}),L=R(f),B=R(v),Y=R(te=>{const{duration:oe,delay:le,easing:H}=wl({style:y,timeout:b,easing:s},{mode:"exit"});let Q;b==="auto"?(Q=E.transitions.getAutoHeightDuration(te.clientHeight),S.current=Q):Q=oe,te.style.transition=[E.transitions.create("opacity",{duration:Q,delay:le}),E.transitions.create("transform",{duration:Av?Q:Q*.666,delay:Av?le:le||Q*.333,easing:H})].join(","),te.style.opacity=0,te.style.transform=xy(.75),h&&h(te)}),Z=R(g),re=te=>{b==="auto"&&(w.current=setTimeout(te,S.current||0)),r&&r(I.current,te)};return T.exports.useEffect(()=>()=>{clearTimeout(w.current)},[]),N(C,z({appear:i,in:u,nodeRef:I,onEnter:W,onEntered:L,onEntering:D,onExit:Y,onExited:Z,onExiting:B,addEndListener:re,timeout:b==="auto"?null:b},x,{children:(te,oe)=>T.exports.cloneElement(o,z({style:z({opacity:0,transform:xy(.75),visibility:te==="exited"&&!u?"hidden":void 0},CY[te],y,o.props.style),ref:_},oe))}))});$R.muiSupportAuto=!0;const Jp=$R,EY=T.exports.createContext({}),by=EY;function OY(e){return tt("MuiList",e)}ct("MuiList",["root","padding","dense","subheader"]);const _Y=["children","className","component","dense","disablePadding","subheader"],PY=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return wt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},OY,t)},TY=Fe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>z({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),IY=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:u=!1,disablePadding:c=!1,subheader:f}=r,p=ke(r,_Y),h=T.exports.useMemo(()=>({dense:u}),[u]),g=z({},r,{component:s,dense:u,disablePadding:c}),v=PY(g);return N(by.Provider,{value:h,children:ge(TY,z({as:s,className:De(v.root,o),ref:n,ownerState:g},p,{children:[f,i]}))})}),RY=IY,AY=ct("MuiListItemIcon",["root","alignItemsFlexStart"]),MC=AY,MY=ct("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),$C=MY,$Y=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function Mv(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function DC(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function DR(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function yu(e,t,n,r,i,o){let s=!1,u=i(e,t,t?n:!1);for(;u;){if(u===e.firstChild){if(s)return!1;s=!0}const c=r?!1:u.disabled||u.getAttribute("aria-disabled")==="true";if(!u.hasAttribute("tabindex")||!DR(u,o)||c)u=i(e,u,n);else return u.focus(),!0}return!1}const DY=T.exports.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:u,disabledItemsFocusable:c=!1,disableListWrap:f=!1,onKeyDown:p,variant:h="selectedMenu"}=t,g=ke(t,$Y),v=T.exports.useRef(null),y=T.exports.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Jo(()=>{i&&v.current.focus()},[i]),T.exports.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,E)=>{const I=!v.current.style.width;if(S.clientHeight{const E=v.current,I=S.key,_=bn(E).activeElement;if(I==="ArrowDown")S.preventDefault(),yu(E,_,f,c,Mv);else if(I==="ArrowUp")S.preventDefault(),yu(E,_,f,c,DC);else if(I==="Home")S.preventDefault(),yu(E,null,f,c,Mv);else if(I==="End")S.preventDefault(),yu(E,null,f,c,DC);else if(I.length===1){const R=y.current,D=I.toLowerCase(),W=performance.now();R.keys.length>0&&(W-R.lastTime>500?(R.keys=[],R.repeating=!0,R.previousKeyMatched=!0):R.repeating&&D!==R.keys[0]&&(R.repeating=!1)),R.lastTime=W,R.keys.push(D);const L=_&&!R.repeating&&DR(_,R);R.previousKeyMatched&&(L||yu(E,_,!1,c,Mv,R))?S.preventDefault():R.previousKeyMatched=!1}p&&p(S)},C=Sn(v,n);let x=-1;T.exports.Children.forEach(s,(S,E)=>{!T.exports.isValidElement(S)||S.props.disabled||(h==="selectedMenu"&&S.props.selected||x===-1)&&(x=E)});const w=T.exports.Children.map(s,(S,E)=>{if(E===x){const I={};return o&&(I.autoFocus=!0),S.props.tabIndex===void 0&&h==="selectedMenu"&&(I.tabIndex=0),T.exports.cloneElement(S,I)}return S});return N(RY,z({role:"menu",ref:C,className:u,onKeyDown:b,tabIndex:i?0:-1},g,{children:w}))}),NY=DY;function LY(e){return tt("MuiPopover",e)}ct("MuiPopover",["root","paper"]);const FY=["onEntering"],zY=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps"];function NC(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function LC(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function FC(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function $v(e){return typeof e=="function"?e():e}const BY=e=>{const{classes:t}=e;return wt({root:["root"],paper:["paper"]},LY,t)},jY=Fe(RR,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),WY=Fe(Al,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),UY=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:s={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:c="anchorEl",children:f,className:p,container:h,elevation:g=8,marginThreshold:v=16,open:y,PaperProps:b={},transformOrigin:C={vertical:"top",horizontal:"left"},TransitionComponent:x=Jp,transitionDuration:w="auto",TransitionProps:{onEntering:S}={}}=r,E=ke(r.TransitionProps,FY),I=ke(r,zY),_=T.exports.useRef(),R=Sn(_,b.ref),D=z({},r,{anchorOrigin:s,anchorReference:c,elevation:g,marginThreshold:v,PaperProps:b,transformOrigin:C,TransitionComponent:x,transitionDuration:w,TransitionProps:E}),W=BY(D),L=T.exports.useCallback(()=>{if(c==="anchorPosition")return u;const K=$v(o),M=(K&&K.nodeType===1?K:bn(_.current).body).getBoundingClientRect();return{top:M.top+NC(M,s.vertical),left:M.left+LC(M,s.horizontal)}},[o,s.horizontal,s.vertical,u,c]),B=T.exports.useCallback(K=>({vertical:NC(K,C.vertical),horizontal:LC(K,C.horizontal)}),[C.horizontal,C.vertical]),Y=T.exports.useCallback(K=>{const A={width:K.offsetWidth,height:K.offsetHeight},M=B(A);if(c==="none")return{top:null,left:null,transformOrigin:FC(M)};const we=L();let xe=we.top-M.vertical,Se=we.left-M.horizontal;const me=xe+A.height,Ae=Se+A.width,Pe=Zo($v(o)),de=Pe.innerHeight-v,We=Pe.innerWidth-v;if(xede){const Ie=me-de;xe-=Ie,M.vertical+=Ie}if(SeWe){const Ie=Ae-We;Se-=Ie,M.horizontal+=Ie}return{top:`${Math.round(xe)}px`,left:`${Math.round(Se)}px`,transformOrigin:FC(M)}},[o,c,L,B,v]),[Z,re]=T.exports.useState(y),te=T.exports.useCallback(()=>{const K=_.current;if(!K)return;const A=Y(K);A.top!==null&&(K.style.top=A.top),A.left!==null&&(K.style.left=A.left),K.style.transformOrigin=A.transformOrigin,re(!0)},[Y]),oe=(K,A)=>{S&&S(K,A),te()},le=()=>{re(!1)};T.exports.useEffect(()=>{y&&te()}),T.exports.useImperativeHandle(i,()=>y?{updatePosition:()=>{te()}}:null,[y,te]),T.exports.useEffect(()=>{if(!y)return;const K=gx(()=>{te()}),A=Zo(o);return A.addEventListener("resize",K),()=>{K.clear(),A.removeEventListener("resize",K)}},[o,y,te]);let H=w;w==="auto"&&!x.muiSupportAuto&&(H=void 0);const Q=h||(o?bn($v(o)).body:void 0);return N(jY,z({BackdropProps:{invisible:!0},className:De(W.root,p),container:Q,open:y,ref:n,ownerState:D},I,{children:N(x,z({appear:!0,in:y,onEntering:oe,onExited:le,timeout:H},E,{children:N(WY,z({elevation:g},b,{ref:R,className:De(W.paper,b.className)},Z?void 0:{style:z({},b.style,{opacity:0})},{ownerState:D,children:f}))}))}))}),HY=UY;function VY(e){return tt("MuiMenu",e)}ct("MuiMenu",["root","paper","list"]);const GY=["onEntering"],qY=["autoFocus","children","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant"],YY={vertical:"top",horizontal:"right"},KY={vertical:"top",horizontal:"left"},XY=e=>{const{classes:t}=e;return wt({root:["root"],paper:["paper"],list:["list"]},VY,t)},QY=Fe(HY,{shouldForwardProp:e=>um(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ZY=Fe(Al,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),JY=Fe(NY,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),eK=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,disableAutoFocusItem:s=!1,MenuListProps:u={},onClose:c,open:f,PaperProps:p={},PopoverClasses:h,transitionDuration:g="auto",TransitionProps:{onEntering:v}={},variant:y="selectedMenu"}=r,b=ke(r.TransitionProps,GY),C=ke(r,qY),x=ns(),w=x.direction==="rtl",S=z({},r,{autoFocus:i,disableAutoFocusItem:s,MenuListProps:u,onEntering:v,PaperProps:p,transitionDuration:g,TransitionProps:b,variant:y}),E=XY(S),I=i&&!s&&f,_=T.exports.useRef(null),R=(L,B)=>{_.current&&_.current.adjustStyleForScrollbar(L,x),v&&v(L,B)},D=L=>{L.key==="Tab"&&(L.preventDefault(),c&&c(L,"tabKeyDown"))};let W=-1;return T.exports.Children.map(o,(L,B)=>{!T.exports.isValidElement(L)||L.props.disabled||(y==="selectedMenu"&&L.props.selected||W===-1)&&(W=B)}),N(QY,z({classes:h,onClose:c,anchorOrigin:{vertical:"bottom",horizontal:w?"right":"left"},transformOrigin:w?YY:KY,PaperProps:z({component:ZY},p,{classes:z({},p.classes,{root:E.paper})}),className:E.root,open:f,ref:n,transitionDuration:g,TransitionProps:z({onEntering:R},b),ownerState:S},C,{children:N(JY,z({onKeyDown:D,actions:_,autoFocus:i&&(W===-1||s),autoFocusItem:I,variant:y},u,{className:De(E.list,u.className),children:o}))}))}),pm=eK;function tK(e){return tt("MuiMenuItem",e)}const nK=ct("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xu=nK,rK=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],iK=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},oK=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,c=wt({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},tK,s);return z({},s,c)},aK=Fe(ab,{shouldForwardProp:e=>um(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:iK})(({theme:e,ownerState:t})=>z({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xu.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:yn(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${xu.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:yn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${xu.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:yn(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:yn(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${xu.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${xu.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${AC.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${AC.inset}`]:{marginLeft:52},[`& .${$C.root}`]:{marginTop:0,marginBottom:0},[`& .${$C.inset}`]:{paddingLeft:36},[`& .${MC.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&z({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${MC.root} svg`]:{fontSize:"1.25rem"}}))),sK=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:u=!1,disableGutters:c=!1,focusVisibleClassName:f,role:p="menuitem",tabIndex:h,className:g}=r,v=ke(r,rK),y=T.exports.useContext(by),b=T.exports.useMemo(()=>({dense:s||y.dense||!1,disableGutters:c}),[y.dense,s,c]),C=T.exports.useRef(null);Jo(()=>{i&&C.current&&C.current.focus()},[i]);const x=z({},r,{dense:b.dense,divider:u,disableGutters:c}),w=oK(r),S=Sn(C,n);let E;return r.disabled||(E=h!==void 0?h:-1),N(by.Provider,{value:b,children:N(aK,z({ref:S,role:p,tabIndex:E,component:o,focusVisibleClassName:De(w.focusVisible,f),className:De(w.root,g)},v,{ownerState:x,classes:w}))})}),Vi=sK;function lK(e){return tt("MuiSnackbarContent",e)}ct("MuiSnackbarContent",["root","message","action"]);const uK=["action","className","message","role"],cK=e=>{const{classes:t}=e;return wt({root:["root"],action:["action"],message:["message"]},lK,t)},fK=Fe(Al,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=aR(e.palette.background.default,t);return z({},e.typography.body2,{color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}})}),dK=Fe("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),pK=Fe("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),hK=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiSnackbarContent"}),{action:i,className:o,message:s,role:u="alert"}=r,c=ke(r,uK),f=r,p=cK(f);return ge(fK,z({role:u,square:!0,elevation:6,className:De(p.root,o),ownerState:f,ref:n},c,{children:[N(dK,{className:p.message,ownerState:f,children:s}),i?N(pK,{className:p.action,ownerState:f,children:i}):null]}))}),mK=hK;function gK(e){return tt("MuiSnackbar",e)}ct("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const vK=["onEnter","onExited"],yK=["action","anchorOrigin","autoHideDuration","children","className","ClickAwayListenerProps","ContentProps","disableWindowBlurListener","message","onBlur","onClose","onFocus","onMouseEnter","onMouseLeave","open","resumeHideDuration","TransitionComponent","transitionDuration","TransitionProps"],xK=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Ne(n.vertical)}${Ne(n.horizontal)}`]};return wt(r,gK,t)},bK=Fe("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Ne(n.anchorOrigin.vertical)}${Ne(n.anchorOrigin.horizontal)}`]]}})(({theme:e,ownerState:t})=>{const n={left:"50%",right:"auto",transform:"translateX(-50%)"};return z({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center"},t.anchorOrigin.vertical==="top"?{top:8}:{bottom:8},t.anchorOrigin.horizontal==="left"&&{justifyContent:"flex-start"},t.anchorOrigin.horizontal==="right"&&{justifyContent:"flex-end"},{[e.breakpoints.up("sm")]:z({},t.anchorOrigin.vertical==="top"?{top:24}:{bottom:24},t.anchorOrigin.horizontal==="center"&&n,t.anchorOrigin.horizontal==="left"&&{left:24,right:"auto"},t.anchorOrigin.horizontal==="right"&&{right:24,left:"auto"})})}),wK=T.exports.forwardRef(function(t,n){const r=Bt({props:t,name:"MuiSnackbar"}),i=ns(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{action:s,anchorOrigin:{vertical:u,horizontal:c}={vertical:"bottom",horizontal:"left"},autoHideDuration:f=null,children:p,className:h,ClickAwayListenerProps:g,ContentProps:v,disableWindowBlurListener:y=!1,message:b,onBlur:C,onClose:x,onFocus:w,onMouseEnter:S,onMouseLeave:E,open:I,resumeHideDuration:_,TransitionComponent:R=Jp,transitionDuration:D=o,TransitionProps:{onEnter:W,onExited:L}={}}=r,B=ke(r.TransitionProps,vK),Y=ke(r,yK),Z=z({},r,{anchorOrigin:{vertical:u,horizontal:c}}),re=xK(Z),te=T.exports.useRef(),[oe,le]=T.exports.useState(!0),H=ui((...de)=>{x&&x(...de)}),Q=ui(de=>{!x||de==null||(clearTimeout(te.current),te.current=setTimeout(()=>{H(null,"timeout")},de))});T.exports.useEffect(()=>(I&&Q(f),()=>{clearTimeout(te.current)}),[I,f,Q]);const K=()=>{clearTimeout(te.current)},A=T.exports.useCallback(()=>{f!=null&&Q(_??f*.5)},[f,_,Q]),M=de=>{w&&w(de),K()},we=de=>{S&&S(de),K()},xe=de=>{C&&C(de),A()},Se=de=>{E&&E(de),A()},me=de=>{x&&x(de,"clickaway")},Ae=de=>{le(!0),L&&L(de)},Pe=(de,We)=>{le(!1),W&&W(de,We)};return T.exports.useEffect(()=>{if(!y&&I)return window.addEventListener("focus",A),window.addEventListener("blur",K),()=>{window.removeEventListener("focus",A),window.removeEventListener("blur",K)}},[y,A,I]),T.exports.useEffect(()=>{if(!I)return;function de(We){We.defaultPrevented||(We.key==="Escape"||We.key==="Esc")&&x&&x(We,"escapeKeyDown")}return document.addEventListener("keydown",de),()=>{document.removeEventListener("keydown",de)}},[oe,I,x]),!I&&oe?null:N(pH,z({onClickAway:me},g,{children:N(bK,z({className:De(re.root,h),onBlur:xe,onFocus:M,onMouseEnter:we,onMouseLeave:Se,ownerState:Z,ref:n,role:"presentation"},Y,{children:N(R,z({appear:!0,in:I,timeout:D,direction:u==="top"?"down":"up",onEnter:Pe,onExited:Ae},B,{children:p||N(mK,z({message:b,action:s},v))}))}))}))}),SK=wK;function kK(e){return tt("MuiTooltip",e)}const CK=ct("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),$o=CK,EK=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];function OK(e){return Math.round(e*1e5)/1e5}const _K=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${Ne(o.split("-")[0])}`],arrow:["arrow"]};return wt(s,kK,t)},PK=Fe(PR,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(({theme:e,ownerState:t,open:n})=>z({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none"},!t.disableInteractive&&{pointerEvents:"auto"},!n&&{pointerEvents:"none"},t.arrow&&{[`&[data-popper-placement*="bottom"] .${$o.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${$o.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${$o.arrow}`]:z({},t.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),[`&[data-popper-placement*="left"] .${$o.arrow}`]:z({},t.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})),TK=Fe("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ne(n.placement.split("-")[0])}`]]}})(({theme:e,ownerState:t})=>z({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:yn(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium},t.arrow&&{position:"relative",margin:0},t.touch&&{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${OK(16/14)}em`,fontWeight:e.typography.fontWeightRegular},{[`.${$o.popper}[data-popper-placement*="left"] &`]:z({transformOrigin:"right center"},t.isRtl?z({marginLeft:"14px"},t.touch&&{marginLeft:"24px"}):z({marginRight:"14px"},t.touch&&{marginRight:"24px"})),[`.${$o.popper}[data-popper-placement*="right"] &`]:z({transformOrigin:"left center"},t.isRtl?z({marginRight:"14px"},t.touch&&{marginRight:"24px"}):z({marginLeft:"14px"},t.touch&&{marginLeft:"24px"})),[`.${$o.popper}[data-popper-placement*="top"] &`]:z({transformOrigin:"center bottom",marginBottom:"14px"},t.touch&&{marginBottom:"24px"}),[`.${$o.popper}[data-popper-placement*="bottom"] &`]:z({transformOrigin:"center top",marginTop:"14px"},t.touch&&{marginTop:"24px"})})),IK=Fe("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:yn(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}));let Od=!1,Dv=null;function _d(e,t){return n=>{t&&t(n),e(n)}}const RK=T.exports.forwardRef(function(t,n){var r,i,o,s,u,c,f,p,h,g,v,y,b,C,x,w,S,E,I;const _=Bt({props:t,name:"MuiTooltip"}),{arrow:R=!1,children:D,components:W={},componentsProps:L={},describeChild:B=!1,disableFocusListener:Y=!1,disableHoverListener:Z=!1,disableInteractive:re=!1,disableTouchListener:te=!1,enterDelay:oe=100,enterNextDelay:le=0,enterTouchDelay:H=700,followCursor:Q=!1,id:K,leaveDelay:A=0,leaveTouchDelay:M=1500,onClose:we,onOpen:xe,open:Se,placement:me="bottom",PopperComponent:Ae,PopperProps:Pe={},slotProps:de={},slots:We={},title:Ie,TransitionComponent:qt=Jp,TransitionProps:Yt}=_,it=ke(_,EK),dt=ns(),kn=dt.direction==="rtl",[pt,ot]=T.exports.useState(),[Wn,Ze]=T.exports.useState(null),Qe=T.exports.useRef(!1),Kt=re||Q,ln=T.exports.useRef(),Xt=T.exports.useRef(),ht=T.exports.useRef(),Dt=T.exports.useRef(),[vt,V]=$T({controlled:Se,default:!1,name:"Tooltip",state:"open"});let q=vt;const be=vx(K),Ce=T.exports.useRef(),ft=T.exports.useCallback(()=>{Ce.current!==void 0&&(document.body.style.WebkitUserSelect=Ce.current,Ce.current=void 0),clearTimeout(Dt.current)},[]);T.exports.useEffect(()=>()=>{clearTimeout(ln.current),clearTimeout(Xt.current),clearTimeout(ht.current),ft()},[ft]);const nr=Ue=>{clearTimeout(Dv),Od=!0,V(!0),xe&&!q&&xe(Ue)},Ke=ui(Ue=>{clearTimeout(Dv),Dv=setTimeout(()=>{Od=!1},800+A),V(!1),we&&q&&we(Ue),clearTimeout(ln.current),ln.current=setTimeout(()=>{Qe.current=!1},dt.transitions.duration.shortest)}),St=Ue=>{Qe.current&&Ue.type!=="touchstart"||(pt&&pt.removeAttribute("title"),clearTimeout(Xt.current),clearTimeout(ht.current),oe||Od&&le?Xt.current=setTimeout(()=>{nr(Ue)},Od?le:oe):nr(Ue))},rr=Ue=>{clearTimeout(Xt.current),clearTimeout(ht.current),ht.current=setTimeout(()=>{Ke(Ue)},A)},{isFocusVisibleRef:Or,onBlur:kt,onFocus:ca,ref:ir}=yx(),[,Ll]=T.exports.useState(!1),Fl=Ue=>{kt(Ue),Or.current===!1&&(Ll(!1),rr(Ue))},uf=Ue=>{pt||ot(Ue.currentTarget),ca(Ue),Or.current===!0&&(Ll(!0),St(Ue))},cf=Ue=>{Qe.current=!0;const un=D.props;un.onTouchStart&&un.onTouchStart(Ue)},ff=St,df=rr,pf=Ue=>{cf(Ue),clearTimeout(ht.current),clearTimeout(ln.current),ft(),Ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",Dt.current=setTimeout(()=>{document.body.style.WebkitUserSelect=Ce.current,St(Ue)},H)},Cm=Ue=>{D.props.onTouchEnd&&D.props.onTouchEnd(Ue),ft(),clearTimeout(ht.current),ht.current=setTimeout(()=>{Ke(Ue)},M)};T.exports.useEffect(()=>{if(!q)return;function Ue(un){(un.key==="Escape"||un.key==="Esc")&&Ke(un)}return document.addEventListener("keydown",Ue),()=>{document.removeEventListener("keydown",Ue)}},[Ke,q]);const Em=Sn(D.ref,ir,ot,n);!Ie&&Ie!==0&&(q=!1);const fa=T.exports.useRef({x:0,y:0}),da=T.exports.useRef(),Om=Ue=>{const un=D.props;un.onMouseMove&&un.onMouseMove(Ue),fa.current={x:Ue.clientX,y:Ue.clientY},da.current&&da.current.update()},Di={},zl=typeof Ie=="string";B?(Di.title=!q&&zl&&!Z?Ie:null,Di["aria-describedby"]=q?be:null):(Di["aria-label"]=zl?Ie:null,Di["aria-labelledby"]=q&&!zl?be:null);const or=z({},Di,it,D.props,{className:De(it.className,D.props.className),onTouchStart:cf,ref:Em},Q?{onMouseMove:Om}:{}),pa={};te||(or.onTouchStart=pf,or.onTouchEnd=Cm),Z||(or.onMouseOver=_d(ff,or.onMouseOver),or.onMouseLeave=_d(df,or.onMouseLeave),Kt||(pa.onMouseOver=ff,pa.onMouseLeave=df)),Y||(or.onFocus=_d(uf,or.onFocus),or.onBlur=_d(Fl,or.onBlur),Kt||(pa.onFocus=uf,pa.onBlur=Fl));const _m=T.exports.useMemo(()=>{var Ue;let un=[{name:"arrow",enabled:Boolean(Wn),options:{element:Wn,padding:4}}];return(Ue=Pe.popperOptions)!=null&&Ue.modifiers&&(un=un.concat(Pe.popperOptions.modifiers)),z({},Pe.popperOptions,{modifiers:un})},[Wn,Pe]),ha=z({},_,{isRtl:kn,arrow:R,disableInteractive:Kt,placement:me,PopperComponentProp:Ae,touch:Qe.current}),Bl=_K(ha),hf=(r=(i=We.popper)!=null?i:W.Popper)!=null?r:PK,mf=(o=(s=(u=We.transition)!=null?u:W.Transition)!=null?s:qt)!=null?o:Jp,jl=(c=(f=We.tooltip)!=null?f:W.Tooltip)!=null?c:TK,gf=(p=(h=We.arrow)!=null?h:W.Arrow)!=null?p:IK,Pm=Lu(hf,z({},Pe,(g=de.popper)!=null?g:L.popper,{className:De(Bl.popper,Pe?.className,(v=(y=de.popper)!=null?y:L.popper)==null?void 0:v.className)}),ha),Tm=Lu(mf,z({},Yt,(b=de.transition)!=null?b:L.transition),ha),Im=Lu(jl,z({},(C=de.tooltip)!=null?C:L.tooltip,{className:De(Bl.tooltip,(x=(w=de.tooltip)!=null?w:L.tooltip)==null?void 0:x.className)}),ha),Rm=Lu(gf,z({},(S=de.arrow)!=null?S:L.arrow,{className:De(Bl.arrow,(E=(I=de.arrow)!=null?I:L.arrow)==null?void 0:E.className)}),ha);return ge(T.exports.Fragment,{children:[T.exports.cloneElement(D,or),N(hf,z({as:Ae??PR,placement:me,anchorEl:Q?{getBoundingClientRect:()=>({top:fa.current.y,left:fa.current.x,right:fa.current.x,bottom:fa.current.y,width:0,height:0})}:pt,popperRef:da,open:pt?q:!1,id:be,transition:!0},pa,Pm,{popperOptions:_m,children:({TransitionProps:Ue})=>N(mf,z({timeout:dt.transitions.duration.shorter},Ue,Tm,{"data-foo":"bar",children:ge(jl,z({},Im,{children:[Ie,R?N(gf,z({},Rm,{ref:Ze})):null]}))}))}))]})}),AK=RK,Ci=(e,t)=>{const n=T.exports.useRef(uT);T.exports.useEffect(()=>{n.current=t},[t]),T.exports.useEffect(()=>{const r=i=>{const{action:o,data:s}=i.data;n.current&&o===e&&n.current(s)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[e])},lb=e=>{Wr("useItem",e.slot)},NR=e=>{const{inventory:{itemAmount:t}}=hr.getState();Wr("giveItem",{slot:e.slot,count:t})};var MK={prefix:"fas",iconName:"circle-info",icon:[512,512,["info-circle"],"f05a","M256 512c141.4 0 256-114.6 256-256S397.4 0 256 0S0 114.6 0 256S114.6 512 256 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-144c-17.7 0-32-14.3-32-32s14.3-32 32-32s32 14.3 32 32s-14.3 32-32 32z"]},$K=MK,DK={prefix:"fas",iconName:"xmark",icon:[320,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z"]},NK=DK;function zC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fe(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n-1;i--){var o=n[i],s=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(s)>-1&&(r=o)}return It.head.insertBefore(t,r),e}}var sX="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function Lc(){for(var e=12,t="";e-- >0;)t+=sX[Math.random()*62|0];return t}function Ml(e){for(var t=[],n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function hb(e){return e.classList?Ml(e.classList):(e.getAttribute("class")||"").split(" ").filter(function(t){return t})}function YR(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function lX(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(YR(e[n]),'" ')},"").trim()}function hm(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n].trim(),";")},"")}function mb(e){return e.size!==Oi.size||e.x!==Oi.x||e.y!==Oi.y||e.rotate!==Oi.rotate||e.flipX||e.flipY}function uX(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),s="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),u="rotate(".concat(t.rotate," 0 0)"),c={transform:"".concat(o," ").concat(s," ").concat(u)},f={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:c,path:f}}function cX(e){var t=e.transform,n=e.width,r=n===void 0?Sy:n,i=e.height,o=i===void 0?Sy:i,s=e.startCentered,u=s===void 0?!1:s,c="";return u&&jR?c+="translate(".concat(t.x/ko-r/2,"em, ").concat(t.y/ko-o/2,"em) "):u?c+="translate(calc(-50% + ".concat(t.x/ko,"em), calc(-50% + ").concat(t.y/ko,"em)) "):c+="translate(".concat(t.x/ko,"em, ").concat(t.y/ko,"em) "),c+="scale(".concat(t.size/ko*(t.flipX?-1:1),", ").concat(t.size/ko*(t.flipY?-1:1),") "),c+="rotate(".concat(t.rotate,"deg) "),c}var fX=`:root, :host { - --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Solid"; - --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Regular"; - --fa-font-light: normal 300 1em/1 "Font Awesome 6 Light"; - --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Thin"; - --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone"; - --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp"; - --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands"; -} - -svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa { - overflow: visible; - box-sizing: content-box; -} - -.svg-inline--fa { - display: var(--fa-display, inline-block); - height: 1em; - overflow: visible; - vertical-align: -0.125em; -} -.svg-inline--fa.fa-2xs { - vertical-align: 0.1em; -} -.svg-inline--fa.fa-xs { - vertical-align: 0em; -} -.svg-inline--fa.fa-sm { - vertical-align: -0.0714285705em; -} -.svg-inline--fa.fa-lg { - vertical-align: -0.2em; -} -.svg-inline--fa.fa-xl { - vertical-align: -0.25em; -} -.svg-inline--fa.fa-2xl { - vertical-align: -0.3125em; -} -.svg-inline--fa.fa-pull-left { - margin-right: var(--fa-pull-margin, 0.3em); - width: auto; -} -.svg-inline--fa.fa-pull-right { - margin-left: var(--fa-pull-margin, 0.3em); - width: auto; -} -.svg-inline--fa.fa-li { - width: var(--fa-li-width, 2em); - top: 0.25em; -} -.svg-inline--fa.fa-fw { - width: var(--fa-fw-width, 1.25em); -} - -.fa-layers svg.svg-inline--fa { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; -} - -.fa-layers-counter, .fa-layers-text { - display: inline-block; - position: absolute; - text-align: center; -} - -.fa-layers { - display: inline-block; - height: 1em; - position: relative; - text-align: center; - vertical-align: -0.125em; - width: 1em; -} -.fa-layers svg.svg-inline--fa { - -webkit-transform-origin: center center; - transform-origin: center center; -} - -.fa-layers-text { - left: 50%; - top: 50%; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - -webkit-transform-origin: center center; - transform-origin: center center; -} - -.fa-layers-counter { - background-color: var(--fa-counter-background-color, #ff253a); - border-radius: var(--fa-counter-border-radius, 1em); - box-sizing: border-box; - color: var(--fa-inverse, #fff); - line-height: var(--fa-counter-line-height, 1); - max-width: var(--fa-counter-max-width, 5em); - min-width: var(--fa-counter-min-width, 1.5em); - overflow: hidden; - padding: var(--fa-counter-padding, 0.25em 0.5em); - right: var(--fa-right, 0); - text-overflow: ellipsis; - top: var(--fa-top, 0); - -webkit-transform: scale(var(--fa-counter-scale, 0.25)); - transform: scale(var(--fa-counter-scale, 0.25)); - -webkit-transform-origin: top right; - transform-origin: top right; -} - -.fa-layers-bottom-right { - bottom: var(--fa-bottom, 0); - right: var(--fa-right, 0); - top: auto; - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: bottom right; - transform-origin: bottom right; -} - -.fa-layers-bottom-left { - bottom: var(--fa-bottom, 0); - left: var(--fa-left, 0); - right: auto; - top: auto; - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: bottom left; - transform-origin: bottom left; -} - -.fa-layers-top-right { - top: var(--fa-top, 0); - right: var(--fa-right, 0); - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: top right; - transform-origin: top right; -} - -.fa-layers-top-left { - left: var(--fa-left, 0); - right: auto; - top: var(--fa-top, 0); - -webkit-transform: scale(var(--fa-layers-scale, 0.25)); - transform: scale(var(--fa-layers-scale, 0.25)); - -webkit-transform-origin: top left; - transform-origin: top left; -} - -.fa-1x { - font-size: 1em; -} - -.fa-2x { - font-size: 2em; -} - -.fa-3x { - font-size: 3em; -} - -.fa-4x { - font-size: 4em; -} - -.fa-5x { - font-size: 5em; -} - -.fa-6x { - font-size: 6em; -} - -.fa-7x { - font-size: 7em; -} - -.fa-8x { - font-size: 8em; -} - -.fa-9x { - font-size: 9em; -} - -.fa-10x { - font-size: 10em; -} - -.fa-2xs { - font-size: 0.625em; - line-height: 0.1em; - vertical-align: 0.225em; -} - -.fa-xs { - font-size: 0.75em; - line-height: 0.0833333337em; - vertical-align: 0.125em; -} - -.fa-sm { - font-size: 0.875em; - line-height: 0.0714285718em; - vertical-align: 0.0535714295em; -} - -.fa-lg { - font-size: 1.25em; - line-height: 0.05em; - vertical-align: -0.075em; -} - -.fa-xl { - font-size: 1.5em; - line-height: 0.0416666682em; - vertical-align: -0.125em; -} - -.fa-2xl { - font-size: 2em; - line-height: 0.03125em; - vertical-align: -0.1875em; -} - -.fa-fw { - text-align: center; - width: 1.25em; -} - -.fa-ul { - list-style-type: none; - margin-left: var(--fa-li-margin, 2.5em); - padding-left: 0; -} -.fa-ul > li { - position: relative; -} - -.fa-li { - left: calc(var(--fa-li-width, 2em) * -1); - position: absolute; - text-align: center; - width: var(--fa-li-width, 2em); - line-height: inherit; -} - -.fa-border { - border-color: var(--fa-border-color, #eee); - border-radius: var(--fa-border-radius, 0.1em); - border-style: var(--fa-border-style, solid); - border-width: var(--fa-border-width, 0.08em); - padding: var(--fa-border-padding, 0.2em 0.25em 0.15em); -} - -.fa-pull-left { - float: left; - margin-right: var(--fa-pull-margin, 0.3em); -} - -.fa-pull-right { - float: right; - margin-left: var(--fa-pull-margin, 0.3em); -} - -.fa-beat { - -webkit-animation-name: fa-beat; - animation-name: fa-beat; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); - animation-timing-function: var(--fa-animation-timing, ease-in-out); -} - -.fa-bounce { - -webkit-animation-name: fa-bounce; - animation-name: fa-bounce; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1)); -} - -.fa-fade { - -webkit-animation-name: fa-fade; - animation-name: fa-fade; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); -} - -.fa-beat-fade { - -webkit-animation-name: fa-beat-fade; - animation-name: fa-beat-fade; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); - animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1)); -} - -.fa-flip { - -webkit-animation-name: fa-flip; - animation-name: fa-flip; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out); - animation-timing-function: var(--fa-animation-timing, ease-in-out); -} - -.fa-shake { - -webkit-animation-name: fa-shake; - animation-name: fa-shake; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, linear); - animation-timing-function: var(--fa-animation-timing, linear); -} - -.fa-spin { - -webkit-animation-name: fa-spin; - animation-name: fa-spin; - -webkit-animation-delay: var(--fa-animation-delay, 0s); - animation-delay: var(--fa-animation-delay, 0s); - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 2s); - animation-duration: var(--fa-animation-duration, 2s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, linear); - animation-timing-function: var(--fa-animation-timing, linear); -} - -.fa-spin-reverse { - --fa-animation-direction: reverse; -} - -.fa-pulse, -.fa-spin-pulse { - -webkit-animation-name: fa-spin; - animation-name: fa-spin; - -webkit-animation-direction: var(--fa-animation-direction, normal); - animation-direction: var(--fa-animation-direction, normal); - -webkit-animation-duration: var(--fa-animation-duration, 1s); - animation-duration: var(--fa-animation-duration, 1s); - -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite); - animation-iteration-count: var(--fa-animation-iteration-count, infinite); - -webkit-animation-timing-function: var(--fa-animation-timing, steps(8)); - animation-timing-function: var(--fa-animation-timing, steps(8)); -} - -@media (prefers-reduced-motion: reduce) { - .fa-beat, -.fa-bounce, -.fa-fade, -.fa-beat-fade, -.fa-flip, -.fa-pulse, -.fa-shake, -.fa-spin, -.fa-spin-pulse { - -webkit-animation-delay: -1ms; - animation-delay: -1ms; - -webkit-animation-duration: 1ms; - animation-duration: 1ms; - -webkit-animation-iteration-count: 1; - animation-iteration-count: 1; - transition-delay: 0s; - transition-duration: 0s; - } -} -@-webkit-keyframes fa-beat { - 0%, 90% { - -webkit-transform: scale(1); - transform: scale(1); - } - 45% { - -webkit-transform: scale(var(--fa-beat-scale, 1.25)); - transform: scale(var(--fa-beat-scale, 1.25)); - } -} -@keyframes fa-beat { - 0%, 90% { - -webkit-transform: scale(1); - transform: scale(1); - } - 45% { - -webkit-transform: scale(var(--fa-beat-scale, 1.25)); - transform: scale(var(--fa-beat-scale, 1.25)); - } -} -@-webkit-keyframes fa-bounce { - 0% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 10% { - -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - } - 30% { - -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - } - 50% { - -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - } - 57% { - -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - } - 64% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 100% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } -} -@keyframes fa-bounce { - 0% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 10% { - -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0); - } - 30% { - -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em)); - } - 50% { - -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0); - } - 57% { - -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em)); - } - 64% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } - 100% { - -webkit-transform: scale(1, 1) translateY(0); - transform: scale(1, 1) translateY(0); - } -} -@-webkit-keyframes fa-fade { - 50% { - opacity: var(--fa-fade-opacity, 0.4); - } -} -@keyframes fa-fade { - 50% { - opacity: var(--fa-fade-opacity, 0.4); - } -} -@-webkit-keyframes fa-beat-fade { - 0%, 100% { - opacity: var(--fa-beat-fade-opacity, 0.4); - -webkit-transform: scale(1); - transform: scale(1); - } - 50% { - opacity: 1; - -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); - transform: scale(var(--fa-beat-fade-scale, 1.125)); - } -} -@keyframes fa-beat-fade { - 0%, 100% { - opacity: var(--fa-beat-fade-opacity, 0.4); - -webkit-transform: scale(1); - transform: scale(1); - } - 50% { - opacity: 1; - -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125)); - transform: scale(var(--fa-beat-fade-scale, 1.125)); - } -} -@-webkit-keyframes fa-flip { - 50% { - -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - } -} -@keyframes fa-flip { - 50% { - -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg)); - } -} -@-webkit-keyframes fa-shake { - 0% { - -webkit-transform: rotate(-15deg); - transform: rotate(-15deg); - } - 4% { - -webkit-transform: rotate(15deg); - transform: rotate(15deg); - } - 8%, 24% { - -webkit-transform: rotate(-18deg); - transform: rotate(-18deg); - } - 12%, 28% { - -webkit-transform: rotate(18deg); - transform: rotate(18deg); - } - 16% { - -webkit-transform: rotate(-22deg); - transform: rotate(-22deg); - } - 20% { - -webkit-transform: rotate(22deg); - transform: rotate(22deg); - } - 32% { - -webkit-transform: rotate(-12deg); - transform: rotate(-12deg); - } - 36% { - -webkit-transform: rotate(12deg); - transform: rotate(12deg); - } - 40%, 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@keyframes fa-shake { - 0% { - -webkit-transform: rotate(-15deg); - transform: rotate(-15deg); - } - 4% { - -webkit-transform: rotate(15deg); - transform: rotate(15deg); - } - 8%, 24% { - -webkit-transform: rotate(-18deg); - transform: rotate(-18deg); - } - 12%, 28% { - -webkit-transform: rotate(18deg); - transform: rotate(18deg); - } - 16% { - -webkit-transform: rotate(-22deg); - transform: rotate(-22deg); - } - 20% { - -webkit-transform: rotate(22deg); - transform: rotate(22deg); - } - 32% { - -webkit-transform: rotate(-12deg); - transform: rotate(-12deg); - } - 36% { - -webkit-transform: rotate(12deg); - transform: rotate(12deg); - } - 40%, 100% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } -} -@-webkit-keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -@keyframes fa-spin { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -.fa-rotate-90 { - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.fa-rotate-180 { - -webkit-transform: rotate(180deg); - transform: rotate(180deg); -} - -.fa-rotate-270 { - -webkit-transform: rotate(270deg); - transform: rotate(270deg); -} - -.fa-flip-horizontal { - -webkit-transform: scale(-1, 1); - transform: scale(-1, 1); -} - -.fa-flip-vertical { - -webkit-transform: scale(1, -1); - transform: scale(1, -1); -} - -.fa-flip-both, -.fa-flip-horizontal.fa-flip-vertical { - -webkit-transform: scale(-1, -1); - transform: scale(-1, -1); -} - -.fa-rotate-by { - -webkit-transform: rotate(var(--fa-rotate-angle, none)); - transform: rotate(var(--fa-rotate-angle, none)); -} - -.fa-stack { - display: inline-block; - vertical-align: middle; - height: 2em; - position: relative; - width: 2.5em; -} - -.fa-stack-1x, -.fa-stack-2x { - bottom: 0; - left: 0; - margin: auto; - position: absolute; - right: 0; - top: 0; - z-index: var(--fa-stack-z-index, auto); -} - -.svg-inline--fa.fa-stack-1x { - height: 1em; - width: 1.25em; -} -.svg-inline--fa.fa-stack-2x { - height: 2em; - width: 2.5em; -} - -.fa-inverse { - color: var(--fa-inverse, #fff); -} - -.sr-only, -.fa-sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.sr-only-focusable:not(:focus), -.fa-sr-only-focusable:not(:focus) { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border-width: 0; -} - -.svg-inline--fa .fa-primary { - fill: var(--fa-primary-color, currentColor); - opacity: var(--fa-primary-opacity, 1); -} - -.svg-inline--fa .fa-secondary { - fill: var(--fa-secondary-color, currentColor); - opacity: var(--fa-secondary-opacity, 0.4); -} - -.svg-inline--fa.fa-swap-opacity .fa-primary { - opacity: var(--fa-secondary-opacity, 0.4); -} - -.svg-inline--fa.fa-swap-opacity .fa-secondary { - opacity: var(--fa-primary-opacity, 1); -} - -.svg-inline--fa mask .fa-primary, -.svg-inline--fa mask .fa-secondary { - fill: black; -} - -.fad.fa-inverse, -.fa-duotone.fa-inverse { - color: var(--fa-inverse, #fff); -}`;function KR(){var e=WR,t=UR,n=ye.cssPrefix,r=ye.replacementClass,i=fX;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),s=new RegExp("\\--".concat(e,"\\-"),"g"),u=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(s,"--".concat(n,"-")).replace(u,".".concat(r))}return i}var GC=!1;function Nv(){ye.autoAddCss&&!GC&&(aX(KR()),GC=!0)}var dX={mixout:function(){return{dom:{css:KR,insertCss:Nv}}},hooks:function(){return{beforeDOMElementCreation:function(){Nv()},beforeI2svg:function(){Nv()}}}},oo=ea||{};oo[io]||(oo[io]={});oo[io].styles||(oo[io].styles={});oo[io].hooks||(oo[io].hooks={});oo[io].shims||(oo[io].shims=[]);var ci=oo[io],XR=[],pX=function e(){It.removeEventListener("DOMContentLoaded",e),th=1,XR.map(function(t){return t()})},th=!1;fo&&(th=(It.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(It.readyState),th||It.addEventListener("DOMContentLoaded",pX));function hX(e){!fo||(th?setTimeout(e,0):XR.push(e))}function tf(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?YR(e):"<".concat(t," ").concat(lX(r),">").concat(o.map(tf).join(""),"")}function qC(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}var mX=function(t,n){return function(r,i,o,s){return t.call(n,r,i,o,s)}},Lv=function(t,n,r,i){var o=Object.keys(t),s=o.length,u=i!==void 0?mX(n,i):n,c,f,p;for(r===void 0?(c=1,p=t[o[0]]):(c=0,p=r);c=55296&&i<=56319&&n=55296&&r<=56319&&n>t+1&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function YC(e){return Object.keys(e).reduce(function(t,n){var r=e[n],i=!!r.icon;return i?t[r.iconName]=r.icon:t[n]=r,t},{})}function Ey(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=YC(t);typeof ci.hooks.addPack=="function"&&!i?ci.hooks.addPack(e,YC(t)):ci.styles[e]=fe(fe({},ci.styles[e]||{}),o),e==="fas"&&Ey("fa",t)}var $d,Dd,Nd,Ws=ci.styles,yX=ci.shims,xX=($d={},sn($d,_t,Object.values(Dc[_t])),sn($d,Ut,Object.values(Dc[Ut])),$d),gb=null,QR={},ZR={},JR={},eA={},tA={},bX=(Dd={},sn(Dd,_t,Object.keys(Mc[_t])),sn(Dd,Ut,Object.keys(Mc[Ut])),Dd);function wX(e){return~tX.indexOf(e)}function SX(e,t){var n=t.split("-"),r=n[0],i=n.slice(1).join("-");return r===e&&i!==""&&!wX(i)?i:null}var nA=function(){var t=function(o){return Lv(Ws,function(s,u,c){return s[c]=Lv(u,o,{}),s},{})};QR=t(function(i,o,s){if(o[3]&&(i[o[3]]=s),o[2]){var u=o[2].filter(function(c){return typeof c=="number"});u.forEach(function(c){i[c.toString(16)]=s})}return i}),ZR=t(function(i,o,s){if(i[s]=s,o[2]){var u=o[2].filter(function(c){return typeof c=="string"});u.forEach(function(c){i[c]=s})}return i}),tA=t(function(i,o,s){var u=o[2];return i[s]=s,u.forEach(function(c){i[c]=s}),i});var n="far"in Ws||ye.autoFetchSvg,r=Lv(yX,function(i,o){var s=o[0],u=o[1],c=o[2];return u==="far"&&!n&&(u="fas"),typeof s=="string"&&(i.names[s]={prefix:u,iconName:c}),typeof s=="number"&&(i.unicodes[s.toString(16)]={prefix:u,iconName:c}),i},{names:{},unicodes:{}});JR=r.names,eA=r.unicodes,gb=mm(ye.styleDefault,{family:ye.familyDefault})};oX(function(e){gb=mm(e.styleDefault,{family:ye.familyDefault})});nA();function vb(e,t){return(QR[e]||{})[t]}function kX(e,t){return(ZR[e]||{})[t]}function Da(e,t){return(tA[e]||{})[t]}function rA(e){return JR[e]||{prefix:null,iconName:null}}function CX(e){var t=eA[e],n=vb("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}function ta(){return gb}var yb=function(){return{prefix:null,iconName:null,rest:[]}};function mm(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.family,r=n===void 0?_t:n,i=Mc[r][e],o=$c[r][e]||$c[r][i],s=e in ci.styles?e:null;return o||s||null}var KC=(Nd={},sn(Nd,_t,Object.keys(Dc[_t])),sn(Nd,Ut,Object.keys(Dc[Ut])),Nd);function gm(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.skipLookups,i=r===void 0?!1:r,o=(t={},sn(t,_t,"".concat(ye.cssPrefix,"-").concat(_t)),sn(t,Ut,"".concat(ye.cssPrefix,"-").concat(Ut)),t),s=null,u=_t;(e.includes(o[_t])||e.some(function(f){return KC[_t].includes(f)}))&&(u=_t),(e.includes(o[Ut])||e.some(function(f){return KC[Ut].includes(f)}))&&(u=Ut);var c=e.reduce(function(f,p){var h=SX(ye.cssPrefix,p);if(Ws[p]?(p=xX[u].includes(p)?KK[u][p]:p,s=p,f.prefix=p):bX[u].indexOf(p)>-1?(s=p,f.prefix=mm(p,{family:u})):h?f.iconName=h:p!==ye.replacementClass&&p!==o[_t]&&p!==o[Ut]&&f.rest.push(p),!i&&f.prefix&&f.iconName){var g=s==="fa"?rA(f.iconName):{},v=Da(f.prefix,f.iconName);g.prefix&&(s=null),f.iconName=g.iconName||v||f.iconName,f.prefix=g.prefix||f.prefix,f.prefix==="far"&&!Ws.far&&Ws.fas&&!ye.autoFetchSvg&&(f.prefix="fas")}return f},yb());return(e.includes("fa-brands")||e.includes("fab"))&&(c.prefix="fab"),(e.includes("fa-duotone")||e.includes("fad"))&&(c.prefix="fad"),!c.prefix&&u===Ut&&(Ws.fass||ye.autoFetchSvg)&&(c.prefix="fass",c.iconName=Da(c.prefix,c.iconName)||c.iconName),(c.prefix==="fa"||s==="fa")&&(c.prefix=ta()||"fas"),c}var EX=function(){function e(){LK(this,e),this.definitions={}}return FK(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o0&&p.forEach(function(h){typeof h=="string"&&(n[u][h]=f)}),n[u][c]=f}),n}}]),e}(),XC=[],Us={},nl={},OX=Object.keys(nl);function _X(e,t){var n=t.mixoutsTo;return XC=e,Us={},Object.keys(nl).forEach(function(r){OX.indexOf(r)===-1&&delete nl[r]}),XC.forEach(function(r){var i=r.mixout?r.mixout():{};if(Object.keys(i).forEach(function(s){typeof i[s]=="function"&&(n[s]=i[s]),eh(i[s])==="object"&&Object.keys(i[s]).forEach(function(u){n[s]||(n[s]={}),n[s][u]=i[s][u]})}),r.hooks){var o=r.hooks();Object.keys(o).forEach(function(s){Us[s]||(Us[s]=[]),Us[s].push(o[s])})}r.provides&&r.provides(nl)}),n}function Oy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i1?t-1:0),r=1;r0&&arguments[0]!==void 0?arguments[0]:{};return fo?(Ka("beforeI2svg",t),ao("pseudoElements2svg",t),ao("i2svg",t)):Promise.reject("Operation requires a DOM of some kind.")},watch:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot;ye.autoReplaceSvg===!1&&(ye.autoReplaceSvg=!0),ye.observeMutations=!0,hX(function(){RX({autoReplaceSvgRoot:n}),Ka("watch",t)})}},IX={icon:function(t){if(t===null)return null;if(eh(t)==="object"&&t.prefix&&t.iconName)return{prefix:t.prefix,iconName:Da(t.prefix,t.iconName)||t.iconName};if(Array.isArray(t)&&t.length===2){var n=t[1].indexOf("fa-")===0?t[1].slice(3):t[1],r=mm(t[0]);return{prefix:r,iconName:Da(r,n)||n}}if(typeof t=="string"&&(t.indexOf("".concat(ye.cssPrefix,"-"))>-1||t.match(XK))){var i=gm(t.split(" "),{skipLookups:!0});return{prefix:i.prefix||ta(),iconName:Da(i.prefix,i.iconName)||i.iconName}}if(typeof t=="string"){var o=ta();return{prefix:o,iconName:Da(o,t)||t}}}},Er={noAuto:PX,config:ye,dom:TX,parse:IX,library:iA,findIconDefinition:_y,toHtml:tf},RX=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.autoReplaceSvgRoot,r=n===void 0?It:n;(Object.keys(ci.styles).length>0||ye.autoFetchSvg)&&fo&&ye.autoReplaceSvg&&Er.dom.i2svg({node:r})};function vm(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return tf(r)})}}),Object.defineProperty(e,"node",{get:function(){if(!!fo){var r=It.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function AX(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,s=e.transform;if(mb(s)&&n.found&&!r.found){var u=n.width,c=n.height,f={x:u/c/2,y:.5};i.style=hm(fe(fe({},o),{},{"transform-origin":"".concat(f.x+s.x/16,"em ").concat(f.y+s.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function MX(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,s=o===!0?"".concat(t,"-").concat(ye.cssPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:fe(fe({},i),{},{id:s}),children:r}]}]}function xb(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,s=e.transform,u=e.symbol,c=e.title,f=e.maskId,p=e.titleId,h=e.extra,g=e.watchable,v=g===void 0?!1:g,y=r.found?r:n,b=y.width,C=y.height,x=i==="fak",w=[ye.replacementClass,o?"".concat(ye.cssPrefix,"-").concat(o):""].filter(function(W){return h.classes.indexOf(W)===-1}).filter(function(W){return W!==""||!!W}).concat(h.classes).join(" "),S={children:[],attributes:fe(fe({},h.attributes),{},{"data-prefix":i,"data-icon":o,class:w,role:h.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(b," ").concat(C)})},E=x&&!~h.classes.indexOf("fa-fw")?{width:"".concat(b/C*16*.0625,"em")}:{};v&&(S.attributes[Ya]=""),c&&(S.children.push({tag:"title",attributes:{id:S.attributes["aria-labelledby"]||"title-".concat(p||Lc())},children:[c]}),delete S.attributes.title);var I=fe(fe({},S),{},{prefix:i,iconName:o,main:n,mask:r,maskId:f,transform:s,symbol:u,styles:fe(fe({},E),h.styles)}),_=r.found&&n.found?ao("generateAbstractMask",I)||{children:[],attributes:{}}:ao("generateAbstractIcon",I)||{children:[],attributes:{}},R=_.children,D=_.attributes;return I.children=R,I.attributes=D,u?MX(I):AX(I)}function QC(e){var t=e.content,n=e.width,r=e.height,i=e.transform,o=e.title,s=e.extra,u=e.watchable,c=u===void 0?!1:u,f=fe(fe(fe({},s.attributes),o?{title:o}:{}),{},{class:s.classes.join(" ")});c&&(f[Ya]="");var p=fe({},s.styles);mb(i)&&(p.transform=cX({transform:i,startCentered:!0,width:n,height:r}),p["-webkit-transform"]=p.transform);var h=hm(p);h.length>0&&(f.style=h);var g=[];return g.push({tag:"span",attributes:f,children:[t]}),o&&g.push({tag:"span",attributes:{class:"sr-only"},children:[o]}),g}function $X(e){var t=e.content,n=e.title,r=e.extra,i=fe(fe(fe({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),o=hm(r.styles);o.length>0&&(i.style=o);var s=[];return s.push({tag:"span",attributes:i,children:[t]}),n&&s.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),s}var Fv=ci.styles;function Py(e){var t=e[0],n=e[1],r=e.slice(4),i=ub(r,1),o=i[0],s=null;return Array.isArray(o)?s={tag:"g",attributes:{class:"".concat(ye.cssPrefix,"-").concat($a.GROUP)},children:[{tag:"path",attributes:{class:"".concat(ye.cssPrefix,"-").concat($a.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(ye.cssPrefix,"-").concat($a.PRIMARY),fill:"currentColor",d:o[1]}}]}:s={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:s}}var DX={found:!1,width:512,height:512};function NX(e,t){!HR&&!ye.showMissingIcons&&e&&console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}function Ty(e,t){var n=t;return t==="fa"&&ye.styleDefault!==null&&(t=ta()),new Promise(function(r,i){if(ao("missingIconAbstract"),n==="fa"){var o=rA(e)||{};e=o.iconName||e,t=o.prefix||t}if(e&&t&&Fv[t]&&Fv[t][e]){var s=Fv[t][e];return r(Py(s))}NX(e,t),r(fe(fe({},DX),{},{icon:ye.showMissingIcons&&e?ao("missingIconAbstract")||{}:{}}))})}var ZC=function(){},Iy=ye.measurePerformance&&Pd&&Pd.mark&&Pd.measure?Pd:{mark:ZC,measure:ZC},zu='FA "6.2.1"',LX=function(t){return Iy.mark("".concat(zu," ").concat(t," begins")),function(){return oA(t)}},oA=function(t){Iy.mark("".concat(zu," ").concat(t," ends")),Iy.measure("".concat(zu," ").concat(t),"".concat(zu," ").concat(t," begins"),"".concat(zu," ").concat(t," ends"))},bb={begin:LX,end:oA},lp=function(){};function JC(e){var t=e.getAttribute?e.getAttribute(Ya):null;return typeof t=="string"}function FX(e){var t=e.getAttribute?e.getAttribute(fb):null,n=e.getAttribute?e.getAttribute(db):null;return t&&n}function zX(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(ye.replacementClass)}function BX(){if(ye.autoReplaceSvg===!0)return up.replace;var e=up[ye.autoReplaceSvg];return e||up.replace}function jX(e){return It.createElementNS("http://www.w3.org/2000/svg",e)}function WX(e){return It.createElement(e)}function aA(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.ceFn,r=n===void 0?e.tag==="svg"?jX:WX:n;if(typeof e=="string")return It.createTextNode(e);var i=r(e.tag);Object.keys(e.attributes||[]).forEach(function(s){i.setAttribute(s,e.attributes[s])});var o=e.children||[];return o.forEach(function(s){i.appendChild(aA(s,{ceFn:r}))}),i}function UX(e){var t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}var up={replace:function(t){var n=t[0];if(n.parentNode)if(t[1].forEach(function(i){n.parentNode.insertBefore(aA(i),n)}),n.getAttribute(Ya)===null&&ye.keepOriginalSource){var r=It.createComment(UX(n));n.parentNode.replaceChild(r,n)}else n.remove()},nest:function(t){var n=t[0],r=t[1];if(~hb(n).indexOf(ye.replacementClass))return up.replace(t);var i=new RegExp("".concat(ye.cssPrefix,"-.*"));if(delete r[0].attributes.id,r[0].attributes.class){var o=r[0].attributes.class.split(" ").reduce(function(u,c){return c===ye.replacementClass||c.match(i)?u.toSvg.push(c):u.toNode.push(c),u},{toNode:[],toSvg:[]});r[0].attributes.class=o.toSvg.join(" "),o.toNode.length===0?n.removeAttribute("class"):n.setAttribute("class",o.toNode.join(" "))}var s=r.map(function(u){return tf(u)}).join(` -`);n.setAttribute(Ya,""),n.innerHTML=s}};function eE(e){e()}function sA(e,t){var n=typeof t=="function"?t:lp;if(e.length===0)n();else{var r=eE;ye.mutateApproach===qK&&(r=ea.requestAnimationFrame||eE),r(function(){var i=BX(),o=bb.begin("mutate");e.map(i),o(),n()})}}var wb=!1;function lA(){wb=!0}function Ry(){wb=!1}var nh=null;function tE(e){if(!!HC&&!!ye.observeMutations){var t=e.treeCallback,n=t===void 0?lp:t,r=e.nodeCallback,i=r===void 0?lp:r,o=e.pseudoElementsCallback,s=o===void 0?lp:o,u=e.observeMutationsRoot,c=u===void 0?It:u;nh=new HC(function(f){if(!wb){var p=ta();Ml(f).forEach(function(h){if(h.type==="childList"&&h.addedNodes.length>0&&!JC(h.addedNodes[0])&&(ye.searchPseudoElements&&s(h.target),n(h.target)),h.type==="attributes"&&h.target.parentNode&&ye.searchPseudoElements&&s(h.target.parentNode),h.type==="attributes"&&JC(h.target)&&~eX.indexOf(h.attributeName))if(h.attributeName==="class"&&FX(h.target)){var g=gm(hb(h.target)),v=g.prefix,y=g.iconName;h.target.setAttribute(fb,v||p),y&&h.target.setAttribute(db,y)}else zX(h.target)&&i(h.target)})}}),fo&&nh.observe(c,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}}function HX(){!nh||nh.disconnect()}function VX(e){var t=e.getAttribute("style"),n=[];return t&&(n=t.split(";").reduce(function(r,i){var o=i.split(":"),s=o[0],u=o.slice(1);return s&&u.length>0&&(r[s]=u.join(":").trim()),r},{})),n}function GX(e){var t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=e.innerText!==void 0?e.innerText.trim():"",i=gm(hb(e));return i.prefix||(i.prefix=ta()),t&&n&&(i.prefix=t,i.iconName=n),i.iconName&&i.prefix||(i.prefix&&r.length>0&&(i.iconName=kX(i.prefix,e.innerText)||vb(i.prefix,Cy(e.innerText))),!i.iconName&&ye.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(i.iconName=e.firstChild.data)),i}function qX(e){var t=Ml(e.attributes).reduce(function(i,o){return i.name!=="class"&&i.name!=="style"&&(i[o.name]=o.value),i},{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return ye.autoA11y&&(n?t["aria-labelledby"]="".concat(ye.replacementClass,"-title-").concat(r||Lc()):(t["aria-hidden"]="true",t.focusable="false")),t}function YX(){return{iconName:null,title:null,titleId:null,prefix:null,transform:Oi,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}}}function nE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{styleParser:!0},n=GX(e),r=n.iconName,i=n.prefix,o=n.rest,s=qX(e),u=Oy("parseNodeAttributes",{},e),c=t.styleParser?VX(e):[];return fe({iconName:r,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:i,transform:Oi,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:c,attributes:s}},u)}var KX=ci.styles;function uA(e){var t=ye.autoReplaceSvg==="nest"?nE(e,{styleParser:!1}):nE(e);return~t.extra.classes.indexOf(VR)?ao("generateLayersText",e,t):ao("generateSvgReplacementMutation",e,t)}var na=new Set;pb.map(function(e){na.add("fa-".concat(e))});Object.keys(Mc[_t]).map(na.add.bind(na));Object.keys(Mc[Ut]).map(na.add.bind(na));na=Jc(na);function rE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(!fo)return Promise.resolve();var n=It.documentElement.classList,r=function(h){return n.add("".concat(VC,"-").concat(h))},i=function(h){return n.remove("".concat(VC,"-").concat(h))},o=ye.autoFetchSvg?na:pb.map(function(p){return"fa-".concat(p)}).concat(Object.keys(KX));o.includes("fa")||o.push("fa");var s=[".".concat(VR,":not([").concat(Ya,"])")].concat(o.map(function(p){return".".concat(p,":not([").concat(Ya,"])")})).join(", ");if(s.length===0)return Promise.resolve();var u=[];try{u=Ml(e.querySelectorAll(s))}catch{}if(u.length>0)r("pending"),i("complete");else return Promise.resolve();var c=bb.begin("onTree"),f=u.reduce(function(p,h){try{var g=uA(h);g&&p.push(g)}catch(v){HR||v.name==="MissingIcon"&&console.error(v)}return p},[]);return new Promise(function(p,h){Promise.all(f).then(function(g){sA(g,function(){r("active"),r("complete"),i("pending"),typeof t=="function"&&t(),c(),p()})}).catch(function(g){c(),h(g)})})}function XX(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;uA(e).then(function(n){n&&sA([n],t)})}function QX(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:_y(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:_y(i||{})),e(r,fe(fe({},n),{},{mask:i}))}}var ZX=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.transform,i=r===void 0?Oi:r,o=n.symbol,s=o===void 0?!1:o,u=n.mask,c=u===void 0?null:u,f=n.maskId,p=f===void 0?null:f,h=n.title,g=h===void 0?null:h,v=n.titleId,y=v===void 0?null:v,b=n.classes,C=b===void 0?[]:b,x=n.attributes,w=x===void 0?{}:x,S=n.styles,E=S===void 0?{}:S;if(!!t){var I=t.prefix,_=t.iconName,R=t.icon;return vm(fe({type:"icon"},t),function(){return Ka("beforeDOMElementCreation",{iconDefinition:t,params:n}),ye.autoA11y&&(g?w["aria-labelledby"]="".concat(ye.replacementClass,"-title-").concat(y||Lc()):(w["aria-hidden"]="true",w.focusable="false")),xb({icons:{main:Py(R),mask:c?Py(c.icon):{found:!1,width:null,height:null,icon:{}}},prefix:I,iconName:_,transform:fe(fe({},Oi),i),symbol:s,title:g,maskId:p,titleId:y,extra:{attributes:w,styles:E,classes:C}})})}},JX={mixout:function(){return{icon:QX(ZX)}},hooks:function(){return{mutationObserverCallbacks:function(n){return n.treeCallback=rE,n.nodeCallback=XX,n}}},provides:function(t){t.i2svg=function(n){var r=n.node,i=r===void 0?It:r,o=n.callback,s=o===void 0?function(){}:o;return rE(i,s)},t.generateSvgReplacementMutation=function(n,r){var i=r.iconName,o=r.title,s=r.titleId,u=r.prefix,c=r.transform,f=r.symbol,p=r.mask,h=r.maskId,g=r.extra;return new Promise(function(v,y){Promise.all([Ty(i,u),p.iconName?Ty(p.iconName,p.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then(function(b){var C=ub(b,2),x=C[0],w=C[1];v([n,xb({icons:{main:x,mask:w},prefix:u,iconName:i,transform:c,symbol:f,maskId:h,title:o,titleId:s,extra:g,watchable:!0})])}).catch(y)})},t.generateAbstractIcon=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.transform,u=n.styles,c=hm(u);c.length>0&&(i.style=c);var f;return mb(s)&&(f=ao("generateAbstractTransformGrouping",{main:o,transform:s,containerWidth:o.width,iconWidth:o.width})),r.push(f||o.icon),{children:r,attributes:i}}}},eQ={mixout:function(){return{layer:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.classes,o=i===void 0?[]:i;return vm({type:"layer"},function(){Ka("beforeDOMElementCreation",{assembler:n,params:r});var s=[];return n(function(u){Array.isArray(u)?u.map(function(c){s=s.concat(c.abstract)}):s=s.concat(u.abstract)}),[{tag:"span",attributes:{class:["".concat(ye.cssPrefix,"-layers")].concat(Jc(o)).join(" ")},children:s}]})}}}},tQ={mixout:function(){return{counter:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.title,o=i===void 0?null:i,s=r.classes,u=s===void 0?[]:s,c=r.attributes,f=c===void 0?{}:c,p=r.styles,h=p===void 0?{}:p;return vm({type:"counter",content:n},function(){return Ka("beforeDOMElementCreation",{content:n,params:r}),$X({content:n.toString(),title:o,extra:{attributes:f,styles:h,classes:["".concat(ye.cssPrefix,"-layers-counter")].concat(Jc(u))}})})}}}},nQ={mixout:function(){return{text:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.transform,o=i===void 0?Oi:i,s=r.title,u=s===void 0?null:s,c=r.classes,f=c===void 0?[]:c,p=r.attributes,h=p===void 0?{}:p,g=r.styles,v=g===void 0?{}:g;return vm({type:"text",content:n},function(){return Ka("beforeDOMElementCreation",{content:n,params:r}),QC({content:n,transform:fe(fe({},Oi),o),title:u,extra:{attributes:h,styles:v,classes:["".concat(ye.cssPrefix,"-layers-text")].concat(Jc(f))}})})}}},provides:function(t){t.generateLayersText=function(n,r){var i=r.title,o=r.transform,s=r.extra,u=null,c=null;if(jR){var f=parseInt(getComputedStyle(n).fontSize,10),p=n.getBoundingClientRect();u=p.width/f,c=p.height/f}return ye.autoA11y&&!i&&(s.attributes["aria-hidden"]="true"),Promise.resolve([n,QC({content:n.innerHTML,width:u,height:c,transform:o,title:i,extra:s,watchable:!0})])}}},rQ=new RegExp('"',"ug"),iE=[1105920,1112319];function iQ(e){var t=e.replace(rQ,""),n=vX(t,0),r=n>=iE[0]&&n<=iE[1],i=t.length===2?t[0]===t[1]:!1;return{value:Cy(i?t[0]:t),isSecondary:r||i}}function oE(e,t){var n="".concat(GK).concat(t.replace(":","-"));return new Promise(function(r,i){if(e.getAttribute(n)!==null)return r();var o=Ml(e.children),s=o.filter(function(R){return R.getAttribute(ky)===t})[0],u=ea.getComputedStyle(e,t),c=u.getPropertyValue("font-family").match(QK),f=u.getPropertyValue("font-weight"),p=u.getPropertyValue("content");if(s&&!c)return e.removeChild(s),r();if(c&&p!=="none"&&p!==""){var h=u.getPropertyValue("content"),g=~["Sharp"].indexOf(c[2])?Ut:_t,v=~["Solid","Regular","Light","Thin","Duotone","Brands","Kit"].indexOf(c[2])?$c[g][c[2].toLowerCase()]:ZK[g][f],y=iQ(h),b=y.value,C=y.isSecondary,x=c[0].startsWith("FontAwesome"),w=vb(v,b),S=w;if(x){var E=CX(b);E.iconName&&E.prefix&&(w=E.iconName,v=E.prefix)}if(w&&!C&&(!s||s.getAttribute(fb)!==v||s.getAttribute(db)!==S)){e.setAttribute(n,S),s&&e.removeChild(s);var I=YX(),_=I.extra;_.attributes[ky]=t,Ty(w,v).then(function(R){var D=xb(fe(fe({},I),{},{icons:{main:R,mask:yb()},prefix:v,iconName:S,extra:_,watchable:!0})),W=It.createElement("svg");t==="::before"?e.insertBefore(W,e.firstChild):e.appendChild(W),W.outerHTML=D.map(function(L){return tf(L)}).join(` -`),e.removeAttribute(n),r()}).catch(i)}else r()}else r()})}function oQ(e){return Promise.all([oE(e,"::before"),oE(e,"::after")])}function aQ(e){return e.parentNode!==document.head&&!~YK.indexOf(e.tagName.toUpperCase())&&!e.getAttribute(ky)&&(!e.parentNode||e.parentNode.tagName!=="svg")}function aE(e){if(!!fo)return new Promise(function(t,n){var r=Ml(e.querySelectorAll("*")).filter(aQ).map(oQ),i=bb.begin("searchPseudoElements");lA(),Promise.all(r).then(function(){i(),Ry(),t()}).catch(function(){i(),Ry(),n()})})}var sQ={hooks:function(){return{mutationObserverCallbacks:function(n){return n.pseudoElementsCallback=aE,n}}},provides:function(t){t.pseudoElements2svg=function(n){var r=n.node,i=r===void 0?It:r;ye.searchPseudoElements&&aE(i)}}},sE=!1,lQ={mixout:function(){return{dom:{unwatch:function(){lA(),sE=!0}}}},hooks:function(){return{bootstrap:function(){tE(Oy("mutationObserverCallbacks",{}))},noAuto:function(){HX()},watch:function(n){var r=n.observeMutationsRoot;sE?Ry():tE(Oy("mutationObserverCallbacks",{observeMutationsRoot:r}))}}}},lE=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),s=o[0],u=o.slice(1).join("-");if(s&&u==="h")return r.flipX=!0,r;if(s&&u==="v")return r.flipY=!0,r;if(u=parseFloat(u),isNaN(u))return r;switch(s){case"grow":r.size=r.size+u;break;case"shrink":r.size=r.size-u;break;case"left":r.x=r.x-u;break;case"right":r.x=r.x+u;break;case"up":r.y=r.y-u;break;case"down":r.y=r.y+u;break;case"rotate":r.rotate=r.rotate+u;break}return r},n)},uQ={mixout:function(){return{parse:{transform:function(n){return lE(n)}}}},hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-transform");return i&&(n.transform=lE(i)),n}}},provides:function(t){t.generateAbstractTransformGrouping=function(n){var r=n.main,i=n.transform,o=n.containerWidth,s=n.iconWidth,u={transform:"translate(".concat(o/2," 256)")},c="translate(".concat(i.x*32,", ").concat(i.y*32,") "),f="scale(".concat(i.size/16*(i.flipX?-1:1),", ").concat(i.size/16*(i.flipY?-1:1),") "),p="rotate(".concat(i.rotate," 0 0)"),h={transform:"".concat(c," ").concat(f," ").concat(p)},g={transform:"translate(".concat(s/2*-1," -256)")},v={outer:u,inner:h,path:g};return{tag:"g",attributes:fe({},v.outer),children:[{tag:"g",attributes:fe({},v.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:fe(fe({},r.icon.attributes),v.path)}]}]}}}},zv={x:0,y:0,width:"100%",height:"100%"};function uE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function cQ(e){return e.tag==="g"?e.children:[e]}var fQ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-mask"),o=i?gm(i.split(" ").map(function(s){return s.trim()})):yb();return o.prefix||(o.prefix=ta()),n.mask=o,n.maskId=r.getAttribute("data-fa-mask-id"),n}}},provides:function(t){t.generateAbstractMask=function(n){var r=n.children,i=n.attributes,o=n.main,s=n.mask,u=n.maskId,c=n.transform,f=o.width,p=o.icon,h=s.width,g=s.icon,v=uX({transform:c,containerWidth:h,iconWidth:f}),y={tag:"rect",attributes:fe(fe({},zv),{},{fill:"white"})},b=p.children?{children:p.children.map(uE)}:{},C={tag:"g",attributes:fe({},v.inner),children:[uE(fe({tag:p.tag,attributes:fe(fe({},p.attributes),v.path)},b))]},x={tag:"g",attributes:fe({},v.outer),children:[C]},w="mask-".concat(u||Lc()),S="clip-".concat(u||Lc()),E={tag:"mask",attributes:fe(fe({},zv),{},{id:w,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[y,x]},I={tag:"defs",children:[{tag:"clipPath",attributes:{id:S},children:cQ(g)},E]};return r.push(I,{tag:"rect",attributes:fe({fill:"currentColor","clip-path":"url(#".concat(S,")"),mask:"url(#".concat(w,")")},zv)}),{children:r,attributes:i}}}},dQ={provides:function(t){var n=!1;ea.matchMedia&&(n=ea.matchMedia("(prefers-reduced-motion: reduce)").matches),t.missingIconAbstract=function(){var r=[],i={fill:"currentColor"},o={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};r.push({tag:"path",attributes:fe(fe({},i),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});var s=fe(fe({},o),{},{attributeName:"opacity"}),u={tag:"circle",attributes:fe(fe({},i),{},{cx:"256",cy:"364",r:"28"}),children:[]};return n||u.children.push({tag:"animate",attributes:fe(fe({},o),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:fe(fe({},s),{},{values:"1;0;1;1;0;1;"})}),r.push(u),r.push({tag:"path",attributes:fe(fe({},i),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:n?[]:[{tag:"animate",attributes:fe(fe({},s),{},{values:"1;0;0;0;0;1;"})}]}),n||r.push({tag:"path",attributes:fe(fe({},i),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:fe(fe({},s),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:r}}}},pQ={hooks:function(){return{parseNodeAttributes:function(n,r){var i=r.getAttribute("data-fa-symbol"),o=i===null?!1:i===""?!0:i;return n.symbol=o,n}}}},hQ=[dX,JX,eQ,tQ,nQ,sQ,lQ,uQ,fQ,dQ,pQ];_X(hQ,{mixoutsTo:Er});Er.noAuto;Er.config;Er.library;Er.dom;var Ay=Er.parse;Er.findIconDefinition;Er.toHtml;var mQ=Er.icon;Er.layer;Er.text;Er.counter;function cE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Do(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function vQ(e,t){if(e==null)return{};var n=gQ(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function My(e){return yQ(e)||xQ(e)||bQ(e)||wQ()}function yQ(e){if(Array.isArray(e))return $y(e)}function xQ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function bQ(e,t){if(!!e){if(typeof e=="string")return $y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $y(e,t)}}function $y(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(c){return fA(e,c)}),i=Object.keys(t.attributes||{}).reduce(function(c,f){var p=t.attributes[f];switch(f){case"class":c.attrs.className=p,delete t.attributes.class;break;case"style":c.attrs.style=OQ(p);break;default:f.indexOf("aria-")===0||f.indexOf("data-")===0?c.attrs[f.toLowerCase()]=p:c.attrs[cA(f)]=p}return c},{attrs:{}}),o=n.style,s=o===void 0?{}:o,u=vQ(n,CQ);return i.attrs.style=Do(Do({},i.attrs.style),s),e.apply(void 0,[t.tag,Do(Do({},i.attrs),u)].concat(My(r)))}var dA=!1;try{dA=!0}catch{}function _Q(){if(!dA&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function fE(e){if(e&&rh(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(Ay.icon)return Ay.icon(e);if(e===null)return null;if(e&&rh(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function Bv(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?Hs({},e,t):{}}var $l=Ye.forwardRef(function(e,t){var n=e.icon,r=e.mask,i=e.symbol,o=e.className,s=e.title,u=e.titleId,c=e.maskId,f=fE(n),p=Bv("classes",[].concat(My(SQ(e)),My(o.split(" ")))),h=Bv("transform",typeof e.transform=="string"?Ay.transform(e.transform):e.transform),g=Bv("mask",fE(r)),v=mQ(f,Do(Do(Do(Do({},p),h),g),{},{symbol:i,title:s,titleId:u,maskId:c}));if(!v)return _Q("Could not find icon",f),null;var y=v.abstract,b={ref:t};return Object.keys(e).forEach(function(C){$l.defaultProps.hasOwnProperty(C)||(b[C]=e[C])}),PQ(y[0],b)});$l.displayName="FontAwesomeIcon";$l.propTypes={beat:se.exports.bool,border:se.exports.bool,beatFade:se.exports.bool,bounce:se.exports.bool,className:se.exports.string,fade:se.exports.bool,flash:se.exports.bool,mask:se.exports.oneOfType([se.exports.object,se.exports.array,se.exports.string]),maskId:se.exports.string,fixedWidth:se.exports.bool,inverse:se.exports.bool,flip:se.exports.oneOf([!0,!1,"horizontal","vertical","both"]),icon:se.exports.oneOfType([se.exports.object,se.exports.array,se.exports.string]),listItem:se.exports.bool,pull:se.exports.oneOf(["right","left"]),pulse:se.exports.bool,rotation:se.exports.oneOf([0,90,180,270]),shake:se.exports.bool,size:se.exports.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:se.exports.bool,spinPulse:se.exports.bool,spinReverse:se.exports.bool,symbol:se.exports.oneOfType([se.exports.bool,se.exports.string]),title:se.exports.string,titleId:se.exports.string,transform:se.exports.oneOfType([se.exports.string,se.exports.object]),swapOpacity:se.exports.bool};$l.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var PQ=fA.bind(null,Ye.createElement);const Pt={},TQ=Ye.forwardRef(function(t,n){return N(MR,{direction:"up",ref:n,...t})}),IQ=({infoVisible:e,setInfoVisible:t})=>{const[n,r]=T.exports.useState(!1);return ge(Vq,{open:e,fullWidth:!0,maxWidth:"xs",onClose:()=>t(!1),TransitionComponent:TQ,children:[ge(fY,{children:[N("p",{children:Pt.ui_usefulcontrols}),N(sb,{className:"useful-controls-exit-button","aria-label":"close",onClick:()=>t(!1),children:N($l,{icon:NK})})]}),N(aY,{children:ge("div",{className:"useful-controls-content-wrapper",children:[ge("p",{children:[N("kbd",{children:"RMB"}),N("br",{}),Pt.ui_rmb]}),ge("p",{children:[N("kbd",{children:"ALT + LMB"}),N("br",{}),Pt.ui_alt_lmb]}),ge("p",{children:[N("kbd",{children:"CTRL + LMB"}),N("br",{}),Pt.ui_ctrl_lmb]}),ge("p",{children:[N("kbd",{children:"SHIFT + Drag"}),N("br",{}),Pt.ui_shift_drag]}),ge("p",{children:[N("kbd",{children:"CTRL + SHIFT + LMB"}),N("br",{}),Pt.ui_ctrl_shift_lmb]})]})}),N(Qq,{children:N("span",{onClick:()=>r(!0),children:"🐂"})}),N(SK,{open:n,onClose:()=>r(!1),autoHideDuration:2e3,anchorOrigin:{vertical:"top",horizontal:"center"},children:N(QG,{severity:"success",color:"info",sx:{width:"100%"},children:"Made with 🐂 by the Overextended team"})})]})},RQ=()=>{const e=Ja(N7),t=_l(),[n,r]=T.exports.useState(!1),[,i]=X0(()=>({accept:"SLOT",drop:u=>{u.inventory==="player"&&lb(u.item)}})),[,o]=X0(()=>({accept:"SLOT",drop:u=>{u.inventory==="player"&&NR(u.item)}}));return ge(Vr,{children:[N(IQ,{infoVisible:n,setInfoVisible:r}),N("div",{className:"inventory-control",children:ge("div",{className:"inventory-control-wrapper",children:[N("input",{className:"inventory-control-input",type:"number",defaultValue:e,onChange:u=>{(u.target.valueAsNumber%1!==0||isNaN(u.target.valueAsNumber)||u.target.valueAsNumber<0)&&(u.target.valueAsNumber=0),t(P7(u.target.valueAsNumber))}}),N("button",{className:"inventory-control-button",ref:i,children:Pt.ui_use||"Use"}),N("button",{className:"inventory-control-button",ref:o,children:Pt.ui_give||"Give"}),N("button",{className:"inventory-control-button",onClick:()=>Wr("exit"),children:Pt.ui_close||"Close"})]})}),N(sb,{className:"useful-controls-button",size:"large",onClick:()=>r(!0),children:N($l,{icon:$K})})]})},jv=(e,t,n)=>{let r=e*n,i=t*(1-n);return r+i},Ld=(e,t,n)=>{let r=jv(e[0],t[0],n),i=jv(e[1],t[1],n),o=jv(e[2],t[2],n);return`rgb(${r}, ${i}, ${o})`},Co={primaryColor:[231,76,60],secondColor:[39,174,96],accentColor:[211,84,0]},Sb=({percent:e,durability:t})=>{const n=Ye.useMemo(()=>t?e<50?Ld(Co.accentColor,Co.primaryColor,e/100):Ld(Co.secondColor,Co.accentColor,e/100):e>50?Ld(Co.primaryColor,Co.accentColor,e/100):Ld(Co.accentColor,Co.secondColor,e/50),[t,e]);return N("div",{className:t?"durability-bar":"weight-bar",children:N("div",{style:{visibility:e>0?"visible":"hidden",height:"100%",width:`${e}%`,backgroundColor:n,transition:`background ${.3}s ease, width ${.3}s ease`}})})},AQ=()=>{const[e,t]=T.exports.useState(!1),n=Ja(dT).items.slice(0,5),[r,i]=T.exports.useState();return Ci("toggleHotbar",()=>{e?t(!1):(r&&clearTimeout(r),t(!0),i(setTimeout(()=>t(!1),3e3)))}),N(MR,{in:e,direction:"up",unmountOnExit:!0,children:N("div",{className:"hotbar-container",children:n.map(o=>N("div",{className:"hotbar-item-slot",style:{backgroundImage:`url(${o?.name?Js(o):"none"}`},children:Fn(o)&&ge("div",{className:"item-slot-wrapper",children:[ge("div",{className:"hotbar-slot-header-wrapper",children:[N("div",{className:"inventory-slot-number",children:o.slot}),ge("div",{className:"item-slot-info-wrapper",children:[N("p",{children:o.weight>0?o.weight>=1e3?`${(o.weight/1e3).toLocaleString("en-us",{minimumFractionDigits:2})}kg `:`${o.weight.toLocaleString("en-us",{minimumFractionDigits:0})}g `:""}),N("p",{children:o.count?o.count.toLocaleString("en-us")+"x":""})]})]}),ge("div",{children:[o?.durability!==void 0&&N(Sb,{percent:o.durability,durability:!0}),N("div",{className:"inventory-slot-label-box",children:N("div",{className:"inventory-slot-label-text",children:o.metadata?.label?o.metadata.label:xt[o.name]?.label||o.name})})]})]})},`hotbar-${o.slot}`))})})},MQ=["Escape"],$Q=e=>{const t=T.exports.useRef(uT);T.exports.useEffect(()=>{t.current=e},[e]),T.exports.useEffect(()=>{const n=r=>{MQ.includes(r.code)&&(t.current(!1),Wr("exit"))};return window.addEventListener("keyup",n),()=>window.removeEventListener("keyup",n)},[])},DQ=ax("inventory/validateMove",async(e,{rejectWithValue:t,dispatch:n})=>{try{const r=await Wr("swapItems",e);if(r===!1)return t(r);typeof r=="number"&&n($7(r))}catch{return t(!1)}}),Dy=(e,t)=>{const{inventory:n}=hr.getState(),{sourceInventory:r,targetInventory:i}=Yh(n,e.inventory,t?.inventory),o=r.items[e.item.slot-1],s=xt[o.name];if(s===void 0)return console.error(`${o.name} item data undefined!`);if(o.metadata?.container!==void 0){if(i.type===Rn.CONTAINER)return console.log(`Cannot store container ${o.name} inside another container`);if(n.rightInventory.id===o.metadata.container)return console.log(`Cannot move container ${o.name} when opened`)}const u=t?i.items[t.item.slot-1]:x7(o,s,i.items);if(u===void 0)return console.error("Target slot undefined!");if(u.metadata?.container!==void 0&&n.rightInventory.id===u.metadata.container)return console.log(`Cannot swap item ${o.name} with container ${u.name} when opened`);const c=n.shiftPressed&&o.count>1&&r.type!=="shop"?Math.floor(o.count/2):n.itemAmount===0||n.itemAmount>o.count?o.count:n.itemAmount,f={fromSlot:o,toSlot:u,fromType:r.type,toType:i.type,count:c};hr.dispatch(DQ({...f,fromSlot:o.slot,toSlot:u.slot})),Fn(u,!0)?s.stack&&y7(o,u)?hr.dispatch(A7({...f,toSlot:u})):hr.dispatch(I7({...f,toSlot:u})):hr.dispatch(R7(f))},NQ=ax("inventory/buyItem",async(e,{rejectWithValue:t})=>{try{const n=await Wr("buyItem",e);if(n===!1)return t(n)}catch{return t(!1)}}),LQ=(e,t)=>{const{inventory:n}=hr.getState(),r=n.rightInventory,i=n.leftInventory,o=r.items[e.item.slot-1];if(!Fn(o))throw new Error(`Item ${o.slot} name === undefined`);if(o.count===0)return;if(xt[o.name]===void 0)return console.error(`Item ${o.name} data undefined!`);const u=i.items[t.item.slot-1];if(u===void 0)return console.error("Target slot undefined");const c=n.itemAmount!==0?o.count&&n.itemAmount>o.count?o.count:n.itemAmount:1,f={fromSlot:o,toSlot:u,fromType:r.type,toType:i.type,count:c};hr.dispatch(NQ({...f,fromSlot:o.slot,toSlot:u.slot}))},dE=["http","https","mailto","tel"];function FQ(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++ii||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}var pA=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};function oc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?pE(e.position):"start"in e||"end"in e?pE(e):"line"in e||"column"in e?Ny(e):""}function Ny(e){return hE(e&&e.line)+":"+hE(e&&e.column)}function pE(e){return Ny(e&&e.start)+"-"+Ny(e&&e.end)}function hE(e){return e&&typeof e=="number"?e:1}class Zr extends Error{constructor(t,n,r){const i=[null,null];let o={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const s=r.indexOf(":");s===-1?i[1]=r:(i[0]=r.slice(0,s),i[1]=r.slice(s+1))}n&&("type"in n||"position"in n?n.position&&(o=n.position):"start"in n||"end"in n?o=n:("line"in n||"column"in n)&&(o.start=n)),this.name=oc(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=o.start.line,this.column=o.start.column,this.position=o,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}Zr.prototype.file="";Zr.prototype.name="";Zr.prototype.reason="";Zr.prototype.message="";Zr.prototype.stack="";Zr.prototype.fatal=null;Zr.prototype.column=null;Zr.prototype.line=null;Zr.prototype.source=null;Zr.prototype.ruleId=null;Zr.prototype.position=null;const bi={basename:zQ,dirname:BQ,extname:jQ,join:WQ,sep:"/"};function zQ(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');nf(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,u=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1),u>-1&&(e.charCodeAt(i)===t.charCodeAt(u--)?u<0&&(r=i):(u=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function BQ(e){if(nf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function jQ(e){nf(e);let t=e.length,n=-1,r=0,i=-1,o=0,s;for(;t--;){const u=e.charCodeAt(t);if(u===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function WQ(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HQ(e,t){let n="",r=0,i=-1,o=0,s=-1,u,c;for(;++s<=e.length;){if(s2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=s,o=0;continue}}else if(n.length>0){n="",r=0,i=s,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,o=0}else u===46&&o>-1?o++:o=-1}return n}function nf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const VQ={cwd:GQ};function GQ(){return"/"}function Ly(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function qQ(e){if(typeof e=="string")e=new URL(e);else if(!Ly(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return YQ(e)}function YQ(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n"u"||cp.call(t,i)},wE=function(t,n){vE&&n.name==="__proto__"?vE(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},SE=function(t,n){if(n==="__proto__")if(cp.call(t,n)){if(yE)return yE(t,n).value}else return;return t[n]},kE=function e(){var t,n,r,i,o,s,u=arguments[0],c=1,f=arguments.length,p=!1;for(typeof u=="boolean"&&(p=u,u=arguments[1]||{},c=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});cs.length;let c;u&&s.push(i);try{c=e.apply(this,s)}catch(f){const p=f;if(u&&n)throw p;return i(p)}u||(c instanceof Promise?c.then(o,i):c instanceof Error?i(c):o(c))}function i(s,...u){n||(n=!0,t(s,...u))}function o(s){i(null,s)}}const QQ=vA().freeze(),gA={}.hasOwnProperty;function vA(){const e=KQ(),t=[];let n={},r,i=-1;return o.data=s,o.Parser=void 0,o.Compiler=void 0,o.freeze=u,o.attachers=t,o.use=c,o.parse=f,o.stringify=p,o.run=h,o.runSync=g,o.process=v,o.processSync=y,o;function o(){const b=vA();let C=-1;for(;++C{if(_||!R||!D)I(_);else{const W=o.stringify(R,D);W==null||(eZ(W)?D.value=W:D.result=W),I(_,D)}});function I(_,R){_||!R?S(_):w?w(R):C(null,R)}}}function y(b){let C;o.freeze(),Vv("processSync",o.Parser),Gv("processSync",o.Compiler);const x=bu(b);return o.process(x,w),OE("processSync","process",C),x;function w(S){C=!0,gE(S)}}}function CE(e,t){return typeof e=="function"&&e.prototype&&(ZQ(e.prototype)||t in e.prototype)}function ZQ(e){let t;for(t in e)if(gA.call(e,t))return!0;return!1}function Vv(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function Gv(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function qv(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function EE(e){if(!Fy(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function OE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function bu(e){return JQ(e)?e:new hA(e)}function JQ(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function eZ(e){return typeof e=="string"||pA(e)}function tZ(e,t){var{includeImageAlt:n=!0}=t||{};return yA(e,n)}function yA(e,t){return e&&typeof e=="object"&&(e.value||(t?e.alt:"")||"children"in e&&_E(e.children,t)||Array.isArray(e)&&_E(e,t))||""}function _E(e,t){for(var n=[],r=-1;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),[].splice.apply(e,s);else for(n&&[].splice.apply(e,[t,n]);o0?($i(e,e.length,0,t),e):t}const PE={}.hasOwnProperty;function nZ(e){const t={};let n=-1;for(;++ns))return;const R=t.events.length;let D=R,W,L;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){if(W){L=t.events[D][1].end;break}W=!0}for(x(r),_=R;_S;){const I=n[E];t.containerState=I[1],I[0].exit.call(t,e)}n.length=S}function w(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hZ(e,t,n){return gt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function RE(e){if(e===null||Hr(e)||lZ(e))return 1;if(uZ(e))return 2}function kb(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const h=Object.assign({},e[r][1].end),g=Object.assign({},e[n][1].start);AE(h,-c),AE(g,c),s={type:c>1?"strongSequence":"emphasisSequence",start:h,end:Object.assign({},e[r][1].end)},u={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:g},o={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:c>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},u.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},u.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=zr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=zr(f,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",o,t]]),f=zr(f,kb(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=zr(f,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=zr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,$i(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n=4?s(f):n(f)}function s(f){return f===null?c(f):Te(f)?e.attempt(OZ,s,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Te(f)?(e.exit("codeFlowValue"),s(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function PZ(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):gt(e,o,"linePrefix",4+1)(s)}function o(s){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(s):Te(s)?i(s):n(s)}}const TZ={name:"codeText",tokenize:AZ,resolve:IZ,previous:RZ};function IZ(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function kA(e,t,n,r,i,o,s,u,c){const f=c||Number.POSITIVE_INFINITY;let p=0;return h;function h(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),g):x===null||x===41||By(x)?n(x):(e.enter(r),e.enter(s),e.enter(u),e.enter("chunkString",{contentType:"string"}),b(x))}function g(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),v(x))}function v(x){return x===62?(e.exit("chunkString"),e.exit(u),g(x)):x===null||x===60||Te(x)?n(x):(e.consume(x),x===92?y:v)}function y(x){return x===60||x===62||x===92?(e.consume(x),v):v(x)}function b(x){return x===40?++p>f?n(x):(e.consume(x),b):x===41?p--?(e.consume(x),b):(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(x)):x===null||Hr(x)?p?n(x):(e.exit("chunkString"),e.exit(u),e.exit(s),e.exit(r),t(x)):By(x)?n(x):(e.consume(x),x===92?C:b)}function C(x){return x===40||x===41||x===92?(e.consume(x),b):b(x)}}function CA(e,t,n,r,i,o){const s=this;let u=0,c;return f;function f(v){return e.enter(r),e.enter(i),e.consume(v),e.exit(i),e.enter(o),p}function p(v){return v===null||v===91||v===93&&!c||v===94&&!u&&"_hiddenFootnoteSupport"in s.parser.constructs||u>999?n(v):v===93?(e.exit(o),e.enter(i),e.consume(v),e.exit(i),e.exit(r),t):Te(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),h(v))}function h(v){return v===null||v===91||v===93||Te(v)||u++>999?(e.exit("chunkString"),p(v)):(e.consume(v),c=c||!Jt(v),v===92?g:h)}function g(v){return v===91||v===92||v===93?(e.consume(v),u++,h):h(v)}}function EA(e,t,n,r,i,o){let s;return u;function u(g){return e.enter(r),e.enter(i),e.consume(g),e.exit(i),s=g===40?41:g,c}function c(g){return g===s?(e.enter(i),e.consume(g),e.exit(i),e.exit(r),t):(e.enter(o),f(g))}function f(g){return g===s?(e.exit(o),c(s)):g===null?n(g):Te(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),gt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===s||g===null||Te(g)?(e.exit("chunkString"),f(g)):(e.consume(g),g===92?h:p)}function h(g){return g===s||g===92?(e.consume(g),p):p(g)}}function ac(e,t){let n;return r;function r(i){return Te(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Jt(i)?gt(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function rl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const zZ={name:"definition",tokenize:jZ},BZ={tokenize:WZ,partial:!0};function jZ(e,t,n){const r=this;let i;return o;function o(c){return e.enter("definition"),CA.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(c)}function s(c){return i=rl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),c===58?(e.enter("definitionMarker"),e.consume(c),e.exit("definitionMarker"),ac(e,kA(e,e.attempt(BZ,gt(e,u,"whitespace"),gt(e,u,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(c)}function u(c){return c===null||Te(c)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(c)):n(c)}}function WZ(e,t,n){return r;function r(s){return Hr(s)?ac(e,i)(s):n(s)}function i(s){return s===34||s===39||s===40?EA(e,gt(e,o,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s):n(s)}function o(s){return s===null||Te(s)?t(s):n(s)}}const UZ={name:"hardBreakEscape",tokenize:HZ};function HZ(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(o),i}function i(o){return Te(o)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(o)):n(o)}}const VZ={name:"headingAtx",tokenize:qZ,resolve:GZ};function GZ(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$i(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function qZ(e,t,n){const r=this;let i=0;return o;function o(p){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),s(p)}function s(p){return p===35&&i++<6?(e.consume(p),s):p===null||Hr(p)?(e.exit("atxHeadingSequence"),r.interrupt?t(p):u(p)):n(p)}function u(p){return p===35?(e.enter("atxHeadingSequence"),c(p)):p===null||Te(p)?(e.exit("atxHeading"),t(p)):Jt(p)?gt(e,u,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function c(p){return p===35?(e.consume(p),c):(e.exit("atxHeadingSequence"),u(p))}function f(p){return p===null||p===35||Hr(p)?(e.exit("atxHeadingText"),u(p)):(e.consume(p),f)}}const YZ=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],DE=["pre","script","style","textarea"],KZ={name:"htmlFlow",tokenize:ZZ,resolveTo:QZ,concrete:!0},XZ={tokenize:JZ,partial:!0};function QZ(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function ZZ(e,t,n){const r=this;let i,o,s,u,c;return f;function f(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),p}function p(M){return M===33?(e.consume(M),h):M===47?(e.consume(M),y):M===63?(e.consume(M),i=3,r.interrupt?t:Q):Ei(M)?(e.consume(M),s=String.fromCharCode(M),o=!0,b):n(M)}function h(M){return M===45?(e.consume(M),i=2,g):M===91?(e.consume(M),i=5,s="CDATA[",u=0,v):Ei(M)?(e.consume(M),i=4,r.interrupt?t:Q):n(M)}function g(M){return M===45?(e.consume(M),r.interrupt?t:Q):n(M)}function v(M){return M===s.charCodeAt(u++)?(e.consume(M),u===s.length?r.interrupt?t:B:v):n(M)}function y(M){return Ei(M)?(e.consume(M),s=String.fromCharCode(M),b):n(M)}function b(M){return M===null||M===47||M===62||Hr(M)?M!==47&&o&&DE.includes(s.toLowerCase())?(i=1,r.interrupt?t(M):B(M)):YZ.includes(s.toLowerCase())?(i=6,M===47?(e.consume(M),C):r.interrupt?t(M):B(M)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):o?w(M):x(M)):M===45||gr(M)?(e.consume(M),s+=String.fromCharCode(M),b):n(M)}function C(M){return M===62?(e.consume(M),r.interrupt?t:B):n(M)}function x(M){return Jt(M)?(e.consume(M),x):W(M)}function w(M){return M===47?(e.consume(M),W):M===58||M===95||Ei(M)?(e.consume(M),S):Jt(M)?(e.consume(M),w):W(M)}function S(M){return M===45||M===46||M===58||M===95||gr(M)?(e.consume(M),S):E(M)}function E(M){return M===61?(e.consume(M),I):Jt(M)?(e.consume(M),E):w(M)}function I(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),c=M,_):Jt(M)?(e.consume(M),I):(c=null,R(M))}function _(M){return M===null||Te(M)?n(M):M===c?(e.consume(M),D):(e.consume(M),_)}function R(M){return M===null||M===34||M===39||M===60||M===61||M===62||M===96||Hr(M)?E(M):(e.consume(M),R)}function D(M){return M===47||M===62||Jt(M)?w(M):n(M)}function W(M){return M===62?(e.consume(M),L):n(M)}function L(M){return Jt(M)?(e.consume(M),L):M===null||Te(M)?B(M):n(M)}function B(M){return M===45&&i===2?(e.consume(M),te):M===60&&i===1?(e.consume(M),oe):M===62&&i===4?(e.consume(M),K):M===63&&i===3?(e.consume(M),Q):M===93&&i===5?(e.consume(M),H):Te(M)&&(i===6||i===7)?e.check(XZ,K,Y)(M):M===null||Te(M)?Y(M):(e.consume(M),B)}function Y(M){return e.exit("htmlFlowData"),Z(M)}function Z(M){return M===null?A(M):Te(M)?e.attempt({tokenize:re,partial:!0},Z,A)(M):(e.enter("htmlFlowData"),B(M))}function re(M,we,xe){return Se;function Se(Ae){return M.enter("lineEnding"),M.consume(Ae),M.exit("lineEnding"),me}function me(Ae){return r.parser.lazy[r.now().line]?xe(Ae):we(Ae)}}function te(M){return M===45?(e.consume(M),Q):B(M)}function oe(M){return M===47?(e.consume(M),s="",le):B(M)}function le(M){return M===62&&DE.includes(s.toLowerCase())?(e.consume(M),K):Ei(M)&&s.length<8?(e.consume(M),s+=String.fromCharCode(M),le):B(M)}function H(M){return M===93?(e.consume(M),Q):B(M)}function Q(M){return M===62?(e.consume(M),K):M===45&&i===2?(e.consume(M),Q):B(M)}function K(M){return M===null||Te(M)?(e.exit("htmlFlowData"),A(M)):(e.consume(M),K)}function A(M){return e.exit("htmlFlow"),t(M)}}function JZ(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(ym,t,n)}}const eJ={name:"htmlText",tokenize:tJ};function tJ(e,t,n){const r=this;let i,o,s,u;return c;function c(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),f}function f(A){return A===33?(e.consume(A),p):A===47?(e.consume(A),R):A===63?(e.consume(A),I):Ei(A)?(e.consume(A),L):n(A)}function p(A){return A===45?(e.consume(A),h):A===91?(e.consume(A),o="CDATA[",s=0,C):Ei(A)?(e.consume(A),E):n(A)}function h(A){return A===45?(e.consume(A),g):n(A)}function g(A){return A===null||A===62?n(A):A===45?(e.consume(A),v):y(A)}function v(A){return A===null||A===62?n(A):y(A)}function y(A){return A===null?n(A):A===45?(e.consume(A),b):Te(A)?(u=y,H(A)):(e.consume(A),y)}function b(A){return A===45?(e.consume(A),K):y(A)}function C(A){return A===o.charCodeAt(s++)?(e.consume(A),s===o.length?x:C):n(A)}function x(A){return A===null?n(A):A===93?(e.consume(A),w):Te(A)?(u=x,H(A)):(e.consume(A),x)}function w(A){return A===93?(e.consume(A),S):x(A)}function S(A){return A===62?K(A):A===93?(e.consume(A),S):x(A)}function E(A){return A===null||A===62?K(A):Te(A)?(u=E,H(A)):(e.consume(A),E)}function I(A){return A===null?n(A):A===63?(e.consume(A),_):Te(A)?(u=I,H(A)):(e.consume(A),I)}function _(A){return A===62?K(A):I(A)}function R(A){return Ei(A)?(e.consume(A),D):n(A)}function D(A){return A===45||gr(A)?(e.consume(A),D):W(A)}function W(A){return Te(A)?(u=W,H(A)):Jt(A)?(e.consume(A),W):K(A)}function L(A){return A===45||gr(A)?(e.consume(A),L):A===47||A===62||Hr(A)?B(A):n(A)}function B(A){return A===47?(e.consume(A),K):A===58||A===95||Ei(A)?(e.consume(A),Y):Te(A)?(u=B,H(A)):Jt(A)?(e.consume(A),B):K(A)}function Y(A){return A===45||A===46||A===58||A===95||gr(A)?(e.consume(A),Y):Z(A)}function Z(A){return A===61?(e.consume(A),re):Te(A)?(u=Z,H(A)):Jt(A)?(e.consume(A),Z):B(A)}function re(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),i=A,te):Te(A)?(u=re,H(A)):Jt(A)?(e.consume(A),re):(e.consume(A),i=void 0,le)}function te(A){return A===i?(e.consume(A),oe):A===null?n(A):Te(A)?(u=te,H(A)):(e.consume(A),te)}function oe(A){return A===62||A===47||Hr(A)?B(A):n(A)}function le(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===62||Hr(A)?B(A):(e.consume(A),le)}function H(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),gt(e,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Q(A){return e.enter("htmlTextData"),u(A)}function K(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}}const Eb={name:"labelEnd",tokenize:sJ,resolveTo:aJ,resolveAll:oJ},nJ={tokenize:lJ},rJ={tokenize:uJ},iJ={tokenize:cJ};function oJ(e){let t=-1,n;for(;++t-1&&(s[0]=s[0].slice(r)),o>0&&s.push(e[i].slice(0,o))),s}function $J(e,t){let n=-1;const r=[];let i;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const YJ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function KJ(e){return e.replace(YJ,XJ)}function XJ(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return PA(n.slice(o?2:1),o?16:10)}return Cb(n)||e}const Wy={}.hasOwnProperty,QJ=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),ZJ(n)(qJ(VJ(n).document().write(GJ()(e,t,!0))))};function ZJ(e={}){const t=TA({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(Qe),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:c(pt),blockQuote:c(qt),characterEscape:Y,characterReference:Y,codeFenced:c(Yt),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(Yt,f),codeText:c(it,f),codeTextData:Y,data:Y,codeFlowValue:Y,definition:c(dt),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(kn),hardBreakEscape:c(ot),hardBreakTrailing:c(ot),htmlFlow:c(Wn,f),htmlFlowData:Y,htmlText:c(Wn,f),htmlTextData:Y,image:c(Ze),label:f,link:c(Qe),listItem:c(ln),listItemValue:b,listOrdered:c(Kt,y),listUnordered:c(Kt),paragraph:c(Xt),reference:me,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(pt),strong:c(ht),thematicBreak:c(vt)},exit:{atxHeading:h(),atxHeadingSequence:D,autolink:h(),autolinkEmail:Ie,autolinkProtocol:We,blockQuote:h(),characterEscapeValue:Z,characterReferenceMarkerHexadecimal:Pe,characterReferenceMarkerNumeric:Pe,characterReferenceValue:de,codeFenced:h(S),codeFencedFence:w,codeFencedFenceInfo:C,codeFencedFenceMeta:x,codeFlowValue:Z,codeIndented:h(E),codeText:h(H),codeTextData:Z,data:Z,definition:h(),definitionDestinationString:R,definitionLabelString:I,definitionTitleString:_,emphasis:h(),hardBreakEscape:h(te),hardBreakTrailing:h(te),htmlFlow:h(oe),htmlFlowData:Z,htmlText:h(le),htmlTextData:Z,image:h(K),label:M,labelText:A,lineEnding:re,link:h(Q),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:Ae,resourceDestinationString:we,resourceTitleString:xe,resource:Se,setextHeading:h(B),setextHeadingLineSequence:L,setextHeadingText:W,strong:h(),thematicBreak:h()}},e.mdastExtensions||[]),n={};return r;function r(V){let q={type:"root",children:[]};const be=[q],Ce=[],ft=[],nr={stack:be,tokenStack:Ce,config:t,enter:p,exit:g,buffer:f,resume:v,setData:o,getData:s};let Ke=-1;for(;++Ke0){const St=Ce[Ce.length-1];(St[1]||FE).call(nr,void 0,St[0])}for(q.position={start:u(V.length>0?V[0][1].start:{line:1,column:1,offset:0}),end:u(V.length>0?V[V.length-2][1].end:{line:1,column:1,offset:0})},Ke=-1;++Ke{const r=this.data("settings");return QJ(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var an=function(e,t,n){var r={type:String(e)};return n==null&&(typeof t=="string"||Array.isArray(t))?n=t:Object.assign(r,t),Array.isArray(n)?r.children=n:n!=null&&(r.value=String(n)),r};const dp={}.hasOwnProperty;function tee(e,t){const n=t.data||{};return"value"in t&&!(dp.call(n,"hName")||dp.call(n,"hProperties")||dp.call(n,"hChildren"))?e.augment(t,an("text",t.value)):e(t,"div",Mn(e,t))}function IA(e,t,n){const r=t&&t.type;let i;if(!r)throw new Error("Expected node, got `"+t+"`");return dp.call(e.handlers,r)?i=e.handlers[r]:e.passThrough&&e.passThrough.includes(r)?i=nee:i=e.unknownHandler,(typeof i=="function"?i:tee)(e,t,n)}function nee(e,t){return"children"in t?{...t,children:Mn(e,t)}:t}function Mn(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i":""))+")"})),g;function g(){let v=[],y,b,C;if((!t||i(u,c,f[f.length-1]||null))&&(v=cee(n(u,f)),v[0]===zE))return v;if(u.children&&v[0]!==lee)for(b=(r?u.children.length:-1)+o,C=f.concat(u);b>-1&&b-1?r.offset:null}}}function fee(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const BE={}.hasOwnProperty;function dee(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return Ob(e,"definition",r=>{const i=jE(r.identifier);i&&!BE.call(t,i)&&(t[i]=r)}),n;function n(r){const i=jE(r);return i&&BE.call(t,i)?t[i]:null}}function jE(e){return String(e||"").toUpperCase()}function Dl(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(s=String.fromCharCode(o,u),i=1):s="�"}else s=String.fromCharCode(o);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Xi(e,t){const n=[];let r=-1;for(t&&n.push(an("text",` -`));++r0&&n.push(an("text",` -`)),n}function pee(e){let t=-1;const n=[];for(;++t1?"-"+u:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};u>1&&h.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(u)}]}),c.length>0&&c.push({type:"text",value:" "}),c.push(h)}const f=i[i.length-1];if(f&&f.type==="element"&&f.tagName==="p"){const h=f.children[f.children.length-1];h&&h.type==="text"?h.value+=" ":f.children.push({type:"text",value:" "}),f.children.push(...c)}else i.push(...c);const p={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:Xi(i,!0)};r.position&&(p.position=r.position),n.push(p)}return n.length===0?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[an("text",e.footnoteLabel)]},{type:"text",value:` -`},{type:"element",tagName:"ol",properties:{},children:Xi(n,!0)},{type:"text",value:` -`}]}}function hee(e,t){return e(t,"blockquote",Xi(Mn(e,t),!0))}function mee(e,t){return[e(t,"br"),an("text",` -`)]}function gee(e,t){const n=t.value?t.value+` -`:"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),i={};r&&(i.className=["language-"+r]);const o=e(t,"code",i,[an("text",n)]);return t.meta&&(o.data={meta:t.meta}),e(t.position,"pre",[o])}function vee(e,t){return e(t,"del",Mn(e,t))}function yee(e,t){return e(t,"em",Mn(e,t))}function DA(e,t){const n=String(t.identifier),r=Dl(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let o;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,o=e.footnoteOrder.length):(e.footnoteCounts[n]++,o=i+1);const s=e.footnoteCounts[n];return e(t,"sup",[e(t.position,"a",{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[an("text",String(o))])])}function xee(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},DA(e,{type:"footnoteReference",identifier:i,position:t.position})}function bee(e,t){return e(t,"h"+t.depth,Mn(e,t))}function wee(e,t){return e.dangerous?e.augment(t,an("raw",t.value)):null}function NA(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return an("text","!["+t.alt+r);const i=Mn(e,t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift(an("text","["));const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push(an("text",r)),i}function See(e,t){const n=e.definition(t.identifier);if(!n)return NA(e,t);const r={src:Dl(n.url||""),alt:t.alt};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"img",r)}function kee(e,t){const n={src:Dl(t.url),alt:t.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"img",n)}function Cee(e,t){return e(t,"code",[an("text",t.value.replace(/\r?\n|\r/g," "))])}function Eee(e,t){const n=e.definition(t.identifier);if(!n)return NA(e,t);const r={href:Dl(n.url||"")};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"a",r,Mn(e,t))}function Oee(e,t){const n={href:Dl(t.url)};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"a",n,Mn(e,t))}function _ee(e,t,n){const r=Mn(e,t),i=n?Pee(n):LA(t),o={},s=[];if(typeof t.checked=="boolean"){let f;r[0]&&r[0].type==="element"&&r[0].tagName==="p"?f=r[0]:(f=e(null,"p",[]),r.unshift(f)),f.children.length>0&&f.children.unshift(an("text"," ")),f.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),o.className=["task-list-item"]}let u=-1;for(;++u1}function Tee(e,t){const n={},r=t.ordered?"ol":"ul",i=Mn(e,t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(HE(t.slice(i),i>0,!1)),o.join("")}function HE(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===WE||o===UE;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===WE||o===UE;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Dee(e,t){return e.augment(t,an("text",$ee(String(t.value))))}function Nee(e,t){return e(t,"hr")}const Lee={blockquote:hee,break:mee,code:gee,delete:vee,emphasis:yee,footnoteReference:DA,footnote:xee,heading:bee,html:wee,imageReference:See,image:kee,inlineCode:Cee,linkReference:Eee,link:Oee,listItem:_ee,list:Tee,paragraph:Iee,root:Ree,strong:Aee,table:Mee,text:Dee,thematicBreak:Nee,toml:Fd,yaml:Fd,definition:Fd,footnoteDefinition:Fd};function Fd(){return null}const Fee={}.hasOwnProperty;function zee(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return s.dangerous=r,s.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.definition=dee(e),s.footnoteById=i,s.footnoteOrder=[],s.footnoteCounts={},s.augment=o,s.handlers={...Lee,...n.handlers},s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,Ob(e,"footnoteDefinition",u=>{const c=String(u.identifier).toUpperCase();Fee.call(i,c)||(i[c]=u)}),s;function o(u,c){if(u&&"data"in u&&u.data){const f=u.data;f.hName&&(c.type!=="element"&&(c={type:"element",tagName:"",properties:{},children:[]}),c.tagName=f.hName),c.type==="element"&&f.hProperties&&(c.properties={...c.properties,...f.hProperties}),"children"in c&&c.children&&f.hChildren&&(c.children=f.hChildren)}if(u){const f="type"in u?u:{position:u};fee(f)||(c.position={start:AA(f),end:MA(f)})}return c}function s(u,c,f,p){return Array.isArray(f)&&(p=f,f={}),o(u,{type:"element",tagName:c,properties:f||{},children:p||[]})}}function FA(e,t){const n=zee(e,t),r=IA(n,e,null),i=pee(n);return i&&r.children.push(an("text",` -`),i),Array.isArray(r)?{type:"root",children:r}:r}const Bee=function(e,t){return e&&"run"in e?Wee(e,t):Uee(e||t)},jee=Bee;function Wee(e,t){return(n,r,i)=>{e.run(FA(n,t),r,o=>{i(o)})}}function Uee(e){return t=>FA(t,e)}class rf{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}rf.prototype.property={};rf.prototype.normal={};rf.prototype.space=null;function zA(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&Yee.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(GE,Zee);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!GE.test(o)){let s=o.replace(Kee,Qee);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=_b}return new i(r,t)}function Qee(e){return"-"+e.toLowerCase()}function Zee(e){return e.charAt(1).toUpperCase()}const qE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},Jee=zA([WA,jA,VA,GA,Gee],"html"),ete=zA([WA,jA,VA,GA,qee],"svg");function tte(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{Ob(t,"element",(n,r,i)=>{const o=i;let s;if(e.allowedElements?s=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(n.tagName)),!s&&e.allowElement&&typeof r=="number"&&(s=!e.allowElement(n,r,o)),s&&typeof r=="number")return e.unwrapDisallowed&&n.children?o.children.splice(r,1,...n.children):o.children.splice(r,1),r})}}function nte(e){var t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function rte(e){return e.join(" ").trim()}function ite(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var YE=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,ote=/\n/g,ate=/^\s*/,ste=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,lte=/^:\s*/,ute=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,cte=/^[;\s]*/,fte=/^\s+|\s+$/g,dte=` -`,KE="/",XE="*",Ta="",pte="comment",hte="declaration",mte=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(y){var b=y.match(ote);b&&(n+=b.length);var C=y.lastIndexOf(dte);r=~C?y.length-C:r+y.length}function o(){var y={line:n,column:r};return function(b){return b.position=new s(y),f(),b}}function s(y){this.start=y,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function u(y){var b=new Error(t.source+":"+n+":"+r+": "+y);if(b.reason=y,b.filename=t.source,b.line=n,b.column=r,b.source=e,!t.silent)throw b}function c(y){var b=y.exec(e);if(!!b){var C=b[0];return i(C),e=e.slice(C.length),b}}function f(){c(ate)}function p(y){var b;for(y=y||[];b=h();)b!==!1&&y.push(b);return y}function h(){var y=o();if(!(KE!=e.charAt(0)||XE!=e.charAt(1))){for(var b=2;Ta!=e.charAt(b)&&(XE!=e.charAt(b)||KE!=e.charAt(b+1));)++b;if(b+=2,Ta===e.charAt(b-1))return u("End of comment missing");var C=e.slice(2,b-2);return r+=2,i(C),e=e.slice(b),r+=2,y({type:pte,comment:C})}}function g(){var y=o(),b=c(ste);if(!!b){if(h(),!c(lte))return u("property missing ':'");var C=c(ute),x=y({type:hte,property:QE(b[0].replace(YE,Ta)),value:C?QE(C[0].replace(YE,Ta)):Ta});return c(cte),x}}function v(){var y=[];p(y);for(var b;b=g();)b!==!1&&(y.push(b),p(y));return y}return f(),v()};function QE(e){return e?e.replace(fte,Ta):Ta}var gte=mte;function vte(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=gte(e),o=typeof t=="function",s,u,c=0,f=i.length;c0?Ye.createElement(g,u,p):Ye.createElement(g,u)}function wte(e){let t=-1;for(;++t for more info)`),delete zd[o]}const t=QQ().use(eee).use(e.remarkPlugins||[]).use(jee,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(tte,e),n=new hA;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=Ye.createElement(Ye.Fragment,{},qA({options:e,schema:Jee,listDepth:0},r));return e.className&&(i=Ye.createElement("div",{className:e.className},i)),i}Pb.defaultProps={transformLinkUri:FQ};Pb.propTypes={children:se.exports.string,className:se.exports.string,allowElement:se.exports.func,allowedElements:se.exports.arrayOf(se.exports.string),disallowedElements:se.exports.arrayOf(se.exports.string),unwrapDisallowed:se.exports.bool,remarkPlugins:se.exports.arrayOf(se.exports.oneOfType([se.exports.object,se.exports.func,se.exports.arrayOf(se.exports.oneOfType([se.exports.bool,se.exports.string,se.exports.object,se.exports.func,se.exports.arrayOf(se.exports.any)]))])),rehypePlugins:se.exports.arrayOf(se.exports.oneOfType([se.exports.object,se.exports.func,se.exports.arrayOf(se.exports.oneOfType([se.exports.bool,se.exports.string,se.exports.object,se.exports.func,se.exports.arrayOf(se.exports.any)]))])),sourcePos:se.exports.bool,rawSourcePos:se.exports.bool,skipHtml:se.exports.bool,includeElementIndex:se.exports.bool,transformLinkUri:se.exports.oneOfType([se.exports.func,se.exports.bool]),linkTarget:se.exports.oneOfType([se.exports.func,se.exports.string]),transformImageUri:se.exports.func,components:se.exports.object};const _te=()=>ge("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"#ffffff",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[N("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),N("circle",{cx:"12",cy:"12",r:"9"}),N("polyline",{points:"12 7 12 12 15 15"})]}),Pte=({item:e,inventory:t})=>{const n=Ja(u=>u.inventory.additionalMetadata),r=T.exports.useMemo(()=>xt[e.name],[e]),i=T.exports.useMemo(()=>e.ingredients?Object.entries(e.ingredients).sort((u,c)=>u[1]-c[1]):null,[e]),o=e.metadata?.description||r?.description,s=r?.ammoName&&xt[r?.ammoName]?.label;return N(Vr,{children:r?ge("div",{className:"tooltip-wrapper",children:[ge("div",{className:"tooltip-header-wrapper",children:[N("p",{children:e.metadata?.label||r.label||e.name}),t.type==="crafting"?ge("div",{className:"tooltip-crafting-duration",children:[N(_te,{}),ge("p",{children:[(e.duration!==void 0?e.duration:3e3)/1e3,"s"]})]}):N("p",{children:e.metadata?.type})]}),N(nc,{}),o&&N("div",{className:"tooltip-description",children:N(Pb,{className:"tooltip-markdown",children:o})}),t.type!=="crafting"?ge(Vr,{children:[e.durability!==void 0&&ge("p",{children:[Pt.ui_durability,": ",Math.trunc(e.durability)]}),e.metadata?.ammo!==void 0&&ge("p",{children:[Pt.ui_ammo,": ",e.metadata.ammo]}),s&&ge("p",{children:[Pt.ammo_type,": ",s]}),e.metadata?.serial&&ge("p",{children:[Pt.ui_serial,": ",e.metadata.serial]}),e.metadata?.components&&e.metadata?.components[0]&&ge("p",{children:[Pt.ui_components,":"," ",(e.metadata?.components).map((u,c,f)=>c+1===f.length?xt[u]?.label:xt[u]?.label+", ")]}),e.metadata?.weapontint&&ge("p",{children:[Pt.ui_tint,": ",e.metadata.weapontint]}),Object.keys(n).map((u,c)=>N(T.exports.Fragment,{children:e.metadata&&e.metadata[u]&&ge("p",{children:[n[u],": ",e.metadata[u]]})},`metadata-${c}`))]}):N("div",{className:"tooltip-ingredients",children:i&&i.map(u=>{const[c,f]=[u[0],u[1]];return ge("div",{className:"tooltip-ingredient",children:[N("img",{src:c?Js(c):"none",alt:"item-image"}),N("p",{children:f>=1?`${f}x ${xt[c]?.label||c}`:f===0?`${xt[c]?.label||c}`:f<1&&`${f*100}% ${xt[c]?.label||c}`})]},`ingredient-${c}`)})})]}):ge("div",{className:"tooltip-wrapper",children:[N("div",{className:"tooltip-header-wrapper",children:N("p",{children:e.name})}),N(nc,{})]})})},Tte=ax("inventory/craftItem",async(e,{rejectWithValue:t})=>{try{const n=await Wr("craftItem",e);if(n===!1)return t(n)}catch{return t(!1)}}),Ite=(e,t)=>{const{inventory:n}=hr.getState(),r=n.rightInventory,i=n.leftInventory,o=r.items[e.item.slot-1];if(!Fn(o))throw new Error(`Item ${o.slot} name === undefined`);if(o.count===0)return;if(xt[o.name]===void 0)return console.error(`Item ${o.name} data undefined!`);const u=i.items[t.item.slot-1];if(u===void 0)return console.error("Target slot undefined");const c=n.itemAmount===0?1:n.itemAmount,f={fromSlot:o,toSlot:u,fromType:r.type,toType:i.type,count:c};hr.dispatch(Tte({...f,fromSlot:o.slot,toSlot:u.slot}))},Rte=({inventory:e,item:t})=>{const n=lo(),r=Ja(L7),i=_l(),o=Ye.useCallback(()=>!r&&N2(t,e)&&L2(t,e.type),[t,e,r]),[{isDragging:s},u]=h9(()=>({type:"SLOT",collect:v=>({isDragging:v.isDragging()}),item:()=>Fn(t,e.type!==Rn.SHOP)?{inventory:e.type,item:{name:t.name,slot:t.slot},image:t?.name&&`url(${Js(t)||"none"}`}:null,canDrag:o}),[r,e,t]),[{isOver:c},f]=X0(()=>({accept:"SLOT",collect:v=>({isOver:v.isOver()}),drop:v=>v.inventory===Rn.SHOP?LQ(v,{inventory:e.type,item:{slot:t.slot}}):v.inventory===Rn.CRAFTING?Ite(v,{inventory:e.type,item:{slot:t.slot}}):Dy(v,{inventory:e.type,item:{slot:t.slot}}),canDrop:v=>!r&&(v.item.slot!==t.slot||v.inventory!==e.type)&&e.type!==Rn.SHOP&&e.type!==Rn.CRAFTING}),[r,e,t]);Ci("refreshSlots",v=>{!s&&!v.items||!Array.isArray(v.items)||!v.items.find(b=>b.item.slot===t.slot&&b.inventory===e.id)||n.dispatch({type:"dnd-core/END_DRAG"})});const p=v=>u(f(v)),h=v=>{v.preventDefault(),!r&&e.type==="player"&&Fn(t)&&i(Gp({coords:{mouseX:v.clientX,mouseY:v.clientY},item:t}))},g=v=>{r||(v.ctrlKey&&Fn(t)&&e.type!=="shop"&&e.type!=="crafting"?Dy({item:t,inventory:e.type}):v.altKey&&Fn(t)&&e.type==="player"&&lb(t))};return N(AK,{title:!Fn(t)||c||s?"":N(Pte,{item:t,inventory:e}),disableInteractive:!0,followCursor:!0,disableFocusListener:!0,disableTouchListener:!0,placement:"right-start",enterDelay:500,enterNextDelay:500,PopperProps:{disablePortal:!0},children:N("div",{ref:p,onContextMenu:h,onClick:g,className:"inventory-slot",style:{filter:!N2(t,e)||!L2(t,e.type)?"brightness(80%) grayscale(100%)":void 0,opacity:s?.4:1,backgroundImage:`url(${t?.name?Js(t):"none"}`,border:c?"1px dashed rgba(255,255,255,0.4)":""},children:Fn(t)&&ge("div",{className:"item-slot-wrapper",children:[ge("div",{className:e.type==="player"&&t.slot<=5?"item-hotslot-header-wrapper":"item-slot-header-wrapper",children:[e.type==="player"&&t.slot<=5&&N("div",{className:"inventory-slot-number",children:t.slot}),ge("div",{className:"item-slot-info-wrapper",children:[N("p",{children:t.weight>0?t.weight>=1e3?`${(t.weight/1e3).toLocaleString("en-us",{minimumFractionDigits:2})}kg `:`${t.weight.toLocaleString("en-us",{minimumFractionDigits:0})}g `:""}),N("p",{children:t.count?t.count.toLocaleString("en-us")+"x":""})]})]}),ge("div",{children:[e.type!=="shop"&&t?.durability!==void 0&&N(Sb,{percent:t.durability,durability:!0}),e.type==="shop"&&t?.price!==void 0&&N(Vr,{children:t?.currency!=="money"&&t.currency!=="black_money"&&t.price>0&&t.currency?ge("div",{className:"item-slot-currency-wrapper",children:[N("img",{src:t.currency?Js(t.currency):"none",alt:"item-image",style:{imageRendering:"-webkit-optimize-contrast",height:"auto",width:"2vh",backfaceVisibility:"hidden",transform:"translateZ(0)"}}),N("p",{children:t.price.toLocaleString("en-us")})]}):N(Vr,{children:t.price>0&&N("div",{className:"item-slot-price-wrapper",style:{color:t.currency==="money"||!t.currency?"#2ECC71":"#E74C3C"},children:ge("p",{children:[Pt.$||"$",t.price.toLocaleString("en-us")]})})})}),N("div",{className:"inventory-slot-label-box",children:N("div",{className:"inventory-slot-label-text",children:t.metadata?.label?t.metadata.label:xt[t.name]?.label||t.name})})]})]})})})},Ate=e=>{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)};var za={},ua={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(ua);const Tb=ih(MU);var wu={},_s={};const of=ih(oz);var Zv={exports:{}},JE;function bm(){return JE||(JE=1,function(e){function t(n,r){if(n==null)return{};var i={},o=Object.keys(n),s,u;for(u=0;u=0)&&(i[s]=n[s]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(Zv)),Zv.exports}const Ib=ih(_j),Mte=ih($U);var Bd={},eO;function $te(){if(eO)return Bd;eO=1;var e=ua.exports;Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.default=n;var t=e(of);function n(r,i){return(0,t.default)({toolbar:{minHeight:56,[r.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[r.up("sm")]:{minHeight:64}}},i)}return Bd}var Eo={},Su={},tO;function Dte(){if(tO)return Su;tO=1,Object.defineProperty(Su,"__esModule",{value:!0}),Su.default=void 0;var t={black:"#000",white:"#fff"};return Su.default=t,Su}var ku={},nO;function Nte(){if(nO)return ku;nO=1,Object.defineProperty(ku,"__esModule",{value:!0}),ku.default=void 0;var t={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"};return ku.default=t,ku}var Cu={},rO;function Lte(){if(rO)return Cu;rO=1,Object.defineProperty(Cu,"__esModule",{value:!0}),Cu.default=void 0;var t={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"};return Cu.default=t,Cu}var Eu={},iO;function Fte(){if(iO)return Eu;iO=1,Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.default=void 0;var t={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"};return Eu.default=t,Eu}var Ou={},oO;function zte(){if(oO)return Ou;oO=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.default=void 0;var t={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"};return Ou.default=t,Ou}var _u={},aO;function Bte(){if(aO)return _u;aO=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.default=void 0;var t={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"};return _u.default=t,_u}var Pu={},sO;function jte(){if(sO)return Pu;sO=1,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.default=void 0;var t={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"};return Pu.default=t,Pu}var Tu={},lO;function Wte(){if(lO)return Tu;lO=1,Object.defineProperty(Tu,"__esModule",{value:!0}),Tu.default=void 0;var t={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};return Tu.default=t,Tu}var uO;function Ute(){if(uO)return Eo;uO=1;var e=ua.exports;Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.dark=void 0,Eo.default=R,Eo.light=void 0;var t=e(of),n=e(bm()),r=Ib,i=Tb,o=e(Dte()),s=e(Nte()),u=e(Lte()),c=e(Fte()),f=e(zte()),p=e(Bte()),h=e(jte()),g=e(Wte());const v=["mode","contrastThreshold","tonalOffset"],y={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:o.default.white,default:o.default.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}};Eo.light=y;const b={text:{primary:o.default.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:o.default.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};Eo.dark=b;function C(D,W,L,B){const Y=B.light||B,Z=B.dark||B*1.5;D[W]||(D.hasOwnProperty(L)?D[W]=D[L]:W==="light"?D.light=(0,i.lighten)(D.main,Y):W==="dark"&&(D.dark=(0,i.darken)(D.main,Z)))}function x(D="light"){return D==="dark"?{main:p.default[200],light:p.default[50],dark:p.default[400]}:{main:p.default[700],light:p.default[400],dark:p.default[800]}}function w(D="light"){return D==="dark"?{main:u.default[200],light:u.default[50],dark:u.default[400]}:{main:u.default[500],light:u.default[300],dark:u.default[700]}}function S(D="light"){return D==="dark"?{main:c.default[500],light:c.default[300],dark:c.default[700]}:{main:c.default[700],light:c.default[400],dark:c.default[800]}}function E(D="light"){return D==="dark"?{main:h.default[400],light:h.default[300],dark:h.default[700]}:{main:h.default[700],light:h.default[500],dark:h.default[900]}}function I(D="light"){return D==="dark"?{main:g.default[400],light:g.default[300],dark:g.default[700]}:{main:g.default[800],light:g.default[500],dark:g.default[900]}}function _(D="light"){return D==="dark"?{main:f.default[400],light:f.default[300],dark:f.default[700]}:{main:"#ed6c02",light:f.default[500],dark:f.default[900]}}function R(D){const{mode:W="light",contrastThreshold:L=3,tonalOffset:B=.2}=D,Y=(0,n.default)(D,v),Z=D.primary||x(W),re=D.secondary||w(W),te=D.error||S(W),oe=D.info||E(W),le=D.success||I(W),H=D.warning||_(W);function Q(we){return(0,i.getContrastRatio)(we,b.text.primary)>=L?b.text.primary:y.text.primary}const K=({color:we,name:xe,mainShade:Se=500,lightShade:me=300,darkShade:Ae=700})=>{if(we=(0,t.default)({},we),!we.main&&we[Se]&&(we.main=we[Se]),!we.hasOwnProperty("main"))throw new Error((0,r.formatMuiErrorMessage)(11,xe?` (${xe})`:"",Se));if(typeof we.main!="string")throw new Error((0,r.formatMuiErrorMessage)(12,xe?` (${xe})`:"",JSON.stringify(we.main)));return C(we,"light",me,B),C(we,"dark",Ae,B),we.contrastText||(we.contrastText=Q(we.main)),we},A={dark:b,light:y};return(0,r.deepmerge)((0,t.default)({common:(0,t.default)({},o.default),mode:W,primary:K({color:Z,name:"primary"}),secondary:K({color:re,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:K({color:te,name:"error"}),warning:K({color:H,name:"warning"}),info:K({color:oe,name:"info"}),success:K({color:le,name:"success"}),grey:s.default,contrastThreshold:L,getContrastText:Q,augmentColor:K,tonalOffset:B},A[W]),Y)}return Eo}var jd={},cO;function Hte(){if(cO)return jd;cO=1;var e=ua.exports;Object.defineProperty(jd,"__esModule",{value:!0}),jd.default=c;var t=e(of),n=e(bm()),r=Ib;const i=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function o(f){return Math.round(f*1e5)/1e5}const s={textTransform:"uppercase"},u='"Roboto", "Helvetica", "Arial", sans-serif';function c(f,p){const h=typeof p=="function"?p(f):p,{fontFamily:g=u,fontSize:v=14,fontWeightLight:y=300,fontWeightRegular:b=400,fontWeightMedium:C=500,fontWeightBold:x=700,htmlFontSize:w=16,allVariants:S,pxToRem:E}=h,I=(0,n.default)(h,i),_=v/14,R=E||(L=>`${L/w*_}rem`),D=(L,B,Y,Z,re)=>(0,t.default)({fontFamily:g,fontWeight:L,fontSize:R(B),lineHeight:Y},g===u?{letterSpacing:`${o(Z/B)}em`}:{},re,S),W={h1:D(y,96,1.167,-1.5),h2:D(y,60,1.2,-.5),h3:D(b,48,1.167,0),h4:D(b,34,1.235,.25),h5:D(b,24,1.334,0),h6:D(C,20,1.6,.15),subtitle1:D(b,16,1.75,.15),subtitle2:D(C,14,1.57,.1),body1:D(b,16,1.5,.15),body2:D(b,14,1.43,.15),button:D(C,14,1.75,.4,s),caption:D(b,12,1.66,.4),overline:D(b,12,2.66,1,s)};return(0,r.deepmerge)((0,t.default)({htmlFontSize:w,pxToRem:R,fontFamily:g,fontSize:v,fontWeightLight:y,fontWeightRegular:b,fontWeightMedium:C,fontWeightBold:x},W),I,{clone:!1})}return jd}var Iu={},fO;function Vte(){if(fO)return Iu;fO=1,Object.defineProperty(Iu,"__esModule",{value:!0}),Iu.default=void 0;const e=.2,t=.14,n=.12;function r(...s){return[`${s[0]}px ${s[1]}px ${s[2]}px ${s[3]}px rgba(0,0,0,${e})`,`${s[4]}px ${s[5]}px ${s[6]}px ${s[7]}px rgba(0,0,0,${t})`,`${s[8]}px ${s[9]}px ${s[10]}px ${s[11]}px rgba(0,0,0,${n})`].join(",")}var o=["none",r(0,2,1,-1,0,1,1,0,0,1,3,0),r(0,3,1,-2,0,2,2,0,0,1,5,0),r(0,3,3,-2,0,3,4,0,0,1,8,0),r(0,2,4,-1,0,4,5,0,0,1,10,0),r(0,3,5,-1,0,5,8,0,0,1,14,0),r(0,3,5,-1,0,6,10,0,0,1,18,0),r(0,4,5,-2,0,7,10,1,0,2,16,1),r(0,5,5,-3,0,8,10,1,0,3,14,2),r(0,5,6,-3,0,9,12,1,0,3,16,2),r(0,6,6,-3,0,10,14,1,0,4,18,3),r(0,6,7,-4,0,11,15,1,0,4,20,3),r(0,7,8,-4,0,12,17,2,0,5,22,4),r(0,7,8,-4,0,13,19,2,0,5,24,4),r(0,7,9,-4,0,14,21,2,0,5,26,4),r(0,8,9,-5,0,15,22,2,0,6,28,5),r(0,8,10,-5,0,16,24,2,0,6,30,5),r(0,8,11,-5,0,17,26,2,0,6,32,5),r(0,9,11,-5,0,18,28,2,0,7,34,6),r(0,9,12,-6,0,19,29,2,0,7,36,6),r(0,10,13,-6,0,20,31,3,0,8,38,7),r(0,10,13,-6,0,21,33,3,0,8,40,7),r(0,10,14,-6,0,22,35,3,0,8,42,7),r(0,11,14,-7,0,23,36,3,0,9,44,8),r(0,11,15,-7,0,24,38,3,0,9,46,8)];return Iu.default=o,Iu}var Oo={},dO;function Gte(){if(dO)return Oo;dO=1;var e=ua.exports;Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=c,Oo.easing=Oo.duration=void 0;var t=e(bm()),n=e(of);const r=["duration","easing","delay"],i={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"};Oo.easing=i;const o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};Oo.duration=o;function s(f){return`${Math.round(f)}ms`}function u(f){if(!f)return 0;const p=f/36;return Math.round((4+15*p**.25+p/5)*10)}function c(f){const p=(0,n.default)({},i,f.easing),h=(0,n.default)({},o,f.duration),g=(v=["all"],y={})=>{const{duration:b=h.standard,easing:C=p.easeInOut,delay:x=0}=y;return(0,t.default)(y,r),(Array.isArray(v)?v:[v]).map(w=>`${w} ${typeof b=="string"?b:s(b)} ${C} ${typeof x=="string"?x:s(x)}`).join(",")};return(0,n.default)({getAutoHeightDuration:u,create:g},f,{easing:p,duration:h})}return Oo}var Ru={},pO;function qte(){if(pO)return Ru;pO=1,Object.defineProperty(Ru,"__esModule",{value:!0}),Ru.default=void 0;var t={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};return Ru.default=t,Ru}var hO;function Yte(){if(hO)return _s;hO=1;var e=ua.exports;Object.defineProperty(_s,"__esModule",{value:!0}),_s.createMuiTheme=v,_s.default=void 0;var t=e(of),n=e(bm()),r=Ib,i=Tb;e(Mte);var o=e($te()),s=e(Ute()),u=e(Hte()),c=e(Vte()),f=e(Gte()),p=e(qte());const h=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function g(b={},...C){const{mixins:x={},palette:w={},transitions:S={},typography:E={}}=b,I=(0,n.default)(b,h);if(b.vars)throw new Error((0,r.formatMuiErrorMessage)(18));const _=(0,s.default)(w),R=(0,i.createTheme)(b);let D=(0,r.deepmerge)(R,{mixins:(0,o.default)(R.breakpoints,x),palette:_,shadows:c.default.slice(),typography:(0,u.default)(_,E),transitions:(0,f.default)(S),zIndex:(0,t.default)({},p.default)});return D=(0,r.deepmerge)(D,I),D=C.reduce((W,L)=>(0,r.deepmerge)(W,L),D),D}function v(...b){return g(...b)}var y=g;return _s.default=y,_s}var mO;function Kte(){if(mO)return wu;mO=1;var e=ua.exports;Object.defineProperty(wu,"__esModule",{value:!0}),wu.default=void 0;var t=e(Yte()),r=(0,t.default)();return wu.default=r,wu}var Xte=ua.exports;Object.defineProperty(za,"__esModule",{value:!0});za.slotShouldForwardProp=za.rootShouldForwardProp=wm=za.default=void 0;var Rb=Tb,Qte=Xte(Kte());const YA=e=>(0,Rb.shouldForwardProp)(e)&&e!=="classes";za.rootShouldForwardProp=YA;const Zte=Rb.shouldForwardProp;za.slotShouldForwardProp=Zte;const Jte=(0,Rb.createStyled)({defaultTheme:Qte.default,rootShouldForwardProp:YA});var ene=Jte,wm=za.default=ene;function af(e,t){return Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})}),e}function sf(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var lf={},KA={};sf(KA,"ContextMenu",()=>JA);var XA={};sf(XA,"nestedMenuItemsFromObject",()=>km);var QA={};sf(QA,"NestedMenuItem",()=>Fc);var ZA={};sf(ZA,"IconMenuItem",()=>Sm);const tne=wm(Vi)({paddingLeft:"4px",paddingRight:"4px",display:"flex",justifyContent:"space-between"}),nne=wm(_R)({paddingLeft:"8px",paddingRight:"8px",textAlign:"left"}),rne=wm(ZI)({display:"flex"}),Sm=T.exports.forwardRef(({leftIcon:e,rightIcon:t,label:n,MenuItemProps:r,className:i,...o},s)=>ge(tne,{...r,ref:s,className:i,...o,children:[ge(rne,{children:[e,N(nne,{children:n})]}),t]}));Sm.displayName="IconMenuItem";const ine=e=>N(Qp,{...e,children:N("path",{d:"M9.29 6.71c-.39.39-.39 1.02 0 1.41L13.17 12l-3.88 3.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01z"})}),Fc=Ye.forwardRef(function(t,n){const{parentMenuOpen:r,label:i,rightIcon:o=N(ine,{}),leftIcon:s=null,children:u,className:c,tabIndex:f,ContainerProps:p={},MenuProps:h,...g}=t,{ref:v,...y}=p,b=T.exports.useRef(null);T.exports.useImperativeHandle(n,()=>b.current);const C=T.exports.useRef(null);T.exports.useImperativeHandle(v,()=>C.current);const x=T.exports.useRef(null),[w,S]=T.exports.useState(!1),E=B=>{S(!0),y.onMouseEnter&&y.onMouseEnter(B)},I=B=>{S(!1),y.onMouseLeave&&y.onMouseLeave(B)},_=()=>{const B=C.current?.ownerDocument.activeElement??null;for(const Y of x.current.children)if(Y===B)return!0;return!1},R=B=>{B.target===C.current&&S(!0),y.onFocus&&y.onFocus(B)},D=B=>{if(B.key==="Escape")return;_()&&B.stopPropagation();const Y=C.current?.ownerDocument.activeElement;B.key==="ArrowLeft"&&_()&&C.current?.focus(),B.key==="ArrowRight"&&B.target===C.current&&B.target===Y&&x.current?.children[0]?.focus()},W=w&&r;let L;return t.disabled||(L=f!==void 0?f:-1),ge("div",{...y,ref:C,onFocus:R,tabIndex:L,onMouseEnter:E,onMouseLeave:I,onKeyDown:D,children:[N(Sm,{MenuItemProps:g,className:c,ref:b,leftIcon:s,rightIcon:o,label:i}),N(pm,{style:{pointerEvents:"none"},anchorEl:b.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},open:W,autoFocus:!1,disableAutoFocus:!0,disableEnforceFocus:!0,onClose:()=>{S(!1)},...h,children:N("div",{ref:x,style:{pointerEvents:"auto"},children:u})})]})});Fc.displayName="NestedMenuItem";function km({menuItemsData:e,isOpen:t,handleClose:n}){return e.map(r=>{const{leftIcon:i,rightIcon:o,label:s,items:u,callback:c}=r;return u&&u.length>0?N(Fc,{leftIcon:i,rightIcon:o,label:s,parentMenuOpen:t,children:km({menuItemsData:u,isOpen:t,handleClose:n})},s):N(Sm,{leftIcon:i,rightIcon:o,label:s,onClick:()=>{n(),c&&c()}},s)})}const JA=T.exports.forwardRef(({children:e,menuItems:t,menuItemsData:n},r)=>{const i=r??T.exports.useRef(null),[o,s]=T.exports.useState(null),[u,c]=T.exports.useState(null),f=()=>s(null),p=v=>{if(o!==null&&s(null),v.button!==2)return;const y=i.current.getBoundingClientRect();v.clientXy.right||v.clientYy.bottom||c({top:v.clientY,left:v.clientX})},h=v=>{const y=v.clientY,b=v.clientX;u!==null&&u.top===y&&u.left===b&&s({top:v.clientY,left:v.clientX})},g=t??(n&&km({menuItemsData:n,isOpen:!!o,handleClose:f}));return ge("div",{ref:i,onContextMenu:v=>v.preventDefault(),onMouseDown:p,onMouseUp:h,children:[o&&N(pm,{onContextMenu:v=>v.preventDefault(),open:!!o,onClose:()=>s(null),anchorReference:"anchorPosition",anchorPosition:o,children:g}),e]})});JA.displayName="ContextMenu";var eM={};sf(eM,"NestedDropdown",()=>ane);const one=e=>N(Qp,{...e,children:N("path",{d:"M8.12 9.29 12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7a.9959.9959 0 0 1 0-1.41c.39-.38 1.03-.39 1.42 0z"})}),ane=Ye.forwardRef(function(t,n){const[r,i]=Ye.useState(null),o=Boolean(r),{menuItemsData:s,onClick:u,ButtonProps:c,MenuProps:f,...p}=t,h=y=>{i(y.currentTarget),u&&u(y)},g=()=>i(null),v=km({menuItemsData:s?.items??[],isOpen:o,handleClose:g});return ge("div",{ref:n,...p,children:[N(Tq,{onClick:h,endIcon:N(one,{}),...c,children:s?.label??"Menu"}),N(pm,{anchorEl:r,open:o,onClose:g,...f,children:v})]})});af(lf,KA);af(lf,eM);af(lf,ZA);af(lf,QA);af(lf,XA);const sne=()=>{const e=Ja(o=>o.inventory.contextMenu),t=e.item,n=_l(),r=o=>{if(!!t)switch(n(Gp({coords:null})),o&&o.action){case"use":lb({name:t.name,slot:t.slot});break;case"give":NR({name:t.name,slot:t.slot});break;case"drop":Fn(t)&&Dy({item:t,inventory:"player"});break;case"remove":Wr("removeComponent",{component:o?.component,slot:o?.slot});break;case"removeAmmo":Wr("removeAmmo",t.slot);break;case"copy":Ate(o.serial||"");break;case"custom":Wr("useButton",{id:(o?.id||0)+1,slot:t.slot});break}},i=o=>o.reduce((s,u,c)=>{if(u.group){const f=s.findIndex(p=>p.groupName===u.group);f!==-1?s[f].buttons.push({...u,index:c}):s.push({groupName:u.group,buttons:[{...u,index:c}]})}else s.push({groupName:null,buttons:[{...u,index:c}]});return s},[]);return N(Vr,{children:ge(pm,{autoFocus:!1,disableAutoFocusItem:!0,disableRestoreFocus:!0,disableAutoFocus:!0,disableEnforceFocus:!0,open:e.coords!==null,anchorReference:"anchorPosition",anchorPosition:e.coords!==null?{top:e.coords.mouseY,left:e.coords.mouseX}:void 0,onClose:()=>n(Gp({coords:null})),children:[N(Vi,{onClick:()=>r({action:"use"}),children:Pt.ui_use||"Use"}),N(Vi,{onClick:()=>r({action:"give"}),children:Pt.ui_give||"Give"}),N(Vi,{onClick:()=>r({action:"drop"}),children:Pt.ui_drop||"Drop"}),t&&t.metadata?.serial&&N(nc,{}),t&&t.metadata?.ammo>0&&N(Vi,{onClick:()=>r({action:"removeAmmo"}),children:Pt.ui_remove_ammo}),t&&t.metadata?.serial&&N(Vi,{onClick:()=>r({action:"copy",serial:t.metadata?.serial}),children:Pt.ui_copy}),t&&t.metadata?.components&&t.metadata?.components.length>0&&N(nc,{}),t&&t.metadata?.components&&t.metadata?.components.length>0&&N(Fc,{parentMenuOpen:!!e,label:Pt.ui_removeattachments,children:t&&t.metadata?.components.map((o,s)=>N(Vi,{onClick:()=>r({action:"remove",component:o,slot:t.slot}),children:xt[o]?.label},s))}),(t&&t.name&&xt[t.name]?.buttons?.length||0)>0&&N(nc,{}),(t&&t.name&&xt[t.name]?.buttons?.length||0)>0&&N(Vr,{children:t&&t.name&&i(xt[t.name]?.buttons).map((o,s)=>N("div",{children:o.groupName?N(Fc,{parentMenuOpen:!!e,label:o.groupName,children:o.buttons.map(u=>N(Vi,{onClick:()=>r({action:"custom",id:u.index}),children:u.label},u.index))}):o.buttons.map(u=>N(Vi,{onClick:()=>r({action:"custom",id:u.index}),children:u.label},u.index))},s))})]})})},tM=({inventory:e})=>{const t=Ye.useMemo(()=>e.maxWeight!==void 0?Math.floor(b7(e.items)*1e3)/1e3:0,[e.maxWeight,e.items]);return N(Vr,{children:ge("div",{className:"inventory-grid-wrapper",children:[ge("div",{children:[ge("div",{className:"inventory-grid-header-wrapper",children:[N("p",{children:e.label}),e.maxWeight&&ge("p",{children:[t/1e3,"/",e.maxWeight/1e3,"kg"]})]}),N(Sb,{percent:e.maxWeight?t/e.maxWeight*100:0})]}),N("div",{className:"inventory-grid-container",children:ge(Vr,{children:[e.items.map(n=>N(Rte,{item:n,inventory:e},`${e.type}-${e.id}-${n.slot}`)),e.type==="player"&&Xa.exports.createPortal(N(sne,{}),document.body)]})})]})})},lne=()=>{const e=Ja(D7);return N(tM,{inventory:e})},une=()=>{const e=Ja(dT);return N(tM,{inventory:e})},cne=()=>{const[e,t]=Ye.useState(!1),n=_l();return Ci("setInventoryVisible",t),Ci("closeInventory",()=>{t(!1),n(Gp({coords:null}))}),$Q(t),Ci("setupInventory",r=>{n(fT(r)),!e&&t(!0)}),Ci("refreshSlots",r=>n(M7(r))),Ci("displayMetadata",r=>{n(_7(r))}),ge(Vr,{children:[N(dm,{in:e,children:ge("div",{className:"inventory-wrapper",children:[N(une,{}),N(RQ,{}),N(lne,{})]})}),N(AQ,{})]})},Gy=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),fne=e=>{const t=e.getInitialClientOffset(),n=e.getInitialSourceClientOffset();return t===null||n===null||t.x===void 0||t.y===void 0?{x:0,y:0}:Gy(t,n)},dne=(e,t)=>{const n=e.getClientOffset();if(n===null)return null;if(!t.current||!t.current.getBoundingClientRect)return Gy(n,fne(e));const r=t.current.getBoundingClientRect(),i={x:r.width/2,y:r.height/2};return Gy(n,i)},pne=()=>{const e=T.exports.useRef(null),{data:t,isDragging:n,currentOffset:r}=m9(i=>({data:i.getItem(),currentOffset:dne(i,e),isDragging:i.isDragging()}));return N(Vr,{children:n&&r&&t.item&&N("div",{className:"item-drag-preview",ref:e,style:{transform:`translate(${r.x}px, ${r.y}px)`,backgroundImage:t.image}})})},hne=e=>{const[t,n]=Ye.useState(!1),r=Ye.useCallback(({key:o})=>{o===e&&n(!0)},[e]),i=Ye.useCallback(({key:o})=>{o===e&&n(!1)},[e]);return Ye.useEffect(()=>(window.addEventListener("keydown",r),window.addEventListener("keyup",i),()=>{window.removeEventListener("keydown",r),window.removeEventListener("keyup",i)}),[r,i]),t},mne=()=>{const e=_l(),t=hne("Shift");return T.exports.useEffect(()=>{e(T7(t))},[t,e]),N(Vr,{})},gne=()=>{const e=_l(),t=lo();return Ci("init",({locale:n,items:r,leftInventory:i,imagepath:o})=>{for(const s in n)Pt[s]=n[s];for(const s in r)xt[s]=r[s];g7(o),e(fT({leftInventory:i}))}),Wr("uiLoaded",{}),Ci("closeInventory",()=>{t.dispatch({type:"dnd-core/END_DRAG"})}),ge(yq,{sx:{height:"100%",width:"100%",color:"white"},children:[N(cne,{}),N(pne,{}),N(mne,{})]})};const vne=(e=[])=>{const[t,n]=T.exports.useState(e);return{add:r=>{n(i=>[...i,r])},remove:()=>{let r;return n(([i,...o])=>(r=i,o)),r},get values(){return t},get first(){return t[0]},get last(){return t[t.length-1]},get size(){return t.length}}},yne=Ye.createContext(null),xne=Ye.forwardRef((e,t)=>{const n=e.item.item;return N("div",{className:"item-notification-item-box",style:{backgroundImage:`url(${Js(n)||"none"}`,...e.style},ref:t,children:ge("div",{className:"item-slot-wrapper",children:[N("div",{className:"item-notification-action-box",children:N("p",{children:e.item.text})}),N("div",{className:"inventory-slot-label-box",children:N("div",{className:"inventory-slot-label-text",children:n.metadata?.label||xt[n.name]?.label})})]})})}),bne=({children:e})=>{const t=vne(),n=r=>{const i=Ye.createRef(),o={id:Date.now(),item:r,ref:i};t.add(o);const s=setTimeout(()=>{t.remove(),clearTimeout(s)},2500)};return Ci("itemNotify",([r,i,o])=>{n({item:r,text:o?`${Pt[i]} ${o}x`:`${Pt[i]}`})}),ge(yne.Provider,{value:{add:n},children:[e,Xa.exports.createPortal(N(OR,{className:"item-notification-container",children:t.values.map((r,i)=>N(dm,{children:N(xne,{item:r.item,ref:r.ref})},`item-notification-${i}`))}),document.body)]})},Bu=document.getElementById("root");lT()&&(Bu.style.backgroundImage='url("https://i.imgur.com/3pzRj9n.png")',Bu.style.backgroundSize="cover",Bu.style.backgroundRepeat="no-repeat",Bu.style.backgroundPosition="center");EP(Bu).render(N(Ye.StrictMode,{children:N(bz,{store:hr,children:N(Hx,{theme:qx({palette:{mode:"dark"}}),children:N(G8,{backend:A9,options:{enableMouseEvents:!0},children:N(bne,{children:N(gne,{})})})})})})); diff --git a/server-data/resources/[ox]/ox_inventory/web/build/assets/index-e31759b5.js b/server-data/resources/[ox]/ox_inventory/web/build/assets/index-e31759b5.js new file mode 100644 index 000000000..fb586b660 --- /dev/null +++ b/server-data/resources/[ox]/ox_inventory/web/build/assets/index-e31759b5.js @@ -0,0 +1,40 @@ +function nA(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerpolicy&&(l.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?l.credentials="include":i.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();var Eu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ef={exports:{}},tf={},T={exports:{}},Ne={};var ks=Symbol.for("react.element"),rA=Symbol.for("react.portal"),iA=Symbol.for("react.fragment"),oA=Symbol.for("react.strict_mode"),lA=Symbol.for("react.profiler"),uA=Symbol.for("react.provider"),sA=Symbol.for("react.context"),aA=Symbol.for("react.forward_ref"),cA=Symbol.for("react.suspense"),fA=Symbol.for("react.memo"),dA=Symbol.for("react.lazy"),i1=Symbol.iterator;function pA(e){return e===null||typeof e!="object"?null:(e=i1&&e[i1]||e["@@iterator"],typeof e=="function"?e:null)}var Jw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},eS=Object.assign,tS={};function Jl(e,t,n){this.props=e,this.context=t,this.refs=tS,this.updater=n||Jw}Jl.prototype.isReactComponent={};Jl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Jl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nS(){}nS.prototype=Jl.prototype;function zg(e,t,n){this.props=e,this.context=t,this.refs=tS,this.updater=n||Jw}var $g=zg.prototype=new nS;$g.constructor=zg;eS($g,Jl.prototype);$g.isPureReactComponent=!0;var o1=Array.isArray,rS=Object.prototype.hasOwnProperty,Bg={current:null},iS={key:!0,ref:!0,__self:!0,__source:!0};function oS(e,t,n){var r,i={},l=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(l=""+t.key),t)rS.call(t,r)&&!iS.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,O=U[b];if(0>>1;bi(Ae,ee))dei(Oe,Ae)?(U[b]=Oe,U[de]=ee,b=de):(U[b]=Ae,U[ve]=ee,b=ve);else if(dei(Oe,ee))U[b]=Oe,U[de]=ee,b=de;else break e}}return J}function i(U,J){var ee=U.sortIndex-J.sortIndex;return ee!==0?ee:U.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var f=[],d=[],h=1,g=null,y=3,m=!1,w=!1,E=!1,A=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _(U){for(var J=n(d);J!==null;){if(J.callback===null)r(d);else if(J.startTime<=U)r(d),J.sortIndex=J.expirationTime,t(f,J);else break;J=n(d)}}function P(U){if(E=!1,_(U),!w)if(n(f)!==null)w=!0,oe(D);else{var J=n(d);J!==null&&ue(P,J.startTime-U)}}function D(U,J){w=!1,E&&(E=!1,v(z),z=-1),m=!0;var ee=y;try{for(_(J),g=n(f);g!==null&&(!(g.expirationTime>J)||U&&!B());){var b=g.callback;if(typeof b=="function"){g.callback=null,y=g.priorityLevel;var O=b(g.expirationTime<=J);J=e.unstable_now(),typeof O=="function"?g.callback=O:g===n(f)&&r(f),_(J)}else r(f);g=n(f)}if(g!==null)var fe=!0;else{var ve=n(d);ve!==null&&ue(P,ve.startTime-J),fe=!1}return fe}finally{g=null,y=ee,m=!1}}var R=!1,F=null,z=-1,q=5,K=-1;function B(){return!(e.unstable_now()-KU||125b?(U.sortIndex=ee,t(d,U),n(f)===null&&U===n(d)&&(E?(v(z),z=-1):E=!0,ue(P,ee-b))):(U.sortIndex=O,t(f,U),w||m||(w=!0,oe(D))),U},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(U){var J=y;return function(){var ee=y;y=J;try{return U.apply(this,arguments)}finally{y=ee}}}})(aS);(function(e){e.exports=aS})(sS);var cS=T.exports,Bn=sS.exports;function te(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mh=Object.prototype.hasOwnProperty,kA=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,u1={},s1={};function _A(e){return mh.call(s1,e)?!0:mh.call(u1,e)?!1:kA.test(e)?s1[e]=!0:(u1[e]=!0,!1)}function bA(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function OA(e,t,n,r){if(t===null||typeof t>"u"||bA(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function dn(e,t,n,r,i,l,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=s}var Wt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Wt[e]=new dn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Wt[t]=new dn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Wt[e]=new dn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Wt[e]=new dn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Wt[e]=new dn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Wt[e]=new dn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Wt[e]=new dn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Wt[e]=new dn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Wt[e]=new dn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Hg=/[\-:]([a-z])/g;function jg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Hg,jg);Wt[t]=new dn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Hg,jg);Wt[t]=new dn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Hg,jg);Wt[t]=new dn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Wt[e]=new dn(e,1,!1,e.toLowerCase(),null,!1,!1)});Wt.xlinkHref=new dn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Wt[e]=new dn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Wg(e,t,n,r){var i=Wt.hasOwnProperty(t)?Wt[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==l[a]){var f=` +`+i[s].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=s&&0<=a);break}}}finally{pp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Du(e):""}function IA(e){switch(e.tag){case 5:return Du(e.type);case 16:return Du("Lazy");case 13:return Du("Suspense");case 19:return Du("SuspenseList");case 0:case 2:case 15:return e=hp(e.type,!1),e;case 11:return e=hp(e.type.render,!1),e;case 1:return e=hp(e.type,!0),e;default:return""}}function wh(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yl:return"Fragment";case vl:return"Portal";case vh:return"Profiler";case Vg:return"StrictMode";case yh:return"Suspense";case xh:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case pS:return(e.displayName||"Context")+".Consumer";case dS:return(e._context.displayName||"Context")+".Provider";case qg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Gg:return t=e.displayName||null,t!==null?t:wh(e.type)||"Memo";case Di:t=e._payload,e=e._init;try{return wh(e(t))}catch{}}return null}function TA(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return wh(t);case 8:return t===Vg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function eo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RA(e){var t=gS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,l.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _a(e){e._valueTracker||(e._valueTracker=RA(e))}function mS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=gS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Sh(e,t){var n=t.checked;return vt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function c1(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=eo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function vS(e,t){t=t.checked,t!=null&&Wg(e,"checked",t,!1)}function Eh(e,t){vS(e,t);var n=eo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ch(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ch(e,t.type,eo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function f1(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ch(e,t,n){(t!=="number"||fc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Lu=Array.isArray;function Rl(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=ba.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function rs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Bu={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},PA=["Webkit","ms","Moz","O"];Object.keys(Bu).forEach(function(e){PA.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Bu[t]=Bu[e]})});function SS(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Bu.hasOwnProperty(e)&&Bu[e]?(""+t).trim():t+"px"}function ES(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=SS(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var AA=vt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bh(e,t){if(t){if(AA[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(te(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(te(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(te(61))}if(t.style!=null&&typeof t.style!="object")throw Error(te(62))}}function Oh(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ih=null;function Kg(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Th=null,Pl=null,Al=null;function h1(e){if(e=Os(e)){if(typeof Th!="function")throw Error(te(280));var t=e.stateNode;t&&(t=uf(t),Th(e.stateNode,e.type,t))}}function CS(e){Pl?Al?Al.push(e):Al=[e]:Pl=e}function kS(){if(Pl){var e=Pl,t=Al;if(Al=Pl=null,h1(e),t)for(e=0;e>>=0,e===0?32:31-(jA(e)/WA|0)|0}var Oa=64,Ia=4194304;function Mu(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function gc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,l=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Mu(a):(l&=s,l!==0&&(r=Mu(l)))}else s=n&~i,s!==0?r=Mu(s):l!==0&&(r=Mu(l));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,l=t&-t,i>=l||i===16&&(l&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function _s(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ir(t),e[t]=n}function KA(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Hu),C1=String.fromCharCode(32),k1=!1;function WS(e,t){switch(e){case"keyup":return ED.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function VS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function kD(e,t){switch(e){case"compositionend":return VS(t);case"keypress":return t.which!==32?null:(k1=!0,C1);case"textInput":return e=t.data,e===C1&&k1?null:e;default:return null}}function _D(e,t){if(xl)return e==="compositionend"||!nm&&WS(e,t)?(e=HS(),Ya=Jg=$i=null,xl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=I1(n)}}function QS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?QS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function YS(){for(var e=window,t=fc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fc(e.document)}return t}function rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function LD(e){var t=YS(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&QS(n.ownerDocument.documentElement,n)){if(r!==null&&rm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,l=Math.min(r.start,i);r=r.end===void 0?l:Math.min(r.end,i),!e.extend&&l>r&&(i=r,r=l,l=i),i=T1(n,l);var s=T1(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,wl=null,Mh=null,Wu=null,Nh=!1;function R1(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Nh||wl==null||wl!==fc(r)||(r=wl,"selectionStart"in r&&rm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Wu&&as(Wu,r)||(Wu=r,r=yc(Mh,"onSelect"),0Cl||(e.current=Hh[Cl],Hh[Cl]=null,Cl--)}function tt(e,t){Cl++,Hh[Cl]=e.current,e.current=t}var to={},tn=uo(to),Cn=uo(!1),Mo=to;function jl(e,t){var n=e.type.contextTypes;if(!n)return to;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},l;for(l in n)i[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function kn(e){return e=e.childContextTypes,e!=null}function wc(){lt(Cn),lt(tn)}function F1(e,t,n){if(tn.current!==to)throw Error(te(168));tt(tn,t),tt(Cn,n)}function oE(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(te(108,TA(e)||"Unknown",i));return vt({},n,r)}function Sc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||to,Mo=tn.current,tt(tn,e),tt(Cn,Cn.current),!0}function z1(e,t,n){var r=e.stateNode;if(!r)throw Error(te(169));n?(e=oE(e,t,Mo),r.__reactInternalMemoizedMergedChildContext=e,lt(Cn),lt(tn),tt(tn,e)):lt(Cn),tt(Cn,n)}var li=null,sf=!1,Ip=!1;function lE(e){li===null?li=[e]:li.push(e)}function qD(e){sf=!0,lE(e)}function so(){if(!Ip&&li!==null){Ip=!0;var e=0,t=Qe;try{var n=li;for(Qe=1;e>=s,i-=s,ui=1<<32-Ir(t)+i|n<z?(q=F,F=null):q=F.sibling;var K=y(v,F,_[z],P);if(K===null){F===null&&(F=q);break}e&&F&&K.alternate===null&&t(v,F),S=l(K,S,z),R===null?D=K:R.sibling=K,R=K,F=q}if(z===_.length)return n(v,F),ft&&So(v,z),D;if(F===null){for(;z<_.length;z++)F=g(v,_[z],P),F!==null&&(S=l(F,S,z),R===null?D=F:R.sibling=F,R=F);return ft&&So(v,z),D}for(F=r(v,F);z<_.length;z++)q=m(F,v,z,_[z],P),q!==null&&(e&&q.alternate!==null&&F.delete(q.key===null?z:q.key),S=l(q,S,z),R===null?D=q:R.sibling=q,R=q);return e&&F.forEach(function(B){return t(v,B)}),ft&&So(v,z),D}function E(v,S,_,P){var D=Cu(_);if(typeof D!="function")throw Error(te(150));if(_=D.call(_),_==null)throw Error(te(151));for(var R=D=null,F=S,z=S=0,q=null,K=_.next();F!==null&&!K.done;z++,K=_.next()){F.index>z?(q=F,F=null):q=F.sibling;var B=y(v,F,K.value,P);if(B===null){F===null&&(F=q);break}e&&F&&B.alternate===null&&t(v,F),S=l(B,S,z),R===null?D=B:R.sibling=B,R=B,F=q}if(K.done)return n(v,F),ft&&So(v,z),D;if(F===null){for(;!K.done;z++,K=_.next())K=g(v,K.value,P),K!==null&&(S=l(K,S,z),R===null?D=K:R.sibling=K,R=K);return ft&&So(v,z),D}for(F=r(v,F);!K.done;z++,K=_.next())K=m(F,v,z,K.value,P),K!==null&&(e&&K.alternate!==null&&F.delete(K.key===null?z:K.key),S=l(K,S,z),R===null?D=K:R.sibling=K,R=K);return e&&F.forEach(function(X){return t(v,X)}),ft&&So(v,z),D}function A(v,S,_,P){if(typeof _=="object"&&_!==null&&_.type===yl&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case ka:e:{for(var D=_.key,R=S;R!==null;){if(R.key===D){if(D=_.type,D===yl){if(R.tag===7){n(v,R.sibling),S=i(R,_.props.children),S.return=v,v=S;break e}}else if(R.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===Di&&V1(D)===R.type){n(v,R.sibling),S=i(R,_.props),S.ref=Iu(v,R,_),S.return=v,v=S;break e}n(v,R);break}else t(v,R);R=R.sibling}_.type===yl?(S=Ao(_.props.children,v.mode,P,_.key),S.return=v,v=S):(P=ic(_.type,_.key,_.props,null,v.mode,P),P.ref=Iu(v,S,_),P.return=v,v=P)}return s(v);case vl:e:{for(R=_.key;S!==null;){if(S.key===R)if(S.tag===4&&S.stateNode.containerInfo===_.containerInfo&&S.stateNode.implementation===_.implementation){n(v,S.sibling),S=i(S,_.children||[]),S.return=v,v=S;break e}else{n(v,S);break}else t(v,S);S=S.sibling}S=Np(_,v.mode,P),S.return=v,v=S}return s(v);case Di:return R=_._init,A(v,S,R(_._payload),P)}if(Lu(_))return w(v,S,_,P);if(Cu(_))return E(v,S,_,P);Ma(v,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,S!==null&&S.tag===6?(n(v,S.sibling),S=i(S,_),S.return=v,v=S):(n(v,S),S=Mp(_,v.mode,P),S.return=v,v=S),s(v)):n(v,S)}return A}var Vl=hE(!0),gE=hE(!1),Is={},jr=uo(Is),ps=uo(Is),hs=uo(Is);function To(e){if(e===Is)throw Error(te(174));return e}function dm(e,t){switch(tt(hs,t),tt(ps,e),tt(jr,Is),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:_h(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=_h(t,e)}lt(jr),tt(jr,t)}function ql(){lt(jr),lt(ps),lt(hs)}function mE(e){To(hs.current);var t=To(jr.current),n=_h(t,e.type);t!==n&&(tt(ps,e),tt(jr,n))}function pm(e){ps.current===e&&(lt(jr),lt(ps))}var ht=uo(0);function Oc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Tp=[];function hm(){for(var e=0;en?n:4,e(!0);var r=Rp.transition;Rp.transition={};try{e(!1),t()}finally{Qe=n,Rp.transition=r}}function AE(){return pr().memoizedState}function YD(e,t,n){var r=Gi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},DE(e))LE(t,n);else if(n=cE(e,t,n,r),n!==null){var i=cn();Tr(n,e,r,i),ME(n,t,r)}}function XD(e,t,n){var r=Gi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(DE(e))LE(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var s=t.lastRenderedState,a=l(s,n);if(i.hasEagerState=!0,i.eagerState=a,Rr(a,s)){var f=t.interleaved;f===null?(i.next=i,cm(t)):(i.next=f.next,f.next=i),t.interleaved=i;return}}catch{}finally{}n=cE(e,t,i,r),n!==null&&(i=cn(),Tr(n,e,r,i),ME(n,t,r))}}function DE(e){var t=e.alternate;return e===mt||t!==null&&t===mt}function LE(e,t){Vu=Ic=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ME(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yg(e,n)}}var Tc={readContext:dr,useCallback:Qt,useContext:Qt,useEffect:Qt,useImperativeHandle:Qt,useInsertionEffect:Qt,useLayoutEffect:Qt,useMemo:Qt,useReducer:Qt,useRef:Qt,useState:Qt,useDebugValue:Qt,useDeferredValue:Qt,useTransition:Qt,useMutableSource:Qt,useSyncExternalStore:Qt,useId:Qt,unstable_isNewReconciler:!1},ZD={readContext:dr,useCallback:function(e,t){return Fr().memoizedState=[e,t===void 0?null:t],e},useContext:dr,useEffect:G1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ec(4194308,4,OE.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ec(4194308,4,e,t)},useInsertionEffect:function(e,t){return ec(4,2,e,t)},useMemo:function(e,t){var n=Fr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Fr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=YD.bind(null,mt,e),[r.memoizedState,e]},useRef:function(e){var t=Fr();return e={current:e},t.memoizedState=e},useState:q1,useDebugValue:xm,useDeferredValue:function(e){return Fr().memoizedState=e},useTransition:function(){var e=q1(!1),t=e[0];return e=QD.bind(null,e[1]),Fr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=mt,i=Fr();if(ft){if(n===void 0)throw Error(te(407));n=n()}else{if(n=t(),Nt===null)throw Error(te(349));(Fo&30)!==0||xE(r,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,G1(SE.bind(null,r,l,e),[e]),r.flags|=2048,vs(9,wE.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=Fr(),t=Nt.identifierPrefix;if(ft){var n=si,r=ui;n=(r&~(1<<32-Ir(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=gs++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[$r]=t,e[ds]=r,WE(e,t,!1,!1),t.stateNode=e;e:{switch(s=Oh(n,r),n){case"dialog":rt("cancel",e),rt("close",e),i=r;break;case"iframe":case"object":case"embed":rt("load",e),i=r;break;case"video":case"audio":for(i=0;iKl&&(t.flags|=128,r=!0,Tu(l,!1),t.lanes=4194304)}else{if(!r)if(e=Oc(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Tu(l,!0),l.tail===null&&l.tailMode==="hidden"&&!s.alternate&&!ft)return Yt(t),null}else 2*kt()-l.renderingStartTime>Kl&&n!==1073741824&&(t.flags|=128,r=!0,Tu(l,!1),t.lanes=4194304);l.isBackwards?(s.sibling=t.child,t.child=s):(n=l.last,n!==null?n.sibling=s:t.child=s,l.last=s)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=kt(),t.sibling=null,n=ht.current,tt(ht,r?n&1|2:n&1),t):(Yt(t),null);case 22:case 23:return _m(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Ln&1073741824)!==0&&(Yt(t),t.subtreeFlags&6&&(t.flags|=8192)):Yt(t),null;case 24:return null;case 25:return null}throw Error(te(156,t.tag))}function lL(e,t){switch(om(t),t.tag){case 1:return kn(t.type)&&wc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ql(),lt(Cn),lt(tn),hm(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return pm(t),null;case 13:if(lt(ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(te(340));Wl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return lt(ht),null;case 4:return ql(),null;case 10:return am(t.type._context),null;case 22:case 23:return _m(),null;case 24:return null;default:return null}}var Fa=!1,Jt=!1,uL=typeof WeakSet=="function"?WeakSet:Set,ae=null;function Ol(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){wt(e,t,r)}else n.current=null}function eg(e,t,n){try{n()}catch(r){wt(e,t,r)}}var nx=!1;function sL(e,t){if(Fh=mc,e=YS(),rm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var s=0,a=-1,f=-1,d=0,h=0,g=e,y=null;t:for(;;){for(var m;g!==n||i!==0&&g.nodeType!==3||(a=s+i),g!==l||r!==0&&g.nodeType!==3||(f=s+r),g.nodeType===3&&(s+=g.nodeValue.length),(m=g.firstChild)!==null;)y=g,g=m;for(;;){if(g===e)break t;if(y===n&&++d===i&&(a=s),y===l&&++h===r&&(f=s),(m=g.nextSibling)!==null)break;g=y,y=g.parentNode}g=m}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(zh={focusedElem:e,selectionRange:n},mc=!1,ae=t;ae!==null;)if(t=ae,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ae=e;else for(;ae!==null;){t=ae;try{var w=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var E=w.memoizedProps,A=w.memoizedState,v=t.stateNode,S=v.getSnapshotBeforeUpdate(t.elementType===t.type?E:kr(t.type,E),A);v.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(te(163))}}catch(P){wt(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,ae=e;break}ae=t.return}return w=nx,nx=!1,w}function qu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var l=i.destroy;i.destroy=void 0,l!==void 0&&eg(t,n,l)}i=i.next}while(i!==r)}}function ff(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function tg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function GE(e){var t=e.alternate;t!==null&&(e.alternate=null,GE(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[$r],delete t[ds],delete t[Uh],delete t[WD],delete t[VD])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function KE(e){return e.tag===5||e.tag===3||e.tag===4}function rx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||KE(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ng(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xc));else if(r!==4&&(e=e.child,e!==null))for(ng(e,t,n),e=e.sibling;e!==null;)ng(e,t,n),e=e.sibling}function rg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(rg(e,t,n),e=e.sibling;e!==null;)rg(e,t,n),e=e.sibling}var Ut=null,_r=!1;function Ri(e,t,n){for(n=n.child;n!==null;)QE(e,t,n),n=n.sibling}function QE(e,t,n){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(nf,n)}catch{}switch(n.tag){case 5:Jt||Ol(n,t);case 6:var r=Ut,i=_r;Ut=null,Ri(e,t,n),Ut=r,_r=i,Ut!==null&&(_r?(e=Ut,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ut.removeChild(n.stateNode));break;case 18:Ut!==null&&(_r?(e=Ut,n=n.stateNode,e.nodeType===8?Op(e.parentNode,n):e.nodeType===1&&Op(e,n),us(e)):Op(Ut,n.stateNode));break;case 4:r=Ut,i=_r,Ut=n.stateNode.containerInfo,_r=!0,Ri(e,t,n),Ut=r,_r=i;break;case 0:case 11:case 14:case 15:if(!Jt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var l=i,s=l.destroy;l=l.tag,s!==void 0&&((l&2)!==0||(l&4)!==0)&&eg(n,t,s),i=i.next}while(i!==r)}Ri(e,t,n);break;case 1:if(!Jt&&(Ol(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){wt(n,t,a)}Ri(e,t,n);break;case 21:Ri(e,t,n);break;case 22:n.mode&1?(Jt=(r=Jt)||n.memoizedState!==null,Ri(e,t,n),Jt=r):Ri(e,t,n);break;default:Ri(e,t,n)}}function ix(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new uL),t.forEach(function(r){var i=vL.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Cr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~l}if(r=i,r=kt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cL(r/1960))-r,10e?16:e,Bi===null)var r=!1;else{if(e=Bi,Bi=null,Ac=0,(Be&6)!==0)throw Error(te(331));var i=Be;for(Be|=4,ae=e.current;ae!==null;){var l=ae,s=l.child;if((ae.flags&16)!==0){var a=l.deletions;if(a!==null){for(var f=0;fkt()-Cm?Po(e,0):Em|=n),_n(e,t)}function rC(e,t){t===0&&((e.mode&1)===0?t=1:(t=Ia,Ia<<=1,(Ia&130023424)===0&&(Ia=4194304)));var n=cn();e=pi(e,t),e!==null&&(_s(e,t,n),_n(e,n))}function mL(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rC(e,n)}function vL(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(te(314))}r!==null&&r.delete(t),rC(e,n)}var iC;iC=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Cn.current)Sn=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Sn=!1,iL(e,t,n);Sn=(e.flags&131072)!==0}else Sn=!1,ft&&(t.flags&1048576)!==0&&uE(t,Cc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;tc(e,t),e=t.pendingProps;var i=jl(t,tn.current);Ll(t,n),i=mm(null,t,r,e,i,n);var l=vm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,kn(r)?(l=!0,Sc(t)):l=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,fm(t),i.updater=af,t.stateNode=i,i._reactInternals=t,Gh(t,r,e,n),t=Yh(null,t,r,!0,l,n)):(t.tag=0,ft&&l&&im(t),sn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(tc(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=xL(r),e=kr(r,e),i){case 0:t=Qh(null,t,r,e,n);break e;case 1:t=J1(null,t,r,e,n);break e;case 11:t=X1(null,t,r,e,n);break e;case 14:t=Z1(null,t,r,kr(r.type,e),n);break e}throw Error(te(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kr(r,i),Qh(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kr(r,i),J1(e,t,r,i,n);case 3:e:{if(UE(t),e===null)throw Error(te(387));r=t.pendingProps,l=t.memoizedState,i=l.element,fE(e,t),bc(t,r,null,n);var s=t.memoizedState;if(r=s.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){i=Gl(Error(te(423)),t),t=ex(e,t,r,n,i);break e}else if(r!==i){i=Gl(Error(te(424)),t),t=ex(e,t,r,n,i);break e}else for(Nn=Wi(t.stateNode.containerInfo.firstChild),zn=t,ft=!0,br=null,n=gE(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wl(),r===i){t=hi(e,t,n);break e}sn(e,t,r,n)}t=t.child}return t;case 5:return mE(t),e===null&&Wh(t),r=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,s=i.children,$h(r,i)?s=null:l!==null&&$h(r,l)&&(t.flags|=32),BE(e,t),sn(e,t,s,n),t.child;case 6:return e===null&&Wh(t),null;case 13:return HE(e,t,n);case 4:return dm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Vl(t,null,r,n):sn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kr(r,i),X1(e,t,r,i,n);case 7:return sn(e,t,t.pendingProps,n),t.child;case 8:return sn(e,t,t.pendingProps.children,n),t.child;case 12:return sn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,l=t.memoizedProps,s=i.value,tt(kc,r._currentValue),r._currentValue=s,l!==null)if(Rr(l.value,s)){if(l.children===i.children&&!Cn.current){t=hi(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var a=l.dependencies;if(a!==null){s=l.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(l.tag===1){f=ci(-1,n&-n),f.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?f.next=f:(f.next=h.next,h.next=f),d.pending=f}}l.lanes|=n,f=l.alternate,f!==null&&(f.lanes|=n),Vh(l.return,n,t),a.lanes|=n;break}f=f.next}}else if(l.tag===10)s=l.type===t.type?null:l.child;else if(l.tag===18){if(s=l.return,s===null)throw Error(te(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),Vh(s,n,t),s=l.sibling}else s=l.child;if(s!==null)s.return=l;else for(s=l;s!==null;){if(s===t){s=null;break}if(l=s.sibling,l!==null){l.return=s.return,s=l;break}s=s.return}l=s}sn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ll(t,n),i=dr(i),r=r(i),t.flags|=1,sn(e,t,r,n),t.child;case 14:return r=t.type,i=kr(r,t.pendingProps),i=kr(r.type,i),Z1(e,t,r,i,n);case 15:return zE(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:kr(r,i),tc(e,t),t.tag=1,kn(r)?(e=!0,Sc(t)):e=!1,Ll(t,n),pE(t,r,i),Gh(t,r,i,n),Yh(null,t,r,!0,e,n);case 19:return jE(e,t,n);case 22:return $E(e,t,n)}throw Error(te(156,t.tag))};function oC(e,t){return PS(e,t)}function yL(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sr(e,t,n,r){return new yL(e,t,n,r)}function Om(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xL(e){if(typeof e=="function")return Om(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qg)return 11;if(e===Gg)return 14}return 2}function Ki(e,t){var n=e.alternate;return n===null?(n=sr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ic(e,t,n,r,i,l){var s=2;if(r=e,typeof e=="function")Om(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case yl:return Ao(n.children,i,l,t);case Vg:s=8,i|=8;break;case vh:return e=sr(12,n,t,i|2),e.elementType=vh,e.lanes=l,e;case yh:return e=sr(13,n,t,i),e.elementType=yh,e.lanes=l,e;case xh:return e=sr(19,n,t,i),e.elementType=xh,e.lanes=l,e;case hS:return pf(n,i,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dS:s=10;break e;case pS:s=9;break e;case qg:s=11;break e;case Gg:s=14;break e;case Di:s=16,r=null;break e}throw Error(te(130,e==null?e:typeof e,""))}return t=sr(s,n,t,i),t.elementType=e,t.type=r,t.lanes=l,t}function Ao(e,t,n,r){return e=sr(7,e,r,t),e.lanes=n,e}function pf(e,t,n,r){return e=sr(22,e,r,t),e.elementType=hS,e.lanes=n,e.stateNode={isHidden:!1},e}function Mp(e,t,n){return e=sr(6,e,null,t),e.lanes=n,e}function Np(e,t,n){return t=sr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function wL(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=mp(0),this.expirationTimes=mp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mp(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Im(e,t,n,r,i,l,s,a,f){return e=new wL(e,t,n,a,f),t===1?(t=1,l===!0&&(t|=8)):t=0,l=sr(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},fm(l),e}function SL(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=jn})(Vo);const Ba=Fg(Vo.exports);var aC,dx=Vo.exports;aC=dx.createRoot,dx.hydrateRoot;var cC={exports:{}},fC={};var Ql=T.exports;function bL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OL=typeof Object.is=="function"?Object.is:bL,IL=Ql.useState,TL=Ql.useEffect,RL=Ql.useLayoutEffect,PL=Ql.useDebugValue;function AL(e,t){var n=t(),r=IL({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return RL(function(){i.value=n,i.getSnapshot=t,Fp(i)&&l({inst:i})},[e,n,t]),TL(function(){return Fp(i)&&l({inst:i}),e(function(){Fp(i)&&l({inst:i})})},[e]),PL(n),n}function Fp(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!OL(e,n)}catch{return!0}}function DL(e,t){return t()}var LL=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?DL:AL;fC.useSyncExternalStore=Ql.useSyncExternalStore!==void 0?Ql.useSyncExternalStore:LL;(function(e){e.exports=fC})(cC);var dC={exports:{}},pC={};var yf=T.exports,ML=cC.exports;function NL(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FL=typeof Object.is=="function"?Object.is:NL,zL=ML.useSyncExternalStore,$L=yf.useRef,BL=yf.useEffect,UL=yf.useMemo,HL=yf.useDebugValue;pC.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var l=$L(null);if(l.current===null){var s={hasValue:!1,value:null};l.current=s}else s=l.current;l=UL(function(){function f(m){if(!d){if(d=!0,h=m,m=r(m),i!==void 0&&s.hasValue){var w=s.value;if(i(w,m))return g=w}return g=m}if(w=g,FL(h,m))return w;var E=r(m);return i!==void 0&&i(w,E)?w:(h=m,g=E)}var d=!1,h,g,y=n===void 0?null:n;return[function(){return f(t())},y===null?void 0:function(){return f(y())}]},[t,n,r,i]);var a=zL(e,l[0],l[1]);return BL(function(){s.hasValue=!0,s.value=a},[a]),HL(a),a};(function(e){e.exports=pC})(dC);function jL(e){e()}let hC=jL;const WL=e=>hC=e,VL=()=>hC,no=T.exports.createContext(null);function gC(){return T.exports.useContext(no)}const qL=()=>{throw new Error("uSES not initialized!")};let mC=qL;const GL=e=>{mC=e},KL=(e,t)=>e===t;function QL(e=no){const t=e===no?gC:()=>T.exports.useContext(e);return function(r,i=KL){const{store:l,subscription:s,getServerState:a}=t(),f=mC(s.addNestedSub,l.getState,a||l.getState,r,i);return T.exports.useDebugValue(f),f}}const YL=QL();function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}var vC={exports:{}},Ye={};var Ft=typeof Symbol=="function"&&Symbol.for,Dm=Ft?Symbol.for("react.element"):60103,Lm=Ft?Symbol.for("react.portal"):60106,xf=Ft?Symbol.for("react.fragment"):60107,wf=Ft?Symbol.for("react.strict_mode"):60108,Sf=Ft?Symbol.for("react.profiler"):60114,Ef=Ft?Symbol.for("react.provider"):60109,Cf=Ft?Symbol.for("react.context"):60110,Mm=Ft?Symbol.for("react.async_mode"):60111,kf=Ft?Symbol.for("react.concurrent_mode"):60111,_f=Ft?Symbol.for("react.forward_ref"):60112,bf=Ft?Symbol.for("react.suspense"):60113,XL=Ft?Symbol.for("react.suspense_list"):60120,Of=Ft?Symbol.for("react.memo"):60115,If=Ft?Symbol.for("react.lazy"):60116,ZL=Ft?Symbol.for("react.block"):60121,JL=Ft?Symbol.for("react.fundamental"):60117,eM=Ft?Symbol.for("react.responder"):60118,tM=Ft?Symbol.for("react.scope"):60119;function Vn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Dm:switch(e=e.type,e){case Mm:case kf:case xf:case Sf:case wf:case bf:return e;default:switch(e=e&&e.$$typeof,e){case Cf:case _f:case If:case Of:case Ef:return e;default:return t}}case Lm:return t}}}function yC(e){return Vn(e)===kf}Ye.AsyncMode=Mm;Ye.ConcurrentMode=kf;Ye.ContextConsumer=Cf;Ye.ContextProvider=Ef;Ye.Element=Dm;Ye.ForwardRef=_f;Ye.Fragment=xf;Ye.Lazy=If;Ye.Memo=Of;Ye.Portal=Lm;Ye.Profiler=Sf;Ye.StrictMode=wf;Ye.Suspense=bf;Ye.isAsyncMode=function(e){return yC(e)||Vn(e)===Mm};Ye.isConcurrentMode=yC;Ye.isContextConsumer=function(e){return Vn(e)===Cf};Ye.isContextProvider=function(e){return Vn(e)===Ef};Ye.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dm};Ye.isForwardRef=function(e){return Vn(e)===_f};Ye.isFragment=function(e){return Vn(e)===xf};Ye.isLazy=function(e){return Vn(e)===If};Ye.isMemo=function(e){return Vn(e)===Of};Ye.isPortal=function(e){return Vn(e)===Lm};Ye.isProfiler=function(e){return Vn(e)===Sf};Ye.isStrictMode=function(e){return Vn(e)===wf};Ye.isSuspense=function(e){return Vn(e)===bf};Ye.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===xf||e===kf||e===Sf||e===wf||e===bf||e===XL||typeof e=="object"&&e!==null&&(e.$$typeof===If||e.$$typeof===Of||e.$$typeof===Ef||e.$$typeof===Cf||e.$$typeof===_f||e.$$typeof===JL||e.$$typeof===eM||e.$$typeof===tM||e.$$typeof===ZL)};Ye.typeOf=Vn;(function(e){e.exports=Ye})(vC);var xC=vC.exports,nM={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},rM={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},wC={};wC[xC.ForwardRef]=nM;wC[xC.Memo]=rM;var SC={exports:{}},Xe={};var Nm=Symbol.for("react.element"),Fm=Symbol.for("react.portal"),Tf=Symbol.for("react.fragment"),Rf=Symbol.for("react.strict_mode"),Pf=Symbol.for("react.profiler"),Af=Symbol.for("react.provider"),Df=Symbol.for("react.context"),iM=Symbol.for("react.server_context"),Lf=Symbol.for("react.forward_ref"),Mf=Symbol.for("react.suspense"),Nf=Symbol.for("react.suspense_list"),Ff=Symbol.for("react.memo"),zf=Symbol.for("react.lazy"),oM=Symbol.for("react.offscreen"),EC;EC=Symbol.for("react.module.reference");function hr(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Nm:switch(e=e.type,e){case Tf:case Pf:case Rf:case Mf:case Nf:return e;default:switch(e=e&&e.$$typeof,e){case iM:case Df:case Lf:case zf:case Ff:case Af:return e;default:return t}}case Fm:return t}}}Xe.ContextConsumer=Df;Xe.ContextProvider=Af;Xe.Element=Nm;Xe.ForwardRef=Lf;Xe.Fragment=Tf;Xe.Lazy=zf;Xe.Memo=Ff;Xe.Portal=Fm;Xe.Profiler=Pf;Xe.StrictMode=Rf;Xe.Suspense=Mf;Xe.SuspenseList=Nf;Xe.isAsyncMode=function(){return!1};Xe.isConcurrentMode=function(){return!1};Xe.isContextConsumer=function(e){return hr(e)===Df};Xe.isContextProvider=function(e){return hr(e)===Af};Xe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Nm};Xe.isForwardRef=function(e){return hr(e)===Lf};Xe.isFragment=function(e){return hr(e)===Tf};Xe.isLazy=function(e){return hr(e)===zf};Xe.isMemo=function(e){return hr(e)===Ff};Xe.isPortal=function(e){return hr(e)===Fm};Xe.isProfiler=function(e){return hr(e)===Pf};Xe.isStrictMode=function(e){return hr(e)===Rf};Xe.isSuspense=function(e){return hr(e)===Mf};Xe.isSuspenseList=function(e){return hr(e)===Nf};Xe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Tf||e===Pf||e===Rf||e===Mf||e===Nf||e===oM||typeof e=="object"&&e!==null&&(e.$$typeof===zf||e.$$typeof===Ff||e.$$typeof===Af||e.$$typeof===Df||e.$$typeof===Lf||e.$$typeof===EC||e.getModuleId!==void 0)};Xe.typeOf=hr;(function(e){e.exports=Xe})(SC);const lM=Fg(SC.exports);function uM(){const e=VL();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,l=n={callback:r,next:null,prev:n};return l.prev?l.prev.next=l:t=l,function(){!i||t===null||(i=!1,l.next?l.next.prev=l.prev:n=l.prev,l.prev?l.prev.next=l.next:t=l.next)}}}}const px={notify(){},get:()=>[]};function sM(e,t){let n,r=px;function i(g){return f(),r.subscribe(g)}function l(){r.notify()}function s(){h.onStateChange&&h.onStateChange()}function a(){return Boolean(n)}function f(){n||(n=t?t.addNestedSub(s):e.subscribe(s),r=uM())}function d(){n&&(n(),n=void 0,r.clear(),r=px)}const h={addNestedSub:i,notifyNestedSubs:l,handleChangeWrapper:s,isSubscribed:a,trySubscribe:f,tryUnsubscribe:d,getListeners:()=>r};return h}const aM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cM=aM?T.exports.useLayoutEffect:T.exports.useEffect;function fM({store:e,context:t,children:n,serverState:r}){const i=T.exports.useMemo(()=>{const a=sM(e);return{store:e,subscription:a,getServerState:r?()=>r:void 0}},[e,r]),l=T.exports.useMemo(()=>e.getState(),[e]);cM(()=>{const{subscription:a}=i;return a.onStateChange=a.notifyNestedSubs,a.trySubscribe(),l!==e.getState()&&a.notifyNestedSubs(),()=>{a.tryUnsubscribe(),a.onStateChange=void 0}},[i,l]);const s=t||no;return be.createElement(s.Provider,{value:i},n)}function CC(e=no){const t=e===no?gC:()=>T.exports.useContext(e);return function(){const{store:r}=t();return r}}const dM=CC();function pM(e=no){const t=e===no?dM:CC(e);return function(){return t().dispatch}}const hM=pM();GL(dC.exports.useSyncExternalStoreWithSelector);WL(Vo.exports.unstable_batchedUpdates);const kC=T.exports.createContext({dragDropManager:void 0});function xs(e){return xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xs(e)}function gM(e,t){if(xs(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xs(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mM(e){var t=gM(e,"string");return xs(t)==="symbol"?t:String(t)}function vM(e,t,n){return t=mM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gx(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Xt(1));return n(zm)(e,t)}if(typeof e!="function")throw new Error(Xt(2));var i=e,l=t,s=[],a=s,f=!1;function d(){a===s&&(a=s.slice())}function h(){if(f)throw new Error(Xt(3));return l}function g(E){if(typeof E!="function")throw new Error(Xt(4));if(f)throw new Error(Xt(5));var A=!0;return d(),a.push(E),function(){if(!!A){if(f)throw new Error(Xt(6));A=!1,d();var S=a.indexOf(E);a.splice(S,1),s=null}}}function y(E){if(!yM(E))throw new Error(Xt(7));if(typeof E.type>"u")throw new Error(Xt(8));if(f)throw new Error(Xt(9));try{f=!0,l=i(l,E)}finally{f=!1}for(var A=s=a,v=0;v"u")throw new Error(Xt(12));if(typeof n(void 0,{type:Nc.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Xt(13))})}function wM(e){for(var t=Object.keys(e),n={},r=0;r"u")throw d&&d.type,new Error(Xt(14));g[m]=A,h=h||A!==E}return h=h||l.length!==Object.keys(f).length,h?g:f}}function Fc(){for(var e=arguments.length,t=new Array(e),n=0;nr&&r[i]?r[i]:n||null,e)}function kM(e,t){return e.filter(n=>n!==t)}function _C(e){return typeof e=="object"}function _M(e,t){const n=new Map,r=l=>{n.set(l,n.has(l)?n.get(l)+1:1)};e.forEach(r),t.forEach(r);const i=[];return n.forEach((l,s)=>{l===1&&i.push(s)}),i}function bM(e,t){return e.filter(n=>t.indexOf(n)>-1)}const $m="dnd-core/INIT_COORDS",$f="dnd-core/BEGIN_DRAG",Bm="dnd-core/PUBLISH_DRAG_SOURCE",Bf="dnd-core/HOVER",Uf="dnd-core/DROP",Hf="dnd-core/END_DRAG";function vx(e,t){return{type:$m,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const OM={type:$m,payload:{clientOffset:null,sourceClientOffset:null}};function IM(e){return function(n=[],r={publishSource:!0}){const{publishSource:i=!0,clientOffset:l,getSourceClientOffset:s}=r,a=e.getMonitor(),f=e.getRegistry();e.dispatch(vx(l)),TM(n,a,f);const d=AM(n,a);if(d==null){e.dispatch(OM);return}let h=null;if(l){if(!s)throw new Error("getSourceClientOffset must be defined");RM(s),h=s(d)}e.dispatch(vx(l,h));const y=f.getSource(d).beginDrag(a,d);if(y==null)return;PM(y),f.pinSource(d);const m=f.getSourceType(d);return{type:$f,payload:{itemType:m,item:y,sourceId:d,clientOffset:l||null,sourceClientOffset:h||null,isSourcePublic:!!i}}}}function TM(e,t,n){_e(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){_e(n.getSource(r),"Expected sourceIds to be registered.")})}function RM(e){_e(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function PM(e){_e(_C(e),"Item must be an object.")}function AM(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function DM(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LM(e){for(var t=1;t{const f=FM(s,a,i,r),d={type:Uf,payload:{dropResult:LM({},n,f)}};e.dispatch(d)})}}function NM(e){_e(e.isDragging(),"Cannot call drop while not dragging."),_e(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function FM(e,t,n,r){const i=n.getTarget(e);let l=i?i.drop(r,e):void 0;return zM(l),typeof l>"u"&&(l=t===0?{}:r.getDropResult()),l}function zM(e){_e(typeof e>"u"||_C(e),"Drop result must either be an object or undefined.")}function $M(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function BM(e){return function(){const n=e.getMonitor(),r=e.getRegistry();UM(n);const i=n.getSourceId();return i!=null&&(r.getSource(i,!0).endDrag(n,i),r.unpinSource()),{type:Hf}}}function UM(e){_e(e.isDragging(),"Cannot call endDrag while not dragging.")}function sg(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function HM(e){return function(n,{clientOffset:r}={}){jM(n);const i=n.slice(0),l=e.getMonitor(),s=e.getRegistry(),a=l.getItemType();return VM(i,s,a),WM(i,l,s),qM(i,l,s),{type:Bf,payload:{targetIds:i,clientOffset:r||null}}}}function jM(e){_e(Array.isArray(e),"Expected targetIds to be an array.")}function WM(e,t,n){_e(t.isDragging(),"Cannot call hover while not dragging."),_e(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const i=e[r],l=t.getTargetType(i);sg(l,n)||e.splice(r,1)}}function qM(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function GM(e){return function(){if(e.getMonitor().isDragging())return{type:Bm}}}function KM(e){return{beginDrag:IM(e),publishDragSource:GM(e),hover:HM(e),drop:MM(e),endDrag:BM(e)}}class QM{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(l){return(...s)=>{const a=l.apply(t,s);typeof a<"u"&&n(a)}}const i=KM(this);return Object.keys(i).reduce((l,s)=>{const a=i[s];return l[s]=r(a),l},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function YM(e,t){return{x:e.x+t.x,y:e.y+t.y}}function bC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XM(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:bC(YM(t,r),n)}function ZM(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:bC(t,n)}const Qu=[],Um=[];Qu.__IS_NONE__=!0;Um.__IS_ALL__=!0;function JM(e,t){return e===Qu?!1:e===Um||typeof t>"u"?!0:bM(t,e).length>0}class eN{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;_e(typeof t=="function","listener must be a function."),_e(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const l=()=>{const s=this.store.getState(),a=s.stateId;try{a===i||a===i+1&&!JM(s.dirtyHandlerIds,r)||t()}finally{i=a}};return this.store.subscribe(l)}subscribeToOffsetChange(t){_e(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const i=this.store.getState().dragOffset;i!==n&&(n=i,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return _e(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(_e(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),i=this.getItemType();return sg(r,i)&&n.canDrop(this,t)}isDragging(){return Boolean(this.getItemType())}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(_e(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),i=this.getItemType();return r!==i?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const i=this.registry.getTargetType(t),l=this.getItemType();if(l&&!sg(i,l))return!1;const s=this.getTargetIds();if(!s.length)return!1;const a=s.indexOf(t);return r?a===s.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return Boolean(this.store.getState().dragOperation.isSourcePublic)}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return XM(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return ZM(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const yx=typeof global<"u"?global:self,OC=yx.MutationObserver||yx.WebKitMutationObserver;function IC(e){return function(){const n=setTimeout(i,0),r=setInterval(i,50);function i(){clearTimeout(n),clearInterval(r),e()}}}function tN(e){let t=1;const n=new OC(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const nN=typeof OC=="function"?tN:IC;class rN{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let r=0,i=t.length-this.index;r{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=nN(this.flush),this.requestErrorThrow=IC(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class iN{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class oN{create(t){const n=this.freeTasks,r=n.length?n.pop():new iN(this.onError,i=>n[n.length]=i);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const TC=new rN,lN=new oN(TC.registerPendingError);function uN(e){TC.enqueueTask(lN.create(e))}const Hm="dnd-core/ADD_SOURCE",jm="dnd-core/ADD_TARGET",Wm="dnd-core/REMOVE_SOURCE",jf="dnd-core/REMOVE_TARGET";function sN(e){return{type:Hm,payload:{sourceId:e}}}function aN(e){return{type:jm,payload:{targetId:e}}}function cN(e){return{type:Wm,payload:{sourceId:e}}}function fN(e){return{type:jf,payload:{targetId:e}}}function dN(e){_e(typeof e.canDrag=="function","Expected canDrag to be a function."),_e(typeof e.beginDrag=="function","Expected beginDrag to be a function."),_e(typeof e.endDrag=="function","Expected endDrag to be a function.")}function pN(e){_e(typeof e.canDrop=="function","Expected canDrop to be a function."),_e(typeof e.hover=="function","Expected hover to be a function."),_e(typeof e.drop=="function","Expected beginDrag to be a function.")}function ag(e,t){if(t&&Array.isArray(e)){e.forEach(n=>ag(n,!1));return}_e(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var lr;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(lr||(lr={}));let hN=0;function gN(){return hN++}function mN(e){const t=gN().toString();switch(e){case lr.SOURCE:return`S${t}`;case lr.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function xx(e){switch(e[0]){case"S":return lr.SOURCE;case"T":return lr.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function wx(e,t){const n=e.entries();let r=!1;do{const{done:i,value:[,l]}=n.next();if(l===t)return!0;r=!!i}while(!r);return!1}class vN{addSource(t,n){ag(t),dN(n);const r=this.addHandler(lr.SOURCE,t,n);return this.store.dispatch(sN(r)),r}addTarget(t,n){ag(t,!0),pN(n);const r=this.addHandler(lr.TARGET,t,n);return this.store.dispatch(aN(r)),r}containsHandler(t){return wx(this.dragSources,t)||wx(this.dropTargets,t)}getSource(t,n=!1){return _e(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return _e(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return _e(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return _e(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return xx(t)===lr.SOURCE}isTargetId(t){return xx(t)===lr.TARGET}removeSource(t){_e(this.getSource(t),"Expected an existing source."),this.store.dispatch(cN(t)),uN(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){_e(this.getTarget(t),"Expected an existing target."),this.store.dispatch(fN(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);_e(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){_e(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const i=mN(t);return this.types.set(i,n),t===lr.SOURCE?this.dragSources.set(i,r):t===lr.TARGET&&this.dropTargets.set(i,r),i}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const yN=(e,t)=>e===t;function xN(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function wN(e,t,n=yN){if(e.length!==t.length)return!1;for(let r=0;r0||!wN(n,r)))return Qu;const s=r[r.length-1],a=n[n.length-1];return s!==a&&(s&&i.push(s),a&&i.push(a)),i}function EN(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CN(e){for(var t=1;t=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function NN(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,l;for(l=0;l=0)&&(n[i]=e[i]);return n}let Ex=0;const oc=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var FN=T.exports.memo(function(t){var{children:n}=t,r=MN(t,["children"]);const[i,l]=zN(r);return T.exports.useEffect(()=>{if(l){const s=RC();return++Ex,()=>{--Ex===0&&(s[oc]=null)}}},[]),V(kC.Provider,{value:i,children:n})});function zN(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=$N(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function $N(e,t=RC(),n,r){const i=t;return i[oc]||(i[oc]={dragDropManager:DN(e,t,n,r)}),i[oc]}function RC(){return typeof global<"u"?global:window}var BN=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,l;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(l=Object.keys(t),r=l.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,l[i]))return!1;for(i=r;i--!==0;){var s=l[i];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const Bo=typeof window<"u"?T.exports.useLayoutEffect:T.exports.useEffect;function PC(e,t,n){const[r,i]=T.exports.useState(()=>t(e)),l=T.exports.useCallback(()=>{const s=t(e);BN(r,s)||(i(s),n&&n())},[r,e,n]);return Bo(l),[r,l]}function UN(e,t,n){const[r,i]=PC(e,t,n);return Bo(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),r}function AC(e,t,n){return UN(t,e||(()=>({})),()=>n.reconnect())}function DC(e,t){const n=[...t||[]];return t==null&&typeof e!="function"&&n.push(e),T.exports.useMemo(()=>typeof e=="function"?e():e,n)}function HN(e){return T.exports.useMemo(()=>e.hooks.dragSource(),[e])}function jN(e){return T.exports.useMemo(()=>e.hooks.dragPreview(),[e])}let $p=!1,Bp=!1;class WN{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){_e(!$p,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return $p=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{$p=!1}}isDragging(){if(!this.sourceId)return!1;_e(!Bp,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Bp=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{Bp=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Up=!1;class VN{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;_e(!Up,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Up=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Up=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function qN(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function GN(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function cg(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const l=Object.keys(e),s=Object.keys(t);if(l.length!==s.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let f=0;f, or turn it into a drag source or a drop target itself.`)}function QN(e){return(t=null,n=null)=>{if(!T.exports.isValidElement(t)){const l=t;return e(l,n),l}const r=t;return KN(r),YN(r,n?l=>e(l,n):e)}}function LC(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=QN(r);t[n]=()=>i}}),t}function Cx(e,t){typeof e=="function"?e(t):e.current=t}function YN(e,t){const n=e.ref;return _e(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?T.exports.cloneElement(e,{ref:r=>{Cx(n,r),Cx(t,r)}}):T.exports.cloneElement(e,{ref:t})}class XN{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!cg(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!cg(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=LC({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,fg(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,fg(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class ZN{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(!!this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!cg(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=LC({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,fg(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function vi(){const{dragDropManager:e}=T.exports.useContext(kC);return _e(e!=null,"Expected drag drop context"),e}function JN(e,t){const n=vi(),r=T.exports.useMemo(()=>new XN(n.getBackend()),[n]);return Bo(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),Bo(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function eF(){const e=vi();return T.exports.useMemo(()=>new WN(e),[e])}class tF{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:l}=r;return l?l(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function nF(e,t,n){const r=T.exports.useMemo(()=>new tF(e,t,n),[t,n]);return T.exports.useEffect(()=>{r.spec=e},[e]),r}function rF(e){return T.exports.useMemo(()=>{const t=e.type;return _e(t!=null,"spec.type must be defined"),t},[e])}function iF(e,t,n){const r=vi(),i=nF(e,t,n),l=rF(e);Bo(function(){if(l!=null){const[a,f]=GN(l,i,r);return t.receiveHandlerId(a),n.receiveHandlerId(a),f}},[r,t,n,i,l])}function oF(e,t){const n=DC(e,t);_e(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=eF(),i=JN(n.options,n.previewOptions);return iF(n,r,i),[AC(n.collect,r,i),HN(i),jN(i)]}function lF(e){const n=vi().getMonitor(),[r,i]=PC(n,e);return T.exports.useEffect(()=>n.subscribeToOffsetChange(i)),T.exports.useEffect(()=>n.subscribeToStateChange(i)),r}function uF(e){return T.exports.useMemo(()=>e.hooks.dropTarget(),[e])}function sF(e){const t=vi(),n=T.exports.useMemo(()=>new ZN(t.getBackend()),[t]);return Bo(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function aF(){const e=vi();return T.exports.useMemo(()=>new VN(e),[e])}function cF(e){const{accept:t}=e;return T.exports.useMemo(()=>(_e(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class fF{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function dF(e,t){const n=T.exports.useMemo(()=>new fF(e,t),[t]);return T.exports.useEffect(()=>{n.spec=e},[e]),n}function pF(e,t,n){const r=vi(),i=dF(e,t),l=cF(e);Bo(function(){const[a,f]=qN(l,i,r);return t.receiveHandlerId(a),n.receiveHandlerId(a),f},[r,t,i,n,l.map(s=>s.toString()).join("|")])}function dg(e,t){const n=DC(e,t),r=aF(),i=sF(n.options);return pF(n,r,i),[AC(n.collect,r,i),uF(i)]}var Qi;(function(e){e.mouse="mouse",e.touch="touch",e.keyboard="keyboard"})(Qi||(Qi={}));class hF{get delay(){var t;return(t=this.args.delay)!==null&&t!==void 0?t:0}get scrollAngleRanges(){return this.args.scrollAngleRanges}get getDropTargetElementsAtPoint(){return this.args.getDropTargetElementsAtPoint}get ignoreContextMenu(){var t;return(t=this.args.ignoreContextMenu)!==null&&t!==void 0?t:!1}get enableHoverOutsideTarget(){var t;return(t=this.args.enableHoverOutsideTarget)!==null&&t!==void 0?t:!1}get enableKeyboardEvents(){var t;return(t=this.args.enableKeyboardEvents)!==null&&t!==void 0?t:!1}get enableMouseEvents(){var t;return(t=this.args.enableMouseEvents)!==null&&t!==void 0?t:!1}get enableTouchEvents(){var t;return(t=this.args.enableTouchEvents)!==null&&t!==void 0?t:!0}get touchSlop(){return this.args.touchSlop||0}get delayTouchStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayTouchStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get delayMouseStart(){var t,n,r,i;return(i=(r=(t=this.args)===null||t===void 0?void 0:t.delayMouseStart)!==null&&r!==void 0?r:(n=this.args)===null||n===void 0?void 0:n.delay)!==null&&i!==void 0?i:0}get window(){if(this.context&&this.context.window)return this.context.window;if(typeof window<"u")return window}get document(){var t;if(!((t=this.context)===null||t===void 0)&&t.document)return this.context.document;if(this.window)return this.window.document}get rootElement(){var t;return((t=this.args)===null||t===void 0?void 0:t.rootElement)||this.document}constructor(t,n){this.args=t,this.context=n}}function gF(e,t,n,r){return Math.sqrt(Math.pow(Math.abs(n-e),2)+Math.pow(Math.abs(r-t),2))}function mF(e,t,n,r,i){if(!i)return!1;const l=Math.atan2(r-t,n-e)*180/Math.PI+180;for(let s=0;s=a.start)&&(a.end==null||l<=a.end))return!0}return!1}const vF={Left:1,Right:2,Center:4},yF={Left:0,Center:1,Right:2};function Hp(e){return e.button===void 0||e.button===yF.Left}function xF(e){return e.buttons===void 0||(e.buttons&vF.Left)===0}function MC(e){return!!e.targetTouches}const wF=1;function SF(e){const t=e.nodeType===wF?e:e.parentElement;if(!t)return;const{top:n,left:r}=t.getBoundingClientRect();return{x:r,y:n}}function EF(e,t){if(e.targetTouches.length===1)return zc(e.targetTouches[0]);if(t&&e.touches.length===1&&e.touches[0].target===t.target)return zc(e.touches[0])}function zc(e,t){return MC(e)?EF(e,t):{x:e.clientX,y:e.clientY}}const kx=(()=>{let e=!1;try{addEventListener("test",()=>{},Object.defineProperty({},"passive",{get(){return e=!0,!0}}))}catch{}return e})(),Pu={[Qi.mouse]:{start:"mousedown",move:"mousemove",end:"mouseup",contextmenu:"contextmenu"},[Qi.touch]:{start:"touchstart",move:"touchmove",end:"touchend"},[Qi.keyboard]:{keydown:"keydown"}};class Yu{profile(){var t;return{sourceNodes:this.sourceNodes.size,sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,targetNodes:this.targetNodes.size,dragOverTargetIds:((t=this.dragOverTargetIds)===null||t===void 0?void 0:t.length)||0}}get document(){return this.options.document}setup(){const t=this.options.rootElement;!t||(_e(!Yu.isSetUp,"Cannot have two Touch backends at the same time."),Yu.isSetUp=!0,this.addEventListener(t,"start",this.getTopMoveStartHandler()),this.addEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.addEventListener(t,"move",this.handleTopMove),this.addEventListener(t,"move",this.handleTopMoveCapture,!0),this.addEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.addEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.addEventListener(t,"keydown",this.handleCancelOnEscape,!0))}teardown(){const t=this.options.rootElement;!t||(Yu.isSetUp=!1,this._mouseClientOffset={},this.removeEventListener(t,"start",this.handleTopMoveStartCapture,!0),this.removeEventListener(t,"start",this.handleTopMoveStart),this.removeEventListener(t,"move",this.handleTopMoveCapture,!0),this.removeEventListener(t,"move",this.handleTopMove),this.removeEventListener(t,"end",this.handleTopMoveEndCapture,!0),this.options.enableMouseEvents&&!this.options.ignoreContextMenu&&this.removeEventListener(t,"contextmenu",this.handleTopMoveEndCapture),this.options.enableKeyboardEvents&&this.removeEventListener(t,"keydown",this.handleCancelOnEscape,!0),this.uninstallSourceNodeRemovalObserver())}addEventListener(t,n,r,i=!1){const l=kx?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const a=Pu[s][n];a&&t.addEventListener(a,r,l)})}removeEventListener(t,n,r,i=!1){const l=kx?{capture:i,passive:!1}:i;this.listenerTypes.forEach(function(s){const a=Pu[s][n];a&&t.removeEventListener(a,r,l)})}connectDragSource(t,n){const r=this.handleMoveStart.bind(this,t);return this.sourceNodes.set(t,n),this.addEventListener(n,"start",r),()=>{this.sourceNodes.delete(t),this.removeEventListener(n,"start",r)}}connectDragPreview(t,n,r){return this.sourcePreviewNodeOptions.set(t,r),this.sourcePreviewNodes.set(t,n),()=>{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDropTarget(t,n){const r=this.options.rootElement;if(!this.document||!r)return()=>{};const i=l=>{if(!this.document||!r||!this.monitor.isDragging())return;let s;switch(l.type){case Pu.mouse.move:s={x:l.clientX,y:l.clientY};break;case Pu.touch.move:var a,f;s={x:((a=l.touches[0])===null||a===void 0?void 0:a.clientX)||0,y:((f=l.touches[0])===null||f===void 0?void 0:f.clientY)||0};break}const d=s!=null?this.document.elementFromPoint(s.x,s.y):void 0,h=d&&n.contains(d);if(d===n||h)return this.handleMove(l,t)};return this.addEventListener(this.document.body,"move",i),this.targetNodes.set(t,n),()=>{this.document&&(this.targetNodes.delete(t),this.removeEventListener(this.document.body,"move",i))}}getTopMoveStartHandler(){return!this.options.delayTouchStart&&!this.options.delayMouseStart?this.handleTopMoveStart:this.handleTopMoveStartDelay}installSourceNodeRemovalObserver(t){this.uninstallSourceNodeRemovalObserver(),this.draggedSourceNode=t,this.draggedSourceNodeRemovalObserver=new MutationObserver(()=>{t&&!t.parentElement&&(this.resurrectSourceNode(),this.uninstallSourceNodeRemovalObserver())}),!(!t||!t.parentElement)&&this.draggedSourceNodeRemovalObserver.observe(t.parentElement,{childList:!0})}resurrectSourceNode(){this.document&&this.draggedSourceNode&&(this.draggedSourceNode.style.display="none",this.draggedSourceNode.removeAttribute("data-reactid"),this.document.body.appendChild(this.draggedSourceNode))}uninstallSourceNodeRemovalObserver(){this.draggedSourceNodeRemovalObserver&&this.draggedSourceNodeRemovalObserver.disconnect(),this.draggedSourceNodeRemovalObserver=void 0,this.draggedSourceNode=void 0}constructor(t,n,r){this.getSourceClientOffset=i=>{const l=this.sourceNodes.get(i);return l&&SF(l)},this.handleTopMoveStartCapture=i=>{!Hp(i)||(this.moveStartSourceIds=[])},this.handleMoveStart=i=>{Array.isArray(this.moveStartSourceIds)&&this.moveStartSourceIds.unshift(i)},this.handleTopMoveStart=i=>{if(!Hp(i))return;const l=zc(i);l&&(MC(i)&&(this.lastTargetTouchFallback=i.targetTouches[0]),this._mouseClientOffset=l),this.waitingForDelay=!1},this.handleTopMoveStartDelay=i=>{if(!Hp(i))return;const l=i.type===Pu.touch.start?this.options.delayTouchStart:this.options.delayMouseStart;this.timeout=setTimeout(this.handleTopMoveStart.bind(this,i),l),this.waitingForDelay=!0},this.handleTopMoveCapture=()=>{this.dragOverTargetIds=[]},this.handleMove=(i,l)=>{this.dragOverTargetIds&&this.dragOverTargetIds.unshift(l)},this.handleTopMove=i=>{if(this.timeout&&clearTimeout(this.timeout),!this.document||this.waitingForDelay)return;const{moveStartSourceIds:l,dragOverTargetIds:s}=this,a=this.options.enableHoverOutsideTarget,f=zc(i,this.lastTargetTouchFallback);if(!f)return;if(this._isScrolling||!this.monitor.isDragging()&&mF(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,f.x,f.y,this.options.scrollAngleRanges)){this._isScrolling=!0;return}if(!this.monitor.isDragging()&&this._mouseClientOffset.hasOwnProperty("x")&&l&&gF(this._mouseClientOffset.x||0,this._mouseClientOffset.y||0,f.x,f.y)>(this.options.touchSlop?this.options.touchSlop:0)&&(this.moveStartSourceIds=void 0,this.actions.beginDrag(l,{clientOffset:this._mouseClientOffset,getSourceClientOffset:this.getSourceClientOffset,publishSource:!1})),!this.monitor.isDragging())return;const d=this.sourceNodes.get(this.monitor.getSourceId());this.installSourceNodeRemovalObserver(d),this.actions.publishDragSource(),i.cancelable&&i.preventDefault();const h=(s||[]).map(w=>this.targetNodes.get(w)).filter(w=>!!w),g=this.options.getDropTargetElementsAtPoint?this.options.getDropTargetElementsAtPoint(f.x,f.y,h):this.document.elementsFromPoint(f.x,f.y),y=[];for(const w in g){if(!g.hasOwnProperty(w))continue;let E=g[w];for(E!=null&&y.push(E);E;)E=E.parentElement,E&&y.indexOf(E)===-1&&y.push(E)}const m=y.filter(w=>h.indexOf(w)>-1).map(w=>this._getDropTargetId(w)).filter(w=>!!w).filter((w,E,A)=>A.indexOf(w)===E);if(a)for(const w in this.targetNodes){const E=this.targetNodes.get(w);if(d&&E&&E.contains(d)&&m.indexOf(w)===-1){m.unshift(w);break}}m.reverse(),this.actions.hover(m,{clientOffset:f})},this._getDropTargetId=i=>{const l=this.targetNodes.keys();let s=l.next();for(;s.done===!1;){const a=s.value;if(i===this.targetNodes.get(a))return a;s=l.next()}},this.handleTopMoveEndCapture=i=>{if(this._isScrolling=!1,this.lastTargetTouchFallback=void 0,!!xF(i)){if(!this.monitor.isDragging()||this.monitor.didDrop()){this.moveStartSourceIds=void 0;return}i.cancelable&&i.preventDefault(),this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.drop(),this.actions.endDrag()}},this.handleCancelOnEscape=i=>{i.key==="Escape"&&this.monitor.isDragging()&&(this._mouseClientOffset={},this.uninstallSourceNodeRemovalObserver(),this.actions.endDrag())},this.options=new hF(r,n),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.sourceNodes=new Map,this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.targetNodes=new Map,this.listenerTypes=[],this._mouseClientOffset={},this._isScrolling=!1,this.options.enableMouseEvents&&this.listenerTypes.push(Qi.mouse),this.options.enableTouchEvents&&this.listenerTypes.push(Qi.touch),this.options.enableKeyboardEvents&&this.listenerTypes.push(Qi.keyboard)}}const CF=function(t,n={},r={}){return new Yu(t,n,r)};function Or(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:Vm(e)?2:qm(e)?3:0}function Nl(e,t){return nu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kF(e,t){return nu(e)===2?e.get(t):e[t]}function NC(e,t,n){var r=nu(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function FC(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function Vm(e){return TF&&e instanceof Map}function qm(e){return RF&&e instanceof Set}function Co(e){return e.o||e.t}function Gm(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=$C(e);delete t[at];for(var n=Fl(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=_F),Object.freeze(e),t&&Uo(e,function(n,r){return Km(r,!0)},!0)),e}function _F(){Or(2)}function Qm(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Wr(e){var t=vg[e];return t||Or(18,e),t}function bF(e,t){vg[e]||(vg[e]=t)}function pg(){return ws}function jp(e,t){t&&(Wr("Patches"),e.u=[],e.s=[],e.v=t)}function $c(e){hg(e),e.p.forEach(OF),e.p=null}function hg(e){e===ws&&(ws=e.l)}function _x(e){return ws={p:[],l:ws,h:e,m:!0,_:0}}function OF(e){var t=e[at];t.i===0||t.i===1?t.j():t.O=!0}function Wp(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Wr("ES5").S(t,e,r),r?(n[at].P&&($c(t),Or(4)),gi(e)&&(e=Bc(t,e),t.l||Uc(t,e)),t.u&&Wr("Patches").M(n[at].t,e,t.u,t.s)):e=Bc(t,n,[]),$c(t),t.u&&t.v(t.u,t.s),e!==zC?e:void 0}function Bc(e,t,n){if(Qm(t))return t;var r=t[at];if(!r)return Uo(t,function(l,s){return bx(e,r,t,l,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Uc(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=Gm(r.k):r.o;Uo(r.i===3?new Set(i):i,function(l,s){return bx(e,r,i,l,s,n)}),Uc(e,i,!1),n&&e.u&&Wr("Patches").R(r,n,e.u,e.s)}return r.o}function bx(e,t,n,r,i,l){if(ro(i)){var s=Bc(e,i,l&&t&&t.i!==3&&!Nl(t.D,r)?l.concat(r):void 0);if(NC(n,r,s),!ro(s))return;e.m=!1}if(gi(i)&&!Qm(i)){if(!e.h.F&&e._<1)return;Bc(e,i),t&&t.A.l||Uc(e,i)}}function Uc(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&Km(t,n)}function Vp(e,t){var n=e[at];return(n?Co(n):e)[t]}function Ox(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function Fi(e){e.P||(e.P=!0,e.l&&Fi(e.l))}function qp(e){e.o||(e.o=Gm(e.t))}function gg(e,t,n){var r=Vm(t)?Wr("MapSet").N(t,n):qm(t)?Wr("MapSet").T(t,n):e.g?function(i,l){var s=Array.isArray(i),a={i:s?1:0,A:l?l.A:pg(),P:!1,I:!1,D:{},l,t:i,k:null,o:null,j:null,C:!1},f=a,d=Ss;s&&(f=[a],d=Fu);var h=Proxy.revocable(f,d),g=h.revoke,y=h.proxy;return a.k=y,a.j=g,y}(t,n):Wr("ES5").J(t,n);return(n?n.A:pg()).p.push(r),r}function mg(e){return ro(e)||Or(22,e),function t(n){if(!gi(n))return n;var r,i=n[at],l=nu(n);if(i){if(!i.P&&(i.i<4||!Wr("ES5").K(i)))return i.t;i.I=!0,r=Ix(n,l),i.I=!1}else r=Ix(n,l);return Uo(r,function(s,a){i&&kF(i.t,s)===a||NC(r,s,t(a))}),l===3?new Set(r):r}(e)}function Ix(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return Gm(e)}function IF(){function e(l,s){var a=i[l];return a?a.enumerable=s:i[l]=a={configurable:!0,enumerable:s,get:function(){var f=this[at];return Ss.get(f,l)},set:function(f){var d=this[at];Ss.set(d,l,f)}},a}function t(l){for(var s=l.length-1;s>=0;s--){var a=l[s][at];if(!a.P)switch(a.i){case 5:r(a)&&Fi(a);break;case 4:n(a)&&Fi(a)}}}function n(l){for(var s=l.t,a=l.k,f=Fl(a),d=f.length-1;d>=0;d--){var h=f[d];if(h!==at){var g=s[h];if(g===void 0&&!Nl(s,h))return!0;var y=a[h],m=y&&y[at];if(m?m.t!==g:!FC(y,g))return!0}}var w=!!s[at];return f.length!==Fl(s).length+(w?0:1)}function r(l){var s=l.k;if(s.length!==l.t.length)return!0;var a=Object.getOwnPropertyDescriptor(s,s.length-1);if(a&&!a.get)return!0;for(var f=0;f1?v-1:0),_=1;_1?h-1:0),y=1;y=0;i--){var l=r[i];if(l.path.length===0&&l.op==="replace"){n=l.value;break}}i>-1&&(r=r.slice(i+1));var s=Wr("Patches").$;return ro(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Un=new AF,BC=Un.produce;Un.produceWithPatches.bind(Un);Un.setAutoFreeze.bind(Un);Un.setUseProxies.bind(Un);Un.applyPatches.bind(Un);Un.createDraft.bind(Un);Un.finishDraft.bind(Un);function UC(e){var t=function(r){var i=r.dispatch,l=r.getState;return function(s){return function(a){return typeof a=="function"?a(i,l,e):s(a)}}};return t}var HC=UC();HC.withExtraArgument=UC;const Ax=HC;var DF=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(r[l]=i[l])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),LF=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},r,i,l,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(d){return function(h){return f([d,h])}}function f(d){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(l=d[0]&2?i.return:d[0]?i.throw||((l=i.return)&&l.call(i),0):i.next)&&!(l=l.call(i,d[1])).done)return l;switch(i=0,l&&(d=[d[0]&2,l.value]),d[0]){case 0:case 1:l=d;break;case 4:return n.label++,{value:d[1],done:!1};case 5:n.label++,i=d[1],d=[0];continue;case 7:d=n.ops.pop(),n.trys.pop();continue;default:if(l=n.trys,!(l=l.length>0&&l[l.length-1])&&(d[0]===6||d[0]===2)){n=0;continue}if(d[0]===3&&(!l||d[1]>l[0]&&d[1]-1;return n&&r}function tv(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function WC(){for(var e=[],t=0;t(e.PLAYER="player",e.SHOP="shop",e.CONTAINER="container",e.CRAFTING="crafting",e))(en||{}),jc={exports:{}};(function(e,t){(function(){var n,r="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",s="Expected a function",a="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",d=500,h="__lodash_placeholder__",g=1,y=2,m=4,w=1,E=2,A=1,v=2,S=4,_=8,P=16,D=32,R=64,F=128,z=256,q=512,K=30,B="...",X=800,$=16,H=1,ie=2,oe=3,ue=1/0,U=9007199254740991,J=17976931348623157e292,ee=0/0,b=4294967295,O=b-1,fe=b>>>1,ve=[["ary",F],["bind",A],["bindKey",v],["curry",_],["curryRight",P],["flip",q],["partial",D],["partialRight",R],["rearg",z]],Ae="[object Arguments]",de="[object Array]",Oe="[object AsyncFunction]",ye="[object Boolean]",Fe="[object Date]",Te="[object DOMException]",Ue="[object Error]",$e="[object Function]",We="[object GeneratorFunction]",yt="[object Map]",qn="[object Number]",he="[object Null]",ut="[object Object]",zt="[object Promise]",pn="[object Proxy]",Gn="[object RegExp]",Vt="[object Set]",vr="[object String]",qr="[object Symbol]",Yo="[object Undefined]",Pr="[object WeakMap]",Kn="[object WeakSet]",Qn="[object ArrayBuffer]",W="[object DataView]",re="[object Float32Array]",xe="[object Float64Array]",He="[object Int8Array]",qt="[object Int16Array]",Gr="[object Int32Array]",qe="[object Uint8Array]",St="[object Uint8ClampedArray]",Ar="[object Uint16Array]",Kr="[object Uint32Array]",dt=/\b__p \+= '';/g,lu=/\b(__p \+=) '' \+/g,yr=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Tv=/&(?:amp|lt|gt|quot|#39);/g,Rv=/[&<>"']/g,b_=RegExp(Tv.source),O_=RegExp(Rv.source),I_=/<%-([\s\S]+?)%>/g,T_=/<%([\s\S]+?)%>/g,Pv=/<%=([\s\S]+?)%>/g,R_=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P_=/^\w*$/,A_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jf=/[\\^$.*+?()[\]{}|]/g,D_=RegExp(Jf.source),ed=/^\s+/,L_=/\s/,M_=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,N_=/\{\n\/\* \[wrapped with (.+)\] \*/,F_=/,? & /,z_=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,$_=/[()=,{}\[\]\/\s]/,B_=/\\(\\)?/g,U_=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Av=/\w*$/,H_=/^[-+]0x[0-9a-f]+$/i,j_=/^0b[01]+$/i,W_=/^\[object .+?Constructor\]$/,V_=/^0o[0-7]+$/i,q_=/^(?:0|[1-9]\d*)$/,G_=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ms=/($^)/,K_=/['\n\r\u2028\u2029\\]/g,Ns="\\ud800-\\udfff",Q_="\\u0300-\\u036f",Y_="\\ufe20-\\ufe2f",X_="\\u20d0-\\u20ff",Dv=Q_+Y_+X_,Lv="\\u2700-\\u27bf",Mv="a-z\\xdf-\\xf6\\xf8-\\xff",Z_="\\xac\\xb1\\xd7\\xf7",J_="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eb="\\u2000-\\u206f",tb=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Nv="A-Z\\xc0-\\xd6\\xd8-\\xde",Fv="\\ufe0e\\ufe0f",zv=Z_+J_+eb+tb,td="['’]",nb="["+Ns+"]",$v="["+zv+"]",Fs="["+Dv+"]",Bv="\\d+",rb="["+Lv+"]",Uv="["+Mv+"]",Hv="[^"+Ns+zv+Bv+Lv+Mv+Nv+"]",nd="\\ud83c[\\udffb-\\udfff]",ib="(?:"+Fs+"|"+nd+")",jv="[^"+Ns+"]",rd="(?:\\ud83c[\\udde6-\\uddff]){2}",id="[\\ud800-\\udbff][\\udc00-\\udfff]",Xo="["+Nv+"]",Wv="\\u200d",Vv="(?:"+Uv+"|"+Hv+")",ob="(?:"+Xo+"|"+Hv+")",qv="(?:"+td+"(?:d|ll|m|re|s|t|ve))?",Gv="(?:"+td+"(?:D|LL|M|RE|S|T|VE))?",Kv=ib+"?",Qv="["+Fv+"]?",lb="(?:"+Wv+"(?:"+[jv,rd,id].join("|")+")"+Qv+Kv+")*",ub="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",sb="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Yv=Qv+Kv+lb,ab="(?:"+[rb,rd,id].join("|")+")"+Yv,cb="(?:"+[jv+Fs+"?",Fs,rd,id,nb].join("|")+")",fb=RegExp(td,"g"),db=RegExp(Fs,"g"),od=RegExp(nd+"(?="+nd+")|"+cb+Yv,"g"),pb=RegExp([Xo+"?"+Uv+"+"+qv+"(?="+[$v,Xo,"$"].join("|")+")",ob+"+"+Gv+"(?="+[$v,Xo+Vv,"$"].join("|")+")",Xo+"?"+Vv+"+"+qv,Xo+"+"+Gv,sb,ub,Bv,ab].join("|"),"g"),hb=RegExp("["+Wv+Ns+Dv+Fv+"]"),gb=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,mb=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vb=-1,nt={};nt[re]=nt[xe]=nt[He]=nt[qt]=nt[Gr]=nt[qe]=nt[St]=nt[Ar]=nt[Kr]=!0,nt[Ae]=nt[de]=nt[Qn]=nt[ye]=nt[W]=nt[Fe]=nt[Ue]=nt[$e]=nt[yt]=nt[qn]=nt[ut]=nt[Gn]=nt[Vt]=nt[vr]=nt[Pr]=!1;var et={};et[Ae]=et[de]=et[Qn]=et[W]=et[ye]=et[Fe]=et[re]=et[xe]=et[He]=et[qt]=et[Gr]=et[yt]=et[qn]=et[ut]=et[Gn]=et[Vt]=et[vr]=et[qr]=et[qe]=et[St]=et[Ar]=et[Kr]=!0,et[Ue]=et[$e]=et[Pr]=!1;var yb={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},xb={"&":"&","<":"<",">":">",'"':""","'":"'"},wb={"&":"&","<":"<",">":">",""":'"',"'":"'"},Sb={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Eb=parseFloat,Cb=parseInt,Xv=typeof Eu=="object"&&Eu&&Eu.Object===Object&&Eu,kb=typeof self=="object"&&self&&self.Object===Object&&self,$t=Xv||kb||Function("return this")(),ld=t&&!t.nodeType&&t,fo=ld&&!0&&e&&!e.nodeType&&e,Zv=fo&&fo.exports===ld,ud=Zv&&Xv.process,Yn=function(){try{var M=fo&&fo.require&&fo.require("util").types;return M||ud&&ud.binding&&ud.binding("util")}catch{}}(),Jv=Yn&&Yn.isArrayBuffer,ey=Yn&&Yn.isDate,ty=Yn&&Yn.isMap,ny=Yn&&Yn.isRegExp,ry=Yn&&Yn.isSet,iy=Yn&&Yn.isTypedArray;function On(M,G,j){switch(j.length){case 0:return M.call(G);case 1:return M.call(G,j[0]);case 2:return M.call(G,j[0],j[1]);case 3:return M.call(G,j[0],j[1],j[2])}return M.apply(G,j)}function _b(M,G,j,se){for(var Ce=-1,je=M==null?0:M.length;++Ce-1}function sd(M,G,j){for(var se=-1,Ce=M==null?0:M.length;++se-1;);return j}function dy(M,G){for(var j=M.length;j--&&Zo(G,M[j],0)>-1;);return j}function Lb(M,G){for(var j=M.length,se=0;j--;)M[j]===G&&++se;return se}var Mb=dd(yb),Nb=dd(xb);function Fb(M){return"\\"+Sb[M]}function zb(M,G){return M==null?n:M[G]}function Jo(M){return hb.test(M)}function $b(M){return gb.test(M)}function Bb(M){for(var G,j=[];!(G=M.next()).done;)j.push(G.value);return j}function md(M){var G=-1,j=Array(M.size);return M.forEach(function(se,Ce){j[++G]=[Ce,se]}),j}function py(M,G){return function(j){return M(G(j))}}function Ci(M,G){for(var j=-1,se=M.length,Ce=0,je=[];++j-1}function OO(o,u){var c=this.__data__,p=ta(c,o);return p<0?(++this.size,c.push([o,u])):c[p][1]=u,this}Qr.prototype.clear=CO,Qr.prototype.delete=kO,Qr.prototype.get=_O,Qr.prototype.has=bO,Qr.prototype.set=OO;function Yr(o){var u=-1,c=o==null?0:o.length;for(this.clear();++u=u?o:u)),o}function er(o,u,c,p,x,k){var I,L=u&g,N=u&y,Q=u&m;if(c&&(I=x?c(o,p,x,k):c(o)),I!==n)return I;if(!pt(o))return o;var Y=ke(o);if(Y){if(I=PI(o),!L)return hn(o,I)}else{var Z=Kt(o),le=Z==$e||Z==We;if(Ti(o))return Qy(o,L);if(Z==ut||Z==Ae||le&&!x){if(I=N||le?{}:h0(o),!L)return N?wI(o,jO(I,o)):xI(o,_y(I,o))}else{if(!et[Z])return x?o:{};I=AI(o,Z,L)}}k||(k=new wr);var ce=k.get(o);if(ce)return ce;k.set(o,I),j0(o)?o.forEach(function(me){I.add(er(me,u,c,me,o,k))}):U0(o)&&o.forEach(function(me,Le){I.set(Le,er(me,u,c,Le,o,k))});var ge=Q?N?Hd:Ud:N?mn:Dt,Re=Y?n:ge(o);return Xn(Re||o,function(me,Le){Re&&(Le=me,me=o[Le]),pu(I,Le,er(me,u,c,Le,o,k))}),I}function WO(o){var u=Dt(o);return function(c){return by(c,o,u)}}function by(o,u,c){var p=c.length;if(o==null)return!p;for(o=Ze(o);p--;){var x=c[p],k=u[x],I=o[x];if(I===n&&!(x in o)||!k(I))return!1}return!0}function Oy(o,u,c){if(typeof o!="function")throw new Zn(s);return wu(function(){o.apply(n,c)},u)}function hu(o,u,c,p){var x=-1,k=zs,I=!0,L=o.length,N=[],Q=u.length;if(!L)return N;c&&(u=st(u,In(c))),p?(k=sd,I=!1):u.length>=i&&(k=uu,I=!1,u=new go(u));e:for(;++xx?0:x+c),p=p===n||p>x?x:Ie(p),p<0&&(p+=x),p=c>p?0:V0(p);c0&&c(L)?u>1?Bt(L,u-1,c,p,x):Ei(x,L):p||(x[x.length]=L)}return x}var Cd=t0(),Ry=t0(!0);function Dr(o,u){return o&&Cd(o,u,Dt)}function kd(o,u){return o&&Ry(o,u,Dt)}function ra(o,u){return Si(u,function(c){return ti(o[c])})}function vo(o,u){u=Oi(u,o);for(var c=0,p=u.length;o!=null&&cu}function GO(o,u){return o!=null&&Ge.call(o,u)}function KO(o,u){return o!=null&&u in Ze(o)}function QO(o,u,c){return o>=Gt(u,c)&&o=120&&Y.length>=120)?new go(I&&Y):n}Y=o[0];var Z=-1,le=L[0];e:for(;++Z-1;)L!==o&&Ks.call(L,N,1),Ks.call(o,N,1);return o}function Uy(o,u){for(var c=o?u.length:0,p=c-1;c--;){var x=u[c];if(c==p||x!==k){var k=x;ei(x)?Ks.call(o,x,1):Ld(o,x)}}return o}function Pd(o,u){return o+Xs(Sy()*(u-o+1))}function sI(o,u,c,p){for(var x=-1,k=Tt(Ys((u-o)/(c||1)),0),I=j(k);k--;)I[p?k:++x]=o,o+=c;return I}function Ad(o,u){var c="";if(!o||u<1||u>U)return c;do u%2&&(c+=o),u=Xs(u/2),u&&(o+=o);while(u);return c}function De(o,u){return Qd(v0(o,u,vn),o+"")}function aI(o){return ky(cl(o))}function cI(o,u){var c=cl(o);return ha(c,mo(u,0,c.length))}function vu(o,u,c,p){if(!pt(o))return o;u=Oi(u,o);for(var x=-1,k=u.length,I=k-1,L=o;L!=null&&++xx?0:x+u),c=c>x?x:c,c<0&&(c+=x),x=u>c?0:c-u>>>0,u>>>=0;for(var k=j(x);++p>>1,I=o[k];I!==null&&!Rn(I)&&(c?I<=u:I=i){var Q=u?null:kI(o);if(Q)return Bs(Q);I=!1,x=uu,N=new go}else N=u?[]:L;e:for(;++p=p?o:tr(o,u,c)}var Ky=tO||function(o){return $t.clearTimeout(o)};function Qy(o,u){if(u)return o.slice();var c=o.length,p=my?my(c):new o.constructor(c);return o.copy(p),p}function zd(o){var u=new o.constructor(o.byteLength);return new qs(u).set(new qs(o)),u}function gI(o,u){var c=u?zd(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.byteLength)}function mI(o){var u=new o.constructor(o.source,Av.exec(o));return u.lastIndex=o.lastIndex,u}function vI(o){return du?Ze(du.call(o)):{}}function Yy(o,u){var c=u?zd(o.buffer):o.buffer;return new o.constructor(c,o.byteOffset,o.length)}function Xy(o,u){if(o!==u){var c=o!==n,p=o===null,x=o===o,k=Rn(o),I=u!==n,L=u===null,N=u===u,Q=Rn(u);if(!L&&!Q&&!k&&o>u||k&&I&&N&&!L&&!Q||p&&I&&N||!c&&N||!x)return 1;if(!p&&!k&&!Q&&o=L)return N;var Q=c[p];return N*(Q=="desc"?-1:1)}}return o.index-u.index}function Zy(o,u,c,p){for(var x=-1,k=o.length,I=c.length,L=-1,N=u.length,Q=Tt(k-I,0),Y=j(N+Q),Z=!p;++L1?c[x-1]:n,I=x>2?c[2]:n;for(k=o.length>3&&typeof k=="function"?(x--,k):n,I&&ln(c[0],c[1],I)&&(k=x<3?n:k,x=1),u=Ze(u);++p-1?x[k?u[I]:I]:n}}function i0(o){return Jr(function(u){var c=u.length,p=c,x=Jn.prototype.thru;for(o&&u.reverse();p--;){var k=u[p];if(typeof k!="function")throw new Zn(s);if(x&&!I&&da(k)=="wrapper")var I=new Jn([],!0)}for(p=I?p:c;++p1&&ze.reverse(),Y&&NL))return!1;var Q=k.get(o),Y=k.get(u);if(Q&&Y)return Q==u&&Y==o;var Z=-1,le=!0,ce=c&E?new go:n;for(k.set(o,u),k.set(u,o);++Z1?"& ":"")+u[p],u=u.join(c>2?", ":" "),o.replace(M_,`{ +/* [wrapped with `+u+`] */ +`)}function LI(o){return ke(o)||wo(o)||!!(xy&&o&&o[xy])}function ei(o,u){var c=typeof o;return u=u??U,!!u&&(c=="number"||c!="symbol"&&q_.test(o))&&o>-1&&o%1==0&&o0){if(++u>=X)return arguments[0]}else u=0;return o.apply(n,arguments)}}function ha(o,u){var c=-1,p=o.length,x=p-1;for(u=u===n?p:u;++c1?o[u-1]:n;return c=typeof c=="function"?(o.pop(),c):n,T0(o,c)});function R0(o){var u=C(o);return u.__chain__=!0,u}function VT(o,u){return u(o),o}function ga(o,u){return u(o)}var qT=Jr(function(o){var u=o.length,c=u?o[0]:0,p=this.__wrapped__,x=function(k){return Ed(k,o)};return u>1||this.__actions__.length||!(p instanceof Me)||!ei(c)?this.thru(x):(p=p.slice(c,+c+(u?1:0)),p.__actions__.push({func:ga,args:[x],thisArg:n}),new Jn(p,this.__chain__).thru(function(k){return u&&!k.length&&k.push(n),k}))});function GT(){return R0(this)}function KT(){return new Jn(this.value(),this.__chain__)}function QT(){this.__values__===n&&(this.__values__=W0(this.value()));var o=this.__index__>=this.__values__.length,u=o?n:this.__values__[this.__index__++];return{done:o,value:u}}function YT(){return this}function XT(o){for(var u,c=this;c instanceof ea;){var p=C0(c);p.__index__=0,p.__values__=n,u?x.__wrapped__=p:u=p;var x=p;c=c.__wrapped__}return x.__wrapped__=o,u}function ZT(){var o=this.__wrapped__;if(o instanceof Me){var u=o;return this.__actions__.length&&(u=new Me(this)),u=u.reverse(),u.__actions__.push({func:ga,args:[Yd],thisArg:n}),new Jn(u,this.__chain__)}return this.thru(Yd)}function JT(){return qy(this.__wrapped__,this.__actions__)}var eR=ua(function(o,u,c){Ge.call(o,c)?++o[c]:Xr(o,c,1)});function tR(o,u,c){var p=ke(o)?oy:VO;return c&&ln(o,u,c)&&(u=n),p(o,pe(u,3))}function nR(o,u){var c=ke(o)?Si:Ty;return c(o,pe(u,3))}var rR=r0(k0),iR=r0(_0);function oR(o,u){return Bt(ma(o,u),1)}function lR(o,u){return Bt(ma(o,u),ue)}function uR(o,u,c){return c=c===n?1:Ie(c),Bt(ma(o,u),c)}function P0(o,u){var c=ke(o)?Xn:_i;return c(o,pe(u,3))}function A0(o,u){var c=ke(o)?bb:Iy;return c(o,pe(u,3))}var sR=ua(function(o,u,c){Ge.call(o,c)?o[c].push(u):Xr(o,c,[u])});function aR(o,u,c,p){o=gn(o)?o:cl(o),c=c&&!p?Ie(c):0;var x=o.length;return c<0&&(c=Tt(x+c,0)),Sa(o)?c<=x&&o.indexOf(u,c)>-1:!!x&&Zo(o,u,c)>-1}var cR=De(function(o,u,c){var p=-1,x=typeof u=="function",k=gn(o)?j(o.length):[];return _i(o,function(I){k[++p]=x?On(u,I,c):gu(I,u,c)}),k}),fR=ua(function(o,u,c){Xr(o,c,u)});function ma(o,u){var c=ke(o)?st:My;return c(o,pe(u,3))}function dR(o,u,c,p){return o==null?[]:(ke(u)||(u=u==null?[]:[u]),c=p?n:c,ke(c)||(c=c==null?[]:[c]),$y(o,u,c))}var pR=ua(function(o,u,c){o[c?0:1].push(u)},function(){return[[],[]]});function hR(o,u,c){var p=ke(o)?ad:ay,x=arguments.length<3;return p(o,pe(u,4),c,x,_i)}function gR(o,u,c){var p=ke(o)?Ob:ay,x=arguments.length<3;return p(o,pe(u,4),c,x,Iy)}function mR(o,u){var c=ke(o)?Si:Ty;return c(o,xa(pe(u,3)))}function vR(o){var u=ke(o)?ky:aI;return u(o)}function yR(o,u,c){(c?ln(o,u,c):u===n)?u=1:u=Ie(u);var p=ke(o)?BO:cI;return p(o,u)}function xR(o){var u=ke(o)?UO:dI;return u(o)}function wR(o){if(o==null)return 0;if(gn(o))return Sa(o)?el(o):o.length;var u=Kt(o);return u==yt||u==Vt?o.size:Id(o).length}function SR(o,u,c){var p=ke(o)?cd:pI;return c&&ln(o,u,c)&&(u=n),p(o,pe(u,3))}var ER=De(function(o,u){if(o==null)return[];var c=u.length;return c>1&&ln(o,u[0],u[1])?u=[]:c>2&&ln(u[0],u[1],u[2])&&(u=[u[0]]),$y(o,Bt(u,1),[])}),va=nO||function(){return $t.Date.now()};function CR(o,u){if(typeof u!="function")throw new Zn(s);return o=Ie(o),function(){if(--o<1)return u.apply(this,arguments)}}function D0(o,u,c){return u=c?n:u,u=o&&u==null?o.length:u,Zr(o,F,n,n,n,n,u)}function L0(o,u){var c;if(typeof u!="function")throw new Zn(s);return o=Ie(o),function(){return--o>0&&(c=u.apply(this,arguments)),o<=1&&(u=n),c}}var Zd=De(function(o,u,c){var p=A;if(c.length){var x=Ci(c,sl(Zd));p|=D}return Zr(o,p,u,c,x)}),M0=De(function(o,u,c){var p=A|v;if(c.length){var x=Ci(c,sl(M0));p|=D}return Zr(u,p,o,c,x)});function N0(o,u,c){u=c?n:u;var p=Zr(o,_,n,n,n,n,n,u);return p.placeholder=N0.placeholder,p}function F0(o,u,c){u=c?n:u;var p=Zr(o,P,n,n,n,n,n,u);return p.placeholder=F0.placeholder,p}function z0(o,u,c){var p,x,k,I,L,N,Q=0,Y=!1,Z=!1,le=!0;if(typeof o!="function")throw new Zn(s);u=rr(u)||0,pt(c)&&(Y=!!c.leading,Z="maxWait"in c,k=Z?Tt(rr(c.maxWait)||0,u):k,le="trailing"in c?!!c.trailing:le);function ce(Ct){var Er=p,ri=x;return p=x=n,Q=Ct,I=o.apply(ri,Er),I}function ge(Ct){return Q=Ct,L=wu(Le,u),Y?ce(Ct):I}function Re(Ct){var Er=Ct-N,ri=Ct-Q,r1=u-Er;return Z?Gt(r1,k-ri):r1}function me(Ct){var Er=Ct-N,ri=Ct-Q;return N===n||Er>=u||Er<0||Z&&ri>=k}function Le(){var Ct=va();if(me(Ct))return ze(Ct);L=wu(Le,Re(Ct))}function ze(Ct){return L=n,le&&p?ce(Ct):(p=x=n,I)}function Pn(){L!==n&&Ky(L),Q=0,p=N=x=L=n}function un(){return L===n?I:ze(va())}function An(){var Ct=va(),Er=me(Ct);if(p=arguments,x=this,N=Ct,Er){if(L===n)return ge(N);if(Z)return Ky(L),L=wu(Le,u),ce(N)}return L===n&&(L=wu(Le,u)),I}return An.cancel=Pn,An.flush=un,An}var kR=De(function(o,u){return Oy(o,1,u)}),_R=De(function(o,u,c){return Oy(o,rr(u)||0,c)});function bR(o){return Zr(o,q)}function ya(o,u){if(typeof o!="function"||u!=null&&typeof u!="function")throw new Zn(s);var c=function(){var p=arguments,x=u?u.apply(this,p):p[0],k=c.cache;if(k.has(x))return k.get(x);var I=o.apply(this,p);return c.cache=k.set(x,I)||k,I};return c.cache=new(ya.Cache||Yr),c}ya.Cache=Yr;function xa(o){if(typeof o!="function")throw new Zn(s);return function(){var u=arguments;switch(u.length){case 0:return!o.call(this);case 1:return!o.call(this,u[0]);case 2:return!o.call(this,u[0],u[1]);case 3:return!o.call(this,u[0],u[1],u[2])}return!o.apply(this,u)}}function OR(o){return L0(2,o)}var IR=hI(function(o,u){u=u.length==1&&ke(u[0])?st(u[0],In(pe())):st(Bt(u,1),In(pe()));var c=u.length;return De(function(p){for(var x=-1,k=Gt(p.length,c);++x=u}),wo=Ay(function(){return arguments}())?Ay:function(o){return xt(o)&&Ge.call(o,"callee")&&!yy.call(o,"callee")},ke=j.isArray,jR=Jv?In(Jv):XO;function gn(o){return o!=null&&wa(o.length)&&!ti(o)}function Et(o){return xt(o)&&gn(o)}function WR(o){return o===!0||o===!1||xt(o)&&on(o)==ye}var Ti=iO||cp,VR=ey?In(ey):ZO;function qR(o){return xt(o)&&o.nodeType===1&&!Su(o)}function GR(o){if(o==null)return!0;if(gn(o)&&(ke(o)||typeof o=="string"||typeof o.splice=="function"||Ti(o)||al(o)||wo(o)))return!o.length;var u=Kt(o);if(u==yt||u==Vt)return!o.size;if(xu(o))return!Id(o).length;for(var c in o)if(Ge.call(o,c))return!1;return!0}function KR(o,u){return mu(o,u)}function QR(o,u,c){c=typeof c=="function"?c:n;var p=c?c(o,u):n;return p===n?mu(o,u,n,c):!!p}function ep(o){if(!xt(o))return!1;var u=on(o);return u==Ue||u==Te||typeof o.message=="string"&&typeof o.name=="string"&&!Su(o)}function YR(o){return typeof o=="number"&&wy(o)}function ti(o){if(!pt(o))return!1;var u=on(o);return u==$e||u==We||u==Oe||u==pn}function B0(o){return typeof o=="number"&&o==Ie(o)}function wa(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=U}function pt(o){var u=typeof o;return o!=null&&(u=="object"||u=="function")}function xt(o){return o!=null&&typeof o=="object"}var U0=ty?In(ty):eI;function XR(o,u){return o===u||Od(o,u,Wd(u))}function ZR(o,u,c){return c=typeof c=="function"?c:n,Od(o,u,Wd(u),c)}function JR(o){return H0(o)&&o!=+o}function eP(o){if(FI(o))throw new Ce(l);return Dy(o)}function tP(o){return o===null}function nP(o){return o==null}function H0(o){return typeof o=="number"||xt(o)&&on(o)==qn}function Su(o){if(!xt(o)||on(o)!=ut)return!1;var u=Gs(o);if(u===null)return!0;var c=Ge.call(u,"constructor")&&u.constructor;return typeof c=="function"&&c instanceof c&&js.call(c)==Zb}var tp=ny?In(ny):tI;function rP(o){return B0(o)&&o>=-U&&o<=U}var j0=ry?In(ry):nI;function Sa(o){return typeof o=="string"||!ke(o)&&xt(o)&&on(o)==vr}function Rn(o){return typeof o=="symbol"||xt(o)&&on(o)==qr}var al=iy?In(iy):rI;function iP(o){return o===n}function oP(o){return xt(o)&&Kt(o)==Pr}function lP(o){return xt(o)&&on(o)==Kn}var uP=fa(Td),sP=fa(function(o,u){return o<=u});function W0(o){if(!o)return[];if(gn(o))return Sa(o)?xr(o):hn(o);if(su&&o[su])return Bb(o[su]());var u=Kt(o),c=u==yt?md:u==Vt?Bs:cl;return c(o)}function ni(o){if(!o)return o===0?o:0;if(o=rr(o),o===ue||o===-ue){var u=o<0?-1:1;return u*J}return o===o?o:0}function Ie(o){var u=ni(o),c=u%1;return u===u?c?u-c:u:0}function V0(o){return o?mo(Ie(o),0,b):0}function rr(o){if(typeof o=="number")return o;if(Rn(o))return ee;if(pt(o)){var u=typeof o.valueOf=="function"?o.valueOf():o;o=pt(u)?u+"":u}if(typeof o!="string")return o===0?o:+o;o=cy(o);var c=j_.test(o);return c||V_.test(o)?Cb(o.slice(2),c?2:8):H_.test(o)?ee:+o}function q0(o){return Lr(o,mn(o))}function aP(o){return o?mo(Ie(o),-U,U):o===0?o:0}function Ve(o){return o==null?"":Tn(o)}var cP=ll(function(o,u){if(xu(u)||gn(u)){Lr(u,Dt(u),o);return}for(var c in u)Ge.call(u,c)&&pu(o,c,u[c])}),G0=ll(function(o,u){Lr(u,mn(u),o)}),Ea=ll(function(o,u,c,p){Lr(u,mn(u),o,p)}),fP=ll(function(o,u,c,p){Lr(u,Dt(u),o,p)}),dP=Jr(Ed);function pP(o,u){var c=ol(o);return u==null?c:_y(c,u)}var hP=De(function(o,u){o=Ze(o);var c=-1,p=u.length,x=p>2?u[2]:n;for(x&&ln(u[0],u[1],x)&&(p=1);++c1),k}),Lr(o,Hd(o),c),p&&(c=er(c,g|y|m,_I));for(var x=u.length;x--;)Ld(c,u[x]);return c});function AP(o,u){return Q0(o,xa(pe(u)))}var DP=Jr(function(o,u){return o==null?{}:lI(o,u)});function Q0(o,u){if(o==null)return{};var c=st(Hd(o),function(p){return[p]});return u=pe(u),By(o,c,function(p,x){return u(p,x[0])})}function LP(o,u,c){u=Oi(u,o);var p=-1,x=u.length;for(x||(x=1,o=n);++pu){var p=o;o=u,u=p}if(c||o%1||u%1){var x=Sy();return Gt(o+x*(u-o+Eb("1e-"+((x+"").length-1))),u)}return Pd(o,u)}var VP=ul(function(o,u,c){return u=u.toLowerCase(),o+(c?Z0(u):u)});function Z0(o){return ip(Ve(o).toLowerCase())}function J0(o){return o=Ve(o),o&&o.replace(G_,Mb).replace(db,"")}function qP(o,u,c){o=Ve(o),u=Tn(u);var p=o.length;c=c===n?p:mo(Ie(c),0,p);var x=c;return c-=u.length,c>=0&&o.slice(c,x)==u}function GP(o){return o=Ve(o),o&&O_.test(o)?o.replace(Rv,Nb):o}function KP(o){return o=Ve(o),o&&D_.test(o)?o.replace(Jf,"\\$&"):o}var QP=ul(function(o,u,c){return o+(c?"-":"")+u.toLowerCase()}),YP=ul(function(o,u,c){return o+(c?" ":"")+u.toLowerCase()}),XP=n0("toLowerCase");function ZP(o,u,c){o=Ve(o),u=Ie(u);var p=u?el(o):0;if(!u||p>=u)return o;var x=(u-p)/2;return ca(Xs(x),c)+o+ca(Ys(x),c)}function JP(o,u,c){o=Ve(o),u=Ie(u);var p=u?el(o):0;return u&&p>>0,c?(o=Ve(o),o&&(typeof u=="string"||u!=null&&!tp(u))&&(u=Tn(u),!u&&Jo(o))?Ii(xr(o),0,c):o.split(u,c)):[]}var l2=ul(function(o,u,c){return o+(c?" ":"")+ip(u)});function u2(o,u,c){return o=Ve(o),c=c==null?0:mo(Ie(c),0,o.length),u=Tn(u),o.slice(c,c+u.length)==u}function s2(o,u,c){var p=C.templateSettings;c&&ln(o,u,c)&&(u=n),o=Ve(o),u=Ea({},u,p,a0);var x=Ea({},u.imports,p.imports,a0),k=Dt(x),I=gd(x,k),L,N,Q=0,Y=u.interpolate||Ms,Z="__p += '",le=vd((u.escape||Ms).source+"|"+Y.source+"|"+(Y===Pv?U_:Ms).source+"|"+(u.evaluate||Ms).source+"|$","g"),ce="//# sourceURL="+(Ge.call(u,"sourceURL")?(u.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++vb+"]")+` +`;o.replace(le,function(me,Le,ze,Pn,un,An){return ze||(ze=Pn),Z+=o.slice(Q,An).replace(K_,Fb),Le&&(L=!0,Z+=`' + +__e(`+Le+`) + +'`),un&&(N=!0,Z+=`'; +`+un+`; +__p += '`),ze&&(Z+=`' + +((__t = (`+ze+`)) == null ? '' : __t) + +'`),Q=An+me.length,me}),Z+=`'; +`;var ge=Ge.call(u,"variable")&&u.variable;if(!ge)Z=`with (obj) { +`+Z+` +} +`;else if($_.test(ge))throw new Ce(a);Z=(N?Z.replace(dt,""):Z).replace(lu,"$1").replace(yr,"$1;"),Z="function("+(ge||"obj")+`) { +`+(ge?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(L?", __e = _.escape":"")+(N?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+Z+`return __p +}`;var Re=t1(function(){return je(k,ce+"return "+Z).apply(n,I)});if(Re.source=Z,ep(Re))throw Re;return Re}function a2(o){return Ve(o).toLowerCase()}function c2(o){return Ve(o).toUpperCase()}function f2(o,u,c){if(o=Ve(o),o&&(c||u===n))return cy(o);if(!o||!(u=Tn(u)))return o;var p=xr(o),x=xr(u),k=fy(p,x),I=dy(p,x)+1;return Ii(p,k,I).join("")}function d2(o,u,c){if(o=Ve(o),o&&(c||u===n))return o.slice(0,hy(o)+1);if(!o||!(u=Tn(u)))return o;var p=xr(o),x=dy(p,xr(u))+1;return Ii(p,0,x).join("")}function p2(o,u,c){if(o=Ve(o),o&&(c||u===n))return o.replace(ed,"");if(!o||!(u=Tn(u)))return o;var p=xr(o),x=fy(p,xr(u));return Ii(p,x).join("")}function h2(o,u){var c=K,p=B;if(pt(u)){var x="separator"in u?u.separator:x;c="length"in u?Ie(u.length):c,p="omission"in u?Tn(u.omission):p}o=Ve(o);var k=o.length;if(Jo(o)){var I=xr(o);k=I.length}if(c>=k)return o;var L=c-el(p);if(L<1)return p;var N=I?Ii(I,0,L).join(""):o.slice(0,L);if(x===n)return N+p;if(I&&(L+=N.length-L),tp(x)){if(o.slice(L).search(x)){var Q,Y=N;for(x.global||(x=vd(x.source,Ve(Av.exec(x))+"g")),x.lastIndex=0;Q=x.exec(Y);)var Z=Q.index;N=N.slice(0,Z===n?L:Z)}}else if(o.indexOf(Tn(x),L)!=L){var le=N.lastIndexOf(x);le>-1&&(N=N.slice(0,le))}return N+p}function g2(o){return o=Ve(o),o&&b_.test(o)?o.replace(Tv,Wb):o}var m2=ul(function(o,u,c){return o+(c?" ":"")+u.toUpperCase()}),ip=n0("toUpperCase");function e1(o,u,c){return o=Ve(o),u=c?n:u,u===n?$b(o)?Gb(o):Rb(o):o.match(u)||[]}var t1=De(function(o,u){try{return On(o,n,u)}catch(c){return ep(c)?c:new Ce(c)}}),v2=Jr(function(o,u){return Xn(u,function(c){c=Mr(c),Xr(o,c,Zd(o[c],o))}),o});function y2(o){var u=o==null?0:o.length,c=pe();return o=u?st(o,function(p){if(typeof p[1]!="function")throw new Zn(s);return[c(p[0]),p[1]]}):[],De(function(p){for(var x=-1;++xU)return[];var c=b,p=Gt(o,b);u=pe(u),o-=b;for(var x=hd(p,u);++c0||u<0)?new Me(c):(o<0?c=c.takeRight(-o):o&&(c=c.drop(o)),u!==n&&(u=Ie(u),c=u<0?c.dropRight(-u):c.take(u-o)),c)},Me.prototype.takeRightWhile=function(o){return this.reverse().takeWhile(o).reverse()},Me.prototype.toArray=function(){return this.take(b)},Dr(Me.prototype,function(o,u){var c=/^(?:filter|find|map|reject)|While$/.test(u),p=/^(?:head|last)$/.test(u),x=C[p?"take"+(u=="last"?"Right":""):u],k=p||/^find/.test(u);!x||(C.prototype[u]=function(){var I=this.__wrapped__,L=p?[1]:arguments,N=I instanceof Me,Q=L[0],Y=N||ke(I),Z=function(Le){var ze=x.apply(C,Ei([Le],L));return p&&le?ze[0]:ze};Y&&c&&typeof Q=="function"&&Q.length!=1&&(N=Y=!1);var le=this.__chain__,ce=!!this.__actions__.length,ge=k&&!le,Re=N&&!ce;if(!k&&Y){I=Re?I:new Me(this);var me=o.apply(I,L);return me.__actions__.push({func:ga,args:[Z],thisArg:n}),new Jn(me,le)}return ge&&Re?o.apply(this,L):(me=this.thru(Z),ge?p?me.value()[0]:me.value():me)})}),Xn(["pop","push","shift","sort","splice","unshift"],function(o){var u=Us[o],c=/^(?:push|sort|unshift)$/.test(o)?"tap":"thru",p=/^(?:pop|shift)$/.test(o);C.prototype[o]=function(){var x=arguments;if(p&&!this.__chain__){var k=this.value();return u.apply(ke(k)?k:[],x)}return this[c](function(I){return u.apply(ke(I)?I:[],x)})}}),Dr(Me.prototype,function(o,u){var c=C[u];if(c){var p=c.name+"";Ge.call(il,p)||(il[p]=[]),il[p].push({name:u,func:c})}}),il[sa(n,v).name]=[{name:"wrapper",func:n}],Me.prototype.clone=gO,Me.prototype.reverse=mO,Me.prototype.value=vO,C.prototype.at=qT,C.prototype.chain=GT,C.prototype.commit=KT,C.prototype.next=QT,C.prototype.plant=XT,C.prototype.reverse=ZT,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=JT,C.prototype.first=C.prototype.head,su&&(C.prototype[su]=YT),C},tl=Kb();fo?((fo.exports=tl)._=tl,ld._=tl):$t._=tl}).call(Eu)})(jc,jc.exports);const ct={water:{name:"water",close:!1,label:"VODA",stack:!0,usable:!0,count:0},burger:{name:"burger",close:!1,label:"BURGR",stack:!1,usable:!1,count:0}};let lc="images";function l3(e){e&&e!==""&&(lc=e)}const GC=()=>!window.invokeNative,KC=()=>{},u3=window.GetParentResourceName?window.GetParentResourceName():"ox_inventory";async function cr(e,t){if(!GC())try{return await(await fetch(`https://${u3}/${e}`,{method:"post",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)})).json()}catch(n){throw Error(`Failed to fetch NUI callback ${e}! (${n})`)}}const Fx=(e,t)=>{if(t.type!=="shop"||!wn(e))return!0;if(e.count!==void 0&&e.count===0)return!1;if(e.grade===void 0||!t.groups)return!0;const n=Mn.getState().inventory.leftInventory;if(!n.groups)return!1;const r=Object.keys(t.groups);if(Array.isArray(e.grade)){for(let i=0;i=e.grade)return!0}return!1}},zx=(e,t)=>{if(!wn(e)||t!=="crafting"||!e.ingredients)return!0;const n=Mn.getState().inventory.leftInventory;return Object.entries(e.ingredients).filter(l=>{const[s,a]=[l[0],l[1]],f=ct[s];return a>=1&&f&&f.count>=a?!1:!n.items.find(h=>{if(wn(h)&&h.name===s&&a<1)return h.metadata?.durability>=a*100})}).length===0},wn=(e,t=!1)=>e.name!==void 0&&e.weight!==void 0||t&&e.name!==void 0&&e.count!==void 0&&e.weight!==void 0,s3=(e,t)=>e.name===t.name&&jc.exports.isEqual(e.metadata,t.metadata),a3=(e,t,n)=>t.stack?n.find(i=>i.name===e.name&&jc.exports.isEqual(i.metadata,e.metadata))||n.find(i=>i.name===void 0):n.find(i=>i.name===void 0),Wf=(e,t,n)=>({sourceInventory:t===en.PLAYER?e.leftInventory:e.rightInventory,targetInventory:n?n===en.PLAYER?e.leftInventory:e.rightInventory:t===en.PLAYER?e.rightInventory:e.leftInventory}),Yl=(e,t)=>{if(e?.durability===void 0)return;let n=e.durability;return n>100&&e.degrade&&(n=(e.durability-t)/(60*e.degrade)*100),n<0&&(n=0),n},c3=e=>e.reduce((t,n)=>wn(n)?t+n.weight:t,0),$x=async e=>{const t=await cr("getItemData",e);if(t?.name)return ct[e]=t,t},zl=e=>{const t=typeof e=="object";if(t){if(!e.name)return;const i=e.metadata;if(i?.imageurl)return`${i.imageurl}`;if(i?.image)return`${lc}/${i.image}.png`}const n=t?e.name:e,r=ct[n];return r?(r.image||(r.image=`${lc}/${n}.png`),r.image):`${lc}/${n}.png`},f3=(e,t)=>{const{leftInventory:n,rightInventory:r}=t.payload,i=Math.floor(Date.now()/1e3);n&&(e.leftInventory={...n,items:Array.from(Array(n.slots),(l,s)=>{const a=Object.values(n.items).find(f=>f?.slot===s+1)||{slot:s+1};return a.name&&(typeof ct[a.name]>"u"&&$x(a.name),a.durability=Yl(a.metadata,i)),a})}),r&&(e.rightInventory={...r,items:Array.from(Array(r.slots),(l,s)=>{const a=Object.values(r.items).find(f=>f?.slot===s+1)||{slot:s+1};return a.name&&(typeof ct[a.name]>"u"&&$x(a.name),a.durability=Yl(a.metadata,i)),a})}),e.isBusy=!1},d3=(e,t)=>{if(t.payload.items){Array.isArray(t.payload.items)||(t.payload.items=[t.payload.items]);const n=Math.floor(Date.now()/1e3);Object.values(t.payload.items).filter(r=>!!r).forEach(r=>{const i=r.inventory&&r.inventory!==en.PLAYER?e.rightInventory:e.leftInventory;r.item.durability=Yl(r.item.metadata,n),i.items[r.item.slot-1]=r.item}),e.rightInventory.type===en.CRAFTING&&(e.rightInventory={...e.rightInventory})}if(t.payload.itemCount){const n=Object.entries(t.payload.itemCount);for(let r=0;r{const{fromSlot:n,fromType:r,toSlot:i,toType:l}=t.payload,{sourceInventory:s,targetInventory:a}=Wf(e,r,l),f=Math.floor(Date.now()/1e3);[s.items[n.slot-1],a.items[i.slot-1]]=[{...a.items[i.slot-1],slot:n.slot,durability:Yl(i.metadata,f)},{...s.items[n.slot-1],slot:i.slot,durability:Yl(n.metadata,f)}]},h3=(e,t)=>{const{fromSlot:n,fromType:r,toSlot:i,toType:l,count:s}=t.payload,{sourceInventory:a,targetInventory:f}=Wf(e,r,l),d=n.weight/n.count;f.items[i.slot-1]={...f.items[i.slot-1],count:i.count+s,weight:d*(i.count+s)},!(r===en.SHOP||r===en.CRAFTING)&&(a.items[n.slot-1]=n.count-s>0?{...a.items[n.slot-1],count:n.count-s,weight:d*(n.count-s)}:{slot:n.slot})},g3=(e,t)=>{const{fromSlot:n,fromType:r,toSlot:i,toType:l,count:s}=t.payload,{sourceInventory:a,targetInventory:f}=Wf(e,r,l),d=n.weight/n.count,h=Math.floor(Date.now()/1e3),g=a.items[n.slot-1];f.items[i.slot-1]={...g,count:s,weight:d*s,slot:i.slot,durability:Yl(g.metadata,h)},!(r===en.SHOP||r===en.CRAFTING)&&(a.items[n.slot-1]=n.count-s>0?{...a.items[n.slot-1],count:n.count-s,weight:d*(n.count-s)}:{slot:n.slot})},m3={leftInventory:{id:"",type:"",slots:0,maxWeight:0,items:[]},rightInventory:{id:"",type:"",slots:0,maxWeight:0,items:[]},additionalMetadata:new Array,itemAmount:0,shiftPressed:!1,isBusy:!1},rv=Xm({name:"inventory",initialState:m3,reducers:{stackSlots:h3,swapSlots:p3,setupInventory:f3,moveSlots:g3,refreshSlots:d3,setAdditionalMetadata:(e,t)=>{const n=[];for(let r=0;rl.value===i.value)||n.push(i)}e.additionalMetadata=[...e.additionalMetadata,...n]},setItemAmount:(e,t)=>{e.itemAmount=t.payload},setShiftPressed:(e,t)=>{e.shiftPressed=t.payload},setContainerWeight:(e,t)=>{const n=e.leftInventory.items.find(r=>r.metadata?.container===e.rightInventory.id);!n||(n.weight=t.payload)}},extraReducers:e=>{e.addMatcher(WC,t=>{t.isBusy=!0,t.history={leftInventory:mg(t.leftInventory),rightInventory:mg(t.rightInventory)}}),e.addMatcher(qC,t=>{t.isBusy=!1}),e.addMatcher(VC,t=>{t.history&&t.history.leftInventory&&t.history.rightInventory&&(t.leftInventory=t.history.leftInventory,t.rightInventory=t.history.rightInventory),t.isBusy=!1})}}),{setAdditionalMetadata:v3,setItemAmount:y3,setShiftPressed:x3,setupInventory:QC,swapSlots:w3,moveSlots:S3,stackSlots:E3,refreshSlots:C3,setContainerWeight:k3}=rv.actions,YC=e=>e.inventory.leftInventory,_3=e=>e.inventory.rightInventory,b3=e=>e.inventory.itemAmount,O3=rv.reducer,I3={open:!1,item:null,inventoryType:null},XC=Xm({name:"tooltip",initialState:I3,reducers:{openTooltip(e,t){e.open=!0,e.item=t.payload.item,e.inventoryType=t.payload.inventoryType},closeTooltip(e){e.open=!1}}}),{openTooltip:T3,closeTooltip:Xu}=XC.actions,R3=XC.reducer,P3={coords:null,item:null},ZC=Xm({name:"contextMenu",initialState:P3,reducers:{openContextMenu(e,t){e.coords=t.payload.coords,e.item=t.payload.item},closeContextMenu(e){e.coords=null}}}),{openContextMenu:A3,closeContextMenu:JC}=ZC.actions,D3=ZC.reducer,Mn=KF({reducer:{inventory:O3,tooltip:R3,contextMenu:D3}}),ru=()=>hM(),yi=YL,Br=(e,t)=>{const n=T.exports.useRef(KC);T.exports.useEffect(()=>{n.current=t},[t]),T.exports.useEffect(()=>{const r=i=>{const{action:l,data:s}=i.data;n.current&&l===e&&n.current(s)};return window.addEventListener("message",r),()=>window.removeEventListener("message",r)},[e])},iv=e=>{cr("useItem",e.slot)},ek=e=>{const{inventory:{itemAmount:t}}=Mn.getState();cr("giveItem",{slot:e.slot,count:t})},ot={},Wc=Math.min,Do=Math.max,Vc=Math.round,Tl=Math.floor,io=e=>({x:e,y:e}),L3={left:"right",right:"left",bottom:"top",top:"bottom"},M3={start:"end",end:"start"};function Bx(e,t,n){return Do(e,Wc(t,n))}function Vf(e,t){return typeof e=="function"?e(t):e}function Ho(e){return e.split("-")[0]}function qf(e){return e.split("-")[1]}function tk(e){return e==="x"?"y":"x"}function nk(e){return e==="y"?"height":"width"}function Gf(e){return["top","bottom"].includes(Ho(e))?"y":"x"}function rk(e){return tk(Gf(e))}function N3(e,t,n){n===void 0&&(n=!1);const r=qf(e),i=rk(e),l=nk(i);let s=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(s=qc(s)),[s,qc(s)]}function F3(e){const t=qc(e);return[xg(e),t,xg(t)]}function xg(e){return e.replace(/start|end/g,t=>M3[t])}function z3(e,t,n){const r=["left","right"],i=["right","left"],l=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?l:s;default:return[]}}function $3(e,t,n,r){const i=qf(e);let l=z3(Ho(e),n==="start",r);return i&&(l=l.map(s=>s+"-"+i),t&&(l=l.concat(l.map(xg)))),l}function qc(e){return e.replace(/left|right|bottom|top/g,t=>L3[t])}function B3(e){return{top:0,right:0,bottom:0,left:0,...e}}function U3(e){return typeof e!="number"?B3(e):{top:e,right:e,bottom:e,left:e}}function Gc(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function oo(e){return ik(e)?(e.nodeName||"").toLowerCase():"#document"}function $n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xi(e){var t;return(t=(ik(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ik(e){return e instanceof Node||e instanceof $n(e).Node}function gt(e){return e instanceof Element||e instanceof $n(e).Element}function nn(e){return e instanceof HTMLElement||e instanceof $n(e).HTMLElement}function wg(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $n(e).ShadowRoot}function Ts(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Hn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function H3(e){return["table","td","th"].includes(oo(e))}function ov(e){const t=lv(),n=Hn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function j3(e){let t=jo(e);for(;nn(t)&&!Rs(t);){if(ov(t))return t;t=jo(t)}return null}function lv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Rs(e){return["html","body","#document"].includes(oo(e))}function Hn(e){return $n(e).getComputedStyle(e)}function Kf(e){return gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function jo(e){if(oo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||wg(e)&&e.host||xi(e);return wg(t)?t.host:t}function ok(e){const t=jo(e);return Rs(t)?e.ownerDocument?e.ownerDocument.body:e.body:nn(t)&&Ts(t)?t:ok(t)}function Zi(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ok(e),l=i===((r=e.ownerDocument)==null?void 0:r.body),s=$n(i);return l?t.concat(s,s.visualViewport||[],Ts(i)?i:[],s.frameElement&&n?Zi(s.frameElement):[]):t.concat(i,Zi(i,[],n))}function zi(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Lt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&wg(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function uv(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function W3(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function lk(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(uv())||t.test(W3()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function uk(e){return e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType!=="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0}function sk(){return/apple/i.test(navigator.vendor)}function V3(){return uv().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Kc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function q3(e){return"nativeEvent"in e}function G3(e){return e.matches("html,body")}function an(e){return e?.ownerDocument||document}function Qp(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function sv(e){return"composedPath"in e?e.composedPath()[0]:e.target}const K3="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ak(e){return nn(e)&&e.matches(K3)}function Ht(e){e.preventDefault(),e.stopPropagation()}function Ux(e,t,n){let{reference:r,floating:i}=e;const l=Gf(t),s=rk(t),a=nk(s),f=Ho(t),d=l==="y",h=r.x+r.width/2-i.width/2,g=r.y+r.height/2-i.height/2,y=r[a]/2-i[a]/2;let m;switch(f){case"top":m={x:h,y:r.y-i.height};break;case"bottom":m={x:h,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:g};break;case"left":m={x:r.x-i.width,y:g};break;default:m={x:r.x,y:r.y}}switch(qf(t)){case"start":m[s]-=y*(n&&d?-1:1);break;case"end":m[s]+=y*(n&&d?-1:1);break}return m}const Q3=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:l=[],platform:s}=n,a=l.filter(Boolean),f=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:g}=Ux(d,r,f),y=r,m={},w=0;for(let E=0;EX<=0)){var q,K;const X=(((q=l.flip)==null?void 0:q.index)||0)+1,$=D[X];if($)return{data:{index:X,overflows:z},reset:{placement:$}};let H=(K=z.filter(ie=>ie.overflows[0]<=0).sort((ie,oe)=>ie.overflows[1]-oe.overflows[1])[0])==null?void 0:K.placement;if(!H)switch(m){case"bestFit":{var B;const ie=(B=z.map(oe=>[oe.placement,oe.overflows.filter(ue=>ue>0).reduce((ue,U)=>ue+U,0)]).sort((oe,ue)=>oe[1]-ue[1])[0])==null?void 0:B[0];ie&&(H=ie);break}case"initialPlacement":H=a;break}if(i!==H)return{reset:{placement:H}}}return{}}}};async function Y3(e,t){const{placement:n,platform:r,elements:i}=e,l=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Ho(n),a=qf(n),f=Gf(n)==="y",d=["left","top"].includes(s)?-1:1,h=l&&f?-1:1,g=Vf(t,e);let{mainAxis:y,crossAxis:m,alignmentAxis:w}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...g};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),f?{x:m*h,y:y*d}:{x:y*d,y:m*h}}const dk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,i=await Y3(t,e);return{x:n+i.x,y:r+i.y,data:i}}}},pk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:l=!0,crossAxis:s=!1,limiter:a={fn:A=>{let{x:v,y:S}=A;return{x:v,y:S}}},...f}=Vf(e,t),d={x:n,y:r},h=await ck(t,f),g=Gf(Ho(i)),y=tk(g);let m=d[y],w=d[g];if(l){const A=y==="y"?"top":"left",v=y==="y"?"bottom":"right",S=m+h[A],_=m-h[v];m=Bx(S,m,_)}if(s){const A=g==="y"?"top":"left",v=g==="y"?"bottom":"right",S=w+h[A],_=w-h[v];w=Bx(S,w,_)}const E=a.fn({...t,[y]:m,[g]:w});return{...E,data:{x:E.x-n,y:E.y-r}}}}};function hk(e){const t=Hn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=nn(e),l=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Vc(n)!==l||Vc(r)!==s;return a&&(n=l,r=s),{width:n,height:r,$:a}}function av(e){return gt(e)?e:e.contextElement}function $l(e){const t=av(e);if(!nn(t))return io(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:l}=hk(t);let s=(l?Vc(n.width):n.width)/r,a=(l?Vc(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const X3=io(0);function gk(e){const t=$n(e);return!lv()||!t.visualViewport?X3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Z3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==$n(e)?!1:t}function Wo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),l=av(e);let s=io(1);t&&(r?gt(r)&&(s=$l(r)):s=$l(e));const a=Z3(l,n,r)?gk(l):io(0);let f=(i.left+a.x)/s.x,d=(i.top+a.y)/s.y,h=i.width/s.x,g=i.height/s.y;if(l){const y=$n(l),m=r&>(r)?$n(r):r;let w=y.frameElement;for(;w&&r&&m!==y;){const E=$l(w),A=w.getBoundingClientRect(),v=Hn(w),S=A.left+(w.clientLeft+parseFloat(v.paddingLeft))*E.x,_=A.top+(w.clientTop+parseFloat(v.paddingTop))*E.y;f*=E.x,d*=E.y,h*=E.x,g*=E.y,f+=S,d+=_,w=$n(w).frameElement}}return Gc({width:h,height:g,x:f,y:d})}function J3(e){let{rect:t,offsetParent:n,strategy:r}=e;const i=nn(n),l=xi(n);if(n===l)return t;let s={scrollLeft:0,scrollTop:0},a=io(1);const f=io(0);if((i||!i&&r!=="fixed")&&((oo(n)!=="body"||Ts(l))&&(s=Kf(n)),nn(n))){const d=Wo(n);a=$l(n),f.x=d.x+n.clientLeft,f.y=d.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-s.scrollLeft*a.x+f.x,y:t.y*a.y-s.scrollTop*a.y+f.y}}function e4(e){return Array.from(e.getClientRects())}function mk(e){return Wo(xi(e)).left+Kf(e).scrollLeft}function t4(e){const t=xi(e),n=Kf(e),r=e.ownerDocument.body,i=Do(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=Do(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+mk(e);const a=-n.scrollTop;return Hn(r).direction==="rtl"&&(s+=Do(t.clientWidth,r.clientWidth)-i),{width:i,height:l,x:s,y:a}}function n4(e,t){const n=$n(e),r=xi(e),i=n.visualViewport;let l=r.clientWidth,s=r.clientHeight,a=0,f=0;if(i){l=i.width,s=i.height;const d=lv();(!d||d&&t==="fixed")&&(a=i.offsetLeft,f=i.offsetTop)}return{width:l,height:s,x:a,y:f}}function r4(e,t){const n=Wo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,l=nn(e)?$l(e):io(1),s=e.clientWidth*l.x,a=e.clientHeight*l.y,f=i*l.x,d=r*l.y;return{width:s,height:a,x:f,y:d}}function Hx(e,t,n){let r;if(t==="viewport")r=n4(e,n);else if(t==="document")r=t4(xi(e));else if(gt(t))r=r4(t,n);else{const i=gk(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return Gc(r)}function vk(e,t){const n=jo(e);return n===t||!gt(n)||Rs(n)?!1:Hn(n).position==="fixed"||vk(n,t)}function i4(e,t){const n=t.get(e);if(n)return n;let r=Zi(e,[],!1).filter(a=>gt(a)&&oo(a)!=="body"),i=null;const l=Hn(e).position==="fixed";let s=l?jo(e):e;for(;gt(s)&&!Rs(s);){const a=Hn(s),f=ov(s);!f&&a.position==="fixed"&&(i=null),(l?!f&&!i:!f&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Ts(s)&&!f&&vk(e,s))?r=r.filter(h=>h!==s):i=a,s=jo(s)}return t.set(e,r),r}function o4(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const s=[...n==="clippingAncestors"?i4(t,this._c):[].concat(n),r],a=s[0],f=s.reduce((d,h)=>{const g=Hx(t,h,i);return d.top=Do(g.top,d.top),d.right=Wc(g.right,d.right),d.bottom=Wc(g.bottom,d.bottom),d.left=Do(g.left,d.left),d},Hx(t,a,i));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function l4(e){return hk(e)}function u4(e,t,n){const r=nn(t),i=xi(t),l=n==="fixed",s=Wo(e,!0,l,t);let a={scrollLeft:0,scrollTop:0};const f=io(0);if(r||!r&&!l)if((oo(t)!=="body"||Ts(i))&&(a=Kf(t)),r){const d=Wo(t,!0,l,t);f.x=d.x+t.clientLeft,f.y=d.y+t.clientTop}else i&&(f.x=mk(i));return{x:s.left+a.scrollLeft-f.x,y:s.top+a.scrollTop-f.y,width:s.width,height:s.height}}function jx(e,t){return!nn(e)||Hn(e).position==="fixed"?null:t?t(e):e.offsetParent}function yk(e,t){const n=$n(e);if(!nn(e))return n;let r=jx(e,t);for(;r&&H3(r)&&Hn(r).position==="static";)r=jx(r,t);return r&&(oo(r)==="html"||oo(r)==="body"&&Hn(r).position==="static"&&!ov(r))?n:r||j3(e)||n}const s4=async function(e){let{reference:t,floating:n,strategy:r}=e;const i=this.getOffsetParent||yk,l=this.getDimensions;return{reference:u4(t,await i(n),r),floating:{x:0,y:0,...await l(n)}}};function a4(e){return Hn(e).direction==="rtl"}const c4={convertOffsetParentRelativeRectToViewportRelativeRect:J3,getDocumentElement:xi,getClippingRect:o4,getOffsetParent:yk,getElementRects:s4,getClientRects:e4,getDimensions:l4,getScale:$l,isElement:gt,isRTL:a4};function f4(e,t){let n=null,r;const i=xi(e);function l(){clearTimeout(r),n&&n.disconnect(),n=null}function s(a,f){a===void 0&&(a=!1),f===void 0&&(f=1),l();const{left:d,top:h,width:g,height:y}=e.getBoundingClientRect();if(a||t(),!g||!y)return;const m=Tl(h),w=Tl(i.clientWidth-(d+g)),E=Tl(i.clientHeight-(h+y)),A=Tl(d),S={rootMargin:-m+"px "+-w+"px "+-E+"px "+-A+"px",threshold:Do(0,Wc(1,f))||1};let _=!0;function P(D){const R=D[0].intersectionRatio;if(R!==f){if(!_)return s();R?s(!1,R):r=setTimeout(()=>{s(!1,1e-7)},100)}_=!1}try{n=new IntersectionObserver(P,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(P,S)}n.observe(e)}return s(!0),l}function d4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=av(e),h=i||l?[...d?Zi(d):[],...Zi(t)]:[];h.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),l&&v.addEventListener("resize",n)});const g=d&&a?f4(d,n):null;let y=-1,m=null;s&&(m=new ResizeObserver(v=>{let[S]=v;S&&S.target===d&&m&&(m.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{m&&m.observe(t)})),n()}),d&&!f&&m.observe(d),m.observe(t));let w,E=f?Wo(e):null;f&&A();function A(){const v=Wo(e);E&&(v.x!==E.x||v.y!==E.y||v.width!==E.width||v.height!==E.height)&&n(),E=v,w=requestAnimationFrame(A)}return n(),()=>{h.forEach(v=>{i&&v.removeEventListener("scroll",n),l&&v.removeEventListener("resize",n)}),g&&g(),m&&m.disconnect(),m=null,f&&cancelAnimationFrame(w)}}const p4=(e,t,n)=>{const r=new Map,i={platform:c4,...n},l={...i.platform,_c:r};return Q3(e,t,{...i,platform:l})};var uc=typeof document<"u"?T.exports.useLayoutEffect:T.exports.useEffect;function Qc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Qc(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const l=i[r];if(!(l==="_owner"&&e.$$typeof)&&!Qc(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function xk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wx(e,t){const n=xk(e);return Math.round(t*n)/n}function Vx(e){const t=T.exports.useRef(e);return uc(()=>{t.current=e}),t}function h4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:l,floating:s}={},transform:a=!0,whileElementsMounted:f,open:d}=e,[h,g]=T.exports.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,m]=T.exports.useState(r);Qc(y,r)||m(r);const[w,E]=T.exports.useState(null),[A,v]=T.exports.useState(null),S=T.exports.useCallback(oe=>{oe!=R.current&&(R.current=oe,E(oe))},[E]),_=T.exports.useCallback(oe=>{oe!==F.current&&(F.current=oe,v(oe))},[v]),P=l||w,D=s||A,R=T.exports.useRef(null),F=T.exports.useRef(null),z=T.exports.useRef(h),q=Vx(f),K=Vx(i),B=T.exports.useCallback(()=>{if(!R.current||!F.current)return;const oe={placement:t,strategy:n,middleware:y};K.current&&(oe.platform=K.current),p4(R.current,F.current,oe).then(ue=>{const U={...ue,isPositioned:!0};X.current&&!Qc(z.current,U)&&(z.current=U,Vo.exports.flushSync(()=>{g(U)}))})},[y,t,n,K]);uc(()=>{d===!1&&z.current.isPositioned&&(z.current.isPositioned=!1,g(oe=>({...oe,isPositioned:!1})))},[d]);const X=T.exports.useRef(!1);uc(()=>(X.current=!0,()=>{X.current=!1}),[]),uc(()=>{if(P&&(R.current=P),D&&(F.current=D),P&&D){if(q.current)return q.current(P,D,B);B()}},[P,D,B,q]);const $=T.exports.useMemo(()=>({reference:R,floating:F,setReference:S,setFloating:_}),[S,_]),H=T.exports.useMemo(()=>({reference:P,floating:D}),[P,D]),ie=T.exports.useMemo(()=>{const oe={position:n,left:0,top:0};if(!H.floating)return oe;const ue=Wx(H.floating,h.x),U=Wx(H.floating,h.y);return a?{...oe,transform:"translate("+ue+"px, "+U+"px)",...xk(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ue,top:U}},[n,a,H.floating,h.x,h.y]);return T.exports.useMemo(()=>({...h,update:B,refs:$,elements:H,floatingStyles:ie}),[h,B,$,H,ie])}var g4=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Sg=g4.join(","),wk=typeof Element>"u",Es=wk?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yc=!wk&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Xc=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),l=i===""||i==="true",s=l||n&&t&&e(t.parentNode);return s},m4=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},v4=function(t,n,r){if(Xc(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(Sg));return n&&Es.call(t,Sg)&&i.unshift(t),i=i.filter(r),i},y4=function e(t,n,r){for(var i=[],l=Array.from(t);l.length;){var s=l.shift();if(!Xc(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),f=a.length?a:s.children,d=e(f,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:s,candidates:d})}else{var h=Es.call(s,Sg);h&&r.filter(s)&&(n||!t.includes(s))&&i.push(s);var g=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),y=!Xc(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(g&&y){var m=e(g===!0?s.children:g.children,!0,r);r.flatten?i.push.apply(i,m):i.push({scopeParent:s,candidates:m})}else l.unshift.apply(l,s.children)}}return i},Sk=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Ek=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||m4(t))&&!Sk(t)?0:t.tabIndex},x4=function(t,n){var r=Ek(t);return r<0&&n&&!Sk(t)?0:r},w4=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Ck=function(t){return t.tagName==="INPUT"},S4=function(t){return Ck(t)&&t.type==="hidden"},E4=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},C4=function(t,n){for(var r=0;rsummary:first-of-type"),s=l?t.parentElement:t;if(Es.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var a=t;t;){var f=t.parentElement,d=Yc(t);if(f&&!f.shadowRoot&&i(f)===!0)return qx(t);t.assignedSlot?t=t.assignedSlot:!f&&d!==t.ownerDocument?t=d.host:t=f}t=a}if(O4(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qx(t);return!1},T4=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r=0)},A4=function e(t){var n=[],r=[];return t.forEach(function(i,l){var s=!!i.scopeParent,a=s?i.scopeParent:i,f=x4(a,s),d=s?e(i.candidates):a;f===0?s?n.push.apply(n,d):n.push(a):r.push({documentOrder:l,tabIndex:f,item:i,isScope:s,content:d})}),r.sort(w4).reduce(function(i,l){return l.isScope?i.push.apply(i,l.content):i.push(l.content),i},[]).concat(n)},cv=function(t,n){n=n||{};var r;return n.getShadowRoot?r=y4([t],n.includeContainer,{filter:Gx.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:P4}):r=v4(t,n.includeContainer,Gx.bind(null,n)),A4(r)};function fv(e){return T.exports.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})},e)}const dv="ArrowUp",Qf="ArrowDown",Xl="ArrowLeft",Ps="ArrowRight";function Ua(e,t,n){return Math.floor(e/t)!==n}function Zu(e,t){return t<0||t>=e.current.length}function Yp(e,t){return Zt(e,{disabledIndices:t})}function Kx(e,t){return Zt(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Zt(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:l=1}=t===void 0?{}:t;const s=e.current;let a=n;do{var f,d;a=a+(r?-l:l)}while(a>=0&&a<=s.length-1&&(i?i.includes(a):s[a]==null||((f=s[a])==null?void 0:f.hasAttribute("disabled"))||((d=s[a])==null?void 0:d.getAttribute("aria-disabled"))==="true"));return a}function D4(e,t){let{event:n,orientation:r,loop:i,cols:l,disabledIndices:s,minIndex:a,maxIndex:f,prevIndex:d,stopEvent:h=!1}=t,g=d;if(n.key===dv){if(h&&Ht(n),d===-1)g=f;else if(g=Zt(e,{startingIndex:g,amount:l,decrement:!0,disabledIndices:s}),i&&(d-ly?w:w-l}Zu(e,g)&&(g=d)}if(n.key===Qf&&(h&&Ht(n),d===-1?g=a:(g=Zt(e,{startingIndex:d,amount:l,disabledIndices:s}),i&&d+l>f&&(g=Zt(e,{startingIndex:d%l-l,amount:l,disabledIndices:s}))),Zu(e,g)&&(g=d)),r==="both"){const y=Tl(d/l);n.key===Ps&&(h&&Ht(n),d%l!==l-1?(g=Zt(e,{startingIndex:d,disabledIndices:s}),i&&Ua(g,l,y)&&(g=Zt(e,{startingIndex:d-d%l-1,disabledIndices:s}))):i&&(g=Zt(e,{startingIndex:d-d%l-1,disabledIndices:s})),Ua(g,l,y)&&(g=d)),n.key===Xl&&(h&&Ht(n),d%l!==0?(g=Zt(e,{startingIndex:d,disabledIndices:s,decrement:!0}),i&&Ua(g,l,y)&&(g=Zt(e,{startingIndex:d+(l-d%l),decrement:!0,disabledIndices:s}))):i&&(g=Zt(e,{startingIndex:d+(l-d%l),decrement:!0,disabledIndices:s})),Ua(g,l,y)&&(g=d));const m=Tl(f/l)===y;Zu(e,g)&&(i&&m?g=n.key===Xl?f:Zt(e,{startingIndex:d-d%l-1,disabledIndices:s}):g=d)}return g}let Qx=0;function oi(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Qx);const l=()=>e?.focus({preventScroll:n});i?l():Qx=requestAnimationFrame(l)}var Ke=typeof document<"u"?T.exports.useLayoutEffect:T.exports.useEffect;function L4(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function M4(e,t){if(e.size!==t.size)return!1;for(const[n,r]of e.entries())if(r!==t.get(n))return!1;return!0}const kk=T.exports.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function N4(e){let{children:t,elementsRef:n,labelsRef:r}=e;const[i,l]=T.exports.useState(()=>new Map),s=T.exports.useCallback(f=>{l(d=>new Map(d).set(f,null))},[]),a=T.exports.useCallback(f=>{l(d=>{const h=new Map(d);return h.delete(f),h})},[]);return Ke(()=>{const f=new Map(i);Array.from(f.keys()).sort(L4).forEach((h,g)=>{f.set(h,g)}),M4(i,f)||l(f)},[i]),T.exports.createElement(kk.Provider,{value:T.exports.useMemo(()=>({register:s,unregister:a,map:i,elementsRef:n,labelsRef:r}),[s,a,i,n,r])},t)}function _k(e){let{label:t}=e===void 0?{}:e;const[n,r]=T.exports.useState(null),i=T.exports.useRef(null),{register:l,unregister:s,map:a,elementsRef:f,labelsRef:d}=T.exports.useContext(kk),h=T.exports.useCallback(g=>{if(i.current=g,n!==null&&(f.current[n]=g,d)){var y;const m=t!==void 0;d.current[n]=m?t:(y=g?.textContent)!=null?y:null}},[n,f,d,t]);return Ke(()=>{const g=i.current;if(g)return l(g),()=>{s(g)}},[l,s]),Ke(()=>{const g=i.current?a.get(i.current):null;g!=null&&r(g)},[a]),T.exports.useMemo(()=>({ref:h,index:n??-1}),[n,h])}function Cs(){return Cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t"floating-ui-"+F4++;function z4(){const[e,t]=T.exports.useState(()=>Xp?Yx():void 0);return Ke(()=>{e==null&&t(Yx())},[]),T.exports.useEffect(()=>{Xp||(Xp=!0)},[]),e}const $4=lS["useId".toString()],As=$4||z4;function bk(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const Ok=T.exports.createContext(null),Ik=T.exports.createContext(null),Ko=()=>{var e;return((e=T.exports.useContext(Ok))==null?void 0:e.id)||null},ao=()=>T.exports.useContext(Ik);function B4(e){const t=As(),n=ao(),r=Ko(),i=e||r;return Ke(()=>{const l={id:t,parentId:i};return n?.addNode(l),()=>{n?.removeNode(l)}},[n,t,i]),t}function U4(e){let{children:t,id:n}=e;const r=Ko();return T.exports.createElement(Ok.Provider,{value:T.exports.useMemo(()=>({id:n,parentId:r}),[n,r])},t)}function H4(e){let{children:t}=e;const n=T.exports.useRef([]),r=T.exports.useCallback(s=>{n.current=[...n.current,s]},[]),i=T.exports.useCallback(s=>{n.current=n.current.filter(a=>a!==s)},[]),l=T.exports.useState(()=>bk())[0];return T.exports.createElement(Ik.Provider,{value:T.exports.useMemo(()=>({nodesRef:n,addNode:r,removeNode:i,events:l}),[n,r,i,l])},t)}function Zl(e){return"data-floating-ui-"+e}function En(e){const t=T.exports.useRef(e);return Ke(()=>{t.current=e}),t}const Xx=Zl("safe-polygon");function Zp(e,t,n){return n&&!Kc(n)?0:typeof e=="number"?e:e?.[t]}function j4(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,events:l,elements:{domReference:s,floating:a},refs:f}=e,{enabled:d=!0,delay:h=0,handleClose:g=null,mouseOnly:y=!1,restMs:m=0,move:w=!0}=t,E=ao(),A=Ko(),v=En(g),S=En(h),_=T.exports.useRef(),P=T.exports.useRef(),D=T.exports.useRef(),R=T.exports.useRef(),F=T.exports.useRef(!0),z=T.exports.useRef(!1),q=T.exports.useRef(()=>{}),K=T.exports.useCallback(()=>{var H;const ie=(H=i.current.openEvent)==null?void 0:H.type;return ie?.includes("mouse")&&ie!=="mousedown"},[i]);T.exports.useEffect(()=>{if(!d)return;function H(){clearTimeout(P.current),clearTimeout(R.current),F.current=!0}return l.on("dismiss",H),()=>{l.off("dismiss",H)}},[d,l]),T.exports.useEffect(()=>{if(!d||!v.current||!n)return;function H(oe){K()&&r(!1,oe)}const ie=an(a).documentElement;return ie.addEventListener("mouseleave",H),()=>{ie.removeEventListener("mouseleave",H)}},[a,n,r,d,v,i,K]);const B=T.exports.useCallback(function(H,ie){ie===void 0&&(ie=!0);const oe=Zp(S.current,"close",_.current);oe&&!D.current?(clearTimeout(P.current),P.current=setTimeout(()=>r(!1,H),oe)):ie&&(clearTimeout(P.current),r(!1,H))},[S,r]),X=T.exports.useCallback(()=>{q.current(),D.current=void 0},[]),$=T.exports.useCallback(()=>{if(z.current){const H=an(f.floating.current).body;H.style.pointerEvents="",H.removeAttribute(Xx),z.current=!1}},[f]);return T.exports.useEffect(()=>{if(!d)return;function H(){return i.current.openEvent?["click","mousedown"].includes(i.current.openEvent.type):!1}function ie(U){if(clearTimeout(P.current),F.current=!1,y&&!Kc(_.current)||m>0&&Zp(S.current,"open")===0)return;const J=Zp(S.current,"open",_.current);J?P.current=setTimeout(()=>{r(!0,U)},J):r(!0,U)}function oe(U){if(H())return;q.current();const J=an(a);if(clearTimeout(R.current),v.current){n||clearTimeout(P.current),D.current=v.current({...e,tree:E,x:U.clientX,y:U.clientY,onClose(){$(),X(),B(U)}});const b=D.current;J.addEventListener("mousemove",b),q.current=()=>{J.removeEventListener("mousemove",b)};return}(_.current==="touch"?!Lt(a,U.relatedTarget):!0)&&B(U)}function ue(U){H()||v.current==null||v.current({...e,tree:E,x:U.clientX,y:U.clientY,onClose(){$(),X(),B(U)}})(U)}if(gt(s)){const U=s;return n&&U.addEventListener("mouseleave",ue),a?.addEventListener("mouseleave",ue),w&&U.addEventListener("mousemove",ie,{once:!0}),U.addEventListener("mouseenter",ie),U.addEventListener("mouseleave",oe),()=>{n&&U.removeEventListener("mouseleave",ue),a?.removeEventListener("mouseleave",ue),w&&U.removeEventListener("mousemove",ie),U.removeEventListener("mouseenter",ie),U.removeEventListener("mouseleave",oe)}}},[s,a,d,e,y,m,w,B,X,$,r,n,E,S,v,i]),Ke(()=>{var H;if(!!d&&n&&(H=v.current)!=null&&H.__options.blockPointerEvents&&K()){const ue=an(a).body;if(ue.setAttribute(Xx,""),ue.style.pointerEvents="none",z.current=!0,gt(s)&&a){var ie,oe;const U=s,J=E==null||(ie=E.nodesRef.current.find(ee=>ee.id===A))==null||(oe=ie.context)==null?void 0:oe.elements.floating;return J&&(J.style.pointerEvents=""),U.style.pointerEvents="auto",a.style.pointerEvents="auto",()=>{U.style.pointerEvents="",a.style.pointerEvents=""}}}},[d,n,A,a,s,E,v,i,K]),Ke(()=>{n||(_.current=void 0,X(),$())},[n,X,$]),T.exports.useEffect(()=>()=>{X(),clearTimeout(P.current),clearTimeout(R.current),$()},[d,s,X,$]),T.exports.useMemo(()=>{if(!d)return{};function H(ie){_.current=ie.pointerType}return{reference:{onPointerDown:H,onPointerEnter:H,onMouseMove(ie){n||m===0||(clearTimeout(R.current),R.current=setTimeout(()=>{F.current||r(!0,ie.nativeEvent)},m))}},floating:{onMouseEnter(){clearTimeout(P.current)},onMouseLeave(ie){l.emit("dismiss",{type:"mouseLeave",data:{returnFocus:!1}}),B(ie.nativeEvent,!1)}}}},[l,d,m,n,r,B])}function W4(e,t){var n;let r=[],i=(n=e.find(l=>l.id===t))==null?void 0:n.parentId;for(;i;){const l=e.find(s=>s.id===i);i=l?.parentId,l&&(r=r.concat(l))}return r}function Lo(e,t){let n=e.filter(i=>{var l;return i.parentId===t&&((l=i.context)==null?void 0:l.open)}),r=n;for(;r.length;)r=e.filter(i=>{var l;return(l=r)==null?void 0:l.some(s=>{var a;return i.parentId===s.id&&((a=i.context)==null?void 0:a.open)})}),n=n.concat(r);return n}function V4(e,t){let n,r=-1;function i(l,s){s>r&&(n=l,r=s),Lo(e,l).forEach(f=>{i(f.id,s+1)})}return i(t,0),e.find(l=>l.id===n)}let pl=new WeakMap,Ha=new WeakSet,ja={},Jp=0;const q4=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Tk=e=>e&&(e.host||Tk(e.parentNode)),G4=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Tk(n);return e.contains(r)?r:null}).filter(n=>n!=null);function K4(e,t,n,r){const i="data-floating-ui-inert",l=r?"inert":n?"aria-hidden":null,s=G4(t,e),a=new Set,f=new Set(s),d=[];ja[i]||(ja[i]=new WeakMap);const h=ja[i];s.forEach(g),y(t),a.clear();function g(m){!m||a.has(m)||(a.add(m),m.parentNode&&g(m.parentNode))}function y(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,w=>{if(a.has(w))y(w);else{const E=l?w.getAttribute(l):null,A=E!==null&&E!=="false",v=(pl.get(w)||0)+1,S=(h.get(w)||0)+1;pl.set(w,v),h.set(w,S),d.push(w),v===1&&A&&Ha.add(w),S===1&&w.setAttribute(i,""),!A&&l&&w.setAttribute(l,"true")}})}return Jp++,()=>{d.forEach(m=>{const w=(pl.get(m)||0)-1,E=(h.get(m)||0)-1;pl.set(m,w),h.set(m,E),w||(!Ha.has(m)&&l&&m.removeAttribute(l),Ha.delete(m)),E||m.removeAttribute(i)}),Jp--,Jp||(pl=new WeakMap,pl=new WeakMap,Ha=new WeakSet,ja={})}}function Zx(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=an(e[0]).body;return K4(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const pv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Rk(e,t){const n=cv(e,pv());t==="prev"&&n.reverse();const r=n.indexOf(zi(an(e)));return n.slice(r+1)[0]}function Pk(){return Rk(document.body,"next")}function Ak(){return Rk(document.body,"prev")}function Ju(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Lt(n,r)}function Q4(e){cv(e,pv()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Y4(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const hv={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};let X4;function Jx(e){e.key==="Tab"&&(e.target,clearTimeout(X4))}const Zc=T.exports.forwardRef(function(t,n){const[r,i]=T.exports.useState();Ke(()=>(sk()&&i("button"),document.addEventListener("keydown",Jx),()=>{document.removeEventListener("keydown",Jx)}),[]);const l={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Zl("focus-guard")]:"",style:hv};return T.exports.createElement("span",Cs({},t,l))}),Dk=T.exports.createContext(null);function Z4(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=T.exports.useState(null),l=As(),s=Lk(),a=T.exports.useMemo(()=>({id:t,root:n,portalContext:s,uniqueId:l}),[t,n,s,l]),f=T.exports.useRef();return Ke(()=>()=>{r?.remove()},[r,a]),Ke(()=>{if(f.current===a)return;f.current=a;const{id:d,root:h,portalContext:g,uniqueId:y}=a,m=d?document.getElementById(d):null,w=Zl("portal");if(m){const E=document.createElement("div");E.id=y,E.setAttribute(w,""),m.appendChild(E),i(E)}else{let E=h||g?.portalNode;E&&!gt(E)&&(E=E.current),E=E||document.body;let A=null;d&&(A=document.createElement("div"),A.id=d,E.appendChild(A));const v=document.createElement("div");v.id=y,v.setAttribute(w,""),E=A||E,E.appendChild(v),i(v)}},[a]),r}function gv(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const l=Z4({id:n,root:r}),[s,a]=T.exports.useState(null),f=T.exports.useRef(null),d=T.exports.useRef(null),h=T.exports.useRef(null),g=T.exports.useRef(null),y=!!s&&!s.modal&&s.open&&i&&!!(r||l);return T.exports.useEffect(()=>{if(!l||!i||s!=null&&s.modal)return;function m(w){l&&Ju(w)&&(w.type==="focusin"?Y4:Q4)(l)}return l.addEventListener("focusin",m,!0),l.addEventListener("focusout",m,!0),()=>{l.removeEventListener("focusin",m,!0),l.removeEventListener("focusout",m,!0)}},[l,i,s?.modal]),T.exports.createElement(Dk.Provider,{value:T.exports.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:f,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:g,portalNode:l,setFocusManagerState:a}),[i,l])},y&&l&&T.exports.createElement(Zc,{"data-type":"outside",ref:f,onFocus:m=>{if(Ju(m,l)){var w;(w=h.current)==null||w.focus()}else{const E=Ak()||s?.refs.domReference.current;E?.focus()}}}),y&&l&&T.exports.createElement("span",{"aria-owns":l.id,style:hv}),l&&Vo.exports.createPortal(t,l),y&&l&&T.exports.createElement(Zc,{"data-type":"outside",ref:d,onFocus:m=>{if(Ju(m,l)){var w;(w=g.current)==null||w.focus()}else{const E=Pk()||s?.refs.domReference.current;E?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,m.nativeEvent)}}}))}const Lk=()=>T.exports.useContext(Dk),J4=T.exports.forwardRef(function(t,n){return T.exports.createElement("button",Cs({},t,{type:"button",ref:n,tabIndex:-1,style:hv}))});function Mk(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:l=!0,initialFocus:s=0,returnFocus:a=!0,modal:f=!0,visuallyHiddenDismiss:d=!1,closeOnFocusOut:h=!0}=e,{open:g,refs:y,nodeId:m,onOpenChange:w,events:E,dataRef:A,elements:{domReference:v,floating:S}}=t,_=q4()?l:!0,P=En(i),D=En(s),R=En(a),F=ao(),z=Lk(),q=typeof s=="number"&&s<0,K=T.exports.useRef(null),B=T.exports.useRef(null),X=T.exports.useRef(!1),$=T.exports.useRef(null),H=T.exports.useRef(!1),ie=z!=null,oe=v&&v.getAttribute("role")==="combobox"&&ak(v)&&q,ue=T.exports.useCallback(function(b){return b===void 0&&(b=S),b?cv(b,pv()):[]},[S]),U=T.exports.useCallback(b=>{const O=ue(b);return P.current.map(fe=>v&&fe==="reference"?v:S&&fe==="floating"?S:O).filter(Boolean).flat()},[v,S,P,ue]);T.exports.useEffect(()=>{if(r||!f)return;function b(fe){if(fe.key==="Tab"){Lt(S,zi(an(S)))&&ue().length===0&&!oe&&Ht(fe);const ve=U(),Ae=sv(fe);P.current[0]==="reference"&&Ae===v&&(Ht(fe),fe.shiftKey?oi(ve[ve.length-1]):oi(ve[1])),P.current[1]==="floating"&&Ae===S&&fe.shiftKey&&(Ht(fe),oi(ve[0]))}}const O=an(S);return O.addEventListener("keydown",b),()=>{O.removeEventListener("keydown",b)}},[r,v,S,f,P,y,oe,ue,U]),T.exports.useEffect(()=>{if(r||!h)return;function b(){H.current=!0,setTimeout(()=>{H.current=!1})}function O(fe){const ve=fe.relatedTarget;queueMicrotask(()=>{const Ae=!(Lt(v,ve)||Lt(S,ve)||Lt(ve,S)||Lt(z?.portalNode,ve)||ve!=null&&ve.hasAttribute(Zl("focus-guard"))||F&&(Lo(F.nodesRef.current,m).find(de=>{var Oe,ye;return Lt((Oe=de.context)==null?void 0:Oe.elements.floating,ve)||Lt((ye=de.context)==null?void 0:ye.elements.domReference,ve)})||W4(F.nodesRef.current,m).find(de=>{var Oe,ye;return((Oe=de.context)==null?void 0:Oe.elements.floating)===ve||((ye=de.context)==null?void 0:ye.elements.domReference)===ve})));ve&&Ae&&!H.current&&ve!==$.current&&(X.current=!0,w(!1,fe))})}if(S&&nn(v))return v.addEventListener("focusout",O),v.addEventListener("pointerdown",b),!f&&S.addEventListener("focusout",O),()=>{v.removeEventListener("focusout",O),v.removeEventListener("pointerdown",b),!f&&S.removeEventListener("focusout",O)}},[r,v,S,f,m,F,z,w,h]),T.exports.useEffect(()=>{var b;if(r)return;const O=Array.from((z==null||(b=z.portalNode)==null?void 0:b.querySelectorAll("["+Zl("portal")+"]"))||[]);if(S){const fe=[S,...O,K.current,B.current,P.current.includes("reference")||oe?v:null].filter(Ae=>Ae!=null),ve=f?Zx(fe,_,!_):Zx(fe);return()=>{ve()}}},[r,v,S,f,P,z,oe,_]),Ke(()=>{if(r||!S)return;const b=an(S),O=zi(b);queueMicrotask(()=>{const fe=U(S),ve=D.current,Ae=(typeof ve=="number"?fe[ve]:ve.current)||S,de=Lt(S,O);!q&&!de&&g&&oi(Ae,{preventScroll:Ae===S})})},[r,g,S,q,U,D]),Ke(()=>{if(r||!S)return;let b=!1;const O=an(S),fe=zi(O),ve=A.current;$.current=fe;function Ae(de){if(de.type==="escapeKey"&&y.domReference.current&&($.current=y.domReference.current),["referencePress","escapeKey"].includes(de.type))return;const Oe=de.data.returnFocus;typeof Oe=="object"?(X.current=!1,b=Oe.preventScroll):X.current=!Oe}return E.on("dismiss",Ae),()=>{E.off("dismiss",Ae);const de=zi(O);(Lt(S,de)||F&&Lo(F.nodesRef.current,m).some(ye=>{var Fe;return Lt((Fe=ye.context)==null?void 0:Fe.elements.floating,de)})||ve.openEvent&&["click","mousedown"].includes(ve.openEvent.type))&&y.domReference.current&&($.current=y.domReference.current),R.current&&nn($.current)&&!X.current&&oi($.current,{cancelPrevious:!1,preventScroll:b})}},[r,S,R,A,y,E,F,m]),Ke(()=>{if(!(r||!z))return z.setFocusManagerState({modal:f,closeOnFocusOut:h,open:g,onOpenChange:w,refs:y}),()=>{z.setFocusManagerState(null)}},[r,z,f,g,w,y,h]),Ke(()=>{if(!r&&S&&typeof MutationObserver=="function"&&!q){const b=()=>{const fe=S.getAttribute("tabindex");P.current.includes("floating")||zi(an(S))!==y.domReference.current&&ue().length===0?fe!=="0"&&S.setAttribute("tabindex","0"):fe!=="-1"&&S.setAttribute("tabindex","-1")};b();const O=new MutationObserver(b);return O.observe(S,{childList:!0,subtree:!0,attributes:!0}),()=>{O.disconnect()}}},[r,S,y,P,ue,q]);function J(b){return r||!d||!f?null:T.exports.createElement(J4,{ref:b==="start"?K:B,onClick:O=>w(!1,O.nativeEvent)},typeof d=="string"?d:"Dismiss")}const ee=!r&&_&&!oe&&(ie||f);return T.exports.createElement(T.exports.Fragment,null,ee&&T.exports.createElement(Zc,{"data-type":"inside",ref:z?.beforeInsideRef,onFocus:b=>{if(f){const fe=U();oi(i[0]==="reference"?fe[0]:fe[fe.length-1])}else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(X.current=!1,Ju(b,z.portalNode)){const fe=Pk()||v;fe?.focus()}else{var O;(O=z.beforeOutsideRef.current)==null||O.focus()}}}),!oe&&J("start"),n,J("end"),ee&&T.exports.createElement(Zc,{"data-type":"inside",ref:z?.afterInsideRef,onFocus:b=>{if(f)oi(U()[0]);else if(z!=null&&z.preserveTabOrder&&z.portalNode)if(h&&(X.current=!0),Ju(b,z.portalNode)){const fe=Ak()||v;fe?.focus()}else{var O;(O=z.afterOutsideRef.current)==null||O.focus()}}}))}const eh=new Set,Nk=T.exports.forwardRef(function(t,n){let{lockScroll:r=!1,...i}=t;const l=As();return Ke(()=>{if(!r)return;eh.add(l);const s=/iP(hone|ad|od)|iOS/.test(uv()),a=document.body.style,d=Math.round(document.documentElement.getBoundingClientRect().left)+document.documentElement.scrollLeft?"paddingLeft":"paddingRight",h=window.innerWidth-document.documentElement.clientWidth,g=a.left?parseFloat(a.left):window.pageXOffset,y=a.top?parseFloat(a.top):window.pageYOffset;if(a.overflow="hidden",h&&(a[d]=h+"px"),s){var m,w;const E=((m=window.visualViewport)==null?void 0:m.offsetLeft)||0,A=((w=window.visualViewport)==null?void 0:w.offsetTop)||0;Object.assign(a,{position:"fixed",top:-(y-Math.floor(A))+"px",left:-(g-Math.floor(E))+"px",right:"0"})}return()=>{eh.delete(l),eh.size===0&&(Object.assign(a,{overflow:"",[d]:""}),s&&(Object.assign(a,{position:"",top:"",left:"",right:""}),window.scrollTo(g,y)))}},[l,r]),T.exports.createElement("div",Cs({ref:n},i,{style:{position:"fixed",overflow:"auto",top:0,right:0,bottom:0,left:0,...i.style}}))});function ew(e){return nn(e.target)&&e.target.tagName==="BUTTON"}function tw(e){return ak(e)}function ez(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:l}}=e,{enabled:s=!0,event:a="click",toggle:f=!0,ignoreMouse:d=!1,keyboardHandlers:h=!0}=t,g=T.exports.useRef(),y=T.exports.useRef(!1);return T.exports.useMemo(()=>s?{reference:{onPointerDown(m){g.current=m.pointerType},onMouseDown(m){m.button===0&&(Kc(g.current,!0)&&d||a!=="click"&&(n&&f&&(i.current.openEvent?i.current.openEvent.type==="mousedown":!0)?r(!1,m.nativeEvent):(m.preventDefault(),r(!0,m.nativeEvent))))},onClick(m){if(a==="mousedown"&&g.current){g.current=void 0;return}Kc(g.current,!0)&&d||(n&&f&&(i.current.openEvent?i.current.openEvent.type==="click":!0)?r(!1,m.nativeEvent):r(!0,m.nativeEvent))},onKeyDown(m){g.current=void 0,!(m.defaultPrevented||!h||ew(m))&&(m.key===" "&&!tw(l)&&(m.preventDefault(),y.current=!0),m.key==="Enter"&&r(!(n&&f),m.nativeEvent))},onKeyUp(m){m.defaultPrevented||!h||ew(m)||tw(l)||m.key===" "&&y.current&&(y.current=!1,r(!(n&&f),m.nativeEvent))}}}:{},[s,i,a,d,h,l,f,n,r])}const tz=lS["useInsertionEffect".toString()],nz=tz||(e=>e());function Ji(e){const t=T.exports.useRef(()=>{});return nz(()=>{t.current=e}),T.exports.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function Fk(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:l,elements:{reference:s,domReference:a,floating:f},dataRef:d}=e,{enabled:h=!0,escapeKey:g=!0,outsidePress:y=!0,outsidePressEvent:m="pointerdown",referencePress:w=!1,referencePressEvent:E="pointerdown",ancestorScroll:A=!1,bubbles:v}=t,S=ao(),_=Ko()!=null,P=Ji(typeof y=="function"?y:()=>!1),D=typeof y=="function"?P:y,R=T.exports.useRef(!1),{escapeKeyBubbles:F,outsidePressBubbles:z}=oz(v),q=Ji(B=>{if(!n||!h||!g||B.key!=="Escape")return;const X=S?Lo(S.nodesRef.current,l):[];if(!F&&(B.stopPropagation(),X.length>0)){let $=!0;if(X.forEach(H=>{var ie;if((ie=H.context)!=null&&ie.open&&!H.context.dataRef.current.__escapeKeyBubbles){$=!1;return}}),!$)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,q3(B)?B.nativeEvent:B)}),K=Ji(B=>{const X=R.current;if(R.current=!1,X||typeof D=="function"&&!D(B))return;const $=sv(B),H="["+Zl("inert")+"]",ie=an(f).querySelectorAll(H);let oe=gt($)?$:null;for(;oe&&!Rs(oe);){const J=jo(oe);if(J===an(f).body||!gt(J))break;oe=J}if(ie.length&>($)&&!G3($)&&!Lt($,f)&&Array.from(ie).every(J=>!Lt(oe,J)))return;if(nn($)&&f){const J=$.clientWidth>0&&$.scrollWidth>$.clientWidth,ee=$.clientHeight>0&&$.scrollHeight>$.clientHeight;let b=ee&&B.offsetX>$.clientWidth;if(ee&&Hn($).direction==="rtl"&&(b=B.offsetX<=$.offsetWidth-$.clientWidth),b||J&&B.offsetY>$.clientHeight)return}const ue=S&&Lo(S.nodesRef.current,l).some(J=>{var ee;return Qp(B,(ee=J.context)==null?void 0:ee.elements.floating)});if(Qp(B,f)||Qp(B,a)||ue)return;const U=S?Lo(S.nodesRef.current,l):[];if(U.length>0){let J=!0;if(U.forEach(ee=>{var b;if((b=ee.context)!=null&&b.open&&!ee.context.dataRef.current.__outsidePressBubbles){J=!1;return}}),!J)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:_?{preventScroll:!0}:lk(B)||uk(B)}}),r(!1,B)});return T.exports.useEffect(()=>{if(!n||!h)return;d.current.__escapeKeyBubbles=F,d.current.__outsidePressBubbles=z;function B(H){r(!1,H)}const X=an(f);g&&X.addEventListener("keydown",q),D&&X.addEventListener(m,K);let $=[];return A&&(gt(a)&&($=Zi(a)),gt(f)&&($=$.concat(Zi(f))),!gt(s)&&s&&s.contextElement&&($=$.concat(Zi(s.contextElement)))),$=$.filter(H=>{var ie;return H!==((ie=X.defaultView)==null?void 0:ie.visualViewport)}),$.forEach(H=>{H.addEventListener("scroll",B,{passive:!0})}),()=>{g&&X.removeEventListener("keydown",q),D&&X.removeEventListener(m,K),$.forEach(H=>{H.removeEventListener("scroll",B)})}},[d,f,a,s,g,D,m,n,r,A,h,F,z,q,K]),T.exports.useEffect(()=>{R.current=!1},[D,m]),T.exports.useMemo(()=>h?{reference:{onKeyDown:q,[rz[E]]:B=>{w&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,B.nativeEvent))}},floating:{onKeyDown:q,[iz[m]]:()=>{R.current=!0}}}:{},[h,i,w,m,E,r,q])}function mv(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e,[l,s]=T.exports.useState(null),a=((t=e.elements)==null?void 0:t.reference)||l,f=h4(e),d=ao(),h=Ji((P,D)=>{P&&(y.current.openEvent=D),r?.(P,D)}),g=T.exports.useRef(null),y=T.exports.useRef({}),m=T.exports.useState(()=>bk())[0],w=As(),E=T.exports.useCallback(P=>{const D=gt(P)?{getBoundingClientRect:()=>P.getBoundingClientRect(),contextElement:P}:P;f.refs.setReference(D)},[f.refs]),A=T.exports.useCallback(P=>{(gt(P)||P===null)&&(g.current=P,s(P)),(gt(f.refs.reference.current)||f.refs.reference.current===null||P!==null&&!gt(P))&&f.refs.setReference(P)},[f.refs]),v=T.exports.useMemo(()=>({...f.refs,setReference:A,setPositionReference:E,domReference:g}),[f.refs,A,E]),S=T.exports.useMemo(()=>({...f.elements,domReference:a}),[f.elements,a]),_=T.exports.useMemo(()=>({...f,refs:v,elements:S,dataRef:y,nodeId:i,floatingId:w,events:m,open:n,onOpenChange:h}),[f,i,w,m,n,h,v,S]);return Ke(()=>{const P=d?.nodesRef.current.find(D=>D.id===i);P&&(P.context=_)}),T.exports.useMemo(()=>({...f,context:_,refs:v,elements:S}),[f,v,S,_])}function th(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,l)=>(l&&Object.entries(l).forEach(s=>{let[a,f]=s;if(a.indexOf("on")===0){if(r.has(a)||r.set(a,[]),typeof f=="function"){var d;(d=r.get(a))==null||d.push(f),i[a]=function(){for(var h,g=arguments.length,y=new Array(g),m=0;mw(...y)).find(w=>w!==void 0)}}}else i[a]=f}),i),{})}}function zk(e){e===void 0&&(e=[]);const t=e,n=T.exports.useCallback(l=>th(l,e,"reference"),t),r=T.exports.useCallback(l=>th(l,e,"floating"),t),i=T.exports.useCallback(l=>th(l,e,"item"),e.map(l=>l?.item));return T.exports.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let nw=!1;function Yf(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function rw(e,t){return Yf(t,e===dv||e===Qf,e===Xl||e===Ps)}function nh(e,t,n){return Yf(t,e===Qf,n?e===Xl:e===Ps)||e==="Enter"||e==" "||e===""}function lz(e,t,n){return Yf(t,n?e===Xl:e===Ps,e===Qf)}function iw(e,t,n){return Yf(t,n?e===Ps:e===Xl,e===dv)}function uz(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:l,floating:s}}=e,{listRef:a,activeIndex:f,onNavigate:d=()=>{},enabled:h=!0,selectedIndex:g=null,allowEscape:y=!1,loop:m=!1,nested:w=!1,rtl:E=!1,virtual:A=!1,focusItemOnOpen:v="auto",focusItemOnHover:S=!0,openOnArrowKeyDown:_=!0,disabledIndices:P=void 0,orientation:D="vertical",cols:R=1,scrollItemIntoView:F=!0,virtualItemRef:z}=t,q=Ko(),K=ao(),B=Ji(d),X=T.exports.useRef(v),$=T.exports.useRef(g??-1),H=T.exports.useRef(null),ie=T.exports.useRef(!0),oe=T.exports.useRef(B),ue=T.exports.useRef(!!s),U=T.exports.useRef(!1),J=T.exports.useRef(!1),ee=En(P),b=En(n),O=En(F),[fe,ve]=T.exports.useState(),[Ae,de]=T.exports.useState(),Oe=Ji(function(Te,Ue,$e){$e===void 0&&($e=!1);const We=Te.current[Ue.current];!We||(A?(ve(We.id),K?.events.emit("virtualfocus",We),z&&(z.current=We)):oi(We,{preventScroll:!0,sync:V3()&&sk()?nw||U.current:!1}),requestAnimationFrame(()=>{const yt=O.current;yt&&We&&($e||!ie.current)&&(We.scrollIntoView==null||We.scrollIntoView(typeof yt=="boolean"?{block:"nearest",inline:"nearest"}:yt))}))});Ke(()=>{document.createElement("div").focus({get preventScroll(){return nw=!0,!1}})},[]),Ke(()=>{!h||(n&&s?X.current&&g!=null&&(J.current=!0,B(g)):ue.current&&($.current=-1,oe.current(null)))},[h,n,s,g,B]),Ke(()=>{if(!!h&&n&&s)if(f==null){if(U.current=!1,g!=null)return;if(ue.current&&($.current=-1,Oe(a,$)),!ue.current&&X.current&&(H.current!=null||X.current===!0&&H.current==null)){let Te=0;const Ue=()=>{a.current[0]==null?(Te<2&&(Te?requestAnimationFrame:queueMicrotask)(Ue),Te++):($.current=H.current==null||nh(H.current,D,E)||w?Yp(a,ee.current):Kx(a,ee.current),H.current=null,B($.current))};Ue()}}else Zu(a,f)||($.current=f,Oe(a,$,J.current),J.current=!1)},[h,n,s,f,g,w,a,D,E,B,Oe,ee]),Ke(()=>{var Te,Ue;if(!h||s||!K||A||!ue.current)return;const $e=K.nodesRef.current,We=(Te=$e.find(he=>he.id===q))==null||(Ue=Te.context)==null?void 0:Ue.elements.floating,yt=zi(an(s)),qn=$e.some(he=>he.context&&Lt(he.context.elements.floating,yt));We&&!qn&&ie.current&&We.focus({preventScroll:!0})},[h,s,K,q,A]),Ke(()=>{if(!h||!K||!A||q)return;function Te(Ue){de(Ue.id),z&&(z.current=Ue)}return K.events.on("virtualfocus",Te),()=>{K.events.off("virtualfocus",Te)}},[h,K,A,q,z]),Ke(()=>{oe.current=B,ue.current=!!s}),Ke(()=>{n||(H.current=null)},[n]);const ye=f!=null,Fe=T.exports.useMemo(()=>{function Te($e){if(!n)return;const We=a.current.indexOf($e);We!==-1&&B(We)}return{onFocus($e){let{currentTarget:We}=$e;Te(We)},onClick:$e=>{let{currentTarget:We}=$e;return We.focus({preventScroll:!0})},...S&&{onMouseMove($e){let{currentTarget:We}=$e;Te(We)},onPointerLeave($e){let{pointerType:We}=$e;!ie.current||We==="touch"||($.current=-1,Oe(a,$),B(null),A||oi(i.floating.current,{preventScroll:!0}))}}}},[n,i,Oe,S,a,B,A]);return T.exports.useMemo(()=>{if(!h)return{};const Te=ee.current;function Ue(he){if(ie.current=!1,U.current=!0,!b.current&&he.currentTarget===i.floating.current)return;if(w&&iw(he.key,D,E)){Ht(he),r(!1,he.nativeEvent),nn(l)&&!A&&l.focus();return}const ut=$.current,zt=Yp(a,Te),pn=Kx(a,Te);if(he.key==="Home"&&(Ht(he),$.current=zt,B($.current)),he.key==="End"&&(Ht(he),$.current=pn,B($.current)),!(R>1&&($.current=D4(a,{event:he,orientation:D,loop:m,cols:R,disabledIndices:Te,minIndex:zt,maxIndex:pn,prevIndex:$.current,stopEvent:!0}),B($.current),D==="both"))&&rw(he.key,D)){if(Ht(he),n&&!A&&zi(he.currentTarget.ownerDocument)===he.currentTarget){$.current=nh(he.key,D,E)?zt:pn,B($.current);return}nh(he.key,D,E)?m?$.current=ut>=pn?y&&ut!==a.current.length?-1:zt:Zt(a,{startingIndex:ut,disabledIndices:Te}):$.current=Math.min(pn,Zt(a,{startingIndex:ut,disabledIndices:Te})):m?$.current=ut<=zt?y&&ut!==-1?a.current.length:pn:Zt(a,{startingIndex:ut,decrement:!0,disabledIndices:Te}):$.current=Math.max(zt,Zt(a,{startingIndex:ut,decrement:!0,disabledIndices:Te})),Zu(a,$.current)?B(null):B($.current)}}function $e(he){v==="auto"&&lk(he.nativeEvent)&&(X.current=!0)}function We(he){X.current=v,v==="auto"&&uk(he.nativeEvent)&&(X.current=!0)}const yt=A&&n&&ye&&{"aria-activedescendant":Ae||fe},qn=a.current.find(he=>he?.id===fe);return{reference:{...yt,onKeyDown(he){ie.current=!1;const ut=he.key.indexOf("Arrow")===0,zt=lz(he.key,D,E),pn=iw(he.key,D,E),Gn=rw(he.key,D),Vt=(w?zt:Gn)||he.key==="Enter"||he.key.trim()==="";if(A&&n){const Pr=K?.nodesRef.current.find(Qn=>Qn.parentId==null),Kn=K&&Pr?V4(K.nodesRef.current,Pr.id):null;if(ut&&Kn&&z){const Qn=new KeyboardEvent("keydown",{key:he.key,bubbles:!0});if(zt||pn){var vr,qr;const W=((vr=Kn.context)==null?void 0:vr.elements.domReference)===he.currentTarget,re=pn&&!W?(qr=Kn.context)==null?void 0:qr.elements.domReference:zt?qn:null;re&&(Ht(he),re.dispatchEvent(Qn),de(void 0))}if(Gn&&Kn.context&&Kn.context.open&&Kn.parentId&&he.currentTarget!==Kn.context.elements.domReference){var Yo;Ht(he),(Yo=Kn.context.elements.domReference)==null||Yo.dispatchEvent(Qn);return}}return Ue(he)}if(!(!n&&!_&&ut)){if(Vt&&(H.current=w&&Gn?null:he.key),w){zt&&(Ht(he),n?($.current=Yp(a,Te),B($.current)):r(!0,he.nativeEvent));return}Gn&&(g!=null&&($.current=g),Ht(he),!n&&_?r(!0,he.nativeEvent):Ue(he),n&&B($.current))}},onFocus(){n&&B(null)},onPointerDown:We,onMouseDown:$e,onClick:$e},floating:{"aria-orientation":D==="both"?void 0:D,...yt,onKeyDown:Ue,onPointerMove(){ie.current=!0}},item:Fe}},[l,i,fe,Ae,ee,b,a,h,D,E,A,n,ye,w,g,_,y,R,m,v,B,r,Fe,K,z])}function sz(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:l="dialog"}=t,s=As();return T.exports.useMemo(()=>{const a={id:r,role:l};return i?l==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:a}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":l==="alertdialog"?"dialog":l,"aria-controls":n?r:void 0,...l==="listbox"&&{role:"combobox"},...l==="menu"&&{id:s}},floating:{...a,...l==="menu"&&{"aria-labelledby":s}}}:{}},[i,l,n,r,s])}const ow=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function hl(e,t){return typeof e=="function"?e(t):e}function az(e,t){const[n,r]=T.exports.useState(e);return e&&!n&&r(!0),T.exports.useEffect(()=>{if(!e){const i=setTimeout(()=>r(!1),t);return()=>clearTimeout(i)}},[e,t]),n}function cz(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:i=250}=t,s=(typeof i=="number"?i:i.close)||0,[a,f]=T.exports.useState(!1),[d,h]=T.exports.useState("unmounted"),g=az(n,s);return Ke(()=>{a&&!g&&h("unmounted")},[a,g]),Ke(()=>{if(!!r)if(n){h("initial");const y=requestAnimationFrame(()=>{h("open")});return()=>{cancelAnimationFrame(y)}}else f(!0),h("close")},[n,r]),{isMounted:g,status:d}}function vv(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:i,common:l,duration:s=250}=t,a=e.placement,f=a.split("-")[0],d=T.exports.useMemo(()=>({side:f,placement:a}),[f,a]),h=typeof s=="number",g=(h?s:s.open)||0,y=(h?s:s.close)||0,[m,w]=T.exports.useState(()=>({...hl(l,d),...hl(n,d)})),{isMounted:E,status:A}=cz(e,{duration:s}),v=En(n),S=En(r),_=En(i),P=En(l);return Ke(()=>{const D=hl(v.current,d),R=hl(_.current,d),F=hl(P.current,d),z=hl(S.current,d)||Object.keys(D).reduce((q,K)=>(q[K]="",q),{});if(A==="initial"&&w(q=>({transitionProperty:q.transitionProperty,...F,...D})),A==="open"&&w({transitionProperty:Object.keys(z).map(ow).join(","),transitionDuration:g+"ms",...F,...z}),A==="close"){const q=R||D;w({transitionProperty:Object.keys(q).map(ow).join(","),transitionDuration:y+"ms",...F,...q})}},[y,_,v,S,P,g,A,d]),{isMounted:E,styles:m}}function fz(e,t){var n;const{open:r,dataRef:i}=e,{listRef:l,activeIndex:s,onMatch:a,onTypingChange:f,enabled:d=!0,findMatch:h=null,resetMs:g=750,ignoreKeys:y=[],selectedIndex:m=null}=t,w=T.exports.useRef(),E=T.exports.useRef(""),A=T.exports.useRef((n=m??s)!=null?n:-1),v=T.exports.useRef(null),S=Ji(a),_=Ji(f),P=En(h),D=En(y);return Ke(()=>{r&&(clearTimeout(w.current),v.current=null,E.current="")},[r]),Ke(()=>{if(r&&E.current===""){var R;A.current=(R=m??s)!=null?R:-1}},[r,m,s]),T.exports.useMemo(()=>{if(!d)return{};function R(q){q?i.current.typing||(i.current.typing=q,_(q)):i.current.typing&&(i.current.typing=q,_(q))}function F(q,K,B){const X=P.current?P.current(K,B):K.find($=>$?.toLocaleLowerCase().indexOf(B.toLocaleLowerCase())===0);return X?q.indexOf(X):-1}function z(q){const K=l.current;if(E.current.length>0&&E.current[0]!==" "&&(F(K,K,E.current)===-1?R(!1):q.key===" "&&Ht(q)),K==null||D.current.includes(q.key)||q.key.length!==1||q.ctrlKey||q.metaKey||q.altKey)return;r&&q.key!==" "&&(Ht(q),R(!0)),K.every(H=>{var ie,oe;return H?((ie=H[0])==null?void 0:ie.toLocaleLowerCase())!==((oe=H[1])==null?void 0:oe.toLocaleLowerCase()):!0})&&E.current===q.key&&(E.current="",A.current=v.current),E.current+=q.key,clearTimeout(w.current),w.current=setTimeout(()=>{E.current="",A.current=v.current,R(!1)},g);const X=A.current,$=F(K,[...K.slice((X||0)+1),...K.slice(0,(X||0)+1)],E.current);$!==-1?(S($),v.current=$):q.key!==" "&&(E.current="",R(!1))}return{reference:{onKeyDown:z},floating:{onKeyDown:z,onKeyUp(q){q.key===" "&&R(!1)}}}},[d,r,i,l,g,D,P,S,_])}function lw(e,t){const[n,r]=e;let i=!1;const l=t.length;for(let s=0,a=l-1;s=r!=g>=r&&n<=(h-f)*(r-d)/(g-d)+f&&(i=!i)}return i}function dz(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function pz(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let i,l=!1,s=null,a=null,f=performance.now();function d(g,y){const m=performance.now(),w=m-f;if(s===null||a===null||w===0)return s=g,a=y,f=m,null;const E=g-s,A=y-a,S=Math.sqrt(E*E+A*A)/w;return s=g,a=y,f=m,S}const h=g=>{let{x:y,y:m,placement:w,elements:E,onClose:A,nodeId:v,tree:S}=g;return function(P){function D(){clearTimeout(i),A()}if(clearTimeout(i),!E.domReference||!E.floating||w==null||y==null||m==null)return;const{clientX:R,clientY:F}=P,z=[R,F],q=sv(P),K=P.type==="mouseleave",B=Lt(E.floating,q),X=Lt(E.domReference,q),$=E.domReference.getBoundingClientRect(),H=E.floating.getBoundingClientRect(),ie=w.split("-")[0],oe=y>H.right-H.width/2,ue=m>H.bottom-H.height/2,U=dz(z,$),J=H.width>$.width,ee=H.height>$.height,b=(J?$:H).left,O=(J?$:H).right,fe=(ee?$:H).top,ve=(ee?$:H).bottom;if(B&&(l=!0,!K))return;if(X&&(l=!1),X&&!K){l=!0;return}if(K&>(P.relatedTarget)&&Lt(E.floating,P.relatedTarget)||S&&Lo(S.nodesRef.current,v).some(Oe=>{let{context:ye}=Oe;return ye?.open}))return;if(ie==="top"&&m>=$.bottom-1||ie==="bottom"&&m<=$.top+1||ie==="left"&&y>=$.right-1||ie==="right"&&y<=$.left+1)return D();let Ae=[];switch(ie){case"top":Ae=[[b,$.top+1],[b,H.bottom-1],[O,H.bottom-1],[O,$.top+1]];break;case"bottom":Ae=[[b,H.top+1],[b,$.bottom-1],[O,$.bottom-1],[O,H.top+1]];break;case"left":Ae=[[H.right-1,ve],[H.right-1,fe],[$.left+1,fe],[$.left+1,ve]];break;case"right":Ae=[[$.right-1,ve],[$.right-1,fe],[H.left+1,fe],[H.left+1,ve]];break}function de(Oe){let[ye,Fe]=Oe;switch(ie){case"top":{const Te=[J?ye+t/2:oe?ye+t*4:ye-t*4,Fe+t+1],Ue=[J?ye-t/2:oe?ye+t*4:ye-t*4,Fe+t+1],$e=[[H.left,oe||J?H.bottom-t:H.top],[H.right,oe?J?H.bottom-t:H.top:H.bottom-t]];return[Te,Ue,...$e]}case"bottom":{const Te=[J?ye+t/2:oe?ye+t*4:ye-t*4,Fe-t],Ue=[J?ye-t/2:oe?ye+t*4:ye-t*4,Fe-t],$e=[[H.left,oe||J?H.top+t:H.bottom],[H.right,oe?J?H.top+t:H.bottom:H.top+t]];return[Te,Ue,...$e]}case"left":{const Te=[ye+t+1,ee?Fe+t/2:ue?Fe+t*4:Fe-t*4],Ue=[ye+t+1,ee?Fe-t/2:ue?Fe+t*4:Fe-t*4];return[...[[ue||ee?H.right-t:H.left,H.top],[ue?ee?H.right-t:H.left:H.right-t,H.bottom]],Te,Ue]}case"right":{const Te=[ye-t,ee?Fe+t/2:ue?Fe+t*4:Fe-t*4],Ue=[ye-t,ee?Fe-t/2:ue?Fe+t*4:Fe-t*4],$e=[[ue||ee?H.left+t:H.right,H.top],[ue?ee?H.left+t:H.right:H.left+t,H.bottom]];return[Te,Ue,...$e]}}}if(!lw([R,F],Ae)){if(l&&!U)return D();if(!K&&r){const Oe=d(P.clientX,P.clientY);if(Oe!==null&&Oe<.1)return D()}lw([R,F],de([y,m]))?!l&&r&&(i=window.setTimeout(D,40)):D()}}};return h.__options={blockPointerEvents:n},h}const hz=({infoVisible:e,setInfoVisible:t})=>{const{refs:n,context:r}=mv({open:e,onOpenChange:t}),i=Fk(r,{outsidePressEvent:"mousedown"}),{isMounted:l,styles:s}=vv(r),{getFloatingProps:a}=zk([i]);return V(bn,{children:l&&V(gv,{children:V(Nk,{lockScroll:!0,className:"useful-controls-dialog-overlay","data-open":e,style:s,children:V(Mk,{context:r,children:we("div",{ref:n.setFloating,...a(),className:"useful-controls-dialog",style:s,children:[we("div",{className:"useful-controls-dialog-title",children:[V("p",{children:ot.ui_usefulcontrols||"Useful controls"}),V("div",{className:"useful-controls-dialog-close",onClick:()=>t(!1),children:V("svg",{xmlns:"http://www.w3.org/2000/svg",height:"1em",viewBox:"0 0 400 528",children:V("path",{d:"M376.6 84.5c11.3-13.6 9.5-33.8-4.1-45.1s-33.8-9.5-45.1 4.1L192 206 56.6 43.5C45.3 29.9 25.1 28.1 11.5 39.4S-3.9 70.9 7.4 84.5L150.3 256 7.4 427.5c-11.3 13.6-9.5 33.8 4.1 45.1s33.8 9.5 45.1-4.1L192 306 327.4 468.5c11.3 13.6 31.5 15.4 45.1 4.1s15.4-31.5 4.1-45.1L233.7 256 376.6 84.5z"})})})]}),we("div",{className:"useful-controls-content-wrapper",children:[we("p",{children:[V("kbd",{children:"RMB"}),V("br",{}),ot.ui_rmb]}),we("p",{children:[V("kbd",{children:"ALT + LMB"}),V("br",{}),ot.ui_alt_lmb]}),we("p",{children:[V("kbd",{children:"CTRL + LMB"}),V("br",{}),ot.ui_ctrl_lmb]}),we("p",{children:[V("kbd",{children:"SHIFT + Drag"}),V("br",{}),ot.ui_shift_drag]}),we("p",{children:[V("kbd",{children:"CTRL + SHIFT + LMB"}),V("br",{}),ot.ui_ctrl_shift_lmb]}),V("div",{style:{textAlign:"right"},children:"🐂"})]})]})})})})})},gz=()=>{const e=yi(b3),t=ru(),[n,r]=T.exports.useState(!1),[,i]=dg(()=>({accept:"SLOT",drop:a=>{a.inventory==="player"&&iv(a.item)}})),[,l]=dg(()=>({accept:"SLOT",drop:a=>{a.inventory==="player"&&ek(a.item)}}));return we(bn,{children:[V(hz,{infoVisible:n,setInfoVisible:r}),V("div",{className:"inventory-control",children:we("div",{className:"inventory-control-wrapper",children:[V("input",{className:"inventory-control-input",type:"number",defaultValue:e,onChange:a=>{a.target.valueAsNumber=isNaN(a.target.valueAsNumber)||a.target.valueAsNumber<0?0:Math.floor(a.target.valueAsNumber),t(y3(a.target.valueAsNumber))},min:0}),V("button",{className:"inventory-control-button",ref:i,children:ot.ui_use||"Use"}),V("button",{className:"inventory-control-button",ref:l,children:ot.ui_give||"Give"}),V("button",{className:"inventory-control-button",onClick:()=>cr("exit"),children:ot.ui_close||"Close"})]})}),V("button",{className:"useful-controls-button",onClick:()=>r(!0),children:V("svg",{xmlns:"http://www.w3.org/2000/svg",height:"2em",viewBox:"0 0 524 524",children:V("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"})})})]})},rh=(e,t,n)=>{let r=e*n,i=t*(1-n);return r+i},Wa=(e,t,n)=>{let r=rh(e[0],t[0],n),i=rh(e[1],t[1],n),l=rh(e[2],t[2],n);return`rgb(${r}, ${i}, ${l})`},Pi={primaryColor:[231,76,60],secondColor:[39,174,96],accentColor:[211,84,0]},yv=({percent:e,durability:t})=>{const n=be.useMemo(()=>t?e<50?Wa(Pi.accentColor,Pi.primaryColor,e/100):Wa(Pi.secondColor,Pi.accentColor,e/100):e>50?Wa(Pi.primaryColor,Pi.accentColor,e/100):Wa(Pi.accentColor,Pi.secondColor,e/50),[t,e]);return V("div",{className:t?"durability-bar":"weight-bar",children:V("div",{style:{visibility:e>0?"visible":"hidden",height:"100%",width:`${e}%`,backgroundColor:n,transition:`background ${.3}s ease, width ${.3}s ease`}})})};function Eg(e,t){return Eg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Eg(e,t)}function xv(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Eg(e,t)}var Se={exports:{}},mz="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",vz=mz,yz=vz;function $k(){}function Bk(){}Bk.resetWarningCache=$k;var xz=function(){function e(r,i,l,s,a,f){if(f!==yz){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:Bk,resetWarningCache:$k};return n.PropTypes=n,n};Se.exports=xz();function wz(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function Sz(e,t){e.classList?e.classList.add(t):wz(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function uw(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ez(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=uw(e.className,t):e.setAttribute("class",uw(e.className&&e.className.baseVal||"",t))}const sw={disabled:!1},Jc=be.createContext(null);var Uk=function(t){return t.scrollTop},zu="unmounted",ko="exited",_o="entering",ml="entered",Cg="exiting",wi=function(e){xv(t,e);function t(r,i){var l;l=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,f;return l.appearStatus=null,r.in?a?(f=ko,l.appearStatus=_o):f=ml:r.unmountOnExit||r.mountOnEnter?f=zu:f=ko,l.state={status:f},l.nextCallback=null,l}t.getDerivedStateFromProps=function(i,l){var s=i.in;return s&&l.status===zu?{status:ko}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var l=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==_o&&s!==ml&&(l=_o):(s===_o||s===ml)&&(l=Cg)}this.updateStatus(!1,l)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,l,s,a;return l=s=a=i,i!=null&&typeof i!="number"&&(l=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:l,enter:s,appear:a}},n.updateStatus=function(i,l){if(i===void 0&&(i=!1),l!==null)if(this.cancelNextCallback(),l===_o){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:Ba.findDOMNode(this);s&&Uk(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ko&&this.setState({status:zu})},n.performEnter=function(i){var l=this,s=this.props.enter,a=this.context?this.context.isMounting:i,f=this.props.nodeRef?[a]:[Ba.findDOMNode(this),a],d=f[0],h=f[1],g=this.getTimeouts(),y=a?g.appear:g.enter;if(!i&&!s||sw.disabled){this.safeSetState({status:ml},function(){l.props.onEntered(d)});return}this.props.onEnter(d,h),this.safeSetState({status:_o},function(){l.props.onEntering(d,h),l.onTransitionEnd(y,function(){l.safeSetState({status:ml},function(){l.props.onEntered(d,h)})})})},n.performExit=function(){var i=this,l=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:Ba.findDOMNode(this);if(!l||sw.disabled){this.safeSetState({status:ko},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:Cg},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:ko},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,l){l=this.setNextCallback(l),this.setState(i,l)},n.setNextCallback=function(i){var l=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,l.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,l){this.setNextCallback(l);var s=this.props.nodeRef?this.props.nodeRef.current:Ba.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var f=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=f[0],h=f[1];this.props.addEndListener(d,h)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===zu)return null;var l=this.props,s=l.children;l.in,l.mountOnEnter,l.unmountOnExit,l.appear,l.enter,l.exit,l.timeout,l.addEndListener,l.onEnter,l.onEntering,l.onEntered,l.onExit,l.onExiting,l.onExited,l.nodeRef;var a=Am(l,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return be.createElement(Jc.Provider,{value:null},typeof s=="function"?s(i,a):be.cloneElement(be.Children.only(s),a))},t}(be.Component);wi.contextType=Jc;wi.propTypes={};function gl(){}wi.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:gl,onEntering:gl,onEntered:gl,onExit:gl,onExiting:gl,onExited:gl};wi.UNMOUNTED=zu;wi.EXITED=ko;wi.ENTERING=_o;wi.ENTERED=ml;wi.EXITING=Cg;const Cz=wi;var kz=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Sz(t,r)})},ih=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Ez(t,r)})},wv=function(e){xv(t,e);function t(){for(var r,i=arguments.length,l=new Array(i),s=0;s{const t=be.useRef(null);return V(Hk,{nodeRef:t,in:e.in,timeout:200,classNames:"transition-slide-up",unmountOnExit:!0,children:be.cloneElement(e.children,{ref:t})})},Dz=()=>{const[e,t]=T.exports.useState(!1),n=yi(YC).items.slice(0,5),[r,i]=T.exports.useState();return Br("toggleHotbar",()=>{e?t(!1):(r&&clearTimeout(r),t(!0),i(setTimeout(()=>t(!1),3e3)))}),V(Az,{in:e,children:V("div",{className:"hotbar-container",children:n.map(l=>V("div",{className:"hotbar-item-slot",style:{backgroundImage:`url(${l?.name?zl(l):"none"}`},children:wn(l)&&we("div",{className:"item-slot-wrapper",children:[we("div",{className:"hotbar-slot-header-wrapper",children:[V("div",{className:"inventory-slot-number",children:l.slot}),we("div",{className:"item-slot-info-wrapper",children:[V("p",{children:l.weight>0?l.weight>=1e3?`${(l.weight/1e3).toLocaleString("en-us",{minimumFractionDigits:2})}kg `:`${l.weight.toLocaleString("en-us",{minimumFractionDigits:0})}g `:""}),V("p",{children:l.count?l.count.toLocaleString("en-us")+"x":""})]})]}),we("div",{children:[l?.durability!==void 0&&V(yv,{percent:l.durability,durability:!0}),V("div",{className:"inventory-slot-label-box",children:V("div",{className:"inventory-slot-label-text",children:l.metadata?.label?l.metadata.label:ct[l.name]?.label||l.name})})]})]})},`hotbar-${l.slot}`))})})},Lz=["Escape"],Mz=e=>{const t=T.exports.useRef(KC),n=ru();T.exports.useEffect(()=>{t.current=e},[e]),T.exports.useEffect(()=>{const r=i=>{Lz.includes(i.code)&&(t.current(!1),n(Xu()),n(JC()),cr("exit"))};return window.addEventListener("keyup",r),()=>window.removeEventListener("keyup",r)},[])},Nz=Zm("inventory/validateMove",async(e,{rejectWithValue:t,dispatch:n})=>{try{const r=await cr("swapItems",e);if(r===!1)return t(r);typeof r=="number"&&n(k3(r))}catch{return t(!1)}}),kg=(e,t)=>{const{inventory:n}=Mn.getState(),{sourceInventory:r,targetInventory:i}=Wf(n,e.inventory,t?.inventory),l=r.items[e.item.slot-1],s=ct[l.name];if(s===void 0)return console.error(`${l.name} item data undefined!`);if(l.metadata?.container!==void 0){if(i.type===en.CONTAINER)return console.log(`Cannot store container ${l.name} inside another container`);if(n.rightInventory.id===l.metadata.container)return console.log(`Cannot move container ${l.name} when opened`)}const a=t?i.items[t.item.slot-1]:a3(l,s,i.items);if(a===void 0)return console.error("Target slot undefined!");if(a.metadata?.container!==void 0&&n.rightInventory.id===a.metadata.container)return console.log(`Cannot swap item ${l.name} with container ${a.name} when opened`);const f=n.shiftPressed&&l.count>1&&r.type!=="shop"?Math.floor(l.count/2):n.itemAmount===0||n.itemAmount>l.count?l.count:n.itemAmount,d={fromSlot:l,toSlot:a,fromType:r.type,toType:i.type,count:f};Mn.dispatch(Nz({...d,fromSlot:l.slot,toSlot:a.slot})),wn(a,!0)?s.stack&&s3(l,a)?Mn.dispatch(E3({...d,toSlot:a})):Mn.dispatch(w3({...d,toSlot:a})):Mn.dispatch(S3(d))},Fz=Zm("inventory/buyItem",async(e,{rejectWithValue:t})=>{try{const n=await cr("buyItem",e);if(n===!1)return t(n)}catch{return t(!1)}}),zz=(e,t)=>{const{inventory:n}=Mn.getState(),r=n.rightInventory,i=n.leftInventory,l=r.items[e.item.slot-1];if(!wn(l))throw new Error(`Item ${l.slot} name === undefined`);if(l.count===0)return;if(ct[l.name]===void 0)return console.error(`Item ${l.name} data undefined!`);const a=i.items[t.item.slot-1];if(a===void 0)return console.error("Target slot undefined");const f=n.itemAmount!==0?l.count&&n.itemAmount>l.count?l.count:n.itemAmount:1,d={fromSlot:l,toSlot:a,fromType:r.type,toType:i.type,count:f};Mn.dispatch(Fz({...d,fromSlot:l.slot,toSlot:a.slot}))},$z=Zm("inventory/craftItem",async(e,{rejectWithValue:t})=>{try{const n=await cr("craftItem",e);if(n===!1)return t(n)}catch{return t(!1)}}),Bz=(e,t)=>{const{inventory:n}=Mn.getState(),r=n.rightInventory,i=n.leftInventory,l=r.items[e.item.slot-1];if(!wn(l))throw new Error(`Item ${l.slot} name === undefined`);if(l.count===0)return;if(ct[l.name]===void 0)return console.error(`Item ${l.name} data undefined!`);const a=i.items[t.item.slot-1];if(a===void 0)return console.error("Target slot undefined");const f=n.itemAmount===0?1:n.itemAmount,d={fromSlot:l,toSlot:a,fromType:r.type,toType:i.type,count:f};Mn.dispatch($z({...d,fromSlot:l.slot,toSlot:a.slot}))},Uz=({item:e,inventoryId:t,inventoryType:n,inventoryGroups:r},i)=>{const l=vi(),s=ru(),a=T.exports.useRef(null),f=be.useCallback(()=>Fx(e,{type:n,groups:r})&&zx(e,n),[e,n,r]),[{isDragging:d},h]=oF(()=>({type:"SLOT",collect:v=>({isDragging:v.isDragging()}),item:()=>wn(e,n!==en.SHOP)?{inventory:n,item:{name:e.name,slot:e.slot},image:e?.name&&`url(${zl(e)||"none"}`}:null,canDrag:f}),[n,e]),[{isOver:g},y]=dg(()=>({accept:"SLOT",collect:v=>({isOver:v.isOver()}),drop:v=>{switch(s(Xu()),v.inventory){case en.SHOP:zz(v,{inventory:n,item:{slot:e.slot}});break;case en.CRAFTING:Bz(v,{inventory:n,item:{slot:e.slot}});break;default:kg(v,{inventory:n,item:{slot:e.slot}});break}},canDrop:v=>(v.item.slot!==e.slot||v.inventory!==n)&&n!==en.SHOP&&n!==en.CRAFTING}),[n,e]);Br("refreshSlots",v=>{!d&&!v.items||!Array.isArray(v.items)||!v.items.find(_=>_.item.slot===e.slot&&_.inventory===t)||l.dispatch({type:"dnd-core/END_DRAG"})});const m=v=>h(y(v)),w=v=>{v.preventDefault(),!(n!=="player"||!wn(e))&&s(A3({item:e,coords:{x:v.clientX,y:v.clientY}}))},E=v=>{s(Xu()),a.current&&clearTimeout(a.current),v.ctrlKey&&wn(e)&&n!=="shop"&&n!=="crafting"?kg({item:e,inventory:n}):v.altKey&&wn(e)&&n==="player"&&iv(e)},A=fv([m,i]);return V("div",{ref:A,onContextMenu:w,onClick:E,className:"inventory-slot",style:{filter:!Fx(e,{type:n,groups:r})||!zx(e,n)?"brightness(80%) grayscale(100%)":void 0,opacity:d?.4:1,backgroundImage:`url(${e?.name?zl(e):"none"}`,border:g?"1px dashed rgba(255,255,255,0.4)":""},children:wn(e)&&we("div",{className:"item-slot-wrapper",onMouseEnter:()=>{a.current=setTimeout(()=>{s(T3({item:e,inventoryType:n}))},500)},onMouseLeave:()=>{s(Xu()),a.current&&(clearTimeout(a.current),a.current=null)},children:[we("div",{className:n==="player"&&e.slot<=5?"item-hotslot-header-wrapper":"item-slot-header-wrapper",children:[n==="player"&&e.slot<=5&&V("div",{className:"inventory-slot-number",children:e.slot}),we("div",{className:"item-slot-info-wrapper",children:[V("p",{children:e.weight>0?e.weight>=1e3?`${(e.weight/1e3).toLocaleString("en-us",{minimumFractionDigits:2})}kg `:`${e.weight.toLocaleString("en-us",{minimumFractionDigits:0})}g `:""}),V("p",{children:e.count?e.count.toLocaleString("en-us")+"x":""})]})]}),we("div",{children:[n!=="shop"&&e?.durability!==void 0&&V(yv,{percent:e.durability,durability:!0}),n==="shop"&&e?.price!==void 0&&V(bn,{children:e?.currency!=="money"&&e.currency!=="black_money"&&e.price>0&&e.currency?we("div",{className:"item-slot-currency-wrapper",children:[V("img",{src:e.currency?zl(e.currency):"none",alt:"item-image",style:{imageRendering:"-webkit-optimize-contrast",height:"auto",width:"2vh",backfaceVisibility:"hidden",transform:"translateZ(0)"}}),V("p",{children:e.price.toLocaleString("en-us")})]}):V(bn,{children:e.price>0&&V("div",{className:"item-slot-price-wrapper",style:{color:e.currency==="money"||!e.currency?"#2ECC71":"#E74C3C"},children:we("p",{children:[ot.$||"$",e.price.toLocaleString("en-us")]})})})}),V("div",{className:"inventory-slot-label-box",children:V("div",{className:"inventory-slot-label-text",children:e.metadata?.label?e.metadata.label:ct[e.name]?.label||e.name})})]})]})})},Hz=be.memo(be.forwardRef(Uz));function jz(e){const[t,n]=T.exports.useState(null),r=T.exports.useRef(null);return{ref:T.exports.useCallback(l=>{if(r.current&&(r.current.disconnect(),r.current=null),l===null){n(null);return}r.current=new IntersectionObserver(([s])=>{n(s)},e),r.current.observe(l)},[e?.rootMargin,e?.root,e?.threshold]),entry:t}}const aw=30,jk=({inventory:e})=>{const t=be.useMemo(()=>e.maxWeight!==void 0?Math.floor(c3(e.items)*1e3)/1e3:0,[e.maxWeight,e.items]),[n,r]=be.useState(0),i=T.exports.useRef(null),{ref:l,entry:s}=jz({threshold:.5}),a=yi(f=>f.inventory.isBusy);return be.useEffect(()=>{s&&s.isIntersecting&&r(f=>++f)},[s]),V(bn,{children:we("div",{className:"inventory-grid-wrapper",style:{pointerEvents:a?"none":"auto"},children:[we("div",{children:[we("div",{className:"inventory-grid-header-wrapper",children:[V("p",{children:e.label}),e.maxWeight&&we("p",{children:[t/1e3,"/",e.maxWeight/1e3,"kg"]})]}),V(yv,{percent:e.maxWeight?t/e.maxWeight*100:0})]}),V("div",{className:"inventory-grid-container",ref:i,children:V(bn,{children:e.items.slice(0,(n+1)*aw).map((f,d)=>V(Hz,{item:f,ref:d===(n+1)*aw-1?l:null,inventoryType:e.type,inventoryGroups:e.groups,inventoryId:e.id},`${e.type}-${e.id}-${f.slot}`))})})]})})},Wz=()=>{const e=yi(_3);return V(jk,{inventory:e})},Vz=()=>{const e=yi(YC);return V(jk,{inventory:e})},cw=["http","https","mailto","tel"];function qz(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let i=-1;for(;++ii||(i=t.indexOf("#"),i!==-1&&r>i)?t:"javascript:void(0)"}var Wk=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)};function es(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fw(e.position):"start"in e||"end"in e?fw(e):"line"in e||"column"in e?_g(e):""}function _g(e){return dw(e&&e.line)+":"+dw(e&&e.column)}function fw(e){return _g(e&&e.start)+"-"+_g(e&&e.end)}function dw(e){return e&&typeof e=="number"?e:1}class gr extends Error{constructor(t,n,r){const i=[null,null];let l={start:{line:null,column:null},end:{line:null,column:null}};if(super(),typeof n=="string"&&(r=n,n=void 0),typeof r=="string"){const s=r.indexOf(":");s===-1?i[1]=r:(i[0]=r.slice(0,s),i[1]=r.slice(s+1))}n&&("type"in n||"position"in n?n.position&&(l=n.position):"start"in n||"end"in n?l=n:("line"in n||"column"in n)&&(l.start=n)),this.name=es(n)||"1:1",this.message=typeof t=="object"?t.message:t,this.stack="",typeof t=="object"&&t.stack&&(this.stack=t.stack),this.reason=this.message,this.fatal,this.line=l.start.line,this.column=l.start.column,this.position=l,this.source=i[0],this.ruleId=i[1],this.file,this.actual,this.expected,this.url,this.note}}gr.prototype.file="";gr.prototype.name="";gr.prototype.reason="";gr.prototype.message="";gr.prototype.stack="";gr.prototype.fatal=null;gr.prototype.column=null;gr.prototype.line=null;gr.prototype.source=null;gr.prototype.ruleId=null;gr.prototype.position=null;const zr={basename:Gz,dirname:Kz,extname:Qz,join:Yz,sep:"/"};function Gz(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ds(e);let n=0,r=-1,i=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.charCodeAt(i)===47){if(l){n=i+1;break}}else r<0&&(l=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let s=-1,a=t.length-1;for(;i--;)if(e.charCodeAt(i)===47){if(l){n=i+1;break}}else s<0&&(l=!0,s=i+1),a>-1&&(e.charCodeAt(i)===t.charCodeAt(a--)?a<0&&(r=i):(a=-1,r=s));return n===r?r=s:r<0&&(r=e.length),e.slice(n,r)}function Kz(e){if(Ds(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.charCodeAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.charCodeAt(0)===47?"/":".":t===1&&e.charCodeAt(0)===47?"//":e.slice(0,t)}function Qz(e){Ds(e);let t=e.length,n=-1,r=0,i=-1,l=0,s;for(;t--;){const a=e.charCodeAt(t);if(a===47){if(s){r=t+1;break}continue}n<0&&(s=!0,n=t+1),a===46?i<0?i=t:l!==1&&(l=1):i>-1&&(l=-1)}return i<0||n<0||l===0||l===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function Yz(...e){let t=-1,n;for(;++t0&&e.charCodeAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Zz(e,t){let n="",r=0,i=-1,l=0,s=-1,a,f;for(;++s<=e.length;){if(s2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),i=s,l=0;continue}}else if(n.length>0){n="",r=0,i=s,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,l=0}else a===46&&l>-1?l++:l=-1}return n}function Ds(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Jz={cwd:e6};function e6(){return"/"}function bg(e){return e!==null&&typeof e=="object"&&e.href&&e.origin}function t6(e){if(typeof e=="string")e=new URL(e);else if(!bg(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return n6(e)}function n6(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n"u"||sc.call(t,i)},xw=function(t,n){gw&&n.name==="__proto__"?gw(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},ww=function(t,n){if(n==="__proto__")if(sc.call(t,n)){if(mw)return mw(t,n).value}else return;return t[n]},Sw=function e(){var t,n,r,i,l,s,a=arguments[0],f=1,d=arguments.length,h=!1;for(typeof a=="boolean"&&(h=a,a=arguments[1]||{},f=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});fs.length;let f;a&&s.push(i);try{f=e.apply(this,s)}catch(d){const h=d;if(a&&n)throw h;return i(h)}a||(f instanceof Promise?f.then(l,i):f instanceof Error?i(f):l(f))}function i(s,...a){n||(n=!0,t(s,...a))}function l(s){i(null,s)}}const o6=Kk().freeze(),Gk={}.hasOwnProperty;function Kk(){const e=r6(),t=[];let n={},r,i=-1;return l.data=s,l.Parser=void 0,l.Compiler=void 0,l.freeze=a,l.attachers=t,l.use=f,l.parse=d,l.stringify=h,l.run=g,l.runSync=y,l.process=m,l.processSync=w,l;function l(){const E=Kk();let A=-1;for(;++A{if(R||!F||!z)D(R);else{const q=l.stringify(F,z);q==null||(s6(q)?z.value=q:z.result=q),D(R,z)}});function D(R,F){R||!F?_(R):S?S(F):A(null,F)}}}function w(E){let A;l.freeze(),sh("processSync",l.Parser),ah("processSync",l.Compiler);const v=Au(E);return l.process(v,S),kw("processSync","process",A),v;function S(_){A=!0,hw(_)}}}function Ew(e,t){return typeof e=="function"&&e.prototype&&(l6(e.prototype)||t in e.prototype)}function l6(e){let t;for(t in e)if(Gk.call(e,t))return!0;return!1}function sh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Parser`")}function ah(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `Compiler`")}function ch(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Cw(e){if(!Og(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function kw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Au(e){return u6(e)?e:new Vk(e)}function u6(e){return Boolean(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function s6(e){return typeof e=="string"||Wk(e)}function a6(e,t){var{includeImageAlt:n=!0}=t||{};return Qk(e,n)}function Qk(e,t){return e&&typeof e=="object"&&(e.value||(t?e.alt:"")||"children"in e&&_w(e.children,t)||Array.isArray(e)&&_w(e,t))||""}function _w(e,t){for(var n=[],r=-1;++ri?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)s=Array.from(r),s.unshift(t,n),[].splice.apply(e,s);else for(n&&[].splice.apply(e,[t,n]);l0?(Vr(e,e.length,0,t),e):t}const bw={}.hasOwnProperty;function c6(e){const t={};let n=-1;for(;++ns))return;const F=t.events.length;let z=F,q,K;for(;z--;)if(t.events[z][0]==="exit"&&t.events[z][1].type==="chunkFlow"){if(q){K=t.events[z][1].end;break}q=!0}for(v(r),R=F;R_;){const D=n[P];t.containerState=D[1],D[0].exit.call(t,e)}n.length=_}function S(){i.write([null]),l=void 0,i=void 0,t.containerState._closeFlow=void 0}}function E6(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Tw(e){if(e===null||fr(e)||m6(e))return 1;if(v6(e))return 2}function Cv(e,t,n){const r=[];let i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g=Object.assign({},e[r][1].end),y=Object.assign({},e[n][1].start);Rw(g,-f),Rw(y,f),s={type:f>1?"strongSequence":"emphasisSequence",start:g,end:Object.assign({},e[r][1].end)},a={type:f>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:y},l={type:f>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:f>1?"strong":"emphasis",start:Object.assign({},s.start),end:Object.assign({},a.end)},e[r][1].end=Object.assign({},s.start),e[n][1].start=Object.assign({},a.end),d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=ur(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=ur(d,[["enter",i,t],["enter",s,t],["exit",s,t],["enter",l,t]]),d=ur(d,Cv(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=ur(d,[["exit",l,t],["enter",a,t],["exit",a,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=ur(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Vr(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n=4?s(d):n(d)}function s(d){return d===null?f(d):Ee(d)?e.attempt(L6,s,f)(d):(e.enter("codeFlowValue"),a(d))}function a(d){return d===null||Ee(d)?(e.exit("codeFlowValue"),s(d)):(e.consume(d),a)}function f(d){return e.exit("codeIndented"),t(d)}}function N6(e,t,n){const r=this;return i;function i(s){return r.parser.lazy[r.now().line]?n(s):Ee(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):Je(e,l,"linePrefix",4+1)(s)}function l(s){const a=r.events[r.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?t(s):Ee(s)?i(s):n(s)}}const F6={name:"codeText",tokenize:B6,resolve:z6,previous:$6};function z6(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=4?t(s):e.interrupt(r.parser.constructs.flow,n,t)(s)}}function e_(e,t,n,r,i,l,s,a,f){const d=f||Number.POSITIVE_INFINITY;let h=0;return g;function g(v){return v===60?(e.enter(r),e.enter(i),e.enter(l),e.consume(v),e.exit(l),y):v===null||v===41||Tg(v)?n(v):(e.enter(r),e.enter(s),e.enter(a),e.enter("chunkString",{contentType:"string"}),E(v))}function y(v){return v===62?(e.enter(l),e.consume(v),e.exit(l),e.exit(i),e.exit(r),t):(e.enter(a),e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===62?(e.exit("chunkString"),e.exit(a),y(v)):v===null||v===60||Ee(v)?n(v):(e.consume(v),v===92?w:m)}function w(v){return v===60||v===62||v===92?(e.consume(v),m):m(v)}function E(v){return v===40?++h>d?n(v):(e.consume(v),E):v===41?h--?(e.consume(v),E):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(v)):v===null||fr(v)?h?n(v):(e.exit("chunkString"),e.exit(a),e.exit(s),e.exit(r),t(v)):Tg(v)?n(v):(e.consume(v),v===92?A:E)}function A(v){return v===40||v===41||v===92?(e.consume(v),E):E(v)}}function t_(e,t,n,r,i,l){const s=this;let a=0,f;return d;function d(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(l),h}function h(m){return m===null||m===91||m===93&&!f||m===94&&!a&&"_hiddenFootnoteSupport"in s.parser.constructs||a>999?n(m):m===93?(e.exit(l),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):Ee(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),g(m))}function g(m){return m===null||m===91||m===93||Ee(m)||a++>999?(e.exit("chunkString"),h(m)):(e.consume(m),f=f||!bt(m),m===92?y:g)}function y(m){return m===91||m===92||m===93?(e.consume(m),a++,g):g(m)}}function n_(e,t,n,r,i,l){let s;return a;function a(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),s=y===40?41:y,f}function f(y){return y===s?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):(e.enter(l),d(y))}function d(y){return y===s?(e.exit(l),f(s)):y===null?n(y):Ee(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),Je(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(y))}function h(y){return y===s||y===null||Ee(y)?(e.exit("chunkString"),d(y)):(e.consume(y),y===92?g:h)}function g(y){return y===s||y===92?(e.consume(y),h):h(y)}}function ts(e,t){let n;return r;function r(i){return Ee(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):bt(i)?Je(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}function Bl(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const G6={name:"definition",tokenize:Q6},K6={tokenize:Y6,partial:!0};function Q6(e,t,n){const r=this;let i;return l;function l(f){return e.enter("definition"),t_.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=Bl(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),ts(e,e_(e,e.attempt(K6,Je(e,a,"whitespace"),Je(e,a,"whitespace")),n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString"))):n(f)}function a(f){return f===null||Ee(f)?(e.exit("definition"),r.parser.defined.includes(i)||r.parser.defined.push(i),t(f)):n(f)}}function Y6(e,t,n){return r;function r(s){return fr(s)?ts(e,i)(s):n(s)}function i(s){return s===34||s===39||s===40?n_(e,Je(e,l,"whitespace"),n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s):n(s)}function l(s){return s===null||Ee(s)?t(s):n(s)}}const X6={name:"hardBreakEscape",tokenize:Z6};function Z6(e,t,n){return r;function r(l){return e.enter("hardBreakEscape"),e.enter("escapeMarker"),e.consume(l),i}function i(l){return Ee(l)?(e.exit("escapeMarker"),e.exit("hardBreakEscape"),t(l)):n(l)}}const J6={name:"headingAtx",tokenize:t5,resolve:e5};function e5(e,t){let n=e.length-2,r=3,i,l;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},l={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Vr(e,r,n-r+1,[["enter",i,t],["enter",l,t],["exit",l,t],["exit",i,t]])),e}function t5(e,t,n){const r=this;let i=0;return l;function l(h){return e.enter("atxHeading"),e.enter("atxHeadingSequence"),s(h)}function s(h){return h===35&&i++<6?(e.consume(h),s):h===null||fr(h)?(e.exit("atxHeadingSequence"),r.interrupt?t(h):a(h)):n(h)}function a(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||Ee(h)?(e.exit("atxHeading"),t(h)):bt(h)?Je(e,a,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),a(h))}function d(h){return h===null||h===35||fr(h)?(e.exit("atxHeadingText"),a(h)):(e.consume(h),d)}}const n5=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Dw=["pre","script","style","textarea"],r5={name:"htmlFlow",tokenize:l5,resolveTo:o5,concrete:!0},i5={tokenize:u5,partial:!0};function o5(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function l5(e,t,n){const r=this;let i,l,s,a,f;return d;function d(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),g):O===47?(e.consume(O),w):O===63?(e.consume(O),i=3,r.interrupt?t:J):Ur(O)?(e.consume(O),s=String.fromCharCode(O),l=!0,E):n(O)}function g(O){return O===45?(e.consume(O),i=2,y):O===91?(e.consume(O),i=5,s="CDATA[",a=0,m):Ur(O)?(e.consume(O),i=4,r.interrupt?t:J):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:J):n(O)}function m(O){return O===s.charCodeAt(a++)?(e.consume(O),a===s.length?r.interrupt?t:B:m):n(O)}function w(O){return Ur(O)?(e.consume(O),s=String.fromCharCode(O),E):n(O)}function E(O){return O===null||O===47||O===62||fr(O)?O!==47&&l&&Dw.includes(s.toLowerCase())?(i=1,r.interrupt?t(O):B(O)):n5.includes(s.toLowerCase())?(i=6,O===47?(e.consume(O),A):r.interrupt?t(O):B(O)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):l?S(O):v(O)):O===45||Fn(O)?(e.consume(O),s+=String.fromCharCode(O),E):n(O)}function A(O){return O===62?(e.consume(O),r.interrupt?t:B):n(O)}function v(O){return bt(O)?(e.consume(O),v):q(O)}function S(O){return O===47?(e.consume(O),q):O===58||O===95||Ur(O)?(e.consume(O),_):bt(O)?(e.consume(O),S):q(O)}function _(O){return O===45||O===46||O===58||O===95||Fn(O)?(e.consume(O),_):P(O)}function P(O){return O===61?(e.consume(O),D):bt(O)?(e.consume(O),P):S(O)}function D(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),f=O,R):bt(O)?(e.consume(O),D):(f=null,F(O))}function R(O){return O===null||Ee(O)?n(O):O===f?(e.consume(O),z):(e.consume(O),R)}function F(O){return O===null||O===34||O===39||O===60||O===61||O===62||O===96||fr(O)?P(O):(e.consume(O),F)}function z(O){return O===47||O===62||bt(O)?S(O):n(O)}function q(O){return O===62?(e.consume(O),K):n(O)}function K(O){return bt(O)?(e.consume(O),K):O===null||Ee(O)?B(O):n(O)}function B(O){return O===45&&i===2?(e.consume(O),ie):O===60&&i===1?(e.consume(O),oe):O===62&&i===4?(e.consume(O),ee):O===63&&i===3?(e.consume(O),J):O===93&&i===5?(e.consume(O),U):Ee(O)&&(i===6||i===7)?e.check(i5,ee,X)(O):O===null||Ee(O)?X(O):(e.consume(O),B)}function X(O){return e.exit("htmlFlowData"),$(O)}function $(O){return O===null?b(O):Ee(O)?e.attempt({tokenize:H,partial:!0},$,b)(O):(e.enter("htmlFlowData"),B(O))}function H(O,fe,ve){return Ae;function Ae(Oe){return O.enter("lineEnding"),O.consume(Oe),O.exit("lineEnding"),de}function de(Oe){return r.parser.lazy[r.now().line]?ve(Oe):fe(Oe)}}function ie(O){return O===45?(e.consume(O),J):B(O)}function oe(O){return O===47?(e.consume(O),s="",ue):B(O)}function ue(O){return O===62&&Dw.includes(s.toLowerCase())?(e.consume(O),ee):Ur(O)&&s.length<8?(e.consume(O),s+=String.fromCharCode(O),ue):B(O)}function U(O){return O===93?(e.consume(O),J):B(O)}function J(O){return O===62?(e.consume(O),ee):O===45&&i===2?(e.consume(O),J):B(O)}function ee(O){return O===null||Ee(O)?(e.exit("htmlFlowData"),b(O)):(e.consume(O),ee)}function b(O){return e.exit("htmlFlow"),t(O)}}function u5(e,t,n){return r;function r(i){return e.exit("htmlFlowData"),e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),e.attempt(Xf,t,n)}}const s5={name:"htmlText",tokenize:a5};function a5(e,t,n){const r=this;let i,l,s,a;return f;function f(b){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(b),d}function d(b){return b===33?(e.consume(b),h):b===47?(e.consume(b),F):b===63?(e.consume(b),D):Ur(b)?(e.consume(b),K):n(b)}function h(b){return b===45?(e.consume(b),g):b===91?(e.consume(b),l="CDATA[",s=0,A):Ur(b)?(e.consume(b),P):n(b)}function g(b){return b===45?(e.consume(b),y):n(b)}function y(b){return b===null||b===62?n(b):b===45?(e.consume(b),m):w(b)}function m(b){return b===null||b===62?n(b):w(b)}function w(b){return b===null?n(b):b===45?(e.consume(b),E):Ee(b)?(a=w,U(b)):(e.consume(b),w)}function E(b){return b===45?(e.consume(b),ee):w(b)}function A(b){return b===l.charCodeAt(s++)?(e.consume(b),s===l.length?v:A):n(b)}function v(b){return b===null?n(b):b===93?(e.consume(b),S):Ee(b)?(a=v,U(b)):(e.consume(b),v)}function S(b){return b===93?(e.consume(b),_):v(b)}function _(b){return b===62?ee(b):b===93?(e.consume(b),_):v(b)}function P(b){return b===null||b===62?ee(b):Ee(b)?(a=P,U(b)):(e.consume(b),P)}function D(b){return b===null?n(b):b===63?(e.consume(b),R):Ee(b)?(a=D,U(b)):(e.consume(b),D)}function R(b){return b===62?ee(b):D(b)}function F(b){return Ur(b)?(e.consume(b),z):n(b)}function z(b){return b===45||Fn(b)?(e.consume(b),z):q(b)}function q(b){return Ee(b)?(a=q,U(b)):bt(b)?(e.consume(b),q):ee(b)}function K(b){return b===45||Fn(b)?(e.consume(b),K):b===47||b===62||fr(b)?B(b):n(b)}function B(b){return b===47?(e.consume(b),ee):b===58||b===95||Ur(b)?(e.consume(b),X):Ee(b)?(a=B,U(b)):bt(b)?(e.consume(b),B):ee(b)}function X(b){return b===45||b===46||b===58||b===95||Fn(b)?(e.consume(b),X):$(b)}function $(b){return b===61?(e.consume(b),H):Ee(b)?(a=$,U(b)):bt(b)?(e.consume(b),$):B(b)}function H(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),i=b,ie):Ee(b)?(a=H,U(b)):bt(b)?(e.consume(b),H):(e.consume(b),i=void 0,ue)}function ie(b){return b===i?(e.consume(b),oe):b===null?n(b):Ee(b)?(a=ie,U(b)):(e.consume(b),ie)}function oe(b){return b===62||b===47||fr(b)?B(b):n(b)}function ue(b){return b===null||b===34||b===39||b===60||b===61||b===96?n(b):b===62||fr(b)?B(b):(e.consume(b),ue)}function U(b){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Je(e,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function J(b){return e.enter("htmlTextData"),a(b)}function ee(b){return b===62?(e.consume(b),e.exit("htmlTextData"),e.exit("htmlText"),t):n(b)}}const _v={name:"labelEnd",tokenize:g5,resolveTo:h5,resolveAll:p5},c5={tokenize:m5},f5={tokenize:v5},d5={tokenize:y5};function p5(e){let t=-1,n;for(;++t-1&&(s[0]=s[0].slice(r)),l>0&&s.push(e[i].slice(0,l))),s}function H5(e,t){let n=-1;const r=[];let i;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCharCode(n)}const n$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function r$(e){return e.replace(n$,i$)}function i$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),l=i===120||i===88;return o_(n.slice(l?2:1),l?16:10)}return kv(n)||e}const Pg={}.hasOwnProperty,o$=function(e,t,n){return typeof t!="string"&&(n=t,t=void 0),l$(n)(t$(J5(n).document().write(e$()(e,t,!0))))};function l$(e={}){const t=l_({transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:f(Vt),autolinkProtocol:X,autolinkEmail:X,atxHeading:f(ut),blockQuote:f($e),characterEscape:X,characterReference:X,codeFenced:f(We),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:f(We,d),codeText:f(yt,d),codeTextData:X,data:X,codeFlowValue:X,definition:f(qn),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:f(he),hardBreakEscape:f(zt),hardBreakTrailing:f(zt),htmlFlow:f(pn,d),htmlFlowData:X,htmlText:f(pn,d),htmlTextData:X,image:f(Gn),label:d,link:f(Vt),listItem:f(qr),listItemValue:E,listOrdered:f(vr,w),listUnordered:f(vr),paragraph:f(Yo),reference:de,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:f(ut),strong:f(Pr),thematicBreak:f(Qn)},exit:{atxHeading:g(),atxHeadingSequence:z,autolink:g(),autolinkEmail:Ue,autolinkProtocol:Te,blockQuote:g(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:ye,characterReferenceMarkerNumeric:ye,characterReferenceValue:Fe,codeFenced:g(_),codeFencedFence:S,codeFencedFenceInfo:A,codeFencedFenceMeta:v,codeFlowValue:$,codeIndented:g(P),codeText:g(U),codeTextData:$,data:$,definition:g(),definitionDestinationString:F,definitionLabelString:D,definitionTitleString:R,emphasis:g(),hardBreakEscape:g(ie),hardBreakTrailing:g(ie),htmlFlow:g(oe),htmlFlowData:$,htmlText:g(ue),htmlTextData:$,image:g(ee),label:O,labelText:b,lineEnding:H,link:g(J),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:Oe,resourceDestinationString:fe,resourceTitleString:ve,resource:Ae,setextHeading:g(B),setextHeadingLineSequence:K,setextHeadingText:q,strong:g(),thematicBreak:g()}},e.mdastExtensions||[]),n={};return r;function r(W){let re={type:"root",children:[]};const xe=[re],He=[],qt=[],Gr={stack:xe,tokenStack:He,config:t,enter:h,exit:y,buffer:d,resume:m,setData:l,getData:s};let qe=-1;for(;++qe0){const St=He[He.length-1];(St[1]||Nw).call(Gr,void 0,St[0])}for(re.position={start:a(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:a(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe{const r=this.data("settings");return o$(n,Object.assign({},r,e,{extensions:this.data("micromarkExtensions")||[],mdastExtensions:this.data("fromMarkdownExtensions")||[]}))}})}var At=function(e,t,n){var r={type:String(e)};return n==null&&(typeof t=="string"||Array.isArray(t))?n=t:Object.assign(r,t),Array.isArray(n)?r.children=n:n!=null&&(r.value=String(n)),r};const cc={}.hasOwnProperty;function a$(e,t){const n=t.data||{};return"value"in t&&!(cc.call(n,"hName")||cc.call(n,"hProperties")||cc.call(n,"hChildren"))?e.augment(t,At("text",t.value)):e(t,"div",rn(e,t))}function u_(e,t,n){const r=t&&t.type;let i;if(!r)throw new Error("Expected node, got `"+t+"`");return cc.call(e.handlers,r)?i=e.handlers[r]:e.passThrough&&e.passThrough.includes(r)?i=c$:i=e.unknownHandler,(typeof i=="function"?i:a$)(e,t,n)}function c$(e,t){return"children"in t?{...t,children:rn(e,t)}:t}function rn(e,t){const n=[];if("children"in t){const r=t.children;let i=-1;for(;++i":""))+")"})),y;function y(){let m=[],w,E,A;if((!t||i(a,f,d[d.length-1]||null))&&(m=y$(n(a,d)),m[0]===Fw))return m;if(a.children&&m[0]!==m$)for(E=(r?a.children.length:-1)+l,A=d.concat(a);E>-1&&E-1?r.offset:null}}}function x$(e){return!e||!e.position||!e.position.start||!e.position.start.line||!e.position.start.column||!e.position.end||!e.position.end.line||!e.position.end.column}const zw={}.hasOwnProperty;function w$(e){const t=Object.create(null);if(!e||!e.type)throw new Error("mdast-util-definitions expected node");return bv(e,"definition",r=>{const i=$w(r.identifier);i&&!zw.call(t,i)&&(t[i]=r)}),n;function n(r){const i=$w(r);return i&&zw.call(t,i)?t[i]:null}}function $w(e){return String(e||"").toUpperCase()}function iu(e){const t=[];let n=-1,r=0,i=0;for(;++n55295&&l<57344){const a=e.charCodeAt(n+1);l<56320&&a>56319&&a<57344?(s=String.fromCharCode(l,a),i=1):s="�"}else s=String.fromCharCode(l);s&&(t.push(e.slice(r,n),encodeURIComponent(s)),r=n+i+1,s=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ai(e,t){const n=[];let r=-1;for(t&&n.push(At("text",` +`));++r0&&n.push(At("text",` +`)),n}function S$(e){let t=-1;const n=[];for(;++t1?"-"+a:""),dataFootnoteBackref:!0,className:["data-footnote-backref"],ariaLabel:e.footnoteBackLabel},children:[{type:"text",value:"↩"}]};a>1&&g.children.push({type:"element",tagName:"sup",children:[{type:"text",value:String(a)}]}),f.length>0&&f.push({type:"text",value:" "}),f.push(g)}const d=i[i.length-1];if(d&&d.type==="element"&&d.tagName==="p"){const g=d.children[d.children.length-1];g&&g.type==="text"?g.value+=" ":d.children.push({type:"text",value:" "}),d.children.push(...f)}else i.push(...f);const h={type:"element",tagName:"li",properties:{id:e.clobberPrefix+"fn-"+s},children:ai(i,!0)};r.position&&(h.position=r.position),n.push(h)}return n.length===0?null:{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:e.footnoteLabelTagName,properties:{...JSON.parse(JSON.stringify(e.footnoteLabelProperties)),id:"footnote-label"},children:[At("text",e.footnoteLabel)]},{type:"text",value:` +`},{type:"element",tagName:"ol",properties:{},children:ai(n,!0)},{type:"text",value:` +`}]}}function E$(e,t){return e(t,"blockquote",ai(rn(e,t),!0))}function C$(e,t){return[e(t,"br"),At("text",` +`)]}function k$(e,t){const n=t.value?t.value+` +`:"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),i={};r&&(i.className=["language-"+r]);const l=e(t,"code",i,[At("text",n)]);return t.meta&&(l.data={meta:t.meta}),e(t.position,"pre",[l])}function _$(e,t){return e(t,"del",rn(e,t))}function b$(e,t){return e(t,"em",rn(e,t))}function d_(e,t){const n=String(t.identifier),r=iu(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let l;i===-1?(e.footnoteOrder.push(n),e.footnoteCounts[n]=1,l=e.footnoteOrder.length):(e.footnoteCounts[n]++,l=i+1);const s=e.footnoteCounts[n];return e(t,"sup",[e(t.position,"a",{href:"#"+e.clobberPrefix+"fn-"+r,id:e.clobberPrefix+"fnref-"+r+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:"footnote-label"},[At("text",String(l))])])}function O$(e,t){const n=e.footnoteById;let r=1;for(;r in n;)r++;const i=String(r);return n[i]={type:"footnoteDefinition",identifier:i,children:[{type:"paragraph",children:t.children}],position:t.position},d_(e,{type:"footnoteReference",identifier:i,position:t.position})}function I$(e,t){return e(t,"h"+t.depth,rn(e,t))}function T$(e,t){return e.dangerous?e.augment(t,At("raw",t.value)):null}function p_(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return At("text","!["+t.alt+r);const i=rn(e,t),l=i[0];l&&l.type==="text"?l.value="["+l.value:i.unshift(At("text","["));const s=i[i.length-1];return s&&s.type==="text"?s.value+=r:i.push(At("text",r)),i}function R$(e,t){const n=e.definition(t.identifier);if(!n)return p_(e,t);const r={src:iu(n.url||""),alt:t.alt};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"img",r)}function P$(e,t){const n={src:iu(t.url),alt:t.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"img",n)}function A$(e,t){return e(t,"code",[At("text",t.value.replace(/\r?\n|\r/g," "))])}function D$(e,t){const n=e.definition(t.identifier);if(!n)return p_(e,t);const r={href:iu(n.url||"")};return n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"a",r,rn(e,t))}function L$(e,t){const n={href:iu(t.url)};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"a",n,rn(e,t))}function M$(e,t,n){const r=rn(e,t),i=n?N$(n):h_(t),l={},s=[];if(typeof t.checked=="boolean"){let d;r[0]&&r[0].type==="element"&&r[0].tagName==="p"?d=r[0]:(d=e(null,"p",[]),r.unshift(d)),d.children.length>0&&d.children.unshift(At("text"," ")),d.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),l.className=["task-list-item"]}let a=-1;for(;++a1}function F$(e,t){const n={},r=t.ordered?"ol":"ul",i=rn(e,t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return l.push(Hw(t.slice(i),i>0,!1)),l.join("")}function Hw(e,t,n){let r=0,i=e.length;if(t){let l=e.codePointAt(r);for(;l===Bw||l===Uw;)r++,l=e.codePointAt(r)}if(n){let l=e.codePointAt(i-1);for(;l===Bw||l===Uw;)i--,l=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function j$(e,t){return e.augment(t,At("text",H$(String(t.value))))}function W$(e,t){return e(t,"hr")}const V$={blockquote:E$,break:C$,code:k$,delete:_$,emphasis:b$,footnoteReference:d_,footnote:O$,heading:I$,html:T$,imageReference:R$,image:P$,inlineCode:A$,linkReference:D$,link:L$,listItem:M$,list:F$,paragraph:z$,root:$$,strong:B$,table:U$,text:j$,thematicBreak:W$,toml:Va,yaml:Va,definition:Va,footnoteDefinition:Va};function Va(){return null}const q$={}.hasOwnProperty;function G$(e,t){const n=t||{},r=n.allowDangerousHtml||!1,i={};return s.dangerous=r,s.clobberPrefix=n.clobberPrefix===void 0||n.clobberPrefix===null?"user-content-":n.clobberPrefix,s.footnoteLabel=n.footnoteLabel||"Footnotes",s.footnoteLabelTagName=n.footnoteLabelTagName||"h2",s.footnoteLabelProperties=n.footnoteLabelProperties||{className:["sr-only"]},s.footnoteBackLabel=n.footnoteBackLabel||"Back to content",s.definition=w$(e),s.footnoteById=i,s.footnoteOrder=[],s.footnoteCounts={},s.augment=l,s.handlers={...V$,...n.handlers},s.unknownHandler=n.unknownHandler,s.passThrough=n.passThrough,bv(e,"footnoteDefinition",a=>{const f=String(a.identifier).toUpperCase();q$.call(i,f)||(i[f]=a)}),s;function l(a,f){if(a&&"data"in a&&a.data){const d=a.data;d.hName&&(f.type!=="element"&&(f={type:"element",tagName:"",properties:{},children:[]}),f.tagName=d.hName),f.type==="element"&&d.hProperties&&(f.properties={...f.properties,...d.hProperties}),"children"in f&&f.children&&d.hChildren&&(f.children=d.hChildren)}if(a){const d="type"in a?a:{position:a};x$(d)||(f.position={start:a_(d),end:c_(d)})}return f}function s(a,f,d,h){return Array.isArray(d)&&(h=d,d={}),l(a,{type:"element",tagName:f,properties:d||{},children:h||[]})}}function g_(e,t){const n=G$(e,t),r=u_(n,e,null),i=S$(n);return i&&r.children.push(At("text",` +`),i),Array.isArray(r)?{type:"root",children:r}:r}const K$=function(e,t){return e&&"run"in e?Y$(e,t):X$(e||t)},Q$=K$;function Y$(e,t){return(n,r,i)=>{e.run(g_(n,t),r,l=>{i(l)})}}function X$(e){return t=>g_(t,e)}class Ls{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Ls.prototype.property={};Ls.prototype.normal={};Ls.prototype.space=null;function m_(e,t){const n={},r={};let i=-1;for(;++i4&&n.slice(0,4)==="data"&&nB.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(Ww,lB);r="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!Ww.test(l)){let s=l.replace(rB,oB);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}i=Ov}return new i(r,t)}function oB(e){return"-"+e.toLowerCase()}function lB(e){return e.charAt(1).toUpperCase()}const Vw={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},uB=m_([x_,y_,E_,C_,eB],"html"),sB=m_([x_,y_,E_,C_,tB],"svg");function aB(e){if(e.allowedElements&&e.disallowedElements)throw new TypeError("Only one of `allowedElements` and `disallowedElements` should be defined");if(e.allowedElements||e.disallowedElements||e.allowElement)return t=>{bv(t,"element",(n,r,i)=>{const l=i;let s;if(e.allowedElements?s=!e.allowedElements.includes(n.tagName):e.disallowedElements&&(s=e.disallowedElements.includes(n.tagName)),!s&&e.allowElement&&typeof r=="number"&&(s=!e.allowElement(n,r,l)),s&&typeof r=="number")return e.unwrapDisallowed&&n.children?l.children.splice(r,1,...n.children):l.children.splice(r,1),r})}}function cB(e){var t=e&&typeof e=="object"&&e.type==="text"?e.value||"":e;return typeof t=="string"&&t.replace(/[ \t\n\f\r]/g,"")===""}function fB(e){return e.join(" ").trim()}function dB(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var qw=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,pB=/\n/g,hB=/^\s*/,gB=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,mB=/^:\s*/,vB=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yB=/^[;\s]*/,xB=/^\s+|\s+$/g,wB=` +`,Gw="/",Kw="*",bo="",SB="comment",EB="declaration",CB=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(w){var E=w.match(pB);E&&(n+=E.length);var A=w.lastIndexOf(wB);r=~A?w.length-A:r+w.length}function l(){var w={line:n,column:r};return function(E){return E.position=new s(w),d(),E}}function s(w){this.start=w,this.end={line:n,column:r},this.source=t.source}s.prototype.content=e;function a(w){var E=new Error(t.source+":"+n+":"+r+": "+w);if(E.reason=w,E.filename=t.source,E.line=n,E.column=r,E.source=e,!t.silent)throw E}function f(w){var E=w.exec(e);if(!!E){var A=E[0];return i(A),e=e.slice(A.length),E}}function d(){f(hB)}function h(w){var E;for(w=w||[];E=g();)E!==!1&&w.push(E);return w}function g(){var w=l();if(!(Gw!=e.charAt(0)||Kw!=e.charAt(1))){for(var E=2;bo!=e.charAt(E)&&(Kw!=e.charAt(E)||Gw!=e.charAt(E+1));)++E;if(E+=2,bo===e.charAt(E-1))return a("End of comment missing");var A=e.slice(2,E-2);return r+=2,i(A),e=e.slice(E),r+=2,w({type:SB,comment:A})}}function y(){var w=l(),E=f(gB);if(!!E){if(g(),!f(mB))return a("property missing ':'");var A=f(vB),v=w({type:EB,property:Qw(E[0].replace(qw,bo)),value:A?Qw(A[0].replace(qw,bo)):bo});return f(yB),v}}function m(){var w=[];h(w);for(var E;E=y();)E!==!1&&(w.push(E),h(w));return w}return d(),m()};function Qw(e){return e?e.replace(xB,bo):bo}var kB=CB;function _B(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,i=kB(e),l=typeof t=="function",s,a,f=0,d=i.length;f0?be.createElement(y,a,h):be.createElement(y,a)}function TB(e){let t=-1;for(;++t for more info)`),delete qa[l]}const t=o6().use(s$).use(e.remarkPlugins||[]).use(Q$,{...e.remarkRehypeOptions,allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(aB,e),n=new Vk;typeof e.children=="string"?n.value=e.children:e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`);const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let i=be.createElement(be.Fragment,{},k_({options:e,schema:uB,listDepth:0},r));return e.className&&(i=be.createElement("div",{className:e.className},i)),i}Iv.defaultProps={transformLinkUri:qz};Iv.propTypes={children:Se.exports.string,className:Se.exports.string,allowElement:Se.exports.func,allowedElements:Se.exports.arrayOf(Se.exports.string),disallowedElements:Se.exports.arrayOf(Se.exports.string),unwrapDisallowed:Se.exports.bool,remarkPlugins:Se.exports.arrayOf(Se.exports.oneOfType([Se.exports.object,Se.exports.func,Se.exports.arrayOf(Se.exports.oneOfType([Se.exports.bool,Se.exports.string,Se.exports.object,Se.exports.func,Se.exports.arrayOf(Se.exports.any)]))])),rehypePlugins:Se.exports.arrayOf(Se.exports.oneOfType([Se.exports.object,Se.exports.func,Se.exports.arrayOf(Se.exports.oneOfType([Se.exports.bool,Se.exports.string,Se.exports.object,Se.exports.func,Se.exports.arrayOf(Se.exports.any)]))])),sourcePos:Se.exports.bool,rawSourcePos:Se.exports.bool,skipHtml:Se.exports.bool,includeElementIndex:Se.exports.bool,transformLinkUri:Se.exports.oneOfType([Se.exports.func,Se.exports.bool]),linkTarget:Se.exports.oneOfType([Se.exports.func,Se.exports.string]),transformImageUri:Se.exports.func,components:Se.exports.object};const MB=()=>we("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"#ffffff",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",children:[V("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),V("circle",{cx:"12",cy:"12",r:"9"}),V("polyline",{points:"12 7 12 12 15 15"})]}),Xw=()=>V("div",{className:"divider"}),NB=({item:e,inventoryType:t,style:n},r)=>{const i=yi(d=>d.inventory.additionalMetadata),l=T.exports.useMemo(()=>ct[e.name],[e]),s=T.exports.useMemo(()=>e.ingredients?Object.entries(e.ingredients).sort((d,h)=>d[1]-h[1]):null,[e]),a=e.metadata?.description||l?.description,f=l?.ammoName&&ct[l?.ammoName]?.label;return V(bn,{children:l?we("div",{style:{...n},className:"tooltip-wrapper",ref:r,children:[we("div",{className:"tooltip-header-wrapper",children:[V("p",{children:e.metadata?.label||l.label||e.name}),t==="crafting"?we("div",{className:"tooltip-crafting-duration",children:[V(MB,{}),we("p",{children:[(e.duration!==void 0?e.duration:3e3)/1e3,"s"]})]}):V("p",{children:e.metadata?.type})]}),V(Xw,{}),a&&V("div",{className:"tooltip-description",children:V(Iv,{className:"tooltip-markdown",children:a})}),t!=="crafting"?we(bn,{children:[e.durability!==void 0&&we("p",{children:[ot.ui_durability,": ",Math.trunc(e.durability)]}),e.metadata?.ammo!==void 0&&we("p",{children:[ot.ui_ammo,": ",e.metadata.ammo]}),f&&we("p",{children:[ot.ammo_type,": ",f]}),e.metadata?.serial&&we("p",{children:[ot.ui_serial,": ",e.metadata.serial]}),e.metadata?.components&&e.metadata?.components[0]&&we("p",{children:[ot.ui_components,":"," ",(e.metadata?.components).map((d,h,g)=>h+1===g.length?ct[d]?.label:ct[d]?.label+", ")]}),e.metadata?.weapontint&&we("p",{children:[ot.ui_tint,": ",e.metadata.weapontint]}),i.map((d,h)=>V(T.exports.Fragment,{children:e.metadata&&e.metadata[d.metadata]&&we("p",{children:[d.value,": ",e.metadata[d.metadata]]})},`metadata-${h}`))]}):V("div",{className:"tooltip-ingredients",children:s&&s.map(d=>{const[h,g]=[d[0],d[1]];return we("div",{className:"tooltip-ingredient",children:[V("img",{src:h?zl(h):"none",alt:"item-image"}),V("p",{children:g>=1?`${g}x ${ct[h]?.label||h}`:g===0?`${ct[h]?.label||h}`:g<1&&`${g*100}% ${ct[h]?.label||h}`})]},`ingredient-${h}`)})})]}):we("div",{className:"tooltip-wrapper",ref:r,style:n,children:[V("div",{className:"tooltip-header-wrapper",children:V("p",{children:e.name})}),V(Xw,{})]})})},FB=be.forwardRef(NB);function zB(e,t){const[n,r]=T.exports.useState(e);return T.exports.useEffect(()=>{const i=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(i)}},[e,t]),n}const $B=()=>{const e=yi(a=>a.tooltip);zB(e.open,500),be.useState(!1),T.exports.useRef(null),T.exports.useRef(!1);const{refs:t,context:n,floatingStyles:r}=mv({middleware:[fk(),pk(),dk({mainAxis:10,crossAxis:10})],open:e.open,placement:"right-start"}),{isMounted:i,styles:l}=vv(n,{duration:200}),s=({clientX:a,clientY:f})=>{t.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:a,y:f,left:a,top:f,right:a,bottom:f}}})};return be.useEffect(()=>(window.addEventListener("mousemove",s),()=>{window.removeEventListener("mousemove",s)}),[]),V(bn,{children:i&&e.item&&e.inventoryType&&V(gv,{children:V(FB,{ref:t.setFloating,style:{...r,...l},item:e.item,inventoryType:e.inventoryType})})})},BB=e=>{const t=document.createElement("input");t.value=e,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},Mg=T.exports.createContext({getItemProps:()=>({}),activeIndex:null,setActiveIndex:()=>{},setHasFocusInside:()=>{},isOpen:!1}),Zw=T.exports.forwardRef(({children:e,label:t,...n},r)=>{const i=yi(ue=>ue.contextMenu),[l,s]=T.exports.useState(!1),[a,f]=T.exports.useState(!1),[d,h]=T.exports.useState(null),g=T.exports.useRef([]),y=T.exports.useRef([]),m=T.exports.useContext(Mg),w=ao(),E=B4(),A=Ko(),v=_k(),S=A!=null,{floatingStyles:_,refs:P,context:D}=mv({nodeId:E,open:l,onOpenChange:s,placement:S?"right-start":"bottom-start",middleware:[dk({mainAxis:S?0:4,alignmentAxis:S?-4:0}),fk(),pk()],whileElementsMounted:d4}),{isMounted:R,styles:F}=vv(D);T.exports.useEffect(()=>{S||(i.coords&&(P.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:i.coords.x,y:i.coords.y,top:i.coords.y,right:i.coords.x,bottom:i.coords.y,left:i.coords.x}}}),s(!0)),i.coords||s(!1))},[i]);const z=j4(D,{enabled:S,delay:{open:75},handleClose:pz({blockPointerEvents:!0})}),q=ez(D,{event:"mousedown",toggle:!S,ignoreMouse:S}),K=sz(D,{role:"menu"}),B=Fk(D,{bubbles:!0}),X=uz(D,{listRef:g,activeIndex:d,nested:S,onNavigate:h}),$=fz(D,{listRef:y,onMatch:l?h:void 0,activeIndex:d}),{getReferenceProps:H,getFloatingProps:ie,getItemProps:oe}=zk([z,q,K,B,X,$]);return T.exports.useEffect(()=>{if(!w)return;function ue(){s(!1)}function U(J){J.nodeId!==E&&J.parentId===A&&s(!1)}return w.events.on("click",ue),w.events.on("menuopen",U),()=>{w.events.off("click",ue),w.events.off("menuopen",U)}},[w,E,A]),T.exports.useEffect(()=>{l&&w&&w.events.emit("menuopen",{parentId:A,nodeId:E})},[w,l,E,A]),we(U4,{id:E,children:[S&&we("button",{ref:fv([P.setReference,v.ref,r]),tabIndex:S?m.activeIndex===v.index?0:-1:void 0,role:S?"menuitem":void 0,"data-open":l?"":void 0,"data-nested":S?"":void 0,"data-focus-inside":a?"":void 0,className:S?"context-menu-item":"context-menu-list",...H(m.getItemProps({...n,onFocus(ue){n.onFocus?.(ue),f(!1),m.setHasFocusInside(!0)}})),children:[t,S&&V("span",{"aria-hidden":!0,style:{marginLeft:10,fontSize:10},children:"▶"})]}),V(Mg.Provider,{value:{activeIndex:d,setActiveIndex:h,getItemProps:oe,setHasFocusInside:f,isOpen:l},children:V(N4,{elementsRef:g,labelsRef:y,children:R&&V(gv,{children:V(Nk,{lockScroll:!0,children:V(Mk,{context:D,modal:!0,initialFocus:P.floating,children:V("div",{ref:P.setFloating,className:"context-menu-list",style:{..._,...F},...ie(),children:e})})})})})})]})}),Ai=T.exports.forwardRef(({label:e,disabled:t,...n},r)=>{const i=T.exports.useContext(Mg),l=_k({label:t?null:e}),s=ao(),a=l.index===i.activeIndex;return V("button",{...n,ref:fv([l.ref,r]),type:"button",role:"menuitem",className:"context-menu-item",tabIndex:a?0:-1,disabled:t,...i.getItemProps({onClick(f){n.onClick?.(f),s?.events.emit("click")},onFocus(f){n.onFocus?.(f),i.setHasFocusInside(!0)}}),children:e})}),gh=T.exports.forwardRef((e,t)=>Ko()===null?V(H4,{children:V(Zw,{...e,ref:t})}):V(Zw,{...e,ref:t})),UB=()=>{const t=yi(i=>i.contextMenu).item,n=i=>{if(!!t)switch(i&&i.action){case"use":iv({name:t.name,slot:t.slot});break;case"give":ek({name:t.name,slot:t.slot});break;case"drop":wn(t)&&kg({item:t,inventory:"player"});break;case"remove":cr("removeComponent",{component:i?.component,slot:i?.slot});break;case"removeAmmo":cr("removeAmmo",t.slot);break;case"copy":BB(i.serial||"");break;case"custom":cr("useButton",{id:(i?.id||0)+1,slot:t.slot});break}},r=i=>i.reduce((l,s,a)=>{if(s.group){const f=l.findIndex(d=>d.groupName===s.group);f!==-1?l[f].buttons.push({...s,index:a}):l.push({groupName:s.group,buttons:[{...s,index:a}]})}else l.push({groupName:null,buttons:[{...s,index:a}]});return l},[]);return V(bn,{children:we(gh,{children:[V(Ai,{onClick:()=>n({action:"use"}),label:ot.ui_use||"Use"}),V(Ai,{onClick:()=>n({action:"give"}),label:ot.ui_give||"Give"}),V(Ai,{onClick:()=>n({action:"drop"}),label:ot.ui_drop||"Drop"}),t&&t.metadata?.ammo>0&&V(Ai,{onClick:()=>n({action:"removeAmmo"}),label:ot.ui_remove_ammo}),t&&t.metadata?.serial&&V(Ai,{onClick:()=>n({action:"copy",serial:t.metadata?.serial}),label:ot.ui_copy}),t&&t.metadata?.components&&t.metadata?.components.length>0&&V(gh,{label:ot.ui_removeattachments,children:t&&t.metadata?.components.map((i,l)=>V(Ai,{onClick:()=>n({action:"remove",component:i,slot:t.slot}),label:ct[i]?.label||""},l))}),(t&&t.name&&ct[t.name]?.buttons?.length||0)>0&&V(bn,{children:t&&t.name&&r(ct[t.name]?.buttons).map((i,l)=>V(be.Fragment,{children:i.groupName?V(gh,{label:i.groupName,children:i.buttons.map(s=>V(Ai,{onClick:()=>n({action:"custom",id:s.index}),label:s.label},s.index))}):i.buttons.map(s=>V(Ai,{onClick:()=>n({action:"custom",id:s.index}),label:s.label},s.index))},l))})]})})},__=e=>{const t=be.useRef(null);return V(Hk,{in:e.in,nodeRef:t,classNames:"transition-fade",timeout:200,unmountOnExit:!0,children:V("span",{ref:t,children:e.children})})},HB=()=>{const[e,t]=be.useState(!1),n=ru();return Br("setInventoryVisible",t),Br("closeInventory",()=>{t(!1),n(JC()),n(Xu())}),Mz(t),Br("setupInventory",r=>{n(QC(r)),!e&&t(!0)}),Br("refreshSlots",r=>n(C3(r))),Br("displayMetadata",r=>{n(v3(r))}),we(bn,{children:[V(__,{in:e,children:we("div",{className:"inventory-wrapper",children:[V(Vz,{}),V(gz,{}),V(Wz,{}),V($B,{}),V(UB,{})]})}),V(Dz,{})]})},Ng=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),jB=e=>{const t=e.getInitialClientOffset(),n=e.getInitialSourceClientOffset();return t===null||n===null||t.x===void 0||t.y===void 0?{x:0,y:0}:Ng(t,n)},WB=(e,t)=>{const n=e.getClientOffset();if(n===null)return null;if(!t.current||!t.current.getBoundingClientRect)return Ng(n,jB(e));const r=t.current.getBoundingClientRect(),i={x:r.width/2,y:r.height/2};return Ng(n,i)},VB=()=>{const e=T.exports.useRef(null),{data:t,isDragging:n,currentOffset:r}=lF(i=>({data:i.getItem(),currentOffset:WB(i,e),isDragging:i.isDragging()}));return V(bn,{children:n&&r&&t.item&&V("div",{className:"item-drag-preview",ref:e,style:{transform:`translate(${r.x}px, ${r.y}px)`,backgroundImage:t.image}})})},qB=e=>{const[t,n]=be.useState(!1),r=be.useCallback(({key:l})=>{l===e&&n(!0)},[e]),i=be.useCallback(({key:l})=>{l===e&&n(!1)},[e]);return be.useEffect(()=>(window.addEventListener("keydown",r),window.addEventListener("keyup",i),()=>{window.removeEventListener("keydown",r),window.removeEventListener("keyup",i)}),[r,i]),t},GB=()=>{const e=ru(),t=qB("Shift");return T.exports.useEffect(()=>{e(x3(t))},[t,e]),V(bn,{})},KB=()=>{const e=ru(),t=vi();return Br("init",({locale:n,items:r,leftInventory:i,imagepath:l})=>{for(const s in n)ot[s]=n[s];for(const s in r)ct[s]=r[s];l3(l),e(QC({leftInventory:i}))}),cr("uiLoaded",{}),Br("closeInventory",()=>{t.dispatch({type:"dnd-core/END_DRAG"})}),we("div",{className:"app-wrapper",children:[V(HB,{}),V(VB,{}),V(GB,{})]})};addEventListener("dragstart",function(e){e.preventDefault()});const QB=(e=[])=>{const[t,n]=T.exports.useState(e);return{add:r=>{n(i=>[...i,r])},remove:()=>{let r;return n(([i,...l])=>(r=i,l)),r},get values(){return t},get first(){return t[0]},get last(){return t[t.length-1]},get size(){return t.length}}},YB=be.createContext(null),XB=be.forwardRef((e,t)=>{const n=e.item.item;return V("div",{className:"item-notification-item-box",style:{backgroundImage:`url(${zl(n)||"none"}`,...e.style},ref:t,children:we("div",{className:"item-slot-wrapper",children:[V("div",{className:"item-notification-action-box",children:V("p",{children:e.item.text})}),V("div",{className:"inventory-slot-label-box",children:V("div",{className:"inventory-slot-label-text",children:n.metadata?.label||ct[n.name]?.label})})]})})}),ZB=({children:e})=>{const t=QB(),n=r=>{const i=be.createRef(),l={id:Date.now(),item:r,ref:i};t.add(l);const s=setTimeout(()=>{t.remove(),clearTimeout(s)},2500)};return Br("itemNotify",([r,i,l])=>{n({item:r,text:l?`${ot[i]} ${l}x`:`${ot[i]}`})}),we(YB.Provider,{value:{add:n},children:[e,Vo.exports.createPortal(V(Pz,{className:"item-notification-container",children:t.values.map((r,i)=>V(__,{children:V(XB,{item:r.item,ref:r.ref})},`item-notification-${i}`))}),document.body)]})},$u=document.getElementById("root");GC()&&($u.style.backgroundImage='url("https://i.imgur.com/3pzRj9n.png")',$u.style.backgroundSize="cover",$u.style.backgroundRepeat="no-repeat",$u.style.backgroundPosition="center");aC($u).render(V(be.StrictMode,{children:V(fM,{store:Mn,children:V(FN,{backend:CF,options:{enableMouseEvents:!0},children:V(ZB,{children:V(KB,{})})})})})); diff --git a/server-data/resources/[ox]/ox_inventory/web/build/index.html b/server-data/resources/[ox]/ox_inventory/web/build/index.html index a991e4a41..d690375a3 100644 --- a/server-data/resources/[ox]/ox_inventory/web/build/index.html +++ b/server-data/resources/[ox]/ox_inventory/web/build/index.html @@ -1,20 +1,17 @@ - - - - - - - - NUI React Boilerplate - - - - - -
- - - - \ No newline at end of file + + + + + + + NUI React Boilerplate + + + + +
+ + +